diff options
author | Tejun Heo <tj@kernel.org> | 2012-11-06 15:26:23 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-11-06 15:26:23 -0500 |
commit | 5b805f2a7675634fbdf9ac1c9b2256905ab2ea68 (patch) | |
tree | ee00d1e3d757458d66209b926d274491c6c3f61c /arch | |
parent | 1db1e31b1ee3ae126ef98f39083b5f213c7b41bf (diff) | |
parent | 201e72acb2d3821e2de9ce6091e98859c316b29a (diff) |
Merge branch 'cgroup/for-3.7-fixes' into cgroup/for-3.8
This is to receive device_cgroup fixes so that further device_cgroup
changes can be made in cgroup/for-3.8.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch')
509 files changed, 5682 insertions, 4929 deletions
diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h index 4554ecbff7c6..1f8c72959fb6 100644 --- a/arch/alpha/include/asm/thread_info.h +++ b/arch/alpha/include/asm/thread_info.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <asm/processor.h> | 7 | #include <asm/processor.h> |
8 | #include <asm/types.h> | 8 | #include <asm/types.h> |
9 | #include <asm/hwrpb.h> | 9 | #include <asm/hwrpb.h> |
10 | #include <asm/sysinfo.h> | ||
10 | #endif | 11 | #endif |
11 | 12 | ||
12 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
@@ -21,6 +22,7 @@ struct thread_info { | |||
21 | mm_segment_t addr_limit; /* thread address space */ | 22 | mm_segment_t addr_limit; /* thread address space */ |
22 | unsigned cpu; /* current CPU */ | 23 | unsigned cpu; /* current CPU */ |
23 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 24 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
25 | unsigned int status; /* thread-synchronous flags */ | ||
24 | 26 | ||
25 | int bpt_nsaved; | 27 | int bpt_nsaved; |
26 | unsigned long bpt_addr[2]; /* breakpoint handling */ | 28 | unsigned long bpt_addr[2]; /* breakpoint handling */ |
@@ -63,8 +65,6 @@ register struct thread_info *__current_thread_info __asm__("$8"); | |||
63 | * - these are process state flags and used from assembly | 65 | * - these are process state flags and used from assembly |
64 | * - pending work-to-be-done flags come first and must be assigned to be | 66 | * - pending work-to-be-done flags come first and must be assigned to be |
65 | * within bits 0 to 7 to fit in and immediate operand. | 67 | * within bits 0 to 7 to fit in and immediate operand. |
66 | * - ALPHA_UAC_SHIFT below must be kept consistent with the unaligned | ||
67 | * control flags. | ||
68 | * | 68 | * |
69 | * TIF_SYSCALL_TRACE is known to be 0 via blbs. | 69 | * TIF_SYSCALL_TRACE is known to be 0 via blbs. |
70 | */ | 70 | */ |
@@ -72,18 +72,12 @@ register struct thread_info *__current_thread_info __asm__("$8"); | |||
72 | #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ | 72 | #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ |
73 | #define TIF_SIGPENDING 2 /* signal pending */ | 73 | #define TIF_SIGPENDING 2 /* signal pending */ |
74 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 74 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
75 | #define TIF_POLLING_NRFLAG 8 /* poll_idle is polling NEED_RESCHED */ | ||
76 | #define TIF_DIE_IF_KERNEL 9 /* dik recursion lock */ | 75 | #define TIF_DIE_IF_KERNEL 9 /* dik recursion lock */ |
77 | #define TIF_UAC_NOPRINT 10 /* ! Preserve sequence of following */ | ||
78 | #define TIF_UAC_NOFIX 11 /* ! flags as they match */ | ||
79 | #define TIF_UAC_SIGBUS 12 /* ! userspace part of 'osf_sysinfo' */ | ||
80 | #define TIF_MEMDIE 13 /* is terminating due to OOM killer */ | 76 | #define TIF_MEMDIE 13 /* is terminating due to OOM killer */ |
81 | #define TIF_RESTORE_SIGMASK 14 /* restore signal mask in do_signal */ | ||
82 | 77 | ||
83 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 78 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
84 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 79 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
85 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 80 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
86 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
87 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 81 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
88 | 82 | ||
89 | /* Work to do on interrupt/exception return. */ | 83 | /* Work to do on interrupt/exception return. */ |
@@ -94,29 +88,63 @@ register struct thread_info *__current_thread_info __asm__("$8"); | |||
94 | #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \ | 88 | #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \ |
95 | | _TIF_SYSCALL_TRACE) | 89 | | _TIF_SYSCALL_TRACE) |
96 | 90 | ||
97 | #define ALPHA_UAC_SHIFT TIF_UAC_NOPRINT | 91 | #define TS_UAC_NOPRINT 0x0001 /* ! Preserve the following three */ |
98 | #define ALPHA_UAC_MASK (1 << TIF_UAC_NOPRINT | 1 << TIF_UAC_NOFIX | \ | 92 | #define TS_UAC_NOFIX 0x0002 /* ! flags as they match */ |
99 | 1 << TIF_UAC_SIGBUS) | 93 | #define TS_UAC_SIGBUS 0x0004 /* ! userspace part of 'osf_sysinfo' */ |
94 | #define TS_RESTORE_SIGMASK 0x0008 /* restore signal mask in do_signal() */ | ||
95 | #define TS_POLLING 0x0010 /* idle task polling need_resched, | ||
96 | skip sending interrupt */ | ||
100 | 97 | ||
101 | #define SET_UNALIGN_CTL(task,value) ({ \ | 98 | #define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING) |
102 | task_thread_info(task)->flags = ((task_thread_info(task)->flags & \ | 99 | |
103 | ~ALPHA_UAC_MASK) \ | 100 | #ifndef __ASSEMBLY__ |
104 | | (((value) << ALPHA_UAC_SHIFT) & (1<<TIF_UAC_NOPRINT))\ | 101 | #define HAVE_SET_RESTORE_SIGMASK 1 |
105 | | (((value) << (ALPHA_UAC_SHIFT + 1)) & (1<<TIF_UAC_SIGBUS)) \ | 102 | static inline void set_restore_sigmask(void) |
106 | | (((value) << (ALPHA_UAC_SHIFT - 1)) & (1<<TIF_UAC_NOFIX)));\ | 103 | { |
104 | struct thread_info *ti = current_thread_info(); | ||
105 | ti->status |= TS_RESTORE_SIGMASK; | ||
106 | WARN_ON(!test_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags)); | ||
107 | } | ||
108 | static inline void clear_restore_sigmask(void) | ||
109 | { | ||
110 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; | ||
111 | } | ||
112 | static inline bool test_restore_sigmask(void) | ||
113 | { | ||
114 | return current_thread_info()->status & TS_RESTORE_SIGMASK; | ||
115 | } | ||
116 | static inline bool test_and_clear_restore_sigmask(void) | ||
117 | { | ||
118 | struct thread_info *ti = current_thread_info(); | ||
119 | if (!(ti->status & TS_RESTORE_SIGMASK)) | ||
120 | return false; | ||
121 | ti->status &= ~TS_RESTORE_SIGMASK; | ||
122 | return true; | ||
123 | } | ||
124 | #endif | ||
125 | |||
126 | #define SET_UNALIGN_CTL(task,value) ({ \ | ||
127 | __u32 status = task_thread_info(task)->status & ~UAC_BITMASK; \ | ||
128 | if (value & PR_UNALIGN_NOPRINT) \ | ||
129 | status |= TS_UAC_NOPRINT; \ | ||
130 | if (value & PR_UNALIGN_SIGBUS) \ | ||
131 | status |= TS_UAC_SIGBUS; \ | ||
132 | if (value & 4) /* alpha-specific */ \ | ||
133 | status |= TS_UAC_NOFIX; \ | ||
134 | task_thread_info(task)->status = status; \ | ||
107 | 0; }) | 135 | 0; }) |
108 | 136 | ||
109 | #define GET_UNALIGN_CTL(task,value) ({ \ | 137 | #define GET_UNALIGN_CTL(task,value) ({ \ |
110 | put_user((task_thread_info(task)->flags & (1 << TIF_UAC_NOPRINT))\ | 138 | __u32 status = task_thread_info(task)->status & ~UAC_BITMASK; \ |
111 | >> ALPHA_UAC_SHIFT \ | 139 | __u32 res = 0; \ |
112 | | (task_thread_info(task)->flags & (1 << TIF_UAC_SIGBUS))\ | 140 | if (status & TS_UAC_NOPRINT) \ |
113 | >> (ALPHA_UAC_SHIFT + 1) \ | 141 | res |= PR_UNALIGN_NOPRINT; \ |
114 | | (task_thread_info(task)->flags & (1 << TIF_UAC_NOFIX))\ | 142 | if (status & TS_UAC_SIGBUS) \ |
115 | >> (ALPHA_UAC_SHIFT - 1), \ | 143 | res |= PR_UNALIGN_SIGBUS; \ |
116 | (int __user *)(value)); \ | 144 | if (status & TS_UAC_NOFIX) \ |
145 | res |= 4; \ | ||
146 | put_user(res, (int __user *)(value)); \ | ||
117 | }) | 147 | }) |
118 | 148 | ||
119 | #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) | ||
120 | |||
121 | #endif /* __KERNEL__ */ | 149 | #endif /* __KERNEL__ */ |
122 | #endif /* _ALPHA_THREAD_INFO_H */ | 150 | #endif /* _ALPHA_THREAD_INFO_H */ |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 9eb090582cf1..1e6956a90608 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -793,8 +793,7 @@ SYSCALL_DEFINE5(osf_getsysinfo, unsigned long, op, void __user *, buffer, | |||
793 | case GSI_UACPROC: | 793 | case GSI_UACPROC: |
794 | if (nbytes < sizeof(unsigned int)) | 794 | if (nbytes < sizeof(unsigned int)) |
795 | return -EINVAL; | 795 | return -EINVAL; |
796 | w = (current_thread_info()->flags >> ALPHA_UAC_SHIFT) & | 796 | w = current_thread_info()->status & UAC_BITMASK; |
797 | UAC_BITMASK; | ||
798 | if (put_user(w, (unsigned int __user *)buffer)) | 797 | if (put_user(w, (unsigned int __user *)buffer)) |
799 | return -EFAULT; | 798 | return -EFAULT; |
800 | return 1; | 799 | return 1; |
@@ -904,24 +903,20 @@ SYSCALL_DEFINE5(osf_setsysinfo, unsigned long, op, void __user *, buffer, | |||
904 | break; | 903 | break; |
905 | 904 | ||
906 | case SSI_NVPAIRS: { | 905 | case SSI_NVPAIRS: { |
907 | unsigned long v, w, i; | 906 | unsigned __user *p = buffer; |
908 | unsigned int old, new; | 907 | unsigned i; |
909 | 908 | ||
910 | for (i = 0; i < nbytes; ++i) { | 909 | for (i = 0, p = buffer; i < nbytes; ++i, p += 2) { |
910 | unsigned v, w, status; | ||
911 | 911 | ||
912 | if (get_user(v, 2*i + (unsigned int __user *)buffer)) | 912 | if (get_user(v, p) || get_user(w, p + 1)) |
913 | return -EFAULT; | ||
914 | if (get_user(w, 2*i + 1 + (unsigned int __user *)buffer)) | ||
915 | return -EFAULT; | 913 | return -EFAULT; |
916 | switch (v) { | 914 | switch (v) { |
917 | case SSIN_UACPROC: | 915 | case SSIN_UACPROC: |
918 | again: | 916 | w &= UAC_BITMASK; |
919 | old = current_thread_info()->flags; | 917 | status = current_thread_info()->status; |
920 | new = old & ~(UAC_BITMASK << ALPHA_UAC_SHIFT); | 918 | status = (status & ~UAC_BITMASK) | w; |
921 | new = new | (w & UAC_BITMASK) << ALPHA_UAC_SHIFT; | 919 | current_thread_info()->status = status; |
922 | if (cmpxchg(¤t_thread_info()->flags, | ||
923 | old, new) != old) | ||
924 | goto again; | ||
925 | break; | 920 | break; |
926 | 921 | ||
927 | default: | 922 | default: |
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 4054e0ffe2b2..51987dcf79b8 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(pm_power_off); | |||
49 | void | 49 | void |
50 | cpu_idle(void) | 50 | cpu_idle(void) |
51 | { | 51 | { |
52 | set_thread_flag(TIF_POLLING_NRFLAG); | 52 | current_thread_info()->status |= TS_POLLING; |
53 | 53 | ||
54 | while (1) { | 54 | while (1) { |
55 | /* FIXME -- EV6 and LCA45 know how to power down | 55 | /* FIXME -- EV6 and LCA45 know how to power down |
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c index 80d987c0e9aa..272666d006df 100644 --- a/arch/alpha/kernel/traps.c +++ b/arch/alpha/kernel/traps.c | |||
@@ -780,17 +780,17 @@ do_entUnaUser(void __user * va, unsigned long opcode, | |||
780 | /* Check the UAC bits to decide what the user wants us to do | 780 | /* Check the UAC bits to decide what the user wants us to do |
781 | with the unaliged access. */ | 781 | with the unaliged access. */ |
782 | 782 | ||
783 | if (!test_thread_flag (TIF_UAC_NOPRINT)) { | 783 | if (!(current_thread_info()->status & TS_UAC_NOPRINT)) { |
784 | if (__ratelimit(&ratelimit)) { | 784 | if (__ratelimit(&ratelimit)) { |
785 | printk("%s(%d): unaligned trap at %016lx: %p %lx %ld\n", | 785 | printk("%s(%d): unaligned trap at %016lx: %p %lx %ld\n", |
786 | current->comm, task_pid_nr(current), | 786 | current->comm, task_pid_nr(current), |
787 | regs->pc - 4, va, opcode, reg); | 787 | regs->pc - 4, va, opcode, reg); |
788 | } | 788 | } |
789 | } | 789 | } |
790 | if (test_thread_flag (TIF_UAC_SIGBUS)) | 790 | if ((current_thread_info()->status & TS_UAC_SIGBUS)) |
791 | goto give_sigbus; | 791 | goto give_sigbus; |
792 | /* Not sure why you'd want to use this, but... */ | 792 | /* Not sure why you'd want to use this, but... */ |
793 | if (test_thread_flag (TIF_UAC_NOFIX)) | 793 | if ((current_thread_info()->status & TS_UAC_NOFIX)) |
794 | return; | 794 | return; |
795 | 795 | ||
796 | /* Don't bother reading ds in the access check since we already | 796 | /* Don't bother reading ds in the access check since we already |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 73067efd4845..ade7e924bef5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1603,8 +1603,8 @@ config NR_CPUS | |||
1603 | default "4" | 1603 | default "4" |
1604 | 1604 | ||
1605 | config HOTPLUG_CPU | 1605 | config HOTPLUG_CPU |
1606 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" | 1606 | bool "Support for hot-pluggable CPUs" |
1607 | depends on SMP && HOTPLUG && EXPERIMENTAL | 1607 | depends on SMP && HOTPLUG |
1608 | help | 1608 | help |
1609 | Say Y here to experiment with turning CPUs off and on. CPUs | 1609 | Say Y here to experiment with turning CPUs off and on. CPUs |
1610 | can be controlled through /sys/devices/system/cpu. | 1610 | can be controlled through /sys/devices/system/cpu. |
@@ -1645,8 +1645,8 @@ config HZ | |||
1645 | default 100 | 1645 | default 100 |
1646 | 1646 | ||
1647 | config THUMB2_KERNEL | 1647 | config THUMB2_KERNEL |
1648 | bool "Compile the kernel in Thumb-2 mode (EXPERIMENTAL)" | 1648 | bool "Compile the kernel in Thumb-2 mode" |
1649 | depends on CPU_V7 && !CPU_V6 && !CPU_V6K && EXPERIMENTAL | 1649 | depends on CPU_V7 && !CPU_V6 && !CPU_V6K |
1650 | select AEABI | 1650 | select AEABI |
1651 | select ARM_ASM_UNIFIED | 1651 | select ARM_ASM_UNIFIED |
1652 | select ARM_UNWIND | 1652 | select ARM_UNWIND |
@@ -1850,6 +1850,7 @@ config XEN_DOM0 | |||
1850 | config XEN | 1850 | config XEN |
1851 | bool "Xen guest support on ARM (EXPERIMENTAL)" | 1851 | bool "Xen guest support on ARM (EXPERIMENTAL)" |
1852 | depends on EXPERIMENTAL && ARM && OF | 1852 | depends on EXPERIMENTAL && ARM && OF |
1853 | depends on CPU_V7 && !CPU_V6 | ||
1853 | help | 1854 | help |
1854 | Say Y if you want to run Linux in a Virtual Machine on Xen on ARM. | 1855 | Say Y if you want to run Linux in a Virtual Machine on Xen on ARM. |
1855 | 1856 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index f023e3acdfbd..5f914fca911b 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -21,8 +21,6 @@ endif | |||
21 | OBJCOPYFLAGS :=-O binary -R .comment -S | 21 | OBJCOPYFLAGS :=-O binary -R .comment -S |
22 | GZFLAGS :=-9 | 22 | GZFLAGS :=-9 |
23 | #KBUILD_CFLAGS +=-pipe | 23 | #KBUILD_CFLAGS +=-pipe |
24 | # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: | ||
25 | KBUILD_CFLAGS +=$(call cc-option,-marm,) | ||
26 | 24 | ||
27 | # Never generate .eh_frame | 25 | # Never generate .eh_frame |
28 | KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) | 26 | KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) |
@@ -105,17 +103,20 @@ endif | |||
105 | ifeq ($(CONFIG_THUMB2_KERNEL),y) | 103 | ifeq ($(CONFIG_THUMB2_KERNEL),y) |
106 | AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) | 104 | AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) |
107 | AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) | 105 | AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) |
108 | CFLAGS_THUMB2 :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) | 106 | CFLAGS_ISA :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) |
109 | AFLAGS_THUMB2 :=$(CFLAGS_THUMB2) -Wa$(comma)-mthumb | 107 | AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb |
110 | # Work around buggy relocation from gas if requested: | 108 | # Work around buggy relocation from gas if requested: |
111 | ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) | 109 | ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) |
112 | CFLAGS_MODULE +=-fno-optimize-sibling-calls | 110 | CFLAGS_MODULE +=-fno-optimize-sibling-calls |
113 | endif | 111 | endif |
112 | else | ||
113 | CFLAGS_ISA :=$(call cc-option,-marm,) | ||
114 | AFLAGS_ISA :=$(CFLAGS_ISA) | ||
114 | endif | 115 | endif |
115 | 116 | ||
116 | # Need -Uarm for gcc < 3.x | 117 | # Need -Uarm for gcc < 3.x |
117 | KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_THUMB2) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm | 118 | KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm |
118 | KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_THUMB2) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float | 119 | KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float |
119 | 120 | ||
120 | CHECKFLAGS += -D__arm__ | 121 | CHECKFLAGS += -D__arm__ |
121 | 122 | ||
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 3fdab016aa5c..f2aa09eb658e 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -33,7 +33,7 @@ ifeq ($(CONFIG_XIP_KERNEL),y) | |||
33 | 33 | ||
34 | $(obj)/xipImage: vmlinux FORCE | 34 | $(obj)/xipImage: vmlinux FORCE |
35 | $(call if_changed,objcopy) | 35 | $(call if_changed,objcopy) |
36 | @echo ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' | 36 | $(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' |
37 | 37 | ||
38 | $(obj)/Image $(obj)/zImage: FORCE | 38 | $(obj)/Image $(obj)/zImage: FORCE |
39 | @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)' | 39 | @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)' |
@@ -48,14 +48,14 @@ $(obj)/xipImage: FORCE | |||
48 | 48 | ||
49 | $(obj)/Image: vmlinux FORCE | 49 | $(obj)/Image: vmlinux FORCE |
50 | $(call if_changed,objcopy) | 50 | $(call if_changed,objcopy) |
51 | @echo ' Kernel: $@ is ready' | 51 | $(kecho) ' Kernel: $@ is ready' |
52 | 52 | ||
53 | $(obj)/compressed/vmlinux: $(obj)/Image FORCE | 53 | $(obj)/compressed/vmlinux: $(obj)/Image FORCE |
54 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ | 54 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ |
55 | 55 | ||
56 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE | 56 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE |
57 | $(call if_changed,objcopy) | 57 | $(call if_changed,objcopy) |
58 | @echo ' Kernel: $@ is ready' | 58 | $(kecho) ' Kernel: $@ is ready' |
59 | 59 | ||
60 | endif | 60 | endif |
61 | 61 | ||
@@ -90,7 +90,7 @@ fi | |||
90 | $(obj)/uImage: $(obj)/zImage FORCE | 90 | $(obj)/uImage: $(obj)/zImage FORCE |
91 | @$(check_for_multiple_loadaddr) | 91 | @$(check_for_multiple_loadaddr) |
92 | $(call if_changed,uimage) | 92 | $(call if_changed,uimage) |
93 | @echo ' Image $@ is ready' | 93 | $(kecho) ' Image $@ is ready' |
94 | 94 | ||
95 | $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE | 95 | $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE |
96 | $(Q)$(MAKE) $(build)=$(obj)/bootp $@ | 96 | $(Q)$(MAKE) $(build)=$(obj)/bootp $@ |
@@ -98,7 +98,7 @@ $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE | |||
98 | 98 | ||
99 | $(obj)/bootpImage: $(obj)/bootp/bootp FORCE | 99 | $(obj)/bootpImage: $(obj)/bootp/bootp FORCE |
100 | $(call if_changed,objcopy) | 100 | $(call if_changed,objcopy) |
101 | @echo ' Kernel: $@ is ready' | 101 | $(kecho) ' Kernel: $@ is ready' |
102 | 102 | ||
103 | PHONY += initrd FORCE | 103 | PHONY += initrd FORCE |
104 | initrd: | 104 | initrd: |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index c1ce813fcc4a..f37cf9fa5fa0 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -25,6 +25,8 @@ dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ | |||
25 | exynos4210-trats.dtb \ | 25 | exynos4210-trats.dtb \ |
26 | exynos5250-smdk5250.dtb | 26 | exynos5250-smdk5250.dtb |
27 | dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb | 27 | dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb |
28 | dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ | ||
29 | integratorcp.dtb | ||
28 | dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb | 30 | dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb |
29 | dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ | 31 | dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ |
30 | kirkwood-dns325.dtb \ | 32 | kirkwood-dns325.dtb \ |
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi index b06c0db273b1..e6391a4e6649 100644 --- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi +++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi | |||
@@ -126,14 +126,14 @@ | |||
126 | #size-cells = <0>; | 126 | #size-cells = <0>; |
127 | 127 | ||
128 | btn3 { | 128 | btn3 { |
129 | label = "Buttin 3"; | 129 | label = "Button 3"; |
130 | gpios = <&pioA 30 1>; | 130 | gpios = <&pioA 30 1>; |
131 | linux,code = <0x103>; | 131 | linux,code = <0x103>; |
132 | gpio-key,wakeup; | 132 | gpio-key,wakeup; |
133 | }; | 133 | }; |
134 | 134 | ||
135 | btn4 { | 135 | btn4 { |
136 | label = "Buttin 4"; | 136 | label = "Button 4"; |
137 | gpios = <&pioA 31 1>; | 137 | gpios = <&pioA 31 1>; |
138 | linux,code = <0x104>; | 138 | linux,code = <0x104>; |
139 | gpio-key,wakeup; | 139 | gpio-key,wakeup; |
diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 748ba7aa746c..4b0e0ca08f40 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi | |||
@@ -483,6 +483,8 @@ | |||
483 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; | 483 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
484 | reg = <0x80004000 0x1000>; | 484 | reg = <0x80004000 0x1000>; |
485 | interrupts = <0 21 0x4>; | 485 | interrupts = <0 21 0x4>; |
486 | arm,primecell-periphid = <0x180024>; | ||
487 | |||
486 | #address-cells = <1>; | 488 | #address-cells = <1>; |
487 | #size-cells = <0>; | 489 | #size-cells = <0>; |
488 | v-i2c-supply = <&db8500_vape_reg>; | 490 | v-i2c-supply = <&db8500_vape_reg>; |
@@ -494,6 +496,8 @@ | |||
494 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; | 496 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
495 | reg = <0x80122000 0x1000>; | 497 | reg = <0x80122000 0x1000>; |
496 | interrupts = <0 22 0x4>; | 498 | interrupts = <0 22 0x4>; |
499 | arm,primecell-periphid = <0x180024>; | ||
500 | |||
497 | #address-cells = <1>; | 501 | #address-cells = <1>; |
498 | #size-cells = <0>; | 502 | #size-cells = <0>; |
499 | v-i2c-supply = <&db8500_vape_reg>; | 503 | v-i2c-supply = <&db8500_vape_reg>; |
@@ -505,6 +509,8 @@ | |||
505 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; | 509 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
506 | reg = <0x80128000 0x1000>; | 510 | reg = <0x80128000 0x1000>; |
507 | interrupts = <0 55 0x4>; | 511 | interrupts = <0 55 0x4>; |
512 | arm,primecell-periphid = <0x180024>; | ||
513 | |||
508 | #address-cells = <1>; | 514 | #address-cells = <1>; |
509 | #size-cells = <0>; | 515 | #size-cells = <0>; |
510 | v-i2c-supply = <&db8500_vape_reg>; | 516 | v-i2c-supply = <&db8500_vape_reg>; |
@@ -516,6 +522,8 @@ | |||
516 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; | 522 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
517 | reg = <0x80110000 0x1000>; | 523 | reg = <0x80110000 0x1000>; |
518 | interrupts = <0 12 0x4>; | 524 | interrupts = <0 12 0x4>; |
525 | arm,primecell-periphid = <0x180024>; | ||
526 | |||
519 | #address-cells = <1>; | 527 | #address-cells = <1>; |
520 | #size-cells = <0>; | 528 | #size-cells = <0>; |
521 | v-i2c-supply = <&db8500_vape_reg>; | 529 | v-i2c-supply = <&db8500_vape_reg>; |
@@ -527,6 +535,8 @@ | |||
527 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; | 535 | compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; |
528 | reg = <0x8012a000 0x1000>; | 536 | reg = <0x8012a000 0x1000>; |
529 | interrupts = <0 51 0x4>; | 537 | interrupts = <0 51 0x4>; |
538 | arm,primecell-periphid = <0x180024>; | ||
539 | |||
530 | #address-cells = <1>; | 540 | #address-cells = <1>; |
531 | #size-cells = <0>; | 541 | #size-cells = <0>; |
532 | v-i2c-supply = <&db8500_vape_reg>; | 542 | v-i2c-supply = <&db8500_vape_reg>; |
@@ -573,33 +583,38 @@ | |||
573 | interrupts = <0 60 0x4>; | 583 | interrupts = <0 60 0x4>; |
574 | status = "disabled"; | 584 | status = "disabled"; |
575 | }; | 585 | }; |
586 | |||
576 | sdi@80118000 { | 587 | sdi@80118000 { |
577 | compatible = "arm,pl18x", "arm,primecell"; | 588 | compatible = "arm,pl18x", "arm,primecell"; |
578 | reg = <0x80118000 0x1000>; | 589 | reg = <0x80118000 0x1000>; |
579 | interrupts = <0 50 0x4>; | 590 | interrupts = <0 50 0x4>; |
580 | status = "disabled"; | 591 | status = "disabled"; |
581 | }; | 592 | }; |
593 | |||
582 | sdi@80005000 { | 594 | sdi@80005000 { |
583 | compatible = "arm,pl18x", "arm,primecell"; | 595 | compatible = "arm,pl18x", "arm,primecell"; |
584 | reg = <0x80005000 0x1000>; | 596 | reg = <0x80005000 0x1000>; |
585 | interrupts = <0 41 0x4>; | 597 | interrupts = <0 41 0x4>; |
586 | status = "disabled"; | 598 | status = "disabled"; |
587 | }; | 599 | }; |
600 | |||
588 | sdi@80119000 { | 601 | sdi@80119000 { |
589 | compatible = "arm,pl18x", "arm,primecell"; | 602 | compatible = "arm,pl18x", "arm,primecell"; |
590 | reg = <0x80119000 0x1000>; | 603 | reg = <0x80119000 0x1000>; |
591 | interrupts = <0 59 0x4>; | 604 | interrupts = <0 59 0x4>; |
592 | status = "disabled"; | 605 | status = "disabled"; |
593 | }; | 606 | }; |
607 | |||
594 | sdi@80114000 { | 608 | sdi@80114000 { |
595 | compatible = "arm,pl18x", "arm,primecell"; | 609 | compatible = "arm,pl18x", "arm,primecell"; |
596 | reg = <0x80114000 0x1000>; | 610 | reg = <0x80114000 0x1000>; |
597 | interrupts = <0 99 0x4>; | 611 | interrupts = <0 99 0x4>; |
598 | status = "disabled"; | 612 | status = "disabled"; |
599 | }; | 613 | }; |
614 | |||
600 | sdi@80008000 { | 615 | sdi@80008000 { |
601 | compatible = "arm,pl18x", "arm,primecell"; | 616 | compatible = "arm,pl18x", "arm,primecell"; |
602 | reg = <0x80114000 0x1000>; | 617 | reg = <0x80008000 0x1000>; |
603 | interrupts = <0 100 0x4>; | 618 | interrupts = <0 100 0x4>; |
604 | status = "disabled"; | 619 | status = "disabled"; |
605 | }; | 620 | }; |
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi index 96fb824b5e6e..5a00022383e7 100644 --- a/arch/arm/boot/dts/dove.dtsi +++ b/arch/arm/boot/dts/dove.dtsi | |||
@@ -4,21 +4,32 @@ | |||
4 | compatible = "marvell,dove"; | 4 | compatible = "marvell,dove"; |
5 | model = "Marvell Armada 88AP510 SoC"; | 5 | model = "Marvell Armada 88AP510 SoC"; |
6 | 6 | ||
7 | interrupt-parent = <&intc>; | 7 | soc@f1000000 { |
8 | |||
9 | intc: interrupt-controller { | ||
10 | compatible = "marvell,orion-intc"; | ||
11 | interrupt-controller; | ||
12 | #interrupt-cells = <1>; | ||
13 | reg = <0xf1020204 0x04>, | ||
14 | <0xf1020214 0x04>; | ||
15 | }; | ||
16 | |||
17 | mbus@f1000000 { | ||
18 | compatible = "simple-bus"; | 8 | compatible = "simple-bus"; |
19 | ranges = <0 0xf1000000 0x4000000>; | ||
20 | #address-cells = <1>; | 9 | #address-cells = <1>; |
21 | #size-cells = <1>; | 10 | #size-cells = <1>; |
11 | interrupt-parent = <&intc>; | ||
12 | |||
13 | ranges = <0xc8000000 0xc8000000 0x0100000 /* CESA SRAM 1M */ | ||
14 | 0xe0000000 0xe0000000 0x8000000 /* PCIe0 Mem 128M */ | ||
15 | 0xe8000000 0xe8000000 0x8000000 /* PCIe1 Mem 128M */ | ||
16 | 0xf0000000 0xf0000000 0x0100000 /* ScratchPad 1M */ | ||
17 | 0x00000000 0xf1000000 0x1000000 /* SB/NB regs 16M */ | ||
18 | 0xf2000000 0xf2000000 0x0100000 /* PCIe0 I/O 1M */ | ||
19 | 0xf2100000 0xf2100000 0x0100000 /* PCIe0 I/O 1M */ | ||
20 | 0xf8000000 0xf8000000 0x8000000>; /* BootROM 128M */ | ||
21 | |||
22 | l2: l2-cache { | ||
23 | compatible = "marvell,tauros2-cache"; | ||
24 | marvell,tauros2-cache-features = <0>; | ||
25 | }; | ||
26 | |||
27 | intc: interrupt-controller { | ||
28 | compatible = "marvell,orion-intc"; | ||
29 | interrupt-controller; | ||
30 | #interrupt-cells = <1>; | ||
31 | reg = <0x20204 0x04>, <0x20214 0x04>; | ||
32 | }; | ||
22 | 33 | ||
23 | uart0: serial@12000 { | 34 | uart0: serial@12000 { |
24 | compatible = "ns16550a"; | 35 | compatible = "ns16550a"; |
@@ -56,11 +67,6 @@ | |||
56 | status = "disabled"; | 67 | status = "disabled"; |
57 | }; | 68 | }; |
58 | 69 | ||
59 | wdt: wdt@20300 { | ||
60 | compatible = "marvell,orion-wdt"; | ||
61 | reg = <0x20300 0x28>; | ||
62 | }; | ||
63 | |||
64 | gpio0: gpio@d0400 { | 70 | gpio0: gpio@d0400 { |
65 | compatible = "marvell,orion-gpio"; | 71 | compatible = "marvell,orion-gpio"; |
66 | #gpio-cells = <2>; | 72 | #gpio-cells = <2>; |
@@ -139,5 +145,14 @@ | |||
139 | nr-ports = <1>; | 145 | nr-ports = <1>; |
140 | status = "disabled"; | 146 | status = "disabled"; |
141 | }; | 147 | }; |
148 | |||
149 | crypto: crypto@30000 { | ||
150 | compatible = "marvell,orion-crypto"; | ||
151 | reg = <0x30000 0x10000>, | ||
152 | <0xc8000000 0x800>; | ||
153 | reg-names = "regs", "sram"; | ||
154 | interrupts = <31>; | ||
155 | status = "okay"; | ||
156 | }; | ||
142 | }; | 157 | }; |
143 | }; | 158 | }; |
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts index 73567b843e72..a21511c14071 100644 --- a/arch/arm/boot/dts/exynos4210-trats.dts +++ b/arch/arm/boot/dts/exynos4210-trats.dts | |||
@@ -20,8 +20,10 @@ | |||
20 | compatible = "samsung,trats", "samsung,exynos4210"; | 20 | compatible = "samsung,trats", "samsung,exynos4210"; |
21 | 21 | ||
22 | memory { | 22 | memory { |
23 | reg = <0x40000000 0x20000000 | 23 | reg = <0x40000000 0x10000000 |
24 | 0x60000000 0x20000000>; | 24 | 0x50000000 0x10000000 |
25 | 0x60000000 0x10000000 | ||
26 | 0x70000000 0x10000000>; | ||
25 | }; | 27 | }; |
26 | 28 | ||
27 | chosen { | 29 | chosen { |
diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi index 9ca4ca70c1bc..6d31aa383460 100644 --- a/arch/arm/boot/dts/imx23.dtsi +++ b/arch/arm/boot/dts/imx23.dtsi | |||
@@ -69,6 +69,7 @@ | |||
69 | interrupts = <13>, <56>; | 69 | interrupts = <13>, <56>; |
70 | interrupt-names = "gpmi-dma", "bch"; | 70 | interrupt-names = "gpmi-dma", "bch"; |
71 | clocks = <&clks 34>; | 71 | clocks = <&clks 34>; |
72 | clock-names = "gpmi_io"; | ||
72 | fsl,gpmi-dma-channel = <4>; | 73 | fsl,gpmi-dma-channel = <4>; |
73 | status = "disabled"; | 74 | status = "disabled"; |
74 | }; | 75 | }; |
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index e16d63155480..55c57ea6169e 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi | |||
@@ -85,6 +85,7 @@ | |||
85 | interrupts = <88>, <41>; | 85 | interrupts = <88>, <41>; |
86 | interrupt-names = "gpmi-dma", "bch"; | 86 | interrupt-names = "gpmi-dma", "bch"; |
87 | clocks = <&clks 50>; | 87 | clocks = <&clks 50>; |
88 | clock-names = "gpmi_io"; | ||
88 | fsl,gpmi-dma-channel = <4>; | 89 | fsl,gpmi-dma-channel = <4>; |
89 | status = "disabled"; | 90 | status = "disabled"; |
90 | }; | 91 | }; |
diff --git a/arch/arm/boot/dts/imx6q-arm2.dts b/arch/arm/boot/dts/imx6q-arm2.dts index 15df4c105e89..5bfa02a3f85c 100644 --- a/arch/arm/boot/dts/imx6q-arm2.dts +++ b/arch/arm/boot/dts/imx6q-arm2.dts | |||
@@ -37,6 +37,13 @@ | |||
37 | pinctrl_hog: hoggrp { | 37 | pinctrl_hog: hoggrp { |
38 | fsl,pins = < | 38 | fsl,pins = < |
39 | 176 0x80000000 /* MX6Q_PAD_EIM_D25__GPIO_3_25 */ | 39 | 176 0x80000000 /* MX6Q_PAD_EIM_D25__GPIO_3_25 */ |
40 | >; | ||
41 | }; | ||
42 | }; | ||
43 | |||
44 | arm2 { | ||
45 | pinctrl_usdhc3_arm2: usdhc3grp-arm2 { | ||
46 | fsl,pins = < | ||
40 | 1363 0x80000000 /* MX6Q_PAD_NANDF_CS0__GPIO_6_11 */ | 47 | 1363 0x80000000 /* MX6Q_PAD_NANDF_CS0__GPIO_6_11 */ |
41 | 1369 0x80000000 /* MX6Q_PAD_NANDF_CS1__GPIO_6_14 */ | 48 | 1369 0x80000000 /* MX6Q_PAD_NANDF_CS1__GPIO_6_14 */ |
42 | >; | 49 | >; |
@@ -58,7 +65,8 @@ | |||
58 | wp-gpios = <&gpio6 14 0>; | 65 | wp-gpios = <&gpio6 14 0>; |
59 | vmmc-supply = <®_3p3v>; | 66 | vmmc-supply = <®_3p3v>; |
60 | pinctrl-names = "default"; | 67 | pinctrl-names = "default"; |
61 | pinctrl-0 = <&pinctrl_usdhc3_1>; | 68 | pinctrl-0 = <&pinctrl_usdhc3_1 |
69 | &pinctrl_usdhc3_arm2>; | ||
62 | status = "okay"; | 70 | status = "okay"; |
63 | }; | 71 | }; |
64 | 72 | ||
diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi index 8ac51c08269d..8fea375c734d 100644 --- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi +++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi | |||
@@ -48,17 +48,19 @@ | |||
48 | #size-cells = <0>; | 48 | #size-cells = <0>; |
49 | button@1 { | 49 | button@1 { |
50 | label = "Function Button"; | 50 | label = "Function Button"; |
51 | linux,code = <132>; | 51 | linux,code = <357>; |
52 | gpios = <&gpio1 9 1>; | 52 | gpios = <&gpio1 9 1>; |
53 | }; | 53 | }; |
54 | button@2 { | 54 | button@2 { |
55 | label = "Power-on Switch"; | 55 | label = "Power-on Switch"; |
56 | linux,code = <116>; | 56 | linux,code = <0>; |
57 | linux,input-type = <5>; | ||
57 | gpios = <&gpio1 10 1>; | 58 | gpios = <&gpio1 10 1>; |
58 | }; | 59 | }; |
59 | button@3 { | 60 | button@3 { |
60 | label = "Power-auto Switch"; | 61 | label = "Power-auto Switch"; |
61 | linux,code = <142>; | 62 | linux,code = <1>; |
63 | linux,input-type = <5>; | ||
62 | gpios = <&gpio1 11 1>; | 64 | gpios = <&gpio1 11 1>; |
63 | }; | 65 | }; |
64 | }; | 66 | }; |
@@ -67,28 +69,28 @@ | |||
67 | compatible = "gpio-leds"; | 69 | compatible = "gpio-leds"; |
68 | 70 | ||
69 | led@1 { | 71 | led@1 { |
70 | label = "lschlv2:blue:func"; | 72 | label = "lsxl:blue:func"; |
71 | gpios = <&gpio1 4 1>; | 73 | gpios = <&gpio1 4 1>; |
72 | }; | 74 | }; |
73 | 75 | ||
74 | led@2 { | 76 | led@2 { |
75 | label = "lschlv2:red:alarm"; | 77 | label = "lsxl:red:alarm"; |
76 | gpios = <&gpio1 5 1>; | 78 | gpios = <&gpio1 5 1>; |
77 | }; | 79 | }; |
78 | 80 | ||
79 | led@3 { | 81 | led@3 { |
80 | label = "lschlv2:amber:info"; | 82 | label = "lsxl:amber:info"; |
81 | gpios = <&gpio1 6 1>; | 83 | gpios = <&gpio1 6 1>; |
82 | }; | 84 | }; |
83 | 85 | ||
84 | led@4 { | 86 | led@4 { |
85 | label = "lschlv2:blue:power"; | 87 | label = "lsxl:blue:power"; |
86 | gpios = <&gpio1 7 1>; | 88 | gpios = <&gpio1 7 1>; |
87 | linux,default-trigger = "default-on"; | 89 | linux,default-trigger = "default-on"; |
88 | }; | 90 | }; |
89 | 91 | ||
90 | led@5 { | 92 | led@5 { |
91 | label = "lschlv2:red:func"; | 93 | label = "lsxl:red:func"; |
92 | gpios = <&gpio1 16 1>; | 94 | gpios = <&gpio1 16 1>; |
93 | }; | 95 | }; |
94 | }; | 96 | }; |
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index f38ea8771b44..696e929d0304 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
@@ -257,7 +257,7 @@ | |||
257 | interrupt-names = "common", "tx", "rx", "sidetone"; | 257 | interrupt-names = "common", "tx", "rx", "sidetone"; |
258 | interrupt-parent = <&intc>; | 258 | interrupt-parent = <&intc>; |
259 | ti,buffer-size = <1280>; | 259 | ti,buffer-size = <1280>; |
260 | ti,hwmods = "mcbsp2"; | 260 | ti,hwmods = "mcbsp2", "mcbsp2_sidetone"; |
261 | }; | 261 | }; |
262 | 262 | ||
263 | mcbsp3: mcbsp@49024000 { | 263 | mcbsp3: mcbsp@49024000 { |
@@ -272,7 +272,7 @@ | |||
272 | interrupt-names = "common", "tx", "rx", "sidetone"; | 272 | interrupt-names = "common", "tx", "rx", "sidetone"; |
273 | interrupt-parent = <&intc>; | 273 | interrupt-parent = <&intc>; |
274 | ti,buffer-size = <128>; | 274 | ti,buffer-size = <128>; |
275 | ti,hwmods = "mcbsp3"; | 275 | ti,hwmods = "mcbsp3", "mcbsp3_sidetone"; |
276 | }; | 276 | }; |
277 | 277 | ||
278 | mcbsp4: mcbsp@49026000 { | 278 | mcbsp4: mcbsp@49026000 { |
diff --git a/arch/arm/boot/dts/wm8505.dtsi b/arch/arm/boot/dts/wm8505.dtsi index b459691655ab..330f833ac3b0 100644 --- a/arch/arm/boot/dts/wm8505.dtsi +++ b/arch/arm/boot/dts/wm8505.dtsi | |||
@@ -71,13 +71,13 @@ | |||
71 | ehci@d8007100 { | 71 | ehci@d8007100 { |
72 | compatible = "via,vt8500-ehci"; | 72 | compatible = "via,vt8500-ehci"; |
73 | reg = <0xd8007100 0x200>; | 73 | reg = <0xd8007100 0x200>; |
74 | interrupts = <43>; | 74 | interrupts = <1>; |
75 | }; | 75 | }; |
76 | 76 | ||
77 | uhci@d8007300 { | 77 | uhci@d8007300 { |
78 | compatible = "platform-uhci"; | 78 | compatible = "platform-uhci"; |
79 | reg = <0xd8007300 0x200>; | 79 | reg = <0xd8007300 0x200>; |
80 | interrupts = <43>; | 80 | interrupts = <0>; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | fb@d8050800 { | 83 | fb@d8050800 { |
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 66aa7a6db884..394ded624e37 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig | |||
@@ -139,6 +139,7 @@ CONFIG_I2C_IMX=y | |||
139 | CONFIG_SPI=y | 139 | CONFIG_SPI=y |
140 | CONFIG_SPI_IMX=y | 140 | CONFIG_SPI_IMX=y |
141 | CONFIG_GPIO_SYSFS=y | 141 | CONFIG_GPIO_SYSFS=y |
142 | CONFIG_GPIO_MC9S08DZ60=y | ||
142 | # CONFIG_HWMON is not set | 143 | # CONFIG_HWMON is not set |
143 | CONFIG_WATCHDOG=y | 144 | CONFIG_WATCHDOG=y |
144 | CONFIG_IMX2_WDT=y | 145 | CONFIG_IMX2_WDT=y |
@@ -155,6 +156,7 @@ CONFIG_SOC_CAMERA=y | |||
155 | CONFIG_SOC_CAMERA_OV2640=y | 156 | CONFIG_SOC_CAMERA_OV2640=y |
156 | CONFIG_VIDEO_MX3=y | 157 | CONFIG_VIDEO_MX3=y |
157 | CONFIG_FB=y | 158 | CONFIG_FB=y |
159 | CONFIG_LCD_PLATFORM=y | ||
158 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | 160 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
159 | CONFIG_LCD_CLASS_DEVICE=y | 161 | CONFIG_LCD_CLASS_DEVICE=y |
160 | CONFIG_LCD_L4F00242T03=y | 162 | CONFIG_LCD_L4F00242T03=y |
diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig index 7bcf850eddcd..3458752c4bb2 100644 --- a/arch/arm/configs/mvebu_defconfig +++ b/arch/arm/configs/mvebu_defconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_NO_HZ=y | 3 | CONFIG_IRQ_DOMAIN_DEBUG=y |
4 | CONFIG_HIGH_RES_TIMERS=y | 4 | CONFIG_HIGH_RES_TIMERS=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
@@ -9,10 +9,12 @@ CONFIG_SLAB=y | |||
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
11 | CONFIG_ARCH_MVEBU=y | 11 | CONFIG_ARCH_MVEBU=y |
12 | CONFIG_MACH_ARMADA_370_XP=y | 12 | CONFIG_MACH_ARMADA_370=y |
13 | CONFIG_MACH_ARMADA_XP=y | ||
14 | # CONFIG_CACHE_L2X0 is not set | ||
13 | CONFIG_AEABI=y | 15 | CONFIG_AEABI=y |
14 | CONFIG_HIGHMEM=y | 16 | CONFIG_HIGHMEM=y |
15 | CONFIG_USE_OF=y | 17 | # CONFIG_COMPACTION is not set |
16 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 18 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
17 | CONFIG_ZBOOT_ROM_BSS=0x0 | 19 | CONFIG_ZBOOT_ROM_BSS=0x0 |
18 | CONFIG_ARM_APPENDED_DTB=y | 20 | CONFIG_ARM_APPENDED_DTB=y |
@@ -23,6 +25,8 @@ CONFIG_SERIAL_8250_CONSOLE=y | |||
23 | CONFIG_SERIAL_OF_PLATFORM=y | 25 | CONFIG_SERIAL_OF_PLATFORM=y |
24 | CONFIG_GPIOLIB=y | 26 | CONFIG_GPIOLIB=y |
25 | CONFIG_GPIO_SYSFS=y | 27 | CONFIG_GPIO_SYSFS=y |
28 | # CONFIG_USB_SUPPORT is not set | ||
29 | # CONFIG_IOMMU_SUPPORT is not set | ||
26 | CONFIG_EXT2_FS=y | 30 | CONFIG_EXT2_FS=y |
27 | CONFIG_EXT3_FS=y | 31 | CONFIG_EXT3_FS=y |
28 | # CONFIG_EXT3_FS_XATTR is not set | 32 | # CONFIG_EXT3_FS_XATTR is not set |
diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig index cdd4d2bd3962..2ba9e63d0f17 100644 --- a/arch/arm/configs/versatile_defconfig +++ b/arch/arm/configs/versatile_defconfig | |||
@@ -1,3 +1,4 @@ | |||
1 | CONFIG_ARCH_VERSATILE=y | ||
1 | CONFIG_EXPERIMENTAL=y | 2 | CONFIG_EXPERIMENTAL=y |
2 | # CONFIG_LOCALVERSION_AUTO is not set | 3 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
diff --git a/arch/arm/include/asm/flat.h b/arch/arm/include/asm/flat.h index 59426a4595c9..e847d23351ed 100644 --- a/arch/arm/include/asm/flat.h +++ b/arch/arm/include/asm/flat.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #define flat_argvp_envp_on_stack() 1 | 8 | #define flat_argvp_envp_on_stack() 1 |
9 | #define flat_old_ram_flag(flags) (flags) | 9 | #define flat_old_ram_flag(flags) (flags) |
10 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 10 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
11 | #define flat_get_addr_from_rp(rp, relval, flags, persistent) get_unaligned(rp) | 11 | #define flat_get_addr_from_rp(rp, relval, flags, persistent) ((void)persistent,get_unaligned(rp)) |
12 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) | 12 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) |
13 | #define flat_get_relocate_addr(rel) (rel) | 13 | #define flat_get_relocate_addr(rel) (rel) |
14 | #define flat_set_persistent(relval, p) 0 | 14 | #define flat_set_persistent(relval, p) 0 |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index 77bd79f2ffdb..7e1f76027f66 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -200,8 +200,8 @@ extern int __put_user_8(void *, unsigned long long); | |||
200 | #define USER_DS KERNEL_DS | 200 | #define USER_DS KERNEL_DS |
201 | 201 | ||
202 | #define segment_eq(a,b) (1) | 202 | #define segment_eq(a,b) (1) |
203 | #define __addr_ok(addr) (1) | 203 | #define __addr_ok(addr) ((void)(addr),1) |
204 | #define __range_ok(addr,size) (0) | 204 | #define __range_ok(addr,size) ((void)(addr),0) |
205 | #define get_fs() (KERNEL_DS) | 205 | #define get_fs() (KERNEL_DS) |
206 | 206 | ||
207 | static inline void set_fs(mm_segment_t fs) | 207 | static inline void set_fs(mm_segment_t fs) |
diff --git a/arch/arm/include/asm/xen/interface.h b/arch/arm/include/asm/xen/interface.h index ae05e56dd17d..5000397134b4 100644 --- a/arch/arm/include/asm/xen/interface.h +++ b/arch/arm/include/asm/xen/interface.h | |||
@@ -29,16 +29,22 @@ | |||
29 | 29 | ||
30 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
31 | /* Explicitly size integers that represent pfns in the interface with | 31 | /* Explicitly size integers that represent pfns in the interface with |
32 | * Xen so that we can have one ABI that works for 32 and 64 bit guests. */ | 32 | * Xen so that we can have one ABI that works for 32 and 64 bit guests. |
33 | * Note that this means that the xen_pfn_t type may be capable of | ||
34 | * representing pfn's which the guest cannot represent in its own pfn | ||
35 | * type. However since pfn space is controlled by the guest this is | ||
36 | * fine since it simply wouldn't be able to create any sure pfns in | ||
37 | * the first place. | ||
38 | */ | ||
33 | typedef uint64_t xen_pfn_t; | 39 | typedef uint64_t xen_pfn_t; |
40 | #define PRI_xen_pfn "llx" | ||
34 | typedef uint64_t xen_ulong_t; | 41 | typedef uint64_t xen_ulong_t; |
42 | #define PRI_xen_ulong "llx" | ||
35 | /* Guest handles for primitive C types. */ | 43 | /* Guest handles for primitive C types. */ |
36 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); | 44 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); |
37 | __DEFINE_GUEST_HANDLE(uint, unsigned int); | 45 | __DEFINE_GUEST_HANDLE(uint, unsigned int); |
38 | __DEFINE_GUEST_HANDLE(ulong, unsigned long); | ||
39 | DEFINE_GUEST_HANDLE(char); | 46 | DEFINE_GUEST_HANDLE(char); |
40 | DEFINE_GUEST_HANDLE(int); | 47 | DEFINE_GUEST_HANDLE(int); |
41 | DEFINE_GUEST_HANDLE(long); | ||
42 | DEFINE_GUEST_HANDLE(void); | 48 | DEFINE_GUEST_HANDLE(void); |
43 | DEFINE_GUEST_HANDLE(uint64_t); | 49 | DEFINE_GUEST_HANDLE(uint64_t); |
44 | DEFINE_GUEST_HANDLE(uint32_t); | 50 | DEFINE_GUEST_HANDLE(uint32_t); |
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h index 174202318dff..c6b9096cef95 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <xen/interface/grant_table.h> | 10 | #include <xen/interface/grant_table.h> |
11 | 11 | ||
12 | #define pfn_to_mfn(pfn) (pfn) | 12 | #define pfn_to_mfn(pfn) (pfn) |
13 | #define phys_to_machine_mapping_valid (1) | 13 | #define phys_to_machine_mapping_valid(pfn) (1) |
14 | #define mfn_to_pfn(mfn) (mfn) | 14 | #define mfn_to_pfn(mfn) (mfn) |
15 | #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) | 15 | #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) |
16 | 16 | ||
@@ -30,6 +30,8 @@ typedef struct xpaddr { | |||
30 | #define XMADDR(x) ((xmaddr_t) { .maddr = (x) }) | 30 | #define XMADDR(x) ((xmaddr_t) { .maddr = (x) }) |
31 | #define XPADDR(x) ((xpaddr_t) { .paddr = (x) }) | 31 | #define XPADDR(x) ((xpaddr_t) { .paddr = (x) }) |
32 | 32 | ||
33 | #define INVALID_P2M_ENTRY (~0UL) | ||
34 | |||
33 | static inline xmaddr_t phys_to_machine(xpaddr_t phys) | 35 | static inline xmaddr_t phys_to_machine(xpaddr_t phys) |
34 | { | 36 | { |
35 | unsigned offset = phys.paddr & ~PAGE_MASK; | 37 | unsigned offset = phys.paddr & ~PAGE_MASK; |
@@ -74,9 +76,14 @@ static inline int m2p_remove_override(struct page *page, bool clear_pte) | |||
74 | return 0; | 76 | return 0; |
75 | } | 77 | } |
76 | 78 | ||
79 | static inline bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn) | ||
80 | { | ||
81 | BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY); | ||
82 | return true; | ||
83 | } | ||
84 | |||
77 | static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) | 85 | static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) |
78 | { | 86 | { |
79 | BUG(); | 87 | return __set_phys_to_machine(pfn, mfn); |
80 | return false; | ||
81 | } | 88 | } |
82 | #endif /* _ASM_ARM_XEN_PAGE_H */ | 89 | #endif /* _ASM_ARM_XEN_PAGE_H */ |
diff --git a/arch/arm/include/debug/8250_32.S b/arch/arm/include/debug/8250_32.S new file mode 100644 index 000000000000..8db01eeabbb4 --- /dev/null +++ b/arch/arm/include/debug/8250_32.S | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Picochip Ltd., Jamie Iles | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
9 | * accesses to the 8250. | ||
10 | */ | ||
11 | |||
12 | #include <linux/serial_reg.h> | ||
13 | |||
14 | .macro senduart,rd,rx | ||
15 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
16 | .endm | ||
17 | |||
18 | .macro busyuart,rd,rx | ||
19 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
20 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
21 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
22 | bne 1002b | ||
23 | .endm | ||
24 | |||
25 | /* The UART's don't have any flow control IO's wired up. */ | ||
26 | .macro waituart,rd,rx | ||
27 | .endm | ||
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S index 7419deb1b948..bc1f07c49cd4 100644 --- a/arch/arm/include/debug/picoxcell.S +++ b/arch/arm/include/debug/picoxcell.S | |||
@@ -5,10 +5,7 @@ | |||
5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | * | 7 | * |
8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
9 | * accesses to the 8250. | ||
10 | */ | 8 | */ |
11 | #include <linux/serial_reg.h> | ||
12 | 9 | ||
13 | #define UART_SHIFT 2 | 10 | #define UART_SHIFT 2 |
14 | #define PICOXCELL_UART1_BASE 0x80230000 | 11 | #define PICOXCELL_UART1_BASE 0x80230000 |
@@ -19,17 +16,4 @@ | |||
19 | ldr \rp, =PICOXCELL_UART1_BASE | 16 | ldr \rp, =PICOXCELL_UART1_BASE |
20 | .endm | 17 | .endm |
21 | 18 | ||
22 | .macro senduart,rd,rx | 19 | #include "8250_32.S" |
23 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
24 | .endm | ||
25 | |||
26 | .macro busyuart,rd,rx | ||
27 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
28 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
29 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
30 | bne 1002b | ||
31 | .endm | ||
32 | |||
33 | /* The UART's don't have any flow control IO's wired up. */ | ||
34 | .macro waituart,rd,rx | ||
35 | .endm | ||
diff --git a/arch/arm/include/debug/socfpga.S b/arch/arm/include/debug/socfpga.S index d6f26d23374f..966b2f994946 100644 --- a/arch/arm/include/debug/socfpga.S +++ b/arch/arm/include/debug/socfpga.S | |||
@@ -7,6 +7,9 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define UART_SHIFT 2 | ||
11 | #define DEBUG_LL_UART_OFFSET 0x00002000 | ||
12 | |||
10 | .macro addruart, rp, rv, tmp | 13 | .macro addruart, rp, rv, tmp |
11 | mov \rp, #DEBUG_LL_UART_OFFSET | 14 | mov \rp, #DEBUG_LL_UART_OFFSET |
12 | orr \rp, \rp, #0x00c00000 | 15 | orr \rp, \rp, #0x00c00000 |
@@ -14,3 +17,5 @@ | |||
14 | orr \rp, \rp, #0xff000000 @ physical base | 17 | orr \rp, \rp, #0xff000000 @ physical base |
15 | .endm | 18 | .endm |
16 | 19 | ||
20 | #include "8250_32.S" | ||
21 | |||
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 417bac1846bd..34711757ba59 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -88,9 +88,9 @@ ENTRY(ret_from_fork) | |||
88 | bl schedule_tail | 88 | bl schedule_tail |
89 | cmp r5, #0 | 89 | cmp r5, #0 |
90 | movne r0, r4 | 90 | movne r0, r4 |
91 | movne lr, pc | 91 | adrne lr, BSYM(1f) |
92 | movne pc, r5 | 92 | movne pc, r5 |
93 | get_thread_info tsk | 93 | 1: get_thread_info tsk |
94 | b ret_slow_syscall | 94 | b ret_slow_syscall |
95 | ENDPROC(ret_from_fork) | 95 | ENDPROC(ret_from_fork) |
96 | 96 | ||
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 16cedb42c0c3..896165096d6a 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/list.h> | 34 | #include <linux/list.h> |
35 | #include <linux/kallsyms.h> | 35 | #include <linux/kallsyms.h> |
36 | #include <linux/proc_fs.h> | 36 | #include <linux/proc_fs.h> |
37 | #include <linux/export.h> | ||
37 | 38 | ||
38 | #include <asm/exception.h> | 39 | #include <asm/exception.h> |
39 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
@@ -109,6 +110,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) | |||
109 | /* Order is clear bits in "clr" then set bits in "set" */ | 110 | /* Order is clear bits in "clr" then set bits in "set" */ |
110 | irq_modify_status(irq, clr, set & ~clr); | 111 | irq_modify_status(irq, clr, set & ~clr); |
111 | } | 112 | } |
113 | EXPORT_SYMBOL_GPL(set_irq_flags); | ||
112 | 114 | ||
113 | void __init init_IRQ(void) | 115 | void __init init_IRQ(void) |
114 | { | 116 | { |
diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c index 38c1a3b103a0..839312905067 100644 --- a/arch/arm/kernel/kprobes-test-arm.c +++ b/arch/arm/kernel/kprobes-test-arm.c | |||
@@ -366,7 +366,9 @@ void kprobe_arm_test_cases(void) | |||
366 | TEST_UNSUPPORTED(".word 0xe04f0392 @ umaal r0, pc, r2, r3") | 366 | TEST_UNSUPPORTED(".word 0xe04f0392 @ umaal r0, pc, r2, r3") |
367 | TEST_UNSUPPORTED(".word 0xe0500090 @ undef") | 367 | TEST_UNSUPPORTED(".word 0xe0500090 @ undef") |
368 | TEST_UNSUPPORTED(".word 0xe05fff9f @ undef") | 368 | TEST_UNSUPPORTED(".word 0xe05fff9f @ undef") |
369 | #endif | ||
369 | 370 | ||
371 | #if __LINUX_ARM_ARCH__ >= 7 | ||
370 | TEST_RRR( "mls r0, r",1, VAL1,", r",2, VAL2,", r",3, VAL3,"") | 372 | TEST_RRR( "mls r0, r",1, VAL1,", r",2, VAL2,", r",3, VAL3,"") |
371 | TEST_RRR( "mlshi r7, r",8, VAL3,", r",9, VAL1,", r",10, VAL2,"") | 373 | TEST_RRR( "mlshi r7, r",8, VAL3,", r",9, VAL1,", r",10, VAL2,"") |
372 | TEST_RR( "mls lr, r",1, VAL2,", r",2, VAL3,", r13") | 374 | TEST_RR( "mls lr, r",1, VAL2,", r",2, VAL3,", r13") |
@@ -456,6 +458,8 @@ void kprobe_arm_test_cases(void) | |||
456 | TEST_UNSUPPORTED(".word 0xe1700090") /* Unallocated space */ | 458 | TEST_UNSUPPORTED(".word 0xe1700090") /* Unallocated space */ |
457 | #if __LINUX_ARM_ARCH__ >= 6 | 459 | #if __LINUX_ARM_ARCH__ >= 6 |
458 | TEST_UNSUPPORTED("ldrex r2, [sp]") | 460 | TEST_UNSUPPORTED("ldrex r2, [sp]") |
461 | #endif | ||
462 | #if (__LINUX_ARM_ARCH__ >= 7) || defined(CONFIG_CPU_32v6K) | ||
459 | TEST_UNSUPPORTED("strexd r0, r2, r3, [sp]") | 463 | TEST_UNSUPPORTED("strexd r0, r2, r3, [sp]") |
460 | TEST_UNSUPPORTED("ldrexd r2, r3, [sp]") | 464 | TEST_UNSUPPORTED("ldrexd r2, r3, [sp]") |
461 | TEST_UNSUPPORTED("strexb r0, r2, [sp]") | 465 | TEST_UNSUPPORTED("strexb r0, r2, [sp]") |
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index e29c3337ca81..8ef8c9337809 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -45,10 +45,9 @@ int machine_kexec_prepare(struct kimage *image) | |||
45 | for (i = 0; i < image->nr_segments; i++) { | 45 | for (i = 0; i < image->nr_segments; i++) { |
46 | current_segment = &image->segment[i]; | 46 | current_segment = &image->segment[i]; |
47 | 47 | ||
48 | err = memblock_is_region_memory(current_segment->mem, | 48 | if (!memblock_is_region_memory(current_segment->mem, |
49 | current_segment->memsz); | 49 | current_segment->memsz)) |
50 | if (err) | 50 | return -EINVAL; |
51 | return - EINVAL; | ||
52 | 51 | ||
53 | err = get_user(header, (__be32*)current_segment->buf); | 52 | err = get_user(header, (__be32*)current_segment->buf); |
54 | if (err) | 53 | if (err) |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 93971b1a4f0b..53c0304b734a 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -96,6 +96,10 @@ armpmu_event_set_period(struct perf_event *event, | |||
96 | s64 period = hwc->sample_period; | 96 | s64 period = hwc->sample_period; |
97 | int ret = 0; | 97 | int ret = 0; |
98 | 98 | ||
99 | /* The period may have been changed by PERF_EVENT_IOC_PERIOD */ | ||
100 | if (unlikely(period != hwc->last_period)) | ||
101 | left = period - (hwc->last_period - left); | ||
102 | |||
99 | if (unlikely(left <= -period)) { | 103 | if (unlikely(left <= -period)) { |
100 | left = period; | 104 | left = period; |
101 | local64_set(&hwc->period_left, left); | 105 | local64_set(&hwc->period_left, left); |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 8e20754dd31d..fbc8b2623d82 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -294,18 +294,24 @@ static void percpu_timer_setup(void); | |||
294 | asmlinkage void __cpuinit secondary_start_kernel(void) | 294 | asmlinkage void __cpuinit secondary_start_kernel(void) |
295 | { | 295 | { |
296 | struct mm_struct *mm = &init_mm; | 296 | struct mm_struct *mm = &init_mm; |
297 | unsigned int cpu = smp_processor_id(); | 297 | unsigned int cpu; |
298 | |||
299 | /* | ||
300 | * The identity mapping is uncached (strongly ordered), so | ||
301 | * switch away from it before attempting any exclusive accesses. | ||
302 | */ | ||
303 | cpu_switch_mm(mm->pgd, mm); | ||
304 | enter_lazy_tlb(mm, current); | ||
305 | local_flush_tlb_all(); | ||
298 | 306 | ||
299 | /* | 307 | /* |
300 | * All kernel threads share the same mm context; grab a | 308 | * All kernel threads share the same mm context; grab a |
301 | * reference and switch to it. | 309 | * reference and switch to it. |
302 | */ | 310 | */ |
311 | cpu = smp_processor_id(); | ||
303 | atomic_inc(&mm->mm_count); | 312 | atomic_inc(&mm->mm_count); |
304 | current->active_mm = mm; | 313 | current->active_mm = mm; |
305 | cpumask_set_cpu(cpu, mm_cpumask(mm)); | 314 | cpumask_set_cpu(cpu, mm_cpumask(mm)); |
306 | cpu_switch_mm(mm->pgd, mm); | ||
307 | enter_lazy_tlb(mm, current); | ||
308 | local_flush_tlb_all(); | ||
309 | 315 | ||
310 | printk("CPU%u: Booted secondary processor\n", cpu); | 316 | printk("CPU%u: Booted secondary processor\n", cpu); |
311 | 317 | ||
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index e1f906989bb8..b22d700fea27 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -42,10 +42,10 @@ static void twd_set_mode(enum clock_event_mode mode, | |||
42 | 42 | ||
43 | switch (mode) { | 43 | switch (mode) { |
44 | case CLOCK_EVT_MODE_PERIODIC: | 44 | case CLOCK_EVT_MODE_PERIODIC: |
45 | /* timer load already set up */ | ||
46 | ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE | 45 | ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE |
47 | | TWD_TIMER_CONTROL_PERIODIC; | 46 | | TWD_TIMER_CONTROL_PERIODIC; |
48 | __raw_writel(twd_timer_rate / HZ, twd_base + TWD_TIMER_LOAD); | 47 | __raw_writel(DIV_ROUND_CLOSEST(twd_timer_rate, HZ), |
48 | twd_base + TWD_TIMER_LOAD); | ||
49 | break; | 49 | break; |
50 | case CLOCK_EVT_MODE_ONESHOT: | 50 | case CLOCK_EVT_MODE_ONESHOT: |
51 | /* period set, and timer enabled in 'next_event' hook */ | 51 | /* period set, and timer enabled in 'next_event' hook */ |
diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c index 9d0a30032d7f..0dc53854a5d8 100644 --- a/arch/arm/lib/delay.c +++ b/arch/arm/lib/delay.c | |||
@@ -45,6 +45,7 @@ int read_current_timer(unsigned long *timer_val) | |||
45 | *timer_val = delay_timer->read_current_timer(); | 45 | *timer_val = delay_timer->read_current_timer(); |
46 | return 0; | 46 | return 0; |
47 | } | 47 | } |
48 | EXPORT_SYMBOL_GPL(read_current_timer); | ||
48 | 49 | ||
49 | static void __timer_delay(unsigned long cycles) | 50 | static void __timer_delay(unsigned long cycles) |
50 | { | 51 | { |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index b14207101938..043624219b55 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -21,19 +21,13 @@ config SOC_AT91SAM9 | |||
21 | bool | 21 | bool |
22 | select CPU_ARM926T | 22 | select CPU_ARM926T |
23 | select GENERIC_CLOCKEVENTS | 23 | select GENERIC_CLOCKEVENTS |
24 | select MULTI_IRQ_HANDLER | ||
25 | select SPARSE_IRQ | ||
24 | 26 | ||
25 | menu "Atmel AT91 System-on-Chip" | 27 | menu "Atmel AT91 System-on-Chip" |
26 | 28 | ||
27 | comment "Atmel AT91 Processor" | 29 | comment "Atmel AT91 Processor" |
28 | 30 | ||
29 | config SOC_AT91SAM9 | ||
30 | bool | ||
31 | select AT91_SAM9_SMC | ||
32 | select AT91_SAM9_TIME | ||
33 | select CPU_ARM926T | ||
34 | select MULTI_IRQ_HANDLER | ||
35 | select SPARSE_IRQ | ||
36 | |||
37 | config SOC_AT91RM9200 | 31 | config SOC_AT91RM9200 |
38 | bool "AT91RM9200" | 32 | bool "AT91RM9200" |
39 | select CPU_ARM920T | 33 | select CPU_ARM920T |
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index b4f0565aff63..5269825194a8 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c | |||
@@ -187,7 +187,7 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
187 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), | 187 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), |
188 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | 188 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), |
189 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), | 189 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), |
190 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200", &twi_clk), | 190 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91rm9200.0", &twi_clk), |
191 | /* fake hclk clock */ | 191 | /* fake hclk clock */ |
192 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), | 192 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), |
193 | CLKDEV_CON_ID("pioA", &pioA_clk), | 193 | CLKDEV_CON_ID("pioA", &pioA_clk), |
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index a563189cdfc3..1e122bcd7845 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -479,7 +479,7 @@ static struct i2c_gpio_platform_data pdata = { | |||
479 | 479 | ||
480 | static struct platform_device at91rm9200_twi_device = { | 480 | static struct platform_device at91rm9200_twi_device = { |
481 | .name = "i2c-gpio", | 481 | .name = "i2c-gpio", |
482 | .id = -1, | 482 | .id = 0, |
483 | .dev.platform_data = &pdata, | 483 | .dev.platform_data = &pdata, |
484 | }; | 484 | }; |
485 | 485 | ||
@@ -512,7 +512,7 @@ static struct resource twi_resources[] = { | |||
512 | 512 | ||
513 | static struct platform_device at91rm9200_twi_device = { | 513 | static struct platform_device at91rm9200_twi_device = { |
514 | .name = "i2c-at91rm9200", | 514 | .name = "i2c-at91rm9200", |
515 | .id = -1, | 515 | .id = 0, |
516 | .resource = twi_resources, | 516 | .resource = twi_resources, |
517 | .num_resources = ARRAY_SIZE(twi_resources), | 517 | .num_resources = ARRAY_SIZE(twi_resources), |
518 | }; | 518 | }; |
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index ad29f93f20ca..f8202615f4a8 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -211,8 +211,8 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
211 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), | 211 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), |
212 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), | 212 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), |
213 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk), | 213 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk), |
214 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk), | 214 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk), |
215 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20", &twi_clk), | 215 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi_clk), |
216 | /* more usart lookup table for DT entries */ | 216 | /* more usart lookup table for DT entries */ |
217 | CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck), | 217 | CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck), |
218 | CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk), | 218 | CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk), |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index a76b8684f52d..aa1e58729885 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -389,7 +389,7 @@ static struct i2c_gpio_platform_data pdata = { | |||
389 | 389 | ||
390 | static struct platform_device at91sam9260_twi_device = { | 390 | static struct platform_device at91sam9260_twi_device = { |
391 | .name = "i2c-gpio", | 391 | .name = "i2c-gpio", |
392 | .id = -1, | 392 | .id = 0, |
393 | .dev.platform_data = &pdata, | 393 | .dev.platform_data = &pdata, |
394 | }; | 394 | }; |
395 | 395 | ||
@@ -421,7 +421,7 @@ static struct resource twi_resources[] = { | |||
421 | }; | 421 | }; |
422 | 422 | ||
423 | static struct platform_device at91sam9260_twi_device = { | 423 | static struct platform_device at91sam9260_twi_device = { |
424 | .id = -1, | 424 | .id = 0, |
425 | .resource = twi_resources, | 425 | .resource = twi_resources, |
426 | .num_resources = ARRAY_SIZE(twi_resources), | 426 | .num_resources = ARRAY_SIZE(twi_resources), |
427 | }; | 427 | }; |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 8d999eb1a137..04295c04b3e0 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -178,8 +178,8 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
178 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | 178 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), |
179 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), | 179 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), |
180 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0), | 180 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &hck0), |
181 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261", &twi_clk), | 181 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9261.0", &twi_clk), |
182 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10", &twi_clk), | 182 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g10.0", &twi_clk), |
183 | CLKDEV_CON_ID("pioA", &pioA_clk), | 183 | CLKDEV_CON_ID("pioA", &pioA_clk), |
184 | CLKDEV_CON_ID("pioB", &pioB_clk), | 184 | CLKDEV_CON_ID("pioB", &pioB_clk), |
185 | CLKDEV_CON_ID("pioC", &pioC_clk), | 185 | CLKDEV_CON_ID("pioC", &pioC_clk), |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 9752f17efba9..b9487696b7be 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -285,7 +285,7 @@ static struct i2c_gpio_platform_data pdata = { | |||
285 | 285 | ||
286 | static struct platform_device at91sam9261_twi_device = { | 286 | static struct platform_device at91sam9261_twi_device = { |
287 | .name = "i2c-gpio", | 287 | .name = "i2c-gpio", |
288 | .id = -1, | 288 | .id = 0, |
289 | .dev.platform_data = &pdata, | 289 | .dev.platform_data = &pdata, |
290 | }; | 290 | }; |
291 | 291 | ||
@@ -317,7 +317,7 @@ static struct resource twi_resources[] = { | |||
317 | }; | 317 | }; |
318 | 318 | ||
319 | static struct platform_device at91sam9261_twi_device = { | 319 | static struct platform_device at91sam9261_twi_device = { |
320 | .id = -1, | 320 | .id = 0, |
321 | .resource = twi_resources, | 321 | .resource = twi_resources, |
322 | .num_resources = ARRAY_SIZE(twi_resources), | 322 | .num_resources = ARRAY_SIZE(twi_resources), |
323 | }; | 323 | }; |
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 6a01d0360dfb..d6f9c23927c4 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -193,7 +193,7 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
193 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), | 193 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), |
194 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), | 194 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), |
195 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), | 195 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), |
196 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260", &twi_clk), | 196 | CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk), |
197 | /* fake hclk clock */ | 197 | /* fake hclk clock */ |
198 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), | 198 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), |
199 | CLKDEV_CON_ID("pioA", &pioA_clk), | 199 | CLKDEV_CON_ID("pioA", &pioA_clk), |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 8dde220b42b6..cb85da2eccea 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -567,7 +567,7 @@ static struct i2c_gpio_platform_data pdata = { | |||
567 | 567 | ||
568 | static struct platform_device at91sam9263_twi_device = { | 568 | static struct platform_device at91sam9263_twi_device = { |
569 | .name = "i2c-gpio", | 569 | .name = "i2c-gpio", |
570 | .id = -1, | 570 | .id = 0, |
571 | .dev.platform_data = &pdata, | 571 | .dev.platform_data = &pdata, |
572 | }; | 572 | }; |
573 | 573 | ||
@@ -600,7 +600,7 @@ static struct resource twi_resources[] = { | |||
600 | 600 | ||
601 | static struct platform_device at91sam9263_twi_device = { | 601 | static struct platform_device at91sam9263_twi_device = { |
602 | .name = "i2c-at91sam9260", | 602 | .name = "i2c-at91sam9260", |
603 | .id = -1, | 603 | .id = 0, |
604 | .resource = twi_resources, | 604 | .resource = twi_resources, |
605 | .num_resources = ARRAY_SIZE(twi_resources), | 605 | .num_resources = ARRAY_SIZE(twi_resources), |
606 | }; | 606 | }; |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index d6ca0543ce8d..5047bdc92adf 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -314,7 +314,7 @@ static struct i2c_gpio_platform_data pdata = { | |||
314 | 314 | ||
315 | static struct platform_device at91sam9rl_twi_device = { | 315 | static struct platform_device at91sam9rl_twi_device = { |
316 | .name = "i2c-gpio", | 316 | .name = "i2c-gpio", |
317 | .id = -1, | 317 | .id = 0, |
318 | .dev.platform_data = &pdata, | 318 | .dev.platform_data = &pdata, |
319 | }; | 319 | }; |
320 | 320 | ||
@@ -347,7 +347,7 @@ static struct resource twi_resources[] = { | |||
347 | 347 | ||
348 | static struct platform_device at91sam9rl_twi_device = { | 348 | static struct platform_device at91sam9rl_twi_device = { |
349 | .name = "i2c-at91sam9g20", | 349 | .name = "i2c-at91sam9g20", |
350 | .id = -1, | 350 | .id = 0, |
351 | .resource = twi_resources, | 351 | .resource = twi_resources, |
352 | .num_resources = ARRAY_SIZE(twi_resources), | 352 | .num_resources = ARRAY_SIZE(twi_resources), |
353 | }; | 353 | }; |
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c index 6bd7300a2bc5..bb7f54474b92 100644 --- a/arch/arm/mach-at91/at91x40.c +++ b/arch/arm/mach-at91/at91x40.c | |||
@@ -88,6 +88,6 @@ void __init at91x40_init_interrupts(unsigned int priority[NR_AIC_IRQS]) | |||
88 | if (!priority) | 88 | if (!priority) |
89 | priority = at91x40_default_irq_priority; | 89 | priority = at91x40_default_irq_priority; |
90 | 90 | ||
91 | at91_aic_init(priority); | 91 | at91_aic_init(priority, at91_extern_irq); |
92 | } | 92 | } |
93 | 93 | ||
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c index 9cda3fd346ae..6960778af4c2 100644 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -129,7 +129,7 @@ static struct spi_board_info neocore926_spi_devices[] = { | |||
129 | .max_speed_hz = 125000 * 16, | 129 | .max_speed_hz = 125000 * 16, |
130 | .bus_num = 0, | 130 | .bus_num = 0, |
131 | .platform_data = &ads_info, | 131 | .platform_data = &ads_info, |
132 | .irq = AT91SAM9263_ID_IRQ1, | 132 | .irq = NR_IRQS_LEGACY + AT91SAM9263_ID_IRQ1, |
133 | }, | 133 | }, |
134 | #endif | 134 | #endif |
135 | }; | 135 | }; |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 27b3af1a3047..a9167dd45f96 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -309,7 +309,7 @@ static struct spi_board_info ek_spi_devices[] = { | |||
309 | .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */ | 309 | .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */ |
310 | .bus_num = 0, | 310 | .bus_num = 0, |
311 | .platform_data = &ads_info, | 311 | .platform_data = &ads_info, |
312 | .irq = AT91SAM9261_ID_IRQ0, | 312 | .irq = NR_IRQS_LEGACY + AT91SAM9261_ID_IRQ0, |
313 | .controller_data = (void *) AT91_PIN_PA28, /* CS pin */ | 313 | .controller_data = (void *) AT91_PIN_PA28, /* CS pin */ |
314 | }, | 314 | }, |
315 | #endif | 315 | #endif |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 073e17403d98..b87dbe2be0d6 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -132,7 +132,7 @@ static struct spi_board_info ek_spi_devices[] = { | |||
132 | .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */ | 132 | .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */ |
133 | .bus_num = 0, | 133 | .bus_num = 0, |
134 | .platform_data = &ads_info, | 134 | .platform_data = &ads_info, |
135 | .irq = AT91SAM9263_ID_IRQ1, | 135 | .irq = NR_IRQS_LEGACY + AT91SAM9263_ID_IRQ1, |
136 | }, | 136 | }, |
137 | #endif | 137 | #endif |
138 | }; | 138 | }; |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index f49650677653..b62f560e6c75 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -26,7 +26,8 @@ extern void __init at91_dt_initialize(void); | |||
26 | extern void __init at91_init_irq_default(void); | 26 | extern void __init at91_init_irq_default(void); |
27 | extern void __init at91_init_interrupts(unsigned int priority[]); | 27 | extern void __init at91_init_interrupts(unsigned int priority[]); |
28 | extern void __init at91x40_init_interrupts(unsigned int priority[]); | 28 | extern void __init at91x40_init_interrupts(unsigned int priority[]); |
29 | extern void __init at91_aic_init(unsigned int priority[]); | 29 | extern void __init at91_aic_init(unsigned int priority[], |
30 | unsigned int ext_irq_mask); | ||
30 | extern int __init at91_aic_of_init(struct device_node *node, | 31 | extern int __init at91_aic_of_init(struct device_node *node, |
31 | struct device_node *parent); | 32 | struct device_node *parent); |
32 | extern int __init at91_aic5_of_init(struct device_node *node, | 33 | extern int __init at91_aic5_of_init(struct device_node *node, |
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c index 1e02c0e49dcc..febc2ee901a5 100644 --- a/arch/arm/mach-at91/irq.c +++ b/arch/arm/mach-at91/irq.c | |||
@@ -502,14 +502,19 @@ int __init at91_aic5_of_init(struct device_node *node, | |||
502 | /* | 502 | /* |
503 | * Initialize the AIC interrupt controller. | 503 | * Initialize the AIC interrupt controller. |
504 | */ | 504 | */ |
505 | void __init at91_aic_init(unsigned int *priority) | 505 | void __init at91_aic_init(unsigned int *priority, unsigned int ext_irq_mask) |
506 | { | 506 | { |
507 | unsigned int i; | 507 | unsigned int i; |
508 | int irq_base; | 508 | int irq_base; |
509 | 509 | ||
510 | if (at91_aic_pm_init()) | 510 | at91_extern_irq = kzalloc(BITS_TO_LONGS(n_irqs) |
511 | * sizeof(*at91_extern_irq), GFP_KERNEL); | ||
512 | |||
513 | if (at91_aic_pm_init() || at91_extern_irq == NULL) | ||
511 | panic("Unable to allocate bit maps\n"); | 514 | panic("Unable to allocate bit maps\n"); |
512 | 515 | ||
516 | *at91_extern_irq = ext_irq_mask; | ||
517 | |||
513 | at91_aic_base = ioremap(AT91_AIC, 512); | 518 | at91_aic_base = ioremap(AT91_AIC, 512); |
514 | if (!at91_aic_base) | 519 | if (!at91_aic_base) |
515 | panic("Unable to ioremap AIC registers\n"); | 520 | panic("Unable to ioremap AIC registers\n"); |
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index da9881b161e1..0b32c81730a5 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -47,7 +47,7 @@ void __init at91_init_irq_default(void) | |||
47 | void __init at91_init_interrupts(unsigned int *priority) | 47 | void __init at91_init_interrupts(unsigned int *priority) |
48 | { | 48 | { |
49 | /* Initialize the AIC interrupt controller */ | 49 | /* Initialize the AIC interrupt controller */ |
50 | at91_aic_init(priority); | 50 | at91_aic_init(priority, at91_extern_irq); |
51 | 51 | ||
52 | /* Enable GPIO interrupts */ | 52 | /* Enable GPIO interrupts */ |
53 | at91_gpio_irq_setup(); | 53 | at91_gpio_irq_setup(); |
@@ -151,7 +151,7 @@ static void __init soc_detect(u32 dbgu_base) | |||
151 | } | 151 | } |
152 | 152 | ||
153 | /* at91sam9g10 */ | 153 | /* at91sam9g10 */ |
154 | if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) { | 154 | if ((socid & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) { |
155 | at91_soc_initdata.type = AT91_SOC_SAM9G10; | 155 | at91_soc_initdata.type = AT91_SOC_SAM9G10; |
156 | at91_boot_soc = at91sam9261_soc; | 156 | at91_boot_soc = at91sam9261_soc; |
157 | } | 157 | } |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index b37bef1d5ffa..f723fe13d0f0 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/irq.h> | 32 | #include <linux/irq.h> |
33 | #include <plat/time.h> | 33 | #include <plat/time.h> |
34 | #include <linux/platform_data/usb-ehci-orion.h> | 34 | #include <linux/platform_data/usb-ehci-orion.h> |
35 | #include <plat/irq.h> | ||
35 | #include <plat/common.h> | 36 | #include <plat/common.h> |
36 | #include <plat/addr-map.h> | 37 | #include <plat/addr-map.h> |
37 | #include "common.h" | 38 | #include "common.h" |
@@ -109,8 +110,8 @@ static void __init dove_clk_init(void) | |||
109 | 110 | ||
110 | orion_clkdev_add(NULL, "orion-ehci.0", usb0); | 111 | orion_clkdev_add(NULL, "orion-ehci.0", usb0); |
111 | orion_clkdev_add(NULL, "orion-ehci.1", usb1); | 112 | orion_clkdev_add(NULL, "orion-ehci.1", usb1); |
112 | orion_clkdev_add(NULL, "mv643xx_eth.0", ge); | 113 | orion_clkdev_add(NULL, "mv643xx_eth_port.0", ge); |
113 | orion_clkdev_add("0", "sata_mv.0", sata); | 114 | orion_clkdev_add(NULL, "sata_mv.0", sata); |
114 | orion_clkdev_add("0", "pcie", pex0); | 115 | orion_clkdev_add("0", "pcie", pex0); |
115 | orion_clkdev_add("1", "pcie", pex1); | 116 | orion_clkdev_add("1", "pcie", pex1); |
116 | orion_clkdev_add(NULL, "sdhci-dove.0", sdio0); | 117 | orion_clkdev_add(NULL, "sdhci-dove.0", sdio0); |
@@ -399,7 +400,7 @@ static void __init dove_dt_init(void) | |||
399 | (dove_tclk + 499999) / 1000000); | 400 | (dove_tclk + 499999) / 1000000); |
400 | 401 | ||
401 | #ifdef CONFIG_CACHE_TAUROS2 | 402 | #ifdef CONFIG_CACHE_TAUROS2 |
402 | tauros2_init(); | 403 | tauros2_init(0); |
403 | #endif | 404 | #endif |
404 | dove_setup_cpu_mbus(); | 405 | dove_setup_cpu_mbus(); |
405 | 406 | ||
@@ -415,7 +416,6 @@ static void __init dove_dt_init(void) | |||
415 | dove_ehci0_init(); | 416 | dove_ehci0_init(); |
416 | dove_ehci1_init(); | 417 | dove_ehci1_init(); |
417 | dove_pcie_init(1, 1); | 418 | dove_pcie_init(1, 1); |
418 | dove_crypto_init(); | ||
419 | 419 | ||
420 | of_platform_populate(NULL, of_default_bus_match_table, | 420 | of_platform_populate(NULL, of_default_bus_match_table, |
421 | dove_auxdata_lookup, NULL); | 421 | dove_auxdata_lookup, NULL); |
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c index bb15b26041cb..0ef4435b1657 100644 --- a/arch/arm/mach-dove/pcie.c +++ b/arch/arm/mach-dove/pcie.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/clk.h> | ||
13 | #include <video/vga.h> | 14 | #include <video/vga.h> |
14 | #include <asm/mach/pci.h> | 15 | #include <asm/mach/pci.h> |
15 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
@@ -188,6 +189,10 @@ static void __init add_pcie_port(int index, void __iomem *base) | |||
188 | 189 | ||
189 | if (orion_pcie_link_up(base)) { | 190 | if (orion_pcie_link_up(base)) { |
190 | struct pcie_port *pp = &pcie_port[num_pcie_ports++]; | 191 | struct pcie_port *pp = &pcie_port[num_pcie_ports++]; |
192 | struct clk *clk = clk_get_sys("pcie", (index ? "1" : "0")); | ||
193 | |||
194 | if (!IS_ERR(clk)) | ||
195 | clk_prepare_enable(clk); | ||
191 | 196 | ||
192 | printk(KERN_INFO "link up\n"); | 197 | printk(KERN_INFO "link up\n"); |
193 | 198 | ||
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 715b690e5009..1947be8e5f5b 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <plat/fimc-core.h> | 47 | #include <plat/fimc-core.h> |
48 | #include <plat/iic-core.h> | 48 | #include <plat/iic-core.h> |
49 | #include <plat/tv-core.h> | 49 | #include <plat/tv-core.h> |
50 | #include <plat/spi-core.h> | ||
50 | #include <plat/regs-serial.h> | 51 | #include <plat/regs-serial.h> |
51 | 52 | ||
52 | #include "common.h" | 53 | #include "common.h" |
@@ -346,6 +347,8 @@ static void __init exynos4_map_io(void) | |||
346 | 347 | ||
347 | s5p_fb_setname(0, "exynos4-fb"); | 348 | s5p_fb_setname(0, "exynos4-fb"); |
348 | s5p_hdmi_setname("exynos4-hdmi"); | 349 | s5p_hdmi_setname("exynos4-hdmi"); |
350 | |||
351 | s3c64xx_spi_setname("exynos4210-spi"); | ||
349 | } | 352 | } |
350 | 353 | ||
351 | static void __init exynos5_map_io(void) | 354 | static void __init exynos5_map_io(void) |
@@ -366,6 +369,8 @@ static void __init exynos5_map_io(void) | |||
366 | s3c_i2c0_setname("s3c2440-i2c"); | 369 | s3c_i2c0_setname("s3c2440-i2c"); |
367 | s3c_i2c1_setname("s3c2440-i2c"); | 370 | s3c_i2c1_setname("s3c2440-i2c"); |
368 | s3c_i2c2_setname("s3c2440-i2c"); | 371 | s3c_i2c2_setname("s3c2440-i2c"); |
372 | |||
373 | s3c64xx_spi_setname("exynos4210-spi"); | ||
369 | } | 374 | } |
370 | 375 | ||
371 | static void __init exynos4_init_clocks(int xtal) | 376 | static void __init exynos4_init_clocks(int xtal) |
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index e58d786faf78..eadf4b59e7d2 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c | |||
@@ -99,6 +99,7 @@ static char const *exynos4_dt_compat[] __initdata = { | |||
99 | 99 | ||
100 | DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") | 100 | DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") |
101 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ | 101 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ |
102 | .smp = smp_ops(exynos_smp_ops), | ||
102 | .init_irq = exynos4_init_irq, | 103 | .init_irq = exynos4_init_irq, |
103 | .map_io = exynos4_dt_map_io, | 104 | .map_io = exynos4_dt_map_io, |
104 | .handle_irq = gic_handle_irq, | 105 | .handle_irq = gic_handle_irq, |
diff --git a/arch/arm/mach-imx/clk-busy.c b/arch/arm/mach-imx/clk-busy.c index 1a7a8dd045a1..1ab91b5209e6 100644 --- a/arch/arm/mach-imx/clk-busy.c +++ b/arch/arm/mach-imx/clk-busy.c | |||
@@ -108,7 +108,7 @@ struct clk *imx_clk_busy_divider(const char *name, const char *parent_name, | |||
108 | busy->div.hw.init = &init; | 108 | busy->div.hw.init = &init; |
109 | 109 | ||
110 | clk = clk_register(NULL, &busy->div.hw); | 110 | clk = clk_register(NULL, &busy->div.hw); |
111 | if (!clk) | 111 | if (IS_ERR(clk)) |
112 | kfree(busy); | 112 | kfree(busy); |
113 | 113 | ||
114 | return clk; | 114 | return clk; |
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c index d20d4795f4ea..01e2f843bf2e 100644 --- a/arch/arm/mach-imx/clk-imx25.c +++ b/arch/arm/mach-imx/clk-imx25.c | |||
@@ -127,8 +127,8 @@ int __init mx25_clocks_init(void) | |||
127 | clk[esdhc2_ipg_per] = imx_clk_gate("esdhc2_ipg_per", "per4", ccm(CCM_CGCR0), 4); | 127 | clk[esdhc2_ipg_per] = imx_clk_gate("esdhc2_ipg_per", "per4", ccm(CCM_CGCR0), 4); |
128 | clk[gpt_ipg_per] = imx_clk_gate("gpt_ipg_per", "per5", ccm(CCM_CGCR0), 5); | 128 | clk[gpt_ipg_per] = imx_clk_gate("gpt_ipg_per", "per5", ccm(CCM_CGCR0), 5); |
129 | clk[i2c_ipg_per] = imx_clk_gate("i2c_ipg_per", "per6", ccm(CCM_CGCR0), 6); | 129 | clk[i2c_ipg_per] = imx_clk_gate("i2c_ipg_per", "per6", ccm(CCM_CGCR0), 6); |
130 | clk[lcdc_ipg_per] = imx_clk_gate("lcdc_ipg_per", "per8", ccm(CCM_CGCR0), 7); | 130 | clk[lcdc_ipg_per] = imx_clk_gate("lcdc_ipg_per", "per7", ccm(CCM_CGCR0), 7); |
131 | clk[nfc_ipg_per] = imx_clk_gate("nfc_ipg_per", "ipg_per", ccm(CCM_CGCR0), 8); | 131 | clk[nfc_ipg_per] = imx_clk_gate("nfc_ipg_per", "per8", ccm(CCM_CGCR0), 8); |
132 | clk[ssi1_ipg_per] = imx_clk_gate("ssi1_ipg_per", "per13", ccm(CCM_CGCR0), 13); | 132 | clk[ssi1_ipg_per] = imx_clk_gate("ssi1_ipg_per", "per13", ccm(CCM_CGCR0), 13); |
133 | clk[ssi2_ipg_per] = imx_clk_gate("ssi2_ipg_per", "per14", ccm(CCM_CGCR0), 14); | 133 | clk[ssi2_ipg_per] = imx_clk_gate("ssi2_ipg_per", "per14", ccm(CCM_CGCR0), 14); |
134 | clk[uart_ipg_per] = imx_clk_gate("uart_ipg_per", "per15", ccm(CCM_CGCR0), 15); | 134 | clk[uart_ipg_per] = imx_clk_gate("uart_ipg_per", "per15", ccm(CCM_CGCR0), 15); |
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 3b6b640eed24..366e5d59d886 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -109,7 +109,7 @@ int __init mx27_clocks_init(unsigned long fref) | |||
109 | clk[per3_div] = imx_clk_divider("per3_div", "mpll_main2", CCM_PCDR1, 16, 6); | 109 | clk[per3_div] = imx_clk_divider("per3_div", "mpll_main2", CCM_PCDR1, 16, 6); |
110 | clk[per4_div] = imx_clk_divider("per4_div", "mpll_main2", CCM_PCDR1, 24, 6); | 110 | clk[per4_div] = imx_clk_divider("per4_div", "mpll_main2", CCM_PCDR1, 24, 6); |
111 | clk[vpu_sel] = imx_clk_mux("vpu_sel", CCM_CSCR, 21, 1, vpu_sel_clks, ARRAY_SIZE(vpu_sel_clks)); | 111 | clk[vpu_sel] = imx_clk_mux("vpu_sel", CCM_CSCR, 21, 1, vpu_sel_clks, ARRAY_SIZE(vpu_sel_clks)); |
112 | clk[vpu_div] = imx_clk_divider("vpu_div", "vpu_sel", CCM_PCDR0, 10, 3); | 112 | clk[vpu_div] = imx_clk_divider("vpu_div", "vpu_sel", CCM_PCDR0, 10, 6); |
113 | clk[usb_div] = imx_clk_divider("usb_div", "spll", CCM_CSCR, 28, 3); | 113 | clk[usb_div] = imx_clk_divider("usb_div", "spll", CCM_CSCR, 28, 3); |
114 | clk[cpu_sel] = imx_clk_mux("cpu_sel", CCM_CSCR, 15, 1, cpu_sel_clks, ARRAY_SIZE(cpu_sel_clks)); | 114 | clk[cpu_sel] = imx_clk_mux("cpu_sel", CCM_CSCR, 15, 1, cpu_sel_clks, ARRAY_SIZE(cpu_sel_clks)); |
115 | clk[clko_sel] = imx_clk_mux("clko_sel", CCM_CCSR, 0, 5, clko_sel_clks, ARRAY_SIZE(clko_sel_clks)); | 115 | clk[clko_sel] = imx_clk_mux("clko_sel", CCM_CCSR, 0, 5, clko_sel_clks, ARRAY_SIZE(clko_sel_clks)); |
@@ -121,7 +121,7 @@ int __init mx27_clocks_init(unsigned long fref) | |||
121 | clk[ssi1_sel] = imx_clk_mux("ssi1_sel", CCM_CSCR, 22, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); | 121 | clk[ssi1_sel] = imx_clk_mux("ssi1_sel", CCM_CSCR, 22, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); |
122 | clk[ssi2_sel] = imx_clk_mux("ssi2_sel", CCM_CSCR, 23, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); | 122 | clk[ssi2_sel] = imx_clk_mux("ssi2_sel", CCM_CSCR, 23, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks)); |
123 | clk[ssi1_div] = imx_clk_divider("ssi1_div", "ssi1_sel", CCM_PCDR0, 16, 6); | 123 | clk[ssi1_div] = imx_clk_divider("ssi1_div", "ssi1_sel", CCM_PCDR0, 16, 6); |
124 | clk[ssi2_div] = imx_clk_divider("ssi2_div", "ssi2_sel", CCM_PCDR0, 26, 3); | 124 | clk[ssi2_div] = imx_clk_divider("ssi2_div", "ssi2_sel", CCM_PCDR0, 26, 6); |
125 | clk[clko_en] = imx_clk_gate("clko_en", "clko_div", CCM_PCCR0, 0); | 125 | clk[clko_en] = imx_clk_gate("clko_en", "clko_div", CCM_PCCR0, 0); |
126 | clk[ssi2_ipg_gate] = imx_clk_gate("ssi2_ipg_gate", "ipg", CCM_PCCR0, 0); | 126 | clk[ssi2_ipg_gate] = imx_clk_gate("ssi2_ipg_gate", "ipg", CCM_PCCR0, 0); |
127 | clk[ssi1_ipg_gate] = imx_clk_gate("ssi1_ipg_gate", "ipg", CCM_PCCR0, 1); | 127 | clk[ssi1_ipg_gate] = imx_clk_gate("ssi1_ipg_gate", "ipg", CCM_PCCR0, 1); |
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 9d2c843bde02..b5deb0554552 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c | |||
@@ -108,9 +108,8 @@ void __init imx3_init_l2x0(void) | |||
108 | } | 108 | } |
109 | 109 | ||
110 | l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096); | 110 | l2x0_base = ioremap(MX3x_L2CC_BASE_ADDR, 4096); |
111 | if (IS_ERR(l2x0_base)) { | 111 | if (!l2x0_base) { |
112 | printk(KERN_ERR "remapping L2 cache area failed with %ld\n", | 112 | printk(KERN_ERR "remapping L2 cache area failed\n"); |
113 | PTR_ERR(l2x0_base)); | ||
114 | return; | 113 | return; |
115 | } | 114 | } |
116 | 115 | ||
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 70c5a2882409..d94872fed8c0 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -51,9 +51,7 @@ static void __init kirkwood_dt_init(void) | |||
51 | 51 | ||
52 | kirkwood_setup_cpu_mbus(); | 52 | kirkwood_setup_cpu_mbus(); |
53 | 53 | ||
54 | #ifdef CONFIG_CACHE_FEROCEON_L2 | ||
55 | kirkwood_l2_init(); | 54 | kirkwood_l2_init(); |
56 | #endif | ||
57 | 55 | ||
58 | /* Setup root of clk tree */ | 56 | /* Setup root of clk tree */ |
59 | kirkwood_clk_init(); | 57 | kirkwood_clk_init(); |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 3991077f58a2..2c6c218fb79e 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -633,6 +633,7 @@ char * __init kirkwood_id(void) | |||
633 | 633 | ||
634 | void __init kirkwood_l2_init(void) | 634 | void __init kirkwood_l2_init(void) |
635 | { | 635 | { |
636 | #ifdef CONFIG_CACHE_FEROCEON_L2 | ||
636 | #ifdef CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH | 637 | #ifdef CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH |
637 | writel(readl(L2_CONFIG_REG) | L2_WRITETHROUGH, L2_CONFIG_REG); | 638 | writel(readl(L2_CONFIG_REG) | L2_WRITETHROUGH, L2_CONFIG_REG); |
638 | feroceon_l2_init(1); | 639 | feroceon_l2_init(1); |
@@ -640,6 +641,7 @@ void __init kirkwood_l2_init(void) | |||
640 | writel(readl(L2_CONFIG_REG) & ~L2_WRITETHROUGH, L2_CONFIG_REG); | 641 | writel(readl(L2_CONFIG_REG) & ~L2_WRITETHROUGH, L2_CONFIG_REG); |
641 | feroceon_l2_init(0); | 642 | feroceon_l2_init(0); |
642 | #endif | 643 | #endif |
644 | #endif | ||
643 | } | 645 | } |
644 | 646 | ||
645 | void __init kirkwood_init(void) | 647 | void __init kirkwood_init(void) |
@@ -657,9 +659,7 @@ void __init kirkwood_init(void) | |||
657 | 659 | ||
658 | kirkwood_setup_cpu_mbus(); | 660 | kirkwood_setup_cpu_mbus(); |
659 | 661 | ||
660 | #ifdef CONFIG_CACHE_FEROCEON_L2 | ||
661 | kirkwood_l2_init(); | 662 | kirkwood_l2_init(); |
662 | #endif | ||
663 | 663 | ||
664 | /* Setup root of clk tree */ | 664 | /* Setup root of clk tree */ |
665 | kirkwood_clk_init(); | 665 | kirkwood_clk_init(); |
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 9518bf5996dc..e255164ff087 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -444,16 +444,28 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = { | |||
444 | .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ | 444 | .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ |
445 | }; | 445 | }; |
446 | 446 | ||
447 | static struct platform_device ams_delta_audio_device = { | ||
448 | .name = "ams-delta-audio", | ||
449 | .id = -1, | ||
450 | }; | ||
451 | |||
452 | static struct platform_device cx20442_codec_device = { | ||
453 | .name = "cx20442-codec", | ||
454 | .id = -1, | ||
455 | }; | ||
456 | |||
447 | static struct platform_device *ams_delta_devices[] __initdata = { | 457 | static struct platform_device *ams_delta_devices[] __initdata = { |
448 | &latch1_gpio_device, | 458 | &latch1_gpio_device, |
449 | &latch2_gpio_device, | 459 | &latch2_gpio_device, |
450 | &ams_delta_kp_device, | 460 | &ams_delta_kp_device, |
451 | &ams_delta_camera_device, | 461 | &ams_delta_camera_device, |
462 | &ams_delta_audio_device, | ||
452 | }; | 463 | }; |
453 | 464 | ||
454 | static struct platform_device *late_devices[] __initdata = { | 465 | static struct platform_device *late_devices[] __initdata = { |
455 | &ams_delta_nand_device, | 466 | &ams_delta_nand_device, |
456 | &ams_delta_lcd_device, | 467 | &ams_delta_lcd_device, |
468 | &cx20442_codec_device, | ||
457 | }; | 469 | }; |
458 | 470 | ||
459 | static void __init ams_delta_init(void) | 471 | static void __init ams_delta_init(void) |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 2a1a898c7f90..d669e227e00c 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -11,7 +11,6 @@ config ARCH_OMAP2PLUS_TYPICAL | |||
11 | select I2C_OMAP | 11 | select I2C_OMAP |
12 | select MENELAUS if ARCH_OMAP2 | 12 | select MENELAUS if ARCH_OMAP2 |
13 | select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5 | 13 | select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5 |
14 | select PINCTRL | ||
15 | select PM_RUNTIME | 14 | select PM_RUNTIME |
16 | select REGULATOR | 15 | select REGULATOR |
17 | select SERIAL_OMAP | 16 | select SERIAL_OMAP |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 388c431c745a..d41ab98890ff 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/gpio_keys.h> | 25 | #include <linux/gpio_keys.h> |
26 | #include <linux/opp.h> | 26 | #include <linux/opp.h> |
27 | #include <linux/cpu.h> | ||
27 | 28 | ||
28 | #include <linux/mtd/mtd.h> | 29 | #include <linux/mtd/mtd.h> |
29 | #include <linux/mtd/partitions.h> | 30 | #include <linux/mtd/partitions.h> |
@@ -444,27 +445,31 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
444 | }; | 445 | }; |
445 | #endif | 446 | #endif |
446 | 447 | ||
447 | static void __init beagle_opp_init(void) | 448 | static int __init beagle_opp_init(void) |
448 | { | 449 | { |
449 | int r = 0; | 450 | int r = 0; |
450 | 451 | ||
451 | /* Initialize the omap3 opp table */ | 452 | if (!machine_is_omap3_beagle()) |
452 | if (omap3_opp_init()) { | 453 | return 0; |
454 | |||
455 | /* Initialize the omap3 opp table if not already created. */ | ||
456 | r = omap3_opp_init(); | ||
457 | if (IS_ERR_VALUE(r) && (r != -EEXIST)) { | ||
453 | pr_err("%s: opp default init failed\n", __func__); | 458 | pr_err("%s: opp default init failed\n", __func__); |
454 | return; | 459 | return r; |
455 | } | 460 | } |
456 | 461 | ||
457 | /* Custom OPP enabled for all xM versions */ | 462 | /* Custom OPP enabled for all xM versions */ |
458 | if (cpu_is_omap3630()) { | 463 | if (cpu_is_omap3630()) { |
459 | struct device *mpu_dev, *iva_dev; | 464 | struct device *mpu_dev, *iva_dev; |
460 | 465 | ||
461 | mpu_dev = omap_device_get_by_hwmod_name("mpu"); | 466 | mpu_dev = get_cpu_device(0); |
462 | iva_dev = omap_device_get_by_hwmod_name("iva"); | 467 | iva_dev = omap_device_get_by_hwmod_name("iva"); |
463 | 468 | ||
464 | if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) { | 469 | if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) { |
465 | pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", | 470 | pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", |
466 | __func__, mpu_dev, iva_dev); | 471 | __func__, mpu_dev, iva_dev); |
467 | return; | 472 | return -ENODEV; |
468 | } | 473 | } |
469 | /* Enable MPU 1GHz and lower opps */ | 474 | /* Enable MPU 1GHz and lower opps */ |
470 | r = opp_enable(mpu_dev, 800000000); | 475 | r = opp_enable(mpu_dev, 800000000); |
@@ -484,8 +489,9 @@ static void __init beagle_opp_init(void) | |||
484 | opp_disable(iva_dev, 660000000); | 489 | opp_disable(iva_dev, 660000000); |
485 | } | 490 | } |
486 | } | 491 | } |
487 | return; | 492 | return 0; |
488 | } | 493 | } |
494 | device_initcall(beagle_opp_init); | ||
489 | 495 | ||
490 | static void __init omap3_beagle_init(void) | 496 | static void __init omap3_beagle_init(void) |
491 | { | 497 | { |
@@ -522,8 +528,6 @@ static void __init omap3_beagle_init(void) | |||
522 | /* Ensure SDRC pins are mux'd for self-refresh */ | 528 | /* Ensure SDRC pins are mux'd for self-refresh */ |
523 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); | 529 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
524 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); | 530 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
525 | |||
526 | beagle_opp_init(); | ||
527 | } | 531 | } |
528 | 532 | ||
529 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") | 533 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") |
diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c index 114ab4b8e0e3..1a45d6bd2539 100644 --- a/arch/arm/mach-omap2/clock33xx_data.c +++ b/arch/arm/mach-omap2/clock33xx_data.c | |||
@@ -1073,6 +1073,8 @@ static struct omap_clk am33xx_clks[] = { | |||
1073 | CLK(NULL, "gfx_fck_div_ck", &gfx_fck_div_ck, CK_AM33XX), | 1073 | CLK(NULL, "gfx_fck_div_ck", &gfx_fck_div_ck, CK_AM33XX), |
1074 | CLK(NULL, "sysclkout_pre_ck", &sysclkout_pre_ck, CK_AM33XX), | 1074 | CLK(NULL, "sysclkout_pre_ck", &sysclkout_pre_ck, CK_AM33XX), |
1075 | CLK(NULL, "clkout2_ck", &clkout2_ck, CK_AM33XX), | 1075 | CLK(NULL, "clkout2_ck", &clkout2_ck, CK_AM33XX), |
1076 | CLK(NULL, "timer_32k_ck", &clkdiv32k_ick, CK_AM33XX), | ||
1077 | CLK(NULL, "timer_sys_ck", &sys_clkin_ck, CK_AM33XX), | ||
1076 | }; | 1078 | }; |
1077 | 1079 | ||
1078 | int __init am33xx_clk_init(void) | 1080 | int __init am33xx_clk_init(void) |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index d661d138f270..6efc30c961a5 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -3294,7 +3294,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
3294 | CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck, CK_443X), | 3294 | CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck, CK_443X), |
3295 | CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X), | 3295 | CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X), |
3296 | CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X), | 3296 | CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X), |
3297 | CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), | 3297 | CLK("omap-gpmc", "fck", &dummy_ck, CK_443X), |
3298 | CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X), | 3298 | CLK("omap_i2c.1", "ick", &dummy_ck, CK_443X), |
3299 | CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), | 3299 | CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), |
3300 | CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X), | 3300 | CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X), |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index cbb879139c51..512e79a842cb 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -925,15 +925,18 @@ static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm) | |||
925 | if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_enable) | 925 | if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_enable) |
926 | return -EINVAL; | 926 | return -EINVAL; |
927 | 927 | ||
928 | spin_lock_irqsave(&clkdm->lock, flags); | ||
929 | |||
928 | /* | 930 | /* |
929 | * For arch's with no autodeps, clkcm_clk_enable | 931 | * For arch's with no autodeps, clkcm_clk_enable |
930 | * should be called for every clock instance or hwmod that is | 932 | * should be called for every clock instance or hwmod that is |
931 | * enabled, so the clkdm can be force woken up. | 933 | * enabled, so the clkdm can be force woken up. |
932 | */ | 934 | */ |
933 | if ((atomic_inc_return(&clkdm->usecount) > 1) && autodeps) | 935 | if ((atomic_inc_return(&clkdm->usecount) > 1) && autodeps) { |
936 | spin_unlock_irqrestore(&clkdm->lock, flags); | ||
934 | return 0; | 937 | return 0; |
938 | } | ||
935 | 939 | ||
936 | spin_lock_irqsave(&clkdm->lock, flags); | ||
937 | arch_clkdm->clkdm_clk_enable(clkdm); | 940 | arch_clkdm->clkdm_clk_enable(clkdm); |
938 | pwrdm_state_switch(clkdm->pwrdm.ptr); | 941 | pwrdm_state_switch(clkdm->pwrdm.ptr); |
939 | spin_unlock_irqrestore(&clkdm->lock, flags); | 942 | spin_unlock_irqrestore(&clkdm->lock, flags); |
@@ -950,15 +953,19 @@ static int _clkdm_clk_hwmod_disable(struct clockdomain *clkdm) | |||
950 | if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_disable) | 953 | if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_disable) |
951 | return -EINVAL; | 954 | return -EINVAL; |
952 | 955 | ||
956 | spin_lock_irqsave(&clkdm->lock, flags); | ||
957 | |||
953 | if (atomic_read(&clkdm->usecount) == 0) { | 958 | if (atomic_read(&clkdm->usecount) == 0) { |
959 | spin_unlock_irqrestore(&clkdm->lock, flags); | ||
954 | WARN_ON(1); /* underflow */ | 960 | WARN_ON(1); /* underflow */ |
955 | return -ERANGE; | 961 | return -ERANGE; |
956 | } | 962 | } |
957 | 963 | ||
958 | if (atomic_dec_return(&clkdm->usecount) > 0) | 964 | if (atomic_dec_return(&clkdm->usecount) > 0) { |
965 | spin_unlock_irqrestore(&clkdm->lock, flags); | ||
959 | return 0; | 966 | return 0; |
967 | } | ||
960 | 968 | ||
961 | spin_lock_irqsave(&clkdm->lock, flags); | ||
962 | arch_clkdm->clkdm_clk_disable(clkdm); | 969 | arch_clkdm->clkdm_clk_disable(clkdm); |
963 | pwrdm_state_switch(clkdm->pwrdm.ptr); | 970 | pwrdm_state_switch(clkdm->pwrdm.ptr); |
964 | spin_unlock_irqrestore(&clkdm->lock, flags); | 971 | spin_unlock_irqrestore(&clkdm->lock, flags); |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index c8c211731d26..cba60e05e32e 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -341,7 +341,7 @@ static void __init omap_init_dmic(void) | |||
341 | 341 | ||
342 | oh = omap_hwmod_lookup("dmic"); | 342 | oh = omap_hwmod_lookup("dmic"); |
343 | if (!oh) { | 343 | if (!oh) { |
344 | printk(KERN_ERR "Could not look up mcpdm hw_mod\n"); | 344 | pr_err("Could not look up dmic hw_mod\n"); |
345 | return; | 345 | return; |
346 | } | 346 | } |
347 | 347 | ||
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 5ac5cf30406a..92b5718fa722 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -868,9 +868,9 @@ static void __devexit gpmc_mem_exit(void) | |||
868 | 868 | ||
869 | } | 869 | } |
870 | 870 | ||
871 | static void __devinit gpmc_mem_init(void) | 871 | static int __devinit gpmc_mem_init(void) |
872 | { | 872 | { |
873 | int cs; | 873 | int cs, rc; |
874 | unsigned long boot_rom_space = 0; | 874 | unsigned long boot_rom_space = 0; |
875 | 875 | ||
876 | /* never allocate the first page, to facilitate bug detection; | 876 | /* never allocate the first page, to facilitate bug detection; |
@@ -890,13 +890,21 @@ static void __devinit gpmc_mem_init(void) | |||
890 | if (!gpmc_cs_mem_enabled(cs)) | 890 | if (!gpmc_cs_mem_enabled(cs)) |
891 | continue; | 891 | continue; |
892 | gpmc_cs_get_memconf(cs, &base, &size); | 892 | gpmc_cs_get_memconf(cs, &base, &size); |
893 | if (gpmc_cs_insert_mem(cs, base, size) < 0) | 893 | rc = gpmc_cs_insert_mem(cs, base, size); |
894 | BUG(); | 894 | if (IS_ERR_VALUE(rc)) { |
895 | while (--cs >= 0) | ||
896 | if (gpmc_cs_mem_enabled(cs)) | ||
897 | gpmc_cs_delete_mem(cs); | ||
898 | return rc; | ||
899 | } | ||
895 | } | 900 | } |
901 | |||
902 | return 0; | ||
896 | } | 903 | } |
897 | 904 | ||
898 | static __devinit int gpmc_probe(struct platform_device *pdev) | 905 | static __devinit int gpmc_probe(struct platform_device *pdev) |
899 | { | 906 | { |
907 | int rc; | ||
900 | u32 l; | 908 | u32 l; |
901 | struct resource *res; | 909 | struct resource *res; |
902 | 910 | ||
@@ -936,7 +944,13 @@ static __devinit int gpmc_probe(struct platform_device *pdev) | |||
936 | dev_info(gpmc_dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l), | 944 | dev_info(gpmc_dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l), |
937 | GPMC_REVISION_MINOR(l)); | 945 | GPMC_REVISION_MINOR(l)); |
938 | 946 | ||
939 | gpmc_mem_init(); | 947 | rc = gpmc_mem_init(); |
948 | if (IS_ERR_VALUE(rc)) { | ||
949 | clk_disable_unprepare(gpmc_l3_clk); | ||
950 | clk_put(gpmc_l3_clk); | ||
951 | dev_err(gpmc_dev, "failed to reserve memory\n"); | ||
952 | return rc; | ||
953 | } | ||
940 | 954 | ||
941 | if (IS_ERR_VALUE(gpmc_setup_irq())) | 955 | if (IS_ERR_VALUE(gpmc_setup_irq())) |
942 | dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); | 956 | dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); |
diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c index 17f80e4ab162..c47140bbbec4 100644 --- a/arch/arm/mach-omap2/mux34xx.c +++ b/arch/arm/mach-omap2/mux34xx.c | |||
@@ -614,16 +614,16 @@ static struct omap_mux __initdata omap3_muxmodes[] = { | |||
614 | "sys_off_mode", NULL, NULL, NULL, | 614 | "sys_off_mode", NULL, NULL, NULL, |
615 | "gpio_9", NULL, NULL, "safe_mode"), | 615 | "gpio_9", NULL, NULL, "safe_mode"), |
616 | _OMAP3_MUXENTRY(UART1_CTS, 150, | 616 | _OMAP3_MUXENTRY(UART1_CTS, 150, |
617 | "uart1_cts", NULL, NULL, NULL, | 617 | "uart1_cts", "ssi1_rdy_tx", NULL, NULL, |
618 | "gpio_150", "hsusb3_tll_clk", NULL, "safe_mode"), | 618 | "gpio_150", "hsusb3_tll_clk", NULL, "safe_mode"), |
619 | _OMAP3_MUXENTRY(UART1_RTS, 149, | 619 | _OMAP3_MUXENTRY(UART1_RTS, 149, |
620 | "uart1_rts", NULL, NULL, NULL, | 620 | "uart1_rts", "ssi1_flag_tx", NULL, NULL, |
621 | "gpio_149", NULL, NULL, "safe_mode"), | 621 | "gpio_149", NULL, NULL, "safe_mode"), |
622 | _OMAP3_MUXENTRY(UART1_RX, 151, | 622 | _OMAP3_MUXENTRY(UART1_RX, 151, |
623 | "uart1_rx", NULL, "mcbsp1_clkr", "mcspi4_clk", | 623 | "uart1_rx", "ss1_wake_tx", "mcbsp1_clkr", "mcspi4_clk", |
624 | "gpio_151", NULL, NULL, "safe_mode"), | 624 | "gpio_151", NULL, NULL, "safe_mode"), |
625 | _OMAP3_MUXENTRY(UART1_TX, 148, | 625 | _OMAP3_MUXENTRY(UART1_TX, 148, |
626 | "uart1_tx", NULL, NULL, NULL, | 626 | "uart1_tx", "ssi1_dat_tx", NULL, NULL, |
627 | "gpio_148", NULL, NULL, "safe_mode"), | 627 | "gpio_148", NULL, NULL, "safe_mode"), |
628 | _OMAP3_MUXENTRY(UART2_CTS, 144, | 628 | _OMAP3_MUXENTRY(UART2_CTS, 144, |
629 | "uart2_cts", "mcbsp3_dx", "gpt9_pwm_evt", NULL, | 629 | "uart2_cts", "mcbsp3_dx", "gpt9_pwm_evt", NULL, |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 686137d164da..67d66131cfa7 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
@@ -91,6 +91,7 @@ extern void omap3_save_scratchpad_contents(void); | |||
91 | 91 | ||
92 | #define PM_RTA_ERRATUM_i608 (1 << 0) | 92 | #define PM_RTA_ERRATUM_i608 (1 << 0) |
93 | #define PM_SDRC_WAKEUP_ERRATUM_i583 (1 << 1) | 93 | #define PM_SDRC_WAKEUP_ERRATUM_i583 (1 << 1) |
94 | #define PM_PER_MEMORIES_ERRATUM_i582 (1 << 2) | ||
94 | 95 | ||
95 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) | 96 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) |
96 | extern u16 pm34xx_errata; | 97 | extern u16 pm34xx_errata; |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index ba670db1fd37..3a904de4313e 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -652,14 +652,17 @@ static void __init pm_errata_configure(void) | |||
652 | /* Enable the l2 cache toggling in sleep logic */ | 652 | /* Enable the l2 cache toggling in sleep logic */ |
653 | enable_omap3630_toggle_l2_on_restore(); | 653 | enable_omap3630_toggle_l2_on_restore(); |
654 | if (omap_rev() < OMAP3630_REV_ES1_2) | 654 | if (omap_rev() < OMAP3630_REV_ES1_2) |
655 | pm34xx_errata |= PM_SDRC_WAKEUP_ERRATUM_i583; | 655 | pm34xx_errata |= (PM_SDRC_WAKEUP_ERRATUM_i583 | |
656 | PM_PER_MEMORIES_ERRATUM_i582); | ||
657 | } else if (cpu_is_omap34xx()) { | ||
658 | pm34xx_errata |= PM_PER_MEMORIES_ERRATUM_i582; | ||
656 | } | 659 | } |
657 | } | 660 | } |
658 | 661 | ||
659 | int __init omap3_pm_init(void) | 662 | int __init omap3_pm_init(void) |
660 | { | 663 | { |
661 | struct power_state *pwrst, *tmp; | 664 | struct power_state *pwrst, *tmp; |
662 | struct clockdomain *neon_clkdm, *mpu_clkdm; | 665 | struct clockdomain *neon_clkdm, *mpu_clkdm, *per_clkdm, *wkup_clkdm; |
663 | int ret; | 666 | int ret; |
664 | 667 | ||
665 | if (!omap3_has_io_chain_ctrl()) | 668 | if (!omap3_has_io_chain_ctrl()) |
@@ -711,6 +714,8 @@ int __init omap3_pm_init(void) | |||
711 | 714 | ||
712 | neon_clkdm = clkdm_lookup("neon_clkdm"); | 715 | neon_clkdm = clkdm_lookup("neon_clkdm"); |
713 | mpu_clkdm = clkdm_lookup("mpu_clkdm"); | 716 | mpu_clkdm = clkdm_lookup("mpu_clkdm"); |
717 | per_clkdm = clkdm_lookup("per_clkdm"); | ||
718 | wkup_clkdm = clkdm_lookup("wkup_clkdm"); | ||
714 | 719 | ||
715 | #ifdef CONFIG_SUSPEND | 720 | #ifdef CONFIG_SUSPEND |
716 | omap_pm_suspend = omap3_pm_suspend; | 721 | omap_pm_suspend = omap3_pm_suspend; |
@@ -727,6 +732,27 @@ int __init omap3_pm_init(void) | |||
727 | if (IS_PM34XX_ERRATUM(PM_RTA_ERRATUM_i608)) | 732 | if (IS_PM34XX_ERRATUM(PM_RTA_ERRATUM_i608)) |
728 | omap3630_ctrl_disable_rta(); | 733 | omap3630_ctrl_disable_rta(); |
729 | 734 | ||
735 | /* | ||
736 | * The UART3/4 FIFO and the sidetone memory in McBSP2/3 are | ||
737 | * not correctly reset when the PER powerdomain comes back | ||
738 | * from OFF or OSWR when the CORE powerdomain is kept active. | ||
739 | * See OMAP36xx Erratum i582 "PER Domain reset issue after | ||
740 | * Domain-OFF/OSWR Wakeup". This wakeup dependency is not a | ||
741 | * complete workaround. The kernel must also prevent the PER | ||
742 | * powerdomain from going to OSWR/OFF while the CORE | ||
743 | * powerdomain is not going to OSWR/OFF. And if PER last | ||
744 | * power state was off while CORE last power state was ON, the | ||
745 | * UART3/4 and McBSP2/3 SIDETONE devices need to run a | ||
746 | * self-test using their loopback tests; if that fails, those | ||
747 | * devices are unusable until the PER/CORE can complete a transition | ||
748 | * from ON to OSWR/OFF and then back to ON. | ||
749 | * | ||
750 | * XXX Technically this workaround is only needed if off-mode | ||
751 | * or OSWR is enabled. | ||
752 | */ | ||
753 | if (IS_PM34XX_ERRATUM(PM_PER_MEMORIES_ERRATUM_i582)) | ||
754 | clkdm_add_wkdep(per_clkdm, wkup_clkdm); | ||
755 | |||
730 | clkdm_add_wkdep(neon_clkdm, mpu_clkdm); | 756 | clkdm_add_wkdep(neon_clkdm, mpu_clkdm); |
731 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) { | 757 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) { |
732 | omap3_secure_ram_storage = | 758 | omap3_secure_ram_storage = |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 0405c8190803..a507cd6cf4f1 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -329,6 +329,11 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, | |||
329 | 329 | ||
330 | oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); | 330 | oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); |
331 | 331 | ||
332 | if (console_uart_id == bdata->id) { | ||
333 | omap_device_enable(pdev); | ||
334 | pm_runtime_set_active(&pdev->dev); | ||
335 | } | ||
336 | |||
332 | oh->dev_attr = uart; | 337 | oh->dev_attr = uart; |
333 | 338 | ||
334 | if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads) | 339 | if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads) |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 44f9aa7ec0c0..69e46631a7cd 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -467,7 +467,7 @@ OMAP_SYS_TIMER(3_am33xx) | |||
467 | #ifdef CONFIG_ARCH_OMAP4 | 467 | #ifdef CONFIG_ARCH_OMAP4 |
468 | #ifdef CONFIG_LOCAL_TIMERS | 468 | #ifdef CONFIG_LOCAL_TIMERS |
469 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, | 469 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, |
470 | OMAP44XX_LOCAL_TWD_BASE, 29 + OMAP_INTC_START); | 470 | OMAP44XX_LOCAL_TWD_BASE, 29); |
471 | #endif | 471 | #endif |
472 | 472 | ||
473 | static void __init omap4_timer_init(void) | 473 | static void __init omap4_timer_init(void) |
diff --git a/arch/arm/mach-prima2/include/mach/gpio.h b/arch/arm/mach-prima2/include/mach/gpio.h deleted file mode 100644 index 1904bb03876e..000000000000 --- a/arch/arm/mach-prima2/include/mach/gpio.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __MACH_GPIO_H | ||
2 | #define __MACH_GPIO_H | ||
3 | |||
4 | /* Pull up/down values */ | ||
5 | enum sirfsoc_gpio_pull { | ||
6 | SIRFSOC_GPIO_PULL_NONE, | ||
7 | SIRFSOC_GPIO_PULL_UP, | ||
8 | SIRFSOC_GPIO_PULL_DOWN, | ||
9 | }; | ||
10 | |||
11 | void sirfsoc_gpio_set_pull(unsigned gpio, unsigned mode); | ||
12 | |||
13 | #endif | ||
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2440.c b/arch/arm/mach-s3c24xx/clock-s3c2440.c index 749220f91a70..4407b1730539 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2440.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2440.c | |||
@@ -163,7 +163,7 @@ static struct clk_lookup s3c2440_clk_lookup[] = { | |||
163 | CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n), | 163 | CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n), |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static int s3c2440_clk_add(struct device *dev, struct subsys_interface *sif) | 166 | static int __init_refok s3c2440_clk_add(struct device *dev, struct subsys_interface *sif) |
167 | { | 167 | { |
168 | struct clk *clock_upll; | 168 | struct clk *clock_upll; |
169 | struct clk *clock_h; | 169 | struct clk *clock_h; |
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index ed5a95ece9eb..77ee0b732237 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <plat/nand-core.h> | 61 | #include <plat/nand-core.h> |
62 | #include <plat/adc-core.h> | 62 | #include <plat/adc-core.h> |
63 | #include <plat/rtc-core.h> | 63 | #include <plat/rtc-core.h> |
64 | #include <plat/spi-core.h> | ||
64 | 65 | ||
65 | static struct map_desc s3c2416_iodesc[] __initdata = { | 66 | static struct map_desc s3c2416_iodesc[] __initdata = { |
66 | IODESC_ENT(WATCHDOG), | 67 | IODESC_ENT(WATCHDOG), |
@@ -132,6 +133,7 @@ void __init s3c2416_map_io(void) | |||
132 | /* initialize device information early */ | 133 | /* initialize device information early */ |
133 | s3c2416_default_sdhci0(); | 134 | s3c2416_default_sdhci0(); |
134 | s3c2416_default_sdhci1(); | 135 | s3c2416_default_sdhci1(); |
136 | s3c64xx_spi_setname("s3c2443-spi"); | ||
135 | 137 | ||
136 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); | 138 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); |
137 | } | 139 | } |
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c index ab648ad8fa50..165b6a6b3daa 100644 --- a/arch/arm/mach-s3c24xx/s3c2443.c +++ b/arch/arm/mach-s3c24xx/s3c2443.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <plat/nand-core.h> | 43 | #include <plat/nand-core.h> |
44 | #include <plat/adc-core.h> | 44 | #include <plat/adc-core.h> |
45 | #include <plat/rtc-core.h> | 45 | #include <plat/rtc-core.h> |
46 | #include <plat/spi-core.h> | ||
46 | 47 | ||
47 | static struct map_desc s3c2443_iodesc[] __initdata = { | 48 | static struct map_desc s3c2443_iodesc[] __initdata = { |
48 | IODESC_ENT(WATCHDOG), | 49 | IODESC_ENT(WATCHDOG), |
@@ -100,6 +101,9 @@ void __init s3c2443_map_io(void) | |||
100 | s3c24xx_gpiocfg_default.set_pull = s3c2443_gpio_setpull; | 101 | s3c24xx_gpiocfg_default.set_pull = s3c2443_gpio_setpull; |
101 | s3c24xx_gpiocfg_default.get_pull = s3c2443_gpio_getpull; | 102 | s3c24xx_gpiocfg_default.get_pull = s3c2443_gpio_getpull; |
102 | 103 | ||
104 | /* initialize device information early */ | ||
105 | s3c64xx_spi_setname("s3c2443-spi"); | ||
106 | |||
103 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); | 107 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); |
104 | } | 108 | } |
105 | 109 | ||
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c index 6e6a0a9d6778..111e404a81fd 100644 --- a/arch/arm/mach-s5p64x0/common.c +++ b/arch/arm/mach-s5p64x0/common.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <plat/sdhci.h> | 44 | #include <plat/sdhci.h> |
45 | #include <plat/adc-core.h> | 45 | #include <plat/adc-core.h> |
46 | #include <plat/fb-core.h> | 46 | #include <plat/fb-core.h> |
47 | #include <plat/spi-core.h> | ||
47 | #include <plat/gpio-cfg.h> | 48 | #include <plat/gpio-cfg.h> |
48 | #include <plat/regs-irqtype.h> | 49 | #include <plat/regs-irqtype.h> |
49 | #include <plat/regs-serial.h> | 50 | #include <plat/regs-serial.h> |
@@ -179,6 +180,7 @@ void __init s5p6440_map_io(void) | |||
179 | /* initialize any device information early */ | 180 | /* initialize any device information early */ |
180 | s3c_adc_setname("s3c64xx-adc"); | 181 | s3c_adc_setname("s3c64xx-adc"); |
181 | s3c_fb_setname("s5p64x0-fb"); | 182 | s3c_fb_setname("s5p64x0-fb"); |
183 | s3c64xx_spi_setname("s5p64x0-spi"); | ||
182 | 184 | ||
183 | s5p64x0_default_sdhci0(); | 185 | s5p64x0_default_sdhci0(); |
184 | s5p64x0_default_sdhci1(); | 186 | s5p64x0_default_sdhci1(); |
@@ -193,6 +195,7 @@ void __init s5p6450_map_io(void) | |||
193 | /* initialize any device information early */ | 195 | /* initialize any device information early */ |
194 | s3c_adc_setname("s3c64xx-adc"); | 196 | s3c_adc_setname("s3c64xx-adc"); |
195 | s3c_fb_setname("s5p64x0-fb"); | 197 | s3c_fb_setname("s5p64x0-fb"); |
198 | s3c64xx_spi_setname("s5p64x0-spi"); | ||
196 | 199 | ||
197 | s5p64x0_default_sdhci0(); | 200 | s5p64x0_default_sdhci0(); |
198 | s5p64x0_default_sdhci1(); | 201 | s5p64x0_default_sdhci1(); |
diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c index 621908658861..cc6e561c9958 100644 --- a/arch/arm/mach-s5pc100/common.c +++ b/arch/arm/mach-s5pc100/common.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <plat/fb-core.h> | 45 | #include <plat/fb-core.h> |
46 | #include <plat/iic-core.h> | 46 | #include <plat/iic-core.h> |
47 | #include <plat/onenand-core.h> | 47 | #include <plat/onenand-core.h> |
48 | #include <plat/spi-core.h> | ||
48 | #include <plat/regs-serial.h> | 49 | #include <plat/regs-serial.h> |
49 | #include <plat/watchdog-reset.h> | 50 | #include <plat/watchdog-reset.h> |
50 | 51 | ||
@@ -165,6 +166,8 @@ void __init s5pc100_map_io(void) | |||
165 | s3c_onenand_setname("s5pc100-onenand"); | 166 | s3c_onenand_setname("s5pc100-onenand"); |
166 | s3c_fb_setname("s5pc100-fb"); | 167 | s3c_fb_setname("s5pc100-fb"); |
167 | s3c_cfcon_setname("s5pc100-pata"); | 168 | s3c_cfcon_setname("s5pc100-pata"); |
169 | |||
170 | s3c64xx_spi_setname("s5pc100-spi"); | ||
168 | } | 171 | } |
169 | 172 | ||
170 | void __init s5pc100_init_clocks(int xtal) | 173 | void __init s5pc100_init_clocks(int xtal) |
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c index 4c9e9027df9a..a0c50efe8145 100644 --- a/arch/arm/mach-s5pv210/common.c +++ b/arch/arm/mach-s5pv210/common.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <plat/iic-core.h> | 43 | #include <plat/iic-core.h> |
44 | #include <plat/keypad-core.h> | 44 | #include <plat/keypad-core.h> |
45 | #include <plat/tv-core.h> | 45 | #include <plat/tv-core.h> |
46 | #include <plat/spi-core.h> | ||
46 | #include <plat/regs-serial.h> | 47 | #include <plat/regs-serial.h> |
47 | 48 | ||
48 | #include "common.h" | 49 | #include "common.h" |
@@ -196,6 +197,8 @@ void __init s5pv210_map_io(void) | |||
196 | 197 | ||
197 | /* setup TV devices */ | 198 | /* setup TV devices */ |
198 | s5p_hdmi_setname("s5pv210-hdmi"); | 199 | s5p_hdmi_setname("s5pv210-hdmi"); |
200 | |||
201 | s3c64xx_spi_setname("s5pv210-spi"); | ||
199 | } | 202 | } |
200 | 203 | ||
201 | void __init s5pv210_init_clocks(int xtal) | 204 | void __init s5pv210_init_clocks(int xtal) |
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 2912eab3b967..3cc8b1c21da9 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -1196,7 +1196,7 @@ static void __init eva_init(void) | |||
1196 | 1196 | ||
1197 | #ifdef CONFIG_CACHE_L2X0 | 1197 | #ifdef CONFIG_CACHE_L2X0 |
1198 | /* Early BRESP enable, Shared attribute override enable, 32K*8way */ | 1198 | /* Early BRESP enable, Shared attribute override enable, 32K*8way */ |
1199 | l2x0_init(__io(0xf0002000), 0x40440000, 0x82000fff); | 1199 | l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff); |
1200 | #endif | 1200 | #endif |
1201 | 1201 | ||
1202 | i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices)); | 1202 | i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices)); |
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index 3cafb6ab5e9a..37b2a3133b3b 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c | |||
@@ -24,17 +24,17 @@ | |||
24 | #include <linux/clkdev.h> | 24 | #include <linux/clkdev.h> |
25 | #include <mach/common.h> | 25 | #include <mach/common.h> |
26 | 26 | ||
27 | #define FRQMR 0xffc80014 | 27 | #define FRQMR IOMEM(0xffc80014) |
28 | #define MSTPCR0 0xffc80030 | 28 | #define MSTPCR0 IOMEM(0xffc80030) |
29 | #define MSTPCR1 0xffc80034 | 29 | #define MSTPCR1 IOMEM(0xffc80034) |
30 | #define MSTPCR3 0xffc8003c | 30 | #define MSTPCR3 IOMEM(0xffc8003c) |
31 | #define MSTPSR1 0xffc80044 | 31 | #define MSTPSR1 IOMEM(0xffc80044) |
32 | #define MSTPSR4 0xffc80048 | 32 | #define MSTPSR4 IOMEM(0xffc80048) |
33 | #define MSTPSR6 0xffc8004c | 33 | #define MSTPSR6 IOMEM(0xffc8004c) |
34 | #define MSTPCR4 0xffc80050 | 34 | #define MSTPCR4 IOMEM(0xffc80050) |
35 | #define MSTPCR5 0xffc80054 | 35 | #define MSTPCR5 IOMEM(0xffc80054) |
36 | #define MSTPCR6 0xffc80058 | 36 | #define MSTPCR6 IOMEM(0xffc80058) |
37 | #define MSTPCR7 0xffc80040 | 37 | #define MSTPCR7 IOMEM(0xffc80040) |
38 | 38 | ||
39 | /* ioremap() through clock mapping mandatory to avoid | 39 | /* ioremap() through clock mapping mandatory to avoid |
40 | * collision with ARM coherent DMA virtual memory range. | 40 | * collision with ARM coherent DMA virtual memory range. |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 2917668f0091..ebbffc25f24f 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -247,7 +247,7 @@ void __init r8a7779_add_standard_devices(void) | |||
247 | { | 247 | { |
248 | #ifdef CONFIG_CACHE_L2X0 | 248 | #ifdef CONFIG_CACHE_L2X0 |
249 | /* Early BRESP enable, Shared attribute override enable, 64K*16way */ | 249 | /* Early BRESP enable, Shared attribute override enable, 64K*16way */ |
250 | l2x0_init((void __iomem __force *)(0xf0100000), 0x40470000, 0x82000fff); | 250 | l2x0_init(IOMEM(0xf0100000), 0x40470000, 0x82000fff); |
251 | #endif | 251 | #endif |
252 | r8a7779_pm_init(); | 252 | r8a7779_pm_init(); |
253 | 253 | ||
diff --git a/arch/arm/mach-spear13xx/include/mach/spear1310_misc_regs.h b/arch/arm/mach-spear13xx/include/mach/spear1310_misc_regs.h deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/arch/arm/mach-spear13xx/include/mach/spear1310_misc_regs.h +++ /dev/null | |||
diff --git a/arch/arm/mach-spear13xx/include/mach/spear1340_misc_regs.h b/arch/arm/mach-spear13xx/include/mach/spear1340_misc_regs.h deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/arch/arm/mach-spear13xx/include/mach/spear1340_misc_regs.h +++ /dev/null | |||
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c index 57e235f4ac74..aa5325cd1c42 100644 --- a/arch/arm/mach-tegra/board-dt-tegra20.c +++ b/arch/arm/mach-tegra/board-dt-tegra20.c | |||
@@ -182,7 +182,7 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)") | |||
182 | .init_early = tegra20_init_early, | 182 | .init_early = tegra20_init_early, |
183 | .init_irq = tegra_dt_init_irq, | 183 | .init_irq = tegra_dt_init_irq, |
184 | .handle_irq = gic_handle_irq, | 184 | .handle_irq = gic_handle_irq, |
185 | .timer = &tegra_timer, | 185 | .timer = &tegra_sys_timer, |
186 | .init_machine = tegra_dt_init, | 186 | .init_machine = tegra_dt_init, |
187 | .init_late = tegra_dt_init_late, | 187 | .init_late = tegra_dt_init_late, |
188 | .restart = tegra_assert_system_reset, | 188 | .restart = tegra_assert_system_reset, |
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c index e4a676d4ddf7..5e92a81f9a2e 100644 --- a/arch/arm/mach-tegra/board-dt-tegra30.c +++ b/arch/arm/mach-tegra/board-dt-tegra30.c | |||
@@ -89,7 +89,7 @@ DT_MACHINE_START(TEGRA30_DT, "NVIDIA Tegra30 (Flattened Device Tree)") | |||
89 | .init_early = tegra30_init_early, | 89 | .init_early = tegra30_init_early, |
90 | .init_irq = tegra_dt_init_irq, | 90 | .init_irq = tegra_dt_init_irq, |
91 | .handle_irq = gic_handle_irq, | 91 | .handle_irq = gic_handle_irq, |
92 | .timer = &tegra_timer, | 92 | .timer = &tegra_sys_timer, |
93 | .init_machine = tegra30_dt_init, | 93 | .init_machine = tegra30_dt_init, |
94 | .init_late = tegra_init_late, | 94 | .init_late = tegra_init_late, |
95 | .restart = tegra_assert_system_reset, | 95 | .restart = tegra_assert_system_reset, |
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h index f88e5143c767..91fbe733a21e 100644 --- a/arch/arm/mach-tegra/board.h +++ b/arch/arm/mach-tegra/board.h | |||
@@ -55,5 +55,5 @@ static inline int harmony_pcie_init(void) { return 0; } | |||
55 | 55 | ||
56 | void __init tegra_paz00_wifikill_init(void); | 56 | void __init tegra_paz00_wifikill_init(void); |
57 | 57 | ||
58 | extern struct sys_timer tegra_timer; | 58 | extern struct sys_timer tegra_sys_timer; |
59 | #endif | 59 | #endif |
diff --git a/arch/arm/mach-tegra/tegra20_clocks_data.c b/arch/arm/mach-tegra/tegra20_clocks_data.c index cc9b5fd8c3d3..8d398a33adf7 100644 --- a/arch/arm/mach-tegra/tegra20_clocks_data.c +++ b/arch/arm/mach-tegra/tegra20_clocks_data.c | |||
@@ -953,6 +953,7 @@ PERIPH_CLK(pcie_xclk, NULL, "pcie_xclk", 74, 0, 26000000, mux_clk_m, | |||
953 | static struct clk *tegra_list_clks[] = { | 953 | static struct clk *tegra_list_clks[] = { |
954 | &tegra_apbdma, | 954 | &tegra_apbdma, |
955 | &tegra_rtc, | 955 | &tegra_rtc, |
956 | &tegra_timer, | ||
956 | &tegra_i2s1, | 957 | &tegra_i2s1, |
957 | &tegra_i2s2, | 958 | &tegra_i2s2, |
958 | &tegra_spdif_out, | 959 | &tegra_spdif_out, |
diff --git a/arch/arm/mach-tegra/tegra30_clocks.c b/arch/arm/mach-tegra/tegra30_clocks.c index 5cd502c27163..e9de5dfd94ec 100644 --- a/arch/arm/mach-tegra/tegra30_clocks.c +++ b/arch/arm/mach-tegra/tegra30_clocks.c | |||
@@ -1199,7 +1199,7 @@ static long tegra30_pll_round_rate(struct clk_hw *hw, unsigned long rate, | |||
1199 | { | 1199 | { |
1200 | struct clk_tegra *c = to_clk_tegra(hw); | 1200 | struct clk_tegra *c = to_clk_tegra(hw); |
1201 | unsigned long input_rate = *prate; | 1201 | unsigned long input_rate = *prate; |
1202 | unsigned long output_rate = *prate; | 1202 | u64 output_rate = *prate; |
1203 | const struct clk_pll_freq_table *sel; | 1203 | const struct clk_pll_freq_table *sel; |
1204 | struct clk_pll_freq_table cfg; | 1204 | struct clk_pll_freq_table cfg; |
1205 | int mul; | 1205 | int mul; |
diff --git a/arch/arm/mach-tegra/tegra30_clocks_data.c b/arch/arm/mach-tegra/tegra30_clocks_data.c index d92cb556ae35..3d2e5532a9ea 100644 --- a/arch/arm/mach-tegra/tegra30_clocks_data.c +++ b/arch/arm/mach-tegra/tegra30_clocks_data.c | |||
@@ -1143,6 +1143,7 @@ struct clk *tegra_list_clks[] = { | |||
1143 | &tegra_apbdma, | 1143 | &tegra_apbdma, |
1144 | &tegra_rtc, | 1144 | &tegra_rtc, |
1145 | &tegra_kbc, | 1145 | &tegra_kbc, |
1146 | &tegra_timer, | ||
1146 | &tegra_kfuse, | 1147 | &tegra_kfuse, |
1147 | &tegra_fuse, | 1148 | &tegra_fuse, |
1148 | &tegra_fuse_burn, | 1149 | &tegra_fuse_burn, |
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c index eccdce983043..d3b8c8e7368f 100644 --- a/arch/arm/mach-tegra/timer.c +++ b/arch/arm/mach-tegra/timer.c | |||
@@ -245,7 +245,7 @@ static void __init tegra_init_timer(void) | |||
245 | register_persistent_clock(NULL, tegra_read_persistent_clock); | 245 | register_persistent_clock(NULL, tegra_read_persistent_clock); |
246 | } | 246 | } |
247 | 247 | ||
248 | struct sys_timer tegra_timer = { | 248 | struct sys_timer tegra_sys_timer = { |
249 | .init = tegra_init_timer, | 249 | .init = tegra_init_timer, |
250 | }; | 250 | }; |
251 | 251 | ||
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 2236cbd03cd7..1f3fbc2bb776 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/stat.h> | 16 | #include <linux/stat.h> |
17 | #include <linux/of.h> | 17 | #include <linux/of.h> |
18 | #include <linux/of_irq.h> | 18 | #include <linux/of_irq.h> |
19 | #include <linux/irq.h> | ||
19 | #include <linux/platform_data/clk-ux500.h> | 20 | #include <linux/platform_data/clk-ux500.h> |
20 | 21 | ||
21 | #include <asm/hardware/gic.h> | 22 | #include <asm/hardware/gic.h> |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index b9f60ebe3bc4..023f443784ec 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -856,8 +856,10 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
856 | if (thumb2_32b) { | 856 | if (thumb2_32b) { |
857 | offset.un = 0; | 857 | offset.un = 0; |
858 | handler = do_alignment_t32_to_handler(&instr, regs, &offset); | 858 | handler = do_alignment_t32_to_handler(&instr, regs, &offset); |
859 | } else | 859 | } else { |
860 | offset.un = 0; | ||
860 | handler = do_alignment_ldmstm; | 861 | handler = do_alignment_ldmstm; |
862 | } | ||
861 | break; | 863 | break; |
862 | 864 | ||
863 | default: | 865 | default: |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 477a2d23ddf1..58bc3e4d3bd0 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -610,7 +610,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, | |||
610 | gfp_t gfp, pgprot_t prot, bool is_coherent, const void *caller) | 610 | gfp_t gfp, pgprot_t prot, bool is_coherent, const void *caller) |
611 | { | 611 | { |
612 | u64 mask = get_coherent_dma_mask(dev); | 612 | u64 mask = get_coherent_dma_mask(dev); |
613 | struct page *page; | 613 | struct page *page = NULL; |
614 | void *addr; | 614 | void *addr; |
615 | 615 | ||
616 | #ifdef CONFIG_DMA_API_DEBUG | 616 | #ifdef CONFIG_DMA_API_DEBUG |
diff --git a/arch/arm/mm/vmregion.h b/arch/arm/mm/vmregion.h index bf312c354a21..0f5a5f2a2c7b 100644 --- a/arch/arm/mm/vmregion.h +++ b/arch/arm/mm/vmregion.h | |||
@@ -17,7 +17,6 @@ struct arm_vmregion { | |||
17 | struct list_head vm_list; | 17 | struct list_head vm_list; |
18 | unsigned long vm_start; | 18 | unsigned long vm_start; |
19 | unsigned long vm_end; | 19 | unsigned long vm_end; |
20 | void *priv; | ||
21 | int vm_active; | 20 | int vm_active; |
22 | const void *caller; | 21 | const void *caller; |
23 | }; | 22 | }; |
diff --git a/arch/arm/plat-mxc/devices/platform-mxc-mmc.c b/arch/arm/plat-mxc/devices/platform-mxc-mmc.c index 540d3a7d92df..e7b920b58675 100644 --- a/arch/arm/plat-mxc/devices/platform-mxc-mmc.c +++ b/arch/arm/plat-mxc/devices/platform-mxc-mmc.c | |||
@@ -55,7 +55,7 @@ struct platform_device *__init imx_add_mxc_mmc( | |||
55 | struct resource res[] = { | 55 | struct resource res[] = { |
56 | { | 56 | { |
57 | .start = data->iobase, | 57 | .start = data->iobase, |
58 | .end = data->iobase + SZ_4K - 1, | 58 | .end = data->iobase + data->iosize - 1, |
59 | .flags = IORESOURCE_MEM, | 59 | .flags = IORESOURCE_MEM, |
60 | }, { | 60 | }, { |
61 | .start = data->irq, | 61 | .start = data->irq, |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 7cd56ed5cd94..82fcb206b5b2 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -26,6 +26,7 @@ config ARCH_OMAP2PLUS | |||
26 | select CLKDEV_LOOKUP | 26 | select CLKDEV_LOOKUP |
27 | select GENERIC_IRQ_CHIP | 27 | select GENERIC_IRQ_CHIP |
28 | select OMAP_DM_TIMER | 28 | select OMAP_DM_TIMER |
29 | select PINCTRL | ||
29 | select PROC_DEVICETREE if PROC_FS | 30 | select PROC_DEVICETREE if PROC_FS |
30 | select SPARSE_IRQ | 31 | select SPARSE_IRQ |
31 | select USE_OF | 32 | select USE_OF |
diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c index c7a4c0902b38..5a4678edd65a 100644 --- a/arch/arm/plat-omap/debug-devices.c +++ b/arch/arm/plat-omap/debug-devices.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/smc91x.h> | 16 | #include <linux/smc91x.h> |
17 | 17 | ||
18 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
19 | #include "../mach-omap2/debug-devices.h" | ||
19 | 20 | ||
20 | /* Many OMAP development platforms reuse the same "debug board"; these | 21 | /* Many OMAP development platforms reuse the same "debug board"; these |
21 | * platforms include H2, H3, H4, and Perseus2. | 22 | * platforms include H2, H3, H4, and Perseus2. |
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h index f4a4cd014795..1957a8516e93 100644 --- a/arch/arm/plat-omap/include/plat/omap-serial.h +++ b/arch/arm/plat-omap/include/plat/omap-serial.h | |||
@@ -40,10 +40,10 @@ | |||
40 | #define OMAP_UART_WER_MOD_WKUP 0X7F | 40 | #define OMAP_UART_WER_MOD_WKUP 0X7F |
41 | 41 | ||
42 | /* Enable XON/XOFF flow control on output */ | 42 | /* Enable XON/XOFF flow control on output */ |
43 | #define OMAP_UART_SW_TX 0x8 | 43 | #define OMAP_UART_SW_TX 0x04 |
44 | 44 | ||
45 | /* Enable XON/XOFF flow control on input */ | 45 | /* Enable XON/XOFF flow control on input */ |
46 | #define OMAP_UART_SW_RX 0x2 | 46 | #define OMAP_UART_SW_RX 0x04 |
47 | 47 | ||
48 | #define OMAP_UART_SYSC_RESET 0X07 | 48 | #define OMAP_UART_SYSC_RESET 0X07 |
49 | #define OMAP_UART_TCR_TRIG 0X0F | 49 | #define OMAP_UART_TCR_TRIG 0X0F |
diff --git a/arch/arm/plat-samsung/include/plat/spi-core.h b/arch/arm/plat-samsung/include/plat/spi-core.h new file mode 100644 index 000000000000..0b9428ab3fc3 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/spi-core.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __PLAT_S3C_SPI_CORE_H | ||
10 | #define __PLAT_S3C_SPI_CORE_H | ||
11 | |||
12 | /* These functions are only for use with the core support code, such as | ||
13 | * the cpu specific initialisation code | ||
14 | */ | ||
15 | |||
16 | /* re-define device name depending on support. */ | ||
17 | static inline void s3c64xx_spi_setname(char *name) | ||
18 | { | ||
19 | #ifdef CONFIG_S3C64XX_DEV_SPI0 | ||
20 | s3c64xx_device_spi0.name = name; | ||
21 | #endif | ||
22 | #ifdef CONFIG_S3C64XX_DEV_SPI1 | ||
23 | s3c64xx_device_spi1.name = name; | ||
24 | #endif | ||
25 | #ifdef CONFIG_S3C64XX_DEV_SPI2 | ||
26 | s3c64xx_device_spi2.name = name; | ||
27 | #endif | ||
28 | } | ||
29 | |||
30 | #endif /* __PLAT_S3C_SPI_CORE_H */ | ||
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile index 635cb1865e4d..cd60a81163e9 100644 --- a/arch/arm/tools/Makefile +++ b/arch/arm/tools/Makefile | |||
@@ -5,6 +5,6 @@ | |||
5 | # | 5 | # |
6 | 6 | ||
7 | include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types | 7 | include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types |
8 | @echo ' Generating $@' | 8 | $(kecho) ' Generating $@' |
9 | @mkdir -p $(dir $@) | 9 | @mkdir -p $(dir $@) |
10 | $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } | 10 | $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } |
diff --git a/arch/arm/xen/grant-table.c b/arch/arm/xen/grant-table.c index dbd1330c0196..859a9bb002d5 100644 --- a/arch/arm/xen/grant-table.c +++ b/arch/arm/xen/grant-table.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <xen/page.h> | 33 | #include <xen/page.h> |
34 | #include <xen/grant_table.h> | 34 | #include <xen/grant_table.h> |
35 | 35 | ||
36 | int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes, | 36 | int arch_gnttab_map_shared(xen_pfn_t *frames, unsigned long nr_gframes, |
37 | unsigned long max_nr_gframes, | 37 | unsigned long max_nr_gframes, |
38 | void **__shared) | 38 | void **__shared) |
39 | { | 39 | { |
diff --git a/arch/arm/xen/hypercall.S b/arch/arm/xen/hypercall.S index 074f5ed101b9..71f723984cbd 100644 --- a/arch/arm/xen/hypercall.S +++ b/arch/arm/xen/hypercall.S | |||
@@ -48,20 +48,16 @@ | |||
48 | 48 | ||
49 | #include <linux/linkage.h> | 49 | #include <linux/linkage.h> |
50 | #include <asm/assembler.h> | 50 | #include <asm/assembler.h> |
51 | #include <asm/opcodes-virt.h> | ||
51 | #include <xen/interface/xen.h> | 52 | #include <xen/interface/xen.h> |
52 | 53 | ||
53 | 54 | ||
54 | /* HVC 0xEA1 */ | 55 | #define XEN_IMM 0xEA1 |
55 | #ifdef CONFIG_THUMB2_KERNEL | ||
56 | #define xen_hvc .word 0xf7e08ea1 | ||
57 | #else | ||
58 | #define xen_hvc .word 0xe140ea71 | ||
59 | #endif | ||
60 | 56 | ||
61 | #define HYPERCALL_SIMPLE(hypercall) \ | 57 | #define HYPERCALL_SIMPLE(hypercall) \ |
62 | ENTRY(HYPERVISOR_##hypercall) \ | 58 | ENTRY(HYPERVISOR_##hypercall) \ |
63 | mov r12, #__HYPERVISOR_##hypercall; \ | 59 | mov r12, #__HYPERVISOR_##hypercall; \ |
64 | xen_hvc; \ | 60 | __HVC(XEN_IMM); \ |
65 | mov pc, lr; \ | 61 | mov pc, lr; \ |
66 | ENDPROC(HYPERVISOR_##hypercall) | 62 | ENDPROC(HYPERVISOR_##hypercall) |
67 | 63 | ||
@@ -76,7 +72,7 @@ ENTRY(HYPERVISOR_##hypercall) \ | |||
76 | stmdb sp!, {r4} \ | 72 | stmdb sp!, {r4} \ |
77 | ldr r4, [sp, #4] \ | 73 | ldr r4, [sp, #4] \ |
78 | mov r12, #__HYPERVISOR_##hypercall; \ | 74 | mov r12, #__HYPERVISOR_##hypercall; \ |
79 | xen_hvc \ | 75 | __HVC(XEN_IMM); \ |
80 | ldm sp!, {r4} \ | 76 | ldm sp!, {r4} \ |
81 | mov pc, lr \ | 77 | mov pc, lr \ |
82 | ENDPROC(HYPERVISOR_##hypercall) | 78 | ENDPROC(HYPERVISOR_##hypercall) |
@@ -100,7 +96,7 @@ ENTRY(privcmd_call) | |||
100 | mov r2, r3 | 96 | mov r2, r3 |
101 | ldr r3, [sp, #8] | 97 | ldr r3, [sp, #8] |
102 | ldr r4, [sp, #4] | 98 | ldr r4, [sp, #4] |
103 | xen_hvc | 99 | __HVC(XEN_IMM) |
104 | ldm sp!, {r4} | 100 | ldm sp!, {r4} |
105 | mov pc, lr | 101 | mov pc, lr |
106 | ENDPROC(privcmd_call); | 102 | ENDPROC(privcmd_call); |
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 7ff68c946073..ef54a59a9e89 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
@@ -22,6 +22,7 @@ config ARM64 | |||
22 | select HAVE_PERF_EVENTS | 22 | select HAVE_PERF_EVENTS |
23 | select HAVE_SPARSE_IRQ | 23 | select HAVE_SPARSE_IRQ |
24 | select IRQ_DOMAIN | 24 | select IRQ_DOMAIN |
25 | select MODULES_USE_ELF_RELA | ||
25 | select NO_BOOTMEM | 26 | select NO_BOOTMEM |
26 | select OF | 27 | select OF |
27 | select OF_EARLY_FLATTREE | 28 | select OF_EARLY_FLATTREE |
diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index fe77e51a7847..a581a2205938 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild | |||
@@ -18,7 +18,6 @@ generic-y += ipcbuf.h | |||
18 | generic-y += irq_regs.h | 18 | generic-y += irq_regs.h |
19 | generic-y += kdebug.h | 19 | generic-y += kdebug.h |
20 | generic-y += kmap_types.h | 20 | generic-y += kmap_types.h |
21 | generic-y += linkage.h | ||
22 | generic-y += local.h | 21 | generic-y += local.h |
23 | generic-y += local64.h | 22 | generic-y += local64.h |
24 | generic-y += mman.h | 23 | generic-y += mman.h |
diff --git a/arch/arm64/include/asm/linkage.h b/arch/arm64/include/asm/linkage.h new file mode 100644 index 000000000000..636c1bced7d4 --- /dev/null +++ b/arch/arm64/include/asm/linkage.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_LINKAGE_H | ||
2 | #define __ASM_LINKAGE_H | ||
3 | |||
4 | #define __ALIGN .align 4 | ||
5 | #define __ALIGN_STR ".align 4" | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 39a208a392f7..5d810044feda 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h | |||
@@ -92,30 +92,20 @@ static inline void start_thread_common(struct pt_regs *regs, unsigned long pc) | |||
92 | static inline void start_thread(struct pt_regs *regs, unsigned long pc, | 92 | static inline void start_thread(struct pt_regs *regs, unsigned long pc, |
93 | unsigned long sp) | 93 | unsigned long sp) |
94 | { | 94 | { |
95 | unsigned long *stack = (unsigned long *)sp; | ||
96 | |||
97 | start_thread_common(regs, pc); | 95 | start_thread_common(regs, pc); |
98 | regs->pstate = PSR_MODE_EL0t; | 96 | regs->pstate = PSR_MODE_EL0t; |
99 | regs->sp = sp; | 97 | regs->sp = sp; |
100 | regs->regs[2] = stack[2]; /* x2 (envp) */ | ||
101 | regs->regs[1] = stack[1]; /* x1 (argv) */ | ||
102 | regs->regs[0] = stack[0]; /* x0 (argc) */ | ||
103 | } | 98 | } |
104 | 99 | ||
105 | #ifdef CONFIG_COMPAT | 100 | #ifdef CONFIG_COMPAT |
106 | static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc, | 101 | static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc, |
107 | unsigned long sp) | 102 | unsigned long sp) |
108 | { | 103 | { |
109 | unsigned int *stack = (unsigned int *)sp; | ||
110 | |||
111 | start_thread_common(regs, pc); | 104 | start_thread_common(regs, pc); |
112 | regs->pstate = COMPAT_PSR_MODE_USR; | 105 | regs->pstate = COMPAT_PSR_MODE_USR; |
113 | if (pc & 1) | 106 | if (pc & 1) |
114 | regs->pstate |= COMPAT_PSR_T_BIT; | 107 | regs->pstate |= COMPAT_PSR_T_BIT; |
115 | regs->compat_sp = sp; | 108 | regs->compat_sp = sp; |
116 | regs->regs[2] = stack[2]; /* x2 (envp) */ | ||
117 | regs->regs[1] = stack[1]; /* x1 (argv) */ | ||
118 | regs->regs[0] = stack[0]; /* x0 (argc) */ | ||
119 | } | 109 | } |
120 | #endif | 110 | #endif |
121 | 111 | ||
diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h index 9b131b4efa0b..6913643bbe54 100644 --- a/arch/arm64/include/uapi/asm/ptrace.h +++ b/arch/arm64/include/uapi/asm/ptrace.h | |||
@@ -79,13 +79,14 @@ struct user_fpsimd_state { | |||
79 | 79 | ||
80 | struct user_hwdebug_state { | 80 | struct user_hwdebug_state { |
81 | __u32 dbg_info; | 81 | __u32 dbg_info; |
82 | __u32 pad; | ||
82 | struct { | 83 | struct { |
83 | __u64 addr; | 84 | __u64 addr; |
84 | __u32 ctrl; | 85 | __u32 ctrl; |
86 | __u32 pad; | ||
85 | } dbg_regs[16]; | 87 | } dbg_regs[16]; |
86 | }; | 88 | }; |
87 | 89 | ||
88 | |||
89 | #endif /* __ASSEMBLY__ */ | 90 | #endif /* __ASSEMBLY__ */ |
90 | 91 | ||
91 | #endif /* _UAPI__ASM_PTRACE_H */ | 92 | #endif /* _UAPI__ASM_PTRACE_H */ |
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 2ea3968367c2..6e1e77f1831c 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c | |||
@@ -234,28 +234,33 @@ static int ptrace_hbp_fill_attr_ctrl(unsigned int note_type, | |||
234 | struct arch_hw_breakpoint_ctrl ctrl, | 234 | struct arch_hw_breakpoint_ctrl ctrl, |
235 | struct perf_event_attr *attr) | 235 | struct perf_event_attr *attr) |
236 | { | 236 | { |
237 | int err, len, type; | 237 | int err, len, type, disabled = !ctrl.enabled; |
238 | 238 | ||
239 | err = arch_bp_generic_fields(ctrl, &len, &type); | 239 | if (disabled) { |
240 | if (err) | 240 | len = 0; |
241 | return err; | 241 | type = HW_BREAKPOINT_EMPTY; |
242 | 242 | } else { | |
243 | switch (note_type) { | 243 | err = arch_bp_generic_fields(ctrl, &len, &type); |
244 | case NT_ARM_HW_BREAK: | 244 | if (err) |
245 | if ((type & HW_BREAKPOINT_X) != type) | 245 | return err; |
246 | return -EINVAL; | 246 | |
247 | break; | 247 | switch (note_type) { |
248 | case NT_ARM_HW_WATCH: | 248 | case NT_ARM_HW_BREAK: |
249 | if ((type & HW_BREAKPOINT_RW) != type) | 249 | if ((type & HW_BREAKPOINT_X) != type) |
250 | return -EINVAL; | ||
251 | break; | ||
252 | case NT_ARM_HW_WATCH: | ||
253 | if ((type & HW_BREAKPOINT_RW) != type) | ||
254 | return -EINVAL; | ||
255 | break; | ||
256 | default: | ||
250 | return -EINVAL; | 257 | return -EINVAL; |
251 | break; | 258 | } |
252 | default: | ||
253 | return -EINVAL; | ||
254 | } | 259 | } |
255 | 260 | ||
256 | attr->bp_len = len; | 261 | attr->bp_len = len; |
257 | attr->bp_type = type; | 262 | attr->bp_type = type; |
258 | attr->disabled = !ctrl.enabled; | 263 | attr->disabled = disabled; |
259 | 264 | ||
260 | return 0; | 265 | return 0; |
261 | } | 266 | } |
@@ -372,7 +377,7 @@ static int ptrace_hbp_set_addr(unsigned int note_type, | |||
372 | 377 | ||
373 | #define PTRACE_HBP_ADDR_SZ sizeof(u64) | 378 | #define PTRACE_HBP_ADDR_SZ sizeof(u64) |
374 | #define PTRACE_HBP_CTRL_SZ sizeof(u32) | 379 | #define PTRACE_HBP_CTRL_SZ sizeof(u32) |
375 | #define PTRACE_HBP_REG_OFF sizeof(u32) | 380 | #define PTRACE_HBP_PAD_SZ sizeof(u32) |
376 | 381 | ||
377 | static int hw_break_get(struct task_struct *target, | 382 | static int hw_break_get(struct task_struct *target, |
378 | const struct user_regset *regset, | 383 | const struct user_regset *regset, |
@@ -380,7 +385,7 @@ static int hw_break_get(struct task_struct *target, | |||
380 | void *kbuf, void __user *ubuf) | 385 | void *kbuf, void __user *ubuf) |
381 | { | 386 | { |
382 | unsigned int note_type = regset->core_note_type; | 387 | unsigned int note_type = regset->core_note_type; |
383 | int ret, idx = 0, offset = PTRACE_HBP_REG_OFF, limit; | 388 | int ret, idx = 0, offset, limit; |
384 | u32 info, ctrl; | 389 | u32 info, ctrl; |
385 | u64 addr; | 390 | u64 addr; |
386 | 391 | ||
@@ -389,11 +394,20 @@ static int hw_break_get(struct task_struct *target, | |||
389 | if (ret) | 394 | if (ret) |
390 | return ret; | 395 | return ret; |
391 | 396 | ||
392 | ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &info, 0, 4); | 397 | ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &info, 0, |
398 | sizeof(info)); | ||
399 | if (ret) | ||
400 | return ret; | ||
401 | |||
402 | /* Pad */ | ||
403 | offset = offsetof(struct user_hwdebug_state, pad); | ||
404 | ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, offset, | ||
405 | offset + PTRACE_HBP_PAD_SZ); | ||
393 | if (ret) | 406 | if (ret) |
394 | return ret; | 407 | return ret; |
395 | 408 | ||
396 | /* (address, ctrl) registers */ | 409 | /* (address, ctrl) registers */ |
410 | offset = offsetof(struct user_hwdebug_state, dbg_regs); | ||
397 | limit = regset->n * regset->size; | 411 | limit = regset->n * regset->size; |
398 | while (count && offset < limit) { | 412 | while (count && offset < limit) { |
399 | ret = ptrace_hbp_get_addr(note_type, target, idx, &addr); | 413 | ret = ptrace_hbp_get_addr(note_type, target, idx, &addr); |
@@ -413,6 +427,13 @@ static int hw_break_get(struct task_struct *target, | |||
413 | if (ret) | 427 | if (ret) |
414 | return ret; | 428 | return ret; |
415 | offset += PTRACE_HBP_CTRL_SZ; | 429 | offset += PTRACE_HBP_CTRL_SZ; |
430 | |||
431 | ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, | ||
432 | offset, | ||
433 | offset + PTRACE_HBP_PAD_SZ); | ||
434 | if (ret) | ||
435 | return ret; | ||
436 | offset += PTRACE_HBP_PAD_SZ; | ||
416 | idx++; | 437 | idx++; |
417 | } | 438 | } |
418 | 439 | ||
@@ -425,12 +446,13 @@ static int hw_break_set(struct task_struct *target, | |||
425 | const void *kbuf, const void __user *ubuf) | 446 | const void *kbuf, const void __user *ubuf) |
426 | { | 447 | { |
427 | unsigned int note_type = regset->core_note_type; | 448 | unsigned int note_type = regset->core_note_type; |
428 | int ret, idx = 0, offset = PTRACE_HBP_REG_OFF, limit; | 449 | int ret, idx = 0, offset, limit; |
429 | u32 ctrl; | 450 | u32 ctrl; |
430 | u64 addr; | 451 | u64 addr; |
431 | 452 | ||
432 | /* Resource info */ | 453 | /* Resource info and pad */ |
433 | ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, 4); | 454 | offset = offsetof(struct user_hwdebug_state, dbg_regs); |
455 | ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, offset); | ||
434 | if (ret) | 456 | if (ret) |
435 | return ret; | 457 | return ret; |
436 | 458 | ||
@@ -454,6 +476,13 @@ static int hw_break_set(struct task_struct *target, | |||
454 | if (ret) | 476 | if (ret) |
455 | return ret; | 477 | return ret; |
456 | offset += PTRACE_HBP_CTRL_SZ; | 478 | offset += PTRACE_HBP_CTRL_SZ; |
479 | |||
480 | ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, | ||
481 | offset, | ||
482 | offset + PTRACE_HBP_PAD_SZ); | ||
483 | if (ret) | ||
484 | return ret; | ||
485 | offset += PTRACE_HBP_PAD_SZ; | ||
457 | idx++; | 486 | idx++; |
458 | } | 487 | } |
459 | 488 | ||
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 48ffb9fb3fe3..7665a9bfdb1e 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
@@ -170,7 +170,19 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys) | |||
170 | 170 | ||
171 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) | 171 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) |
172 | { | 172 | { |
173 | base &= PAGE_MASK; | ||
173 | size &= PAGE_MASK; | 174 | size &= PAGE_MASK; |
175 | if (base + size < PHYS_OFFSET) { | ||
176 | pr_warning("Ignoring memory block 0x%llx - 0x%llx\n", | ||
177 | base, base + size); | ||
178 | return; | ||
179 | } | ||
180 | if (base < PHYS_OFFSET) { | ||
181 | pr_warning("Ignoring memory range 0x%llx - 0x%llx\n", | ||
182 | base, PHYS_OFFSET); | ||
183 | size -= PHYS_OFFSET - base; | ||
184 | base = PHYS_OFFSET; | ||
185 | } | ||
174 | memblock_add(base, size); | 186 | memblock_add(base, size); |
175 | } | 187 | } |
176 | 188 | ||
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index b711525be21f..226b6bf6e9c2 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <asm/sections.h> | 46 | #include <asm/sections.h> |
47 | #include <asm/tlbflush.h> | 47 | #include <asm/tlbflush.h> |
48 | #include <asm/ptrace.h> | 48 | #include <asm/ptrace.h> |
49 | #include <asm/mmu_context.h> | ||
50 | 49 | ||
51 | /* | 50 | /* |
52 | * as from 2.5, kernels no longer have an init_tasks structure | 51 | * as from 2.5, kernels no longer have an init_tasks structure |
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 17948fc7d663..ba457943a16b 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
29 | #include <linux/signal.h> | 29 | #include <linux/signal.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/timekeeper_internal.h> | ||
31 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
32 | 33 | ||
33 | #include <asm/cacheflush.h> | 34 | #include <asm/cacheflush.h> |
@@ -222,11 +223,10 @@ struct vm_area_struct *get_gate_vma(struct mm_struct *mm) | |||
222 | /* | 223 | /* |
223 | * Update the vDSO data page to keep in sync with kernel timekeeping. | 224 | * Update the vDSO data page to keep in sync with kernel timekeeping. |
224 | */ | 225 | */ |
225 | void update_vsyscall(struct timespec *ts, struct timespec *wtm, | 226 | void update_vsyscall(struct timekeeper *tk) |
226 | struct clocksource *clock, u32 mult) | ||
227 | { | 227 | { |
228 | struct timespec xtime_coarse; | 228 | struct timespec xtime_coarse; |
229 | u32 use_syscall = strcmp(clock->name, "arch_sys_counter"); | 229 | u32 use_syscall = strcmp(tk->clock->name, "arch_sys_counter"); |
230 | 230 | ||
231 | ++vdso_data->tb_seq_count; | 231 | ++vdso_data->tb_seq_count; |
232 | smp_wmb(); | 232 | smp_wmb(); |
@@ -237,13 +237,13 @@ void update_vsyscall(struct timespec *ts, struct timespec *wtm, | |||
237 | vdso_data->xtime_coarse_nsec = xtime_coarse.tv_nsec; | 237 | vdso_data->xtime_coarse_nsec = xtime_coarse.tv_nsec; |
238 | 238 | ||
239 | if (!use_syscall) { | 239 | if (!use_syscall) { |
240 | vdso_data->cs_cycle_last = clock->cycle_last; | 240 | vdso_data->cs_cycle_last = tk->clock->cycle_last; |
241 | vdso_data->xtime_clock_sec = ts->tv_sec; | 241 | vdso_data->xtime_clock_sec = tk->xtime_sec; |
242 | vdso_data->xtime_clock_nsec = ts->tv_nsec; | 242 | vdso_data->xtime_clock_nsec = tk->xtime_nsec >> tk->shift; |
243 | vdso_data->cs_mult = mult; | 243 | vdso_data->cs_mult = tk->mult; |
244 | vdso_data->cs_shift = clock->shift; | 244 | vdso_data->cs_shift = tk->shift; |
245 | vdso_data->wtm_clock_sec = wtm->tv_sec; | 245 | vdso_data->wtm_clock_sec = tk->wall_to_monotonic.tv_sec; |
246 | vdso_data->wtm_clock_nsec = wtm->tv_nsec; | 246 | vdso_data->wtm_clock_nsec = tk->wall_to_monotonic.tv_nsec; |
247 | } | 247 | } |
248 | 248 | ||
249 | smp_wmb(); | 249 | smp_wmb(); |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index b7412504f08a..df2eb4bd9fa2 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -13,6 +13,7 @@ config FRV | |||
13 | select GENERIC_CPU_DEVICES | 13 | select GENERIC_CPU_DEVICES |
14 | select ARCH_WANT_IPC_PARSE_VERSION | 14 | select ARCH_WANT_IPC_PARSE_VERSION |
15 | select GENERIC_KERNEL_THREAD | 15 | select GENERIC_KERNEL_THREAD |
16 | select GENERIC_KERNEL_EXECVE | ||
16 | 17 | ||
17 | config ZONE_DMA | 18 | config ZONE_DMA |
18 | bool | 19 | bool |
diff --git a/arch/frv/boot/Makefile b/arch/frv/boot/Makefile index 6ae3254da019..636d5bbcd53f 100644 --- a/arch/frv/boot/Makefile +++ b/arch/frv/boot/Makefile | |||
@@ -17,6 +17,8 @@ PARAMS_PHYS = 0x0207c000 | |||
17 | INITRD_PHYS = 0x02180000 | 17 | INITRD_PHYS = 0x02180000 |
18 | INITRD_VIRT = 0x02180000 | 18 | INITRD_VIRT = 0x02180000 |
19 | 19 | ||
20 | OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment | ||
21 | |||
20 | # | 22 | # |
21 | # If you don't define ZRELADDR above, | 23 | # If you don't define ZRELADDR above, |
22 | # then it defaults to ZTEXTADDR | 24 | # then it defaults to ZTEXTADDR |
@@ -32,18 +34,18 @@ Image: $(obj)/Image | |||
32 | targets: $(obj)/Image | 34 | targets: $(obj)/Image |
33 | 35 | ||
34 | $(obj)/Image: vmlinux FORCE | 36 | $(obj)/Image: vmlinux FORCE |
35 | $(OBJCOPY) -O binary -R .note -R .comment -S vmlinux $@ | 37 | $(OBJCOPY) $(OBJCOPYFLAGS) -S vmlinux $@ |
36 | 38 | ||
37 | #$(obj)/Image: $(CONFIGURE) $(SYSTEM) | 39 | #$(obj)/Image: $(CONFIGURE) $(SYSTEM) |
38 | # $(OBJCOPY) -O binary -R .note -R .comment -g -S $(SYSTEM) $@ | 40 | # $(OBJCOPY) $(OBJCOPYFLAGS) -g -S $(SYSTEM) $@ |
39 | 41 | ||
40 | bzImage: zImage | 42 | bzImage: zImage |
41 | 43 | ||
42 | zImage: $(CONFIGURE) compressed/$(LINUX) | 44 | zImage: $(CONFIGURE) compressed/$(LINUX) |
43 | $(OBJCOPY) -O binary -R .note -R .comment -S compressed/$(LINUX) $@ | 45 | $(OBJCOPY) $(OBJCOPYFLAGS) -S compressed/$(LINUX) $@ |
44 | 46 | ||
45 | bootpImage: bootp/bootp | 47 | bootpImage: bootp/bootp |
46 | $(OBJCOPY) -O binary -R .note -R .comment -S bootp/bootp $@ | 48 | $(OBJCOPY) $(OBJCOPYFLAGS) -S bootp/bootp $@ |
47 | 49 | ||
48 | compressed/$(LINUX): $(LINUX) dep | 50 | compressed/$(LINUX): $(LINUX) dep |
49 | @$(MAKE) -C compressed $(LINUX) | 51 | @$(MAKE) -C compressed $(LINUX) |
diff --git a/arch/frv/include/asm/unistd.h b/arch/frv/include/asm/unistd.h index 266a5b25a0c1..2358634cacca 100644 --- a/arch/frv/include/asm/unistd.h +++ b/arch/frv/include/asm/unistd.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #define __ARCH_WANT_SYS_RT_SIGACTION | 30 | #define __ARCH_WANT_SYS_RT_SIGACTION |
31 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 31 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
32 | #define __ARCH_WANT_SYS_EXECVE | 32 | #define __ARCH_WANT_SYS_EXECVE |
33 | #define __ARCH_WANT_KERNEL_EXECVE | ||
34 | 33 | ||
35 | /* | 34 | /* |
36 | * "Conditional" syscalls | 35 | * "Conditional" syscalls |
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 002732960315..dfcd263c0517 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S | |||
@@ -867,13 +867,8 @@ ret_from_fork: | |||
867 | ret_from_kernel_thread: | 867 | ret_from_kernel_thread: |
868 | lddi.p @(gr28,#REG_GR(8)),gr20 | 868 | lddi.p @(gr28,#REG_GR(8)),gr20 |
869 | call schedule_tail | 869 | call schedule_tail |
870 | or.p gr20,gr20,gr8 | 870 | calll.p @(gr21,gr0) |
871 | calll @(gr21,gr0) | 871 | or gr20,gr20,gr8 |
872 | bra sys_exit | ||
873 | |||
874 | .globl ret_from_kernel_execve | ||
875 | ret_from_kernel_execve: | ||
876 | ori gr28,0,sp | ||
877 | bra __syscall_exit | 872 | bra __syscall_exit |
878 | 873 | ||
879 | ################################################################################################### | 874 | ################################################################################################### |
@@ -1080,27 +1075,10 @@ __entry_return_from_kernel_interrupt: | |||
1080 | subicc gr5,#0,gr0,icc0 | 1075 | subicc gr5,#0,gr0,icc0 |
1081 | beq icc0,#0,__entry_return_direct | 1076 | beq icc0,#0,__entry_return_direct |
1082 | 1077 | ||
1083 | __entry_preempt_need_resched: | 1078 | subcc gr0,gr0,gr0,icc2 /* set Z and clear C */ |
1084 | ldi @(gr15,#TI_FLAGS),gr4 | 1079 | call preempt_schedule_irq |
1085 | andicc gr4,#_TIF_NEED_RESCHED,gr0,icc0 | ||
1086 | beq icc0,#1,__entry_return_direct | ||
1087 | |||
1088 | setlos #PREEMPT_ACTIVE,gr5 | ||
1089 | sti gr5,@(gr15,#TI_FLAGS) | ||
1090 | |||
1091 | andi gr23,#~PSR_PIL,gr23 | ||
1092 | movgs gr23,psr | ||
1093 | |||
1094 | call schedule | ||
1095 | sti gr0,@(gr15,#TI_PRE_COUNT) | ||
1096 | |||
1097 | movsg psr,gr23 | ||
1098 | ori gr23,#PSR_PIL_14,gr23 | ||
1099 | movgs gr23,psr | ||
1100 | bra __entry_preempt_need_resched | ||
1101 | #else | ||
1102 | bra __entry_return_direct | ||
1103 | #endif | 1080 | #endif |
1081 | bra __entry_return_direct | ||
1104 | 1082 | ||
1105 | 1083 | ||
1106 | ############################################################################### | 1084 | ############################################################################### |
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 655d90d20bb0..7e33215f1d8f 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -181,6 +181,9 @@ int copy_thread(unsigned long clone_flags, | |||
181 | childregs = (struct pt_regs *) | 181 | childregs = (struct pt_regs *) |
182 | (task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE); | 182 | (task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE); |
183 | 183 | ||
184 | /* set up the userspace frame (the only place that the USP is stored) */ | ||
185 | *childregs = *__kernel_frame0_ptr; | ||
186 | |||
184 | p->set_child_tid = p->clear_child_tid = NULL; | 187 | p->set_child_tid = p->clear_child_tid = NULL; |
185 | 188 | ||
186 | p->thread.frame = childregs; | 189 | p->thread.frame = childregs; |
@@ -191,10 +194,8 @@ int copy_thread(unsigned long clone_flags, | |||
191 | p->thread.frame0 = childregs; | 194 | p->thread.frame0 = childregs; |
192 | 195 | ||
193 | if (unlikely(!regs)) { | 196 | if (unlikely(!regs)) { |
194 | memset(childregs, 0, sizeof(struct pt_regs)); | ||
195 | childregs->gr9 = usp; /* function */ | 197 | childregs->gr9 = usp; /* function */ |
196 | childregs->gr8 = arg; | 198 | childregs->gr8 = arg; |
197 | chilregs->psr = PSR_S; | ||
198 | p->thread.pc = (unsigned long) ret_from_kernel_thread; | 199 | p->thread.pc = (unsigned long) ret_from_kernel_thread; |
199 | save_user_regs(p->thread.user); | 200 | save_user_regs(p->thread.user); |
200 | return 0; | 201 | return 0; |
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c index 1f1e5efb3385..b8993c87d3de 100644 --- a/arch/frv/kernel/setup.c +++ b/arch/frv/kernel/setup.c | |||
@@ -112,9 +112,11 @@ char __initdata redboot_command_line[COMMAND_LINE_SIZE]; | |||
112 | #ifdef CONFIG_PM | 112 | #ifdef CONFIG_PM |
113 | #define __pminit | 113 | #define __pminit |
114 | #define __pminitdata | 114 | #define __pminitdata |
115 | #define __pminitconst | ||
115 | #else | 116 | #else |
116 | #define __pminit __init | 117 | #define __pminit __init |
117 | #define __pminitdata __initdata | 118 | #define __pminitdata __initdata |
119 | #define __pminitconst __initconst | ||
118 | #endif | 120 | #endif |
119 | 121 | ||
120 | struct clock_cmode { | 122 | struct clock_cmode { |
diff --git a/arch/frv/mb93090-mb00/pci-dma-nommu.c b/arch/frv/mb93090-mb00/pci-dma-nommu.c index e47857f889b6..b99c2a7cc7a4 100644 --- a/arch/frv/mb93090-mb00/pci-dma-nommu.c +++ b/arch/frv/mb93090-mb00/pci-dma-nommu.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/export.h> | ||
14 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
15 | #include <linux/list.h> | 16 | #include <linux/list.h> |
16 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index 3364b6966d26..3bfa9b30f448 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild | |||
@@ -1,8 +1,5 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | header-y += registers.h | ||
4 | header-y += ucontext.h | 2 | header-y += ucontext.h |
5 | header-y += user.h | ||
6 | 3 | ||
7 | generic-y += auxvec.h | 4 | generic-y += auxvec.h |
8 | generic-y += bug.h | 5 | generic-y += bug.h |
diff --git a/arch/hexagon/include/asm/atomic.h b/arch/hexagon/include/asm/atomic.h index 3e258043337b..468fbb0781cd 100644 --- a/arch/hexagon/include/asm/atomic.h +++ b/arch/hexagon/include/asm/atomic.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Atomic operations for the Hexagon architecture | 2 | * Atomic operations for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
diff --git a/arch/hexagon/include/asm/barrier.h b/arch/hexagon/include/asm/barrier.h index a4ed6e26cb1d..1041a8e70ce8 100644 --- a/arch/hexagon/include/asm/barrier.h +++ b/arch/hexagon/include/asm/barrier.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Memory barrier definitions for the Hexagon architecture | 2 | * Memory barrier definitions for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/bitops.h b/arch/hexagon/include/asm/bitops.h index 4caa649ad78b..9b1e4afbab3c 100644 --- a/arch/hexagon/include/asm/bitops.h +++ b/arch/hexagon/include/asm/bitops.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Bit operations for the Hexagon architecture | 2 | * Bit operations for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
diff --git a/arch/hexagon/include/asm/cache.h b/arch/hexagon/include/asm/cache.h index 0f01de2eb4ab..f4ca594fdf8c 100644 --- a/arch/hexagon/include/asm/cache.h +++ b/arch/hexagon/include/asm/cache.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Cache definitions for the Hexagon architecture | 2 | * Cache definitions for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/cacheflush.h b/arch/hexagon/include/asm/cacheflush.h index 6865c1be927a..49e0896ec240 100644 --- a/arch/hexagon/include/asm/cacheflush.h +++ b/arch/hexagon/include/asm/cacheflush.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Cache flush operations for the Hexagon architecture | 2 | * Cache flush operations for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/checksum.h b/arch/hexagon/include/asm/checksum.h index 3ce4ecd44f82..46ec8a7fd65f 100644 --- a/arch/hexagon/include/asm/checksum.h +++ b/arch/hexagon/include/asm/checksum.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/cmpxchg.h b/arch/hexagon/include/asm/cmpxchg.h index c5f9527e1df6..9e7802911a57 100644 --- a/arch/hexagon/include/asm/cmpxchg.h +++ b/arch/hexagon/include/asm/cmpxchg.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * xchg/cmpxchg operations for the Hexagon architecture | 2 | * xchg/cmpxchg operations for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
diff --git a/arch/hexagon/include/asm/delay.h b/arch/hexagon/include/asm/delay.h index 9ab12e9a872b..53079719d667 100644 --- a/arch/hexagon/include/asm/delay.h +++ b/arch/hexagon/include/asm/delay.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h index 233ed3d2d25e..85e9935660cb 100644 --- a/arch/hexagon/include/asm/dma-mapping.h +++ b/arch/hexagon/include/asm/dma-mapping.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * DMA operations for the Hexagon architecture | 2 | * DMA operations for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/dma.h b/arch/hexagon/include/asm/dma.h index da6d2f61a93a..9e34ff49f3b7 100644 --- a/arch/hexagon/include/asm/dma.h +++ b/arch/hexagon/include/asm/dma.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h index 82b499621e05..1ba4b3bff5ed 100644 --- a/arch/hexagon/include/asm/elf.h +++ b/arch/hexagon/include/asm/elf.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * ELF definitions for the Hexagon architecture | 2 | * ELF definitions for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/exec.h b/arch/hexagon/include/asm/exec.h index 350e6d497d44..c32b2132614b 100644 --- a/arch/hexagon/include/asm/exec.h +++ b/arch/hexagon/include/asm/exec.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Process execution related definitions for the Hexagon architecture | 2 | * Process execution related definitions for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/fixmap.h b/arch/hexagon/include/asm/fixmap.h index b27f4941645b..b75b6bf4269c 100644 --- a/arch/hexagon/include/asm/fixmap.h +++ b/arch/hexagon/include/asm/fixmap.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Fixmap support for Hexagon - enough to support highmem features | 2 | * Fixmap support for Hexagon - enough to support highmem features |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/hexagon_vm.h b/arch/hexagon/include/asm/hexagon_vm.h index 182cb9d54769..c144bee6cabe 100644 --- a/arch/hexagon/include/asm/hexagon_vm.h +++ b/arch/hexagon/include/asm/hexagon_vm.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Declarations for to Hexagon Virtal Machine. | 2 | * Declarations for to Hexagon Virtal Machine. |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/intrinsics.h b/arch/hexagon/include/asm/intrinsics.h index 1c02186d2e9a..ca587737fb2a 100644 --- a/arch/hexagon/include/asm/intrinsics.h +++ b/arch/hexagon/include/asm/intrinsics.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h index b3acc2cc71bf..e527cfeff5ba 100644 --- a/arch/hexagon/include/asm/io.h +++ b/arch/hexagon/include/asm/io.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * IO definitions for the Hexagon architecture | 2 | * IO definitions for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/irq.h b/arch/hexagon/include/asm/irq.h index ded8c15cf3e5..51661db389d6 100644 --- a/arch/hexagon/include/asm/irq.h +++ b/arch/hexagon/include/asm/irq.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/irqflags.h b/arch/hexagon/include/asm/irqflags.h index ec1523655416..e5fd9492d60f 100644 --- a/arch/hexagon/include/asm/irqflags.h +++ b/arch/hexagon/include/asm/irqflags.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * IRQ support for the Hexagon architecture | 2 | * IRQ support for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/kgdb.h b/arch/hexagon/include/asm/kgdb.h index 9e8779702f10..32a6fb66944a 100644 --- a/arch/hexagon/include/asm/kgdb.h +++ b/arch/hexagon/include/asm/kgdb.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/hexagon/include/asm/kgdb.h - Hexagon KGDB Support | 2 | * arch/hexagon/include/asm/kgdb.h - Hexagon KGDB Support |
3 | * | 3 | * |
4 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/linkage.h b/arch/hexagon/include/asm/linkage.h index a00b85f680b8..31b4cbe7e583 100644 --- a/arch/hexagon/include/asm/linkage.h +++ b/arch/hexagon/include/asm/linkage.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/mem-layout.h b/arch/hexagon/include/asm/mem-layout.h index 72e5dcda79f5..af16e977c55e 100644 --- a/arch/hexagon/include/asm/mem-layout.h +++ b/arch/hexagon/include/asm/mem-layout.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Memory layout definitions for the Hexagon architecture | 2 | * Memory layout definitions for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/mmu.h b/arch/hexagon/include/asm/mmu.h index 30a5d8d2659d..2288b19fd0f2 100644 --- a/arch/hexagon/include/asm/mmu.h +++ b/arch/hexagon/include/asm/mmu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/mmu_context.h b/arch/hexagon/include/asm/mmu_context.h index b4fe5a5411b6..d423d2e73c30 100644 --- a/arch/hexagon/include/asm/mmu_context.h +++ b/arch/hexagon/include/asm/mmu_context.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * MM context support for the Hexagon architecture | 2 | * MM context support for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/module.h b/arch/hexagon/include/asm/module.h index 72ba494e6d7d..6b4323acef44 100644 --- a/arch/hexagon/include/asm/module.h +++ b/arch/hexagon/include/asm/module.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/page.h b/arch/hexagon/include/asm/page.h index edd97626c482..692adc213429 100644 --- a/arch/hexagon/include/asm/page.h +++ b/arch/hexagon/include/asm/page.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Page management definitions for the Hexagon architecture | 2 | * Page management definitions for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/perf_event.h b/arch/hexagon/include/asm/perf_event.h index 8b8526b491c7..430978b1de38 100644 --- a/arch/hexagon/include/asm/perf_event.h +++ b/arch/hexagon/include/asm/perf_event.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/pgalloc.h b/arch/hexagon/include/asm/pgalloc.h index 13443c775131..679bf6d66487 100644 --- a/arch/hexagon/include/asm/pgalloc.h +++ b/arch/hexagon/include/asm/pgalloc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Page table support for the Hexagon architecture | 2 | * Page table support for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h index ca619bf225ef..20d55f69fe55 100644 --- a/arch/hexagon/include/asm/pgtable.h +++ b/arch/hexagon/include/asm/pgtable.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Page table support for the Hexagon architecture | 2 | * Page table support for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/processor.h b/arch/hexagon/include/asm/processor.h index e8ea459002a4..a03323ab9d44 100644 --- a/arch/hexagon/include/asm/processor.h +++ b/arch/hexagon/include/asm/processor.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Process/processor support for the Hexagon architecture | 2 | * Process/processor support for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/smp.h b/arch/hexagon/include/asm/smp.h index 87c869a6a897..2b9b974e0952 100644 --- a/arch/hexagon/include/asm/smp.h +++ b/arch/hexagon/include/asm/smp.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * SMP definitions for the Hexagon architecture | 2 | * SMP definitions for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/spinlock.h b/arch/hexagon/include/asm/spinlock.h index 168a920485a8..12ca4ebc0338 100644 --- a/arch/hexagon/include/asm/spinlock.h +++ b/arch/hexagon/include/asm/spinlock.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Spinlock support for the Hexagon architecture | 2 | * Spinlock support for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
diff --git a/arch/hexagon/include/asm/spinlock_types.h b/arch/hexagon/include/asm/spinlock_types.h index 99b5a7575c21..7a906b5214a4 100644 --- a/arch/hexagon/include/asm/spinlock_types.h +++ b/arch/hexagon/include/asm/spinlock_types.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Spinlock support for the Hexagon architecture | 2 | * Spinlock support for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/string.h b/arch/hexagon/include/asm/string.h index f4489c15942c..7d37f47a1d07 100644 --- a/arch/hexagon/include/asm/string.h +++ b/arch/hexagon/include/asm/string.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/suspend.h b/arch/hexagon/include/asm/suspend.h index 089dd8268791..18b44b557fbc 100644 --- a/arch/hexagon/include/asm/suspend.h +++ b/arch/hexagon/include/asm/suspend.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/switch_to.h b/arch/hexagon/include/asm/switch_to.h index 28ca0dfb6064..96745e7b3e3c 100644 --- a/arch/hexagon/include/asm/switch_to.h +++ b/arch/hexagon/include/asm/switch_to.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Task switching definitions for the Hexagon architecture | 2 | * Task switching definitions for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/syscall.h b/arch/hexagon/include/asm/syscall.h index 3e7d61d38d97..fb0e9d48faa6 100644 --- a/arch/hexagon/include/asm/syscall.h +++ b/arch/hexagon/include/asm/syscall.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Syscall support for the Hexagon architecture | 2 | * Syscall support for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/thread_info.h b/arch/hexagon/include/asm/thread_info.h index e4a0aad69cbb..f7c32406a711 100644 --- a/arch/hexagon/include/asm/thread_info.h +++ b/arch/hexagon/include/asm/thread_info.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Thread support for the Hexagon architecture | 2 | * Thread support for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/time.h b/arch/hexagon/include/asm/time.h index 081b82cac9a9..deda170c03b8 100644 --- a/arch/hexagon/include/asm/time.h +++ b/arch/hexagon/include/asm/time.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/timer-regs.h b/arch/hexagon/include/asm/timer-regs.h index d80db239a7b6..79912b8c1e5b 100644 --- a/arch/hexagon/include/asm/timer-regs.h +++ b/arch/hexagon/include/asm/timer-regs.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Timer support for Hexagon | 2 | * Timer support for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/timex.h b/arch/hexagon/include/asm/timex.h index b11c62b23f31..f63fe132f072 100644 --- a/arch/hexagon/include/asm/timex.h +++ b/arch/hexagon/include/asm/timex.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/tlb.h b/arch/hexagon/include/asm/tlb.h index 473abde01d62..2f00772cc08a 100644 --- a/arch/hexagon/include/asm/tlb.h +++ b/arch/hexagon/include/asm/tlb.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/tlbflush.h b/arch/hexagon/include/asm/tlbflush.h index b89a90251225..62d95a9705c4 100644 --- a/arch/hexagon/include/asm/tlbflush.h +++ b/arch/hexagon/include/asm/tlbflush.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * TLB flush support for Hexagon | 2 | * TLB flush support for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/traps.h b/arch/hexagon/include/asm/traps.h index 6a407f6e5e24..ec11285012cf 100644 --- a/arch/hexagon/include/asm/traps.h +++ b/arch/hexagon/include/asm/traps.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Trap support for Hexagon | 2 | * Trap support for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/uaccess.h b/arch/hexagon/include/asm/uaccess.h index 7e706eadbf0a..e4127e4d6a5b 100644 --- a/arch/hexagon/include/asm/uaccess.h +++ b/arch/hexagon/include/asm/uaccess.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * User memory access support for Hexagon | 2 | * User memory access support for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/vdso.h b/arch/hexagon/include/asm/vdso.h index 2d95cbba3572..ed08e6c6886d 100644 --- a/arch/hexagon/include/asm/vdso.h +++ b/arch/hexagon/include/asm/vdso.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * vDSO implementation for Hexagon | 2 | * vDSO implementation for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/vm_fault.h b/arch/hexagon/include/asm/vm_fault.h index cacda36ef5d5..9b0e9c50ceda 100644 --- a/arch/hexagon/include/asm/vm_fault.h +++ b/arch/hexagon/include/asm/vm_fault.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/vm_mmu.h b/arch/hexagon/include/asm/vm_mmu.h index 580462de5cca..9a94de7969bb 100644 --- a/arch/hexagon/include/asm/vm_mmu.h +++ b/arch/hexagon/include/asm/vm_mmu.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Hexagon VM page table entry definitions | 2 | * Hexagon VM page table entry definitions |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/uapi/asm/Kbuild b/arch/hexagon/include/uapi/asm/Kbuild index baebb3da1d44..c31706c38631 100644 --- a/arch/hexagon/include/uapi/asm/Kbuild +++ b/arch/hexagon/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,15 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += bitsperlong.h | ||
5 | header-y += byteorder.h | ||
6 | header-y += kvm_para.h | ||
7 | header-y += param.h | ||
8 | header-y += ptrace.h | ||
9 | header-y += registers.h | ||
10 | header-y += setup.h | ||
11 | header-y += sigcontext.h | ||
12 | header-y += signal.h | ||
13 | header-y += swab.h | ||
14 | header-y += unistd.h | ||
15 | header-y += user.h | ||
diff --git a/arch/hexagon/include/asm/bitsperlong.h b/arch/hexagon/include/uapi/asm/bitsperlong.h index 2701cae3426e..4a658151383d 100644 --- a/arch/hexagon/include/asm/bitsperlong.h +++ b/arch/hexagon/include/uapi/asm/bitsperlong.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/byteorder.h b/arch/hexagon/include/uapi/asm/byteorder.h index 0e19b9fe4ca6..e31f3f7d9a45 100644 --- a/arch/hexagon/include/asm/byteorder.h +++ b/arch/hexagon/include/uapi/asm/byteorder.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/kvm_para.h b/arch/hexagon/include/uapi/asm/kvm_para.h index 14fab8f0b957..14fab8f0b957 100644 --- a/arch/hexagon/include/asm/kvm_para.h +++ b/arch/hexagon/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/hexagon/include/asm/param.h b/arch/hexagon/include/uapi/asm/param.h index 285344bbd036..5cec8c0417fb 100644 --- a/arch/hexagon/include/asm/param.h +++ b/arch/hexagon/include/uapi/asm/param.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/ptrace.h b/arch/hexagon/include/uapi/asm/ptrace.h index 3d2f607cd63c..8ef784047a74 100644 --- a/arch/hexagon/include/asm/ptrace.h +++ b/arch/hexagon/include/uapi/asm/ptrace.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Ptrace definitions for the Hexagon architecture | 2 | * Ptrace definitions for the Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/registers.h b/arch/hexagon/include/uapi/asm/registers.h index 4dd741be855d..c20406f63b5c 100644 --- a/arch/hexagon/include/asm/registers.h +++ b/arch/hexagon/include/uapi/asm/registers.h | |||
@@ -1,23 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Register definitions for the Hexagon architecture | 2 | * Register definitions for the Hexagon architecture |
3 | * | ||
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 and | ||
8 | * only version 2 as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
18 | * 02110-1301, USA. | ||
19 | */ | 3 | */ |
20 | 4 | ||
5 | |||
21 | #ifndef _ASM_REGISTERS_H | 6 | #ifndef _ASM_REGISTERS_H |
22 | #define _ASM_REGISTERS_H | 7 | #define _ASM_REGISTERS_H |
23 | 8 | ||
diff --git a/arch/hexagon/include/asm/setup.h b/arch/hexagon/include/uapi/asm/setup.h index 3b754c50bc0a..e48285e4af96 100644 --- a/arch/hexagon/include/asm/setup.h +++ b/arch/hexagon/include/uapi/asm/setup.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/sigcontext.h b/arch/hexagon/include/uapi/asm/sigcontext.h index ce6dcd995220..b6ba5369ccc6 100644 --- a/arch/hexagon/include/asm/sigcontext.h +++ b/arch/hexagon/include/uapi/asm/sigcontext.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/signal.h b/arch/hexagon/include/uapi/asm/signal.h index 471c0562e17b..939556817d34 100644 --- a/arch/hexagon/include/asm/signal.h +++ b/arch/hexagon/include/uapi/asm/signal.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/swab.h b/arch/hexagon/include/uapi/asm/swab.h index 99cf0be3fb83..9069e9247a2e 100644 --- a/arch/hexagon/include/asm/swab.h +++ b/arch/hexagon/include/uapi/asm/swab.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/unistd.h b/arch/hexagon/include/uapi/asm/unistd.h index c0d5565030ae..81312d6a52e6 100644 --- a/arch/hexagon/include/asm/unistd.h +++ b/arch/hexagon/include/uapi/asm/unistd.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Syscall support for Hexagon | 2 | * Syscall support for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/include/asm/user.h b/arch/hexagon/include/uapi/asm/user.h index 3a55078543d1..cef13ee1413f 100644 --- a/arch/hexagon/include/asm/user.h +++ b/arch/hexagon/include/uapi/asm/user.h | |||
@@ -1,21 +1,3 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 and | ||
6 | * only version 2 as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
16 | * 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef HEXAGON_ASM_USER_H | 1 | #ifndef HEXAGON_ASM_USER_H |
20 | #define HEXAGON_ASM_USER_H | 2 | #define HEXAGON_ASM_USER_H |
21 | 3 | ||
diff --git a/arch/hexagon/kernel/asm-offsets.c b/arch/hexagon/kernel/asm-offsets.c index 89ffa514611f..2d5e84d3b00d 100644 --- a/arch/hexagon/kernel/asm-offsets.c +++ b/arch/hexagon/kernel/asm-offsets.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com | 5 | * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com |
6 | * Copyright (C) 2000 MIPS Technologies, Inc. | 6 | * Copyright (C) 2000 MIPS Technologies, Inc. |
7 | * | 7 | * |
8 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 8 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License version 2 and | 11 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/dma.c b/arch/hexagon/kernel/dma.c index 2b48751aa5f7..65c7bdcf565e 100644 --- a/arch/hexagon/kernel/dma.c +++ b/arch/hexagon/kernel/dma.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * DMA implementation for Hexagon | 2 | * DMA implementation for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/head.S b/arch/hexagon/kernel/head.S index 8e6b819125a3..d859402c73ba 100644 --- a/arch/hexagon/kernel/head.S +++ b/arch/hexagon/kernel/head.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Early kernel startup code for Hexagon | 2 | * Early kernel startup code for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
diff --git a/arch/hexagon/kernel/hexagon_ksyms.c b/arch/hexagon/kernel/hexagon_ksyms.c index 7f1892471805..32b1379d6877 100644 --- a/arch/hexagon/kernel/hexagon_ksyms.c +++ b/arch/hexagon/kernel/hexagon_ksyms.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Export of symbols defined in assembly files and/or libgcc. | 2 | * Export of symbols defined in assembly files and/or libgcc. |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/irq_cpu.c b/arch/hexagon/kernel/irq_cpu.c index d4416a1a431e..85883e1fdc12 100644 --- a/arch/hexagon/kernel/irq_cpu.c +++ b/arch/hexagon/kernel/irq_cpu.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * First-level interrupt controller model for Hexagon. | 2 | * First-level interrupt controller model for Hexagon. |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011 Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/kgdb.c b/arch/hexagon/kernel/kgdb.c index fe4aa1bcca50..344645370646 100644 --- a/arch/hexagon/kernel/kgdb.c +++ b/arch/hexagon/kernel/kgdb.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/hexagon/kernel/kgdb.c - Hexagon KGDB Support | 2 | * arch/hexagon/kernel/kgdb.c - Hexagon KGDB Support |
3 | * | 3 | * |
4 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/module.c b/arch/hexagon/kernel/module.c index 61a76bae3668..477d07a5646c 100644 --- a/arch/hexagon/kernel/module.c +++ b/arch/hexagon/kernel/module.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Kernel module loader for Hexagon | 2 | * Kernel module loader for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/process.c b/arch/hexagon/kernel/process.c index af51de63b835..9f6d7411b574 100644 --- a/arch/hexagon/kernel/process.c +++ b/arch/hexagon/kernel/process.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Process creation support for Hexagon | 2 | * Process creation support for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/ptrace.c b/arch/hexagon/kernel/ptrace.c index 96c3b2c4dbad..670b1b0bee63 100644 --- a/arch/hexagon/kernel/ptrace.c +++ b/arch/hexagon/kernel/ptrace.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Ptrace support for Hexagon | 2 | * Ptrace support for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/reset.c b/arch/hexagon/kernel/reset.c index 4d72fc58e9b1..6aeabc962b3b 100644 --- a/arch/hexagon/kernel/reset.c +++ b/arch/hexagon/kernel/reset.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/setup.c b/arch/hexagon/kernel/setup.c index 1202f78d25cb..94a387835008 100644 --- a/arch/hexagon/kernel/setup.c +++ b/arch/hexagon/kernel/setup.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Arch related setup for Hexagon | 2 | * Arch related setup for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/signal.c b/arch/hexagon/kernel/signal.c index 1ea16bec7b91..5047b8b879c0 100644 --- a/arch/hexagon/kernel/signal.c +++ b/arch/hexagon/kernel/signal.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Signal support for Hexagon processor | 2 | * Signal support for Hexagon processor |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c index 149fbefc1a4d..8e095dffd070 100644 --- a/arch/hexagon/kernel/smp.c +++ b/arch/hexagon/kernel/smp.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * SMP support for Hexagon | 2 | * SMP support for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/stacktrace.c b/arch/hexagon/kernel/stacktrace.c index 11c597b2ac59..f94918b449a8 100644 --- a/arch/hexagon/kernel/stacktrace.c +++ b/arch/hexagon/kernel/stacktrace.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Stacktrace support for Hexagon | 2 | * Stacktrace support for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/syscall.c b/arch/hexagon/kernel/syscall.c index 25a9bfe3445d..319fa6494f58 100644 --- a/arch/hexagon/kernel/syscall.c +++ b/arch/hexagon/kernel/syscall.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Hexagon system calls | 2 | * Hexagon system calls |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/syscalltab.c b/arch/hexagon/kernel/syscalltab.c index c550f4177ab8..7024b1ddc08a 100644 --- a/arch/hexagon/kernel/syscalltab.c +++ b/arch/hexagon/kernel/syscalltab.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * System call table for Hexagon | 2 | * System call table for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c index 36ba64185711..9903fad997f3 100644 --- a/arch/hexagon/kernel/time.c +++ b/arch/hexagon/kernel/time.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Time related functions for Hexagon architecture | 2 | * Time related functions for Hexagon architecture |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/topology.c b/arch/hexagon/kernel/topology.c index ba4475184432..352f27e809fd 100644 --- a/arch/hexagon/kernel/topology.c +++ b/arch/hexagon/kernel/topology.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * CPU topology for Hexagon | 2 | * CPU topology for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/trampoline.S b/arch/hexagon/kernel/trampoline.S index 06c36c036b98..18110a9056b0 100644 --- a/arch/hexagon/kernel/trampoline.S +++ b/arch/hexagon/kernel/trampoline.S | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/traps.c b/arch/hexagon/kernel/traps.c index f08857d0715b..a41eeb8eeaa1 100644 --- a/arch/hexagon/kernel/traps.c +++ b/arch/hexagon/kernel/traps.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Kernel traps/events for Hexagon processor | 2 | * Kernel traps/events for Hexagon processor |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/vdso.c b/arch/hexagon/kernel/vdso.c index 5d39f42f7085..0bf5a87e4d0a 100644 --- a/arch/hexagon/kernel/vdso.c +++ b/arch/hexagon/kernel/vdso.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * vDSO implementation for Hexagon | 2 | * vDSO implementation for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/vm_entry.S b/arch/hexagon/kernel/vm_entry.S index 5b99066cbc8d..cd71673ac259 100644 --- a/arch/hexagon/kernel/vm_entry.S +++ b/arch/hexagon/kernel/vm_entry.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Event entry/exit for Hexagon | 2 | * Event entry/exit for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/vm_events.c b/arch/hexagon/kernel/vm_events.c index 591fc1b68635..9b5a4a295a68 100644 --- a/arch/hexagon/kernel/vm_events.c +++ b/arch/hexagon/kernel/vm_events.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Mostly IRQ support for Hexagon | 2 | * Mostly IRQ support for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/vm_init_segtable.S b/arch/hexagon/kernel/vm_init_segtable.S index aebb35b6465e..80967f2192b3 100644 --- a/arch/hexagon/kernel/vm_init_segtable.S +++ b/arch/hexagon/kernel/vm_init_segtable.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Initial page table for Linux kernel under Hexagon VM, | 2 | * Initial page table for Linux kernel under Hexagon VM, |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/vm_ops.S b/arch/hexagon/kernel/vm_ops.S index 24d7fcac4ff2..9fb77b3f6cf2 100644 --- a/arch/hexagon/kernel/vm_ops.S +++ b/arch/hexagon/kernel/vm_ops.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Hexagon VM instruction support | 2 | * Hexagon VM instruction support |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/vm_switch.S b/arch/hexagon/kernel/vm_switch.S index 0decf2f58e32..62c6df91b3bb 100644 --- a/arch/hexagon/kernel/vm_switch.S +++ b/arch/hexagon/kernel/vm_switch.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Context switch support for Hexagon | 2 | * Context switch support for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/vm_vectors.S b/arch/hexagon/kernel/vm_vectors.S index 97a4b50b00df..620f42cc582a 100644 --- a/arch/hexagon/kernel/vm_vectors.S +++ b/arch/hexagon/kernel/vm_vectors.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Event jump tables | 2 | * Event jump tables |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/kernel/vmlinux.lds.S b/arch/hexagon/kernel/vmlinux.lds.S index 071d3c30edfb..14e793f6abbf 100644 --- a/arch/hexagon/kernel/vmlinux.lds.S +++ b/arch/hexagon/kernel/vmlinux.lds.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Linker script for Hexagon kernel | 2 | * Linker script for Hexagon kernel |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/lib/checksum.c b/arch/hexagon/lib/checksum.c index 93005522d52b..8169f78a46a7 100644 --- a/arch/hexagon/lib/checksum.c +++ b/arch/hexagon/lib/checksum.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Checksum functions for Hexagon | 2 | * Checksum functions for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/lib/io.c b/arch/hexagon/lib/io.c index 8ae47ba0e705..885c9626d5e0 100644 --- a/arch/hexagon/lib/io.c +++ b/arch/hexagon/lib/io.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * I/O access functions for Hexagon | 2 | * I/O access functions for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/lib/memcpy.S b/arch/hexagon/lib/memcpy.S index 2101c3395665..81c561c4b4d6 100644 --- a/arch/hexagon/lib/memcpy.S +++ b/arch/hexagon/lib/memcpy.S | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
diff --git a/arch/hexagon/lib/memset.S b/arch/hexagon/lib/memset.S index 26d961439ab0..9341889ea3f6 100644 --- a/arch/hexagon/lib/memset.S +++ b/arch/hexagon/lib/memset.S | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/mm/cache.c b/arch/hexagon/mm/cache.c index c5cf6ee27587..fe14ccf28561 100644 --- a/arch/hexagon/mm/cache.c +++ b/arch/hexagon/mm/cache.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Cache management functions for Hexagon | 2 | * Cache management functions for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/mm/copy_from_user.S b/arch/hexagon/mm/copy_from_user.S index 8eb1d4d61a3d..7fc94f3e6642 100644 --- a/arch/hexagon/mm/copy_from_user.S +++ b/arch/hexagon/mm/copy_from_user.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * User memory copy functions for kernel | 2 | * User memory copy functions for kernel |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/mm/copy_to_user.S b/arch/hexagon/mm/copy_to_user.S index cb9740ed9e7d..0cfbcc09d1d9 100644 --- a/arch/hexagon/mm/copy_to_user.S +++ b/arch/hexagon/mm/copy_to_user.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * User memory copying routines for the Hexagon Kernel | 2 | * User memory copying routines for the Hexagon Kernel |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/mm/copy_user_template.S b/arch/hexagon/mm/copy_user_template.S index 08d7d7b23daa..254d8cc766bb 100644 --- a/arch/hexagon/mm/copy_user_template.S +++ b/arch/hexagon/mm/copy_user_template.S | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/mm/init.c b/arch/hexagon/mm/init.c index b57d741750b2..69ffcfd28794 100644 --- a/arch/hexagon/mm/init.c +++ b/arch/hexagon/mm/init.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Memory subsystem initialization for Hexagon | 2 | * Memory subsystem initialization for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/mm/ioremap.c b/arch/hexagon/mm/ioremap.c index 3a37bc3b0116..5905fd5f97f6 100644 --- a/arch/hexagon/mm/ioremap.c +++ b/arch/hexagon/mm/ioremap.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * I/O remap functions for Hexagon | 2 | * I/O remap functions for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/mm/pgalloc.c b/arch/hexagon/mm/pgalloc.c index b175e2d42b89..19760a4611d9 100644 --- a/arch/hexagon/mm/pgalloc.c +++ b/arch/hexagon/mm/pgalloc.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/mm/strnlen_user.S b/arch/hexagon/mm/strnlen_user.S index 5c6a16c7c72a..0eecb7a768fe 100644 --- a/arch/hexagon/mm/strnlen_user.S +++ b/arch/hexagon/mm/strnlen_user.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * User string length functions for kernel | 2 | * User string length functions for kernel |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/mm/uaccess.c b/arch/hexagon/mm/uaccess.c index e748108b47a7..34127261c2b7 100644 --- a/arch/hexagon/mm/uaccess.c +++ b/arch/hexagon/mm/uaccess.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 2 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 and | 5 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/mm/vm_fault.c b/arch/hexagon/mm/vm_fault.c index 513b74cb397e..308ef0ce648b 100644 --- a/arch/hexagon/mm/vm_fault.c +++ b/arch/hexagon/mm/vm_fault.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Memory fault handling for Hexagon | 2 | * Memory fault handling for Hexagon |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011 Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/hexagon/mm/vm_tlb.c b/arch/hexagon/mm/vm_tlb.c index c6ff41575461..9647d00cb761 100644 --- a/arch/hexagon/mm/vm_tlb.c +++ b/arch/hexagon/mm/vm_tlb.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Hexagon Virtual Machine TLB functions | 2 | * Hexagon Virtual Machine TLB functions |
3 | * | 3 | * |
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | 4 | * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 and | 7 | * it under the terms of the GNU General Public License version 2 and |
diff --git a/arch/ia64/include/asm/Kbuild b/arch/ia64/include/asm/Kbuild index 4a159da23633..dd02f09b6eda 100644 --- a/arch/ia64/include/asm/Kbuild +++ b/arch/ia64/include/asm/Kbuild | |||
@@ -1,3 +1,4 @@ | |||
1 | 1 | ||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += exec.h | 3 | generic-y += exec.h |
4 | generic-y += kvm_para.h | ||
diff --git a/arch/ia64/include/asm/kvm_para.h b/arch/ia64/include/asm/kvm_para.h deleted file mode 100644 index 47c00f910434..000000000000 --- a/arch/ia64/include/asm/kvm_para.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Xiantao Zhang <xiantao.zhang@intel.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
15 | * Place - Suite 330, Boston, MA 02111-1307 USA. | ||
16 | * | ||
17 | */ | ||
18 | #ifndef __IA64_KVM_PARA_H | ||
19 | #define __IA64_KVM_PARA_H | ||
20 | |||
21 | #include <uapi/asm/kvm_para.h> | ||
22 | |||
23 | |||
24 | static inline unsigned int kvm_arch_para_features(void) | ||
25 | { | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | static inline bool kvm_check_and_clear_guest_paused(void) | ||
30 | { | ||
31 | return false; | ||
32 | } | ||
33 | |||
34 | #endif | ||
diff --git a/arch/ia64/include/uapi/asm/Kbuild b/arch/ia64/include/uapi/asm/Kbuild index 30cafac93703..1b3f5eb5fcdb 100644 --- a/arch/ia64/include/uapi/asm/Kbuild +++ b/arch/ia64/include/uapi/asm/Kbuild | |||
@@ -1,6 +1,8 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | generic-y += kvm_para.h | ||
5 | |||
4 | header-y += auxvec.h | 6 | header-y += auxvec.h |
5 | header-y += bitsperlong.h | 7 | header-y += bitsperlong.h |
6 | header-y += break.h | 8 | header-y += break.h |
diff --git a/arch/ia64/include/uapi/asm/kvm_para.h b/arch/ia64/include/uapi/asm/kvm_para.h deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/arch/ia64/include/uapi/asm/kvm_para.h +++ /dev/null | |||
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index ecb540810ab3..88fa3ac86fae 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild | |||
@@ -1,5 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | header-y += cachectl.h | ||
3 | 1 | ||
4 | generic-y += bitsperlong.h | 2 | generic-y += bitsperlong.h |
5 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
diff --git a/arch/m68k/include/asm/ptrace.h b/arch/m68k/include/asm/ptrace.h index 5e08b597f012..0f717045bdde 100644 --- a/arch/m68k/include/asm/ptrace.h +++ b/arch/m68k/include/asm/ptrace.h | |||
@@ -1,82 +1,10 @@ | |||
1 | #ifndef _M68K_PTRACE_H | 1 | #ifndef _M68K_PTRACE_H |
2 | #define _M68K_PTRACE_H | 2 | #define _M68K_PTRACE_H |
3 | 3 | ||
4 | #define PT_D1 0 | 4 | #include <uapi/asm/ptrace.h> |
5 | #define PT_D2 1 | ||
6 | #define PT_D3 2 | ||
7 | #define PT_D4 3 | ||
8 | #define PT_D5 4 | ||
9 | #define PT_D6 5 | ||
10 | #define PT_D7 6 | ||
11 | #define PT_A0 7 | ||
12 | #define PT_A1 8 | ||
13 | #define PT_A2 9 | ||
14 | #define PT_A3 10 | ||
15 | #define PT_A4 11 | ||
16 | #define PT_A5 12 | ||
17 | #define PT_A6 13 | ||
18 | #define PT_D0 14 | ||
19 | #define PT_USP 15 | ||
20 | #define PT_ORIG_D0 16 | ||
21 | #define PT_SR 17 | ||
22 | #define PT_PC 18 | ||
23 | 5 | ||
24 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
25 | 7 | ||
26 | /* this struct defines the way the registers are stored on the | ||
27 | stack during a system call. */ | ||
28 | |||
29 | struct pt_regs { | ||
30 | long d1; | ||
31 | long d2; | ||
32 | long d3; | ||
33 | long d4; | ||
34 | long d5; | ||
35 | long a0; | ||
36 | long a1; | ||
37 | long a2; | ||
38 | long d0; | ||
39 | long orig_d0; | ||
40 | long stkadj; | ||
41 | #ifdef CONFIG_COLDFIRE | ||
42 | unsigned format : 4; /* frame format specifier */ | ||
43 | unsigned vector : 12; /* vector offset */ | ||
44 | unsigned short sr; | ||
45 | unsigned long pc; | ||
46 | #else | ||
47 | unsigned short sr; | ||
48 | unsigned long pc; | ||
49 | unsigned format : 4; /* frame format specifier */ | ||
50 | unsigned vector : 12; /* vector offset */ | ||
51 | #endif | ||
52 | }; | ||
53 | |||
54 | /* | ||
55 | * This is the extended stack used by signal handlers and the context | ||
56 | * switcher: it's pushed after the normal "struct pt_regs". | ||
57 | */ | ||
58 | struct switch_stack { | ||
59 | unsigned long d6; | ||
60 | unsigned long d7; | ||
61 | unsigned long a3; | ||
62 | unsigned long a4; | ||
63 | unsigned long a5; | ||
64 | unsigned long a6; | ||
65 | unsigned long retpc; | ||
66 | }; | ||
67 | |||
68 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ | ||
69 | #define PTRACE_GETREGS 12 | ||
70 | #define PTRACE_SETREGS 13 | ||
71 | #define PTRACE_GETFPREGS 14 | ||
72 | #define PTRACE_SETFPREGS 15 | ||
73 | |||
74 | #define PTRACE_GET_THREAD_AREA 25 | ||
75 | |||
76 | #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ | ||
77 | |||
78 | #ifdef __KERNEL__ | ||
79 | |||
80 | #ifndef PS_S | 8 | #ifndef PS_S |
81 | #define PS_S (0x2000) | 9 | #define PS_S (0x2000) |
82 | #define PS_M (0x1000) | 10 | #define PS_M (0x1000) |
@@ -94,6 +22,5 @@ struct switch_stack { | |||
94 | #define arch_has_block_step() (1) | 22 | #define arch_has_block_step() (1) |
95 | #endif | 23 | #endif |
96 | 24 | ||
97 | #endif /* __KERNEL__ */ | ||
98 | #endif /* __ASSEMBLY__ */ | 25 | #endif /* __ASSEMBLY__ */ |
99 | #endif /* _M68K_PTRACE_H */ | 26 | #endif /* _M68K_PTRACE_H */ |
diff --git a/arch/m68k/include/asm/setup.h b/arch/m68k/include/asm/setup.h index 00c2c5397d37..65e78a2dad64 100644 --- a/arch/m68k/include/asm/setup.h +++ b/arch/m68k/include/asm/setup.h | |||
@@ -19,33 +19,12 @@ | |||
19 | ** Redesign of the boot information structure; moved boot information | 19 | ** Redesign of the boot information structure; moved boot information |
20 | ** structure to bootinfo.h | 20 | ** structure to bootinfo.h |
21 | */ | 21 | */ |
22 | |||
23 | #ifndef _M68K_SETUP_H | 22 | #ifndef _M68K_SETUP_H |
24 | #define _M68K_SETUP_H | 23 | #define _M68K_SETUP_H |
25 | 24 | ||
25 | #include <uapi/asm/setup.h> | ||
26 | 26 | ||
27 | 27 | ||
28 | /* | ||
29 | * Linux/m68k Architectures | ||
30 | */ | ||
31 | |||
32 | #define MACH_AMIGA 1 | ||
33 | #define MACH_ATARI 2 | ||
34 | #define MACH_MAC 3 | ||
35 | #define MACH_APOLLO 4 | ||
36 | #define MACH_SUN3 5 | ||
37 | #define MACH_MVME147 6 | ||
38 | #define MACH_MVME16x 7 | ||
39 | #define MACH_BVME6000 8 | ||
40 | #define MACH_HP300 9 | ||
41 | #define MACH_Q40 10 | ||
42 | #define MACH_SUN3X 11 | ||
43 | #define MACH_M54XX 12 | ||
44 | |||
45 | #define COMMAND_LINE_SIZE 256 | ||
46 | |||
47 | #ifdef __KERNEL__ | ||
48 | |||
49 | #define CL_SIZE COMMAND_LINE_SIZE | 28 | #define CL_SIZE COMMAND_LINE_SIZE |
50 | 29 | ||
51 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
@@ -194,63 +173,6 @@ extern unsigned long m68k_machtype; | |||
194 | # define MACH_TYPE (m68k_machtype) | 173 | # define MACH_TYPE (m68k_machtype) |
195 | #endif | 174 | #endif |
196 | 175 | ||
197 | #endif /* __KERNEL__ */ | ||
198 | |||
199 | |||
200 | /* | ||
201 | * CPU, FPU and MMU types | ||
202 | * | ||
203 | * Note: we may rely on the following equalities: | ||
204 | * | ||
205 | * CPU_68020 == MMU_68851 | ||
206 | * CPU_68030 == MMU_68030 | ||
207 | * CPU_68040 == FPU_68040 == MMU_68040 | ||
208 | * CPU_68060 == FPU_68060 == MMU_68060 | ||
209 | */ | ||
210 | |||
211 | #define CPUB_68020 0 | ||
212 | #define CPUB_68030 1 | ||
213 | #define CPUB_68040 2 | ||
214 | #define CPUB_68060 3 | ||
215 | #define CPUB_COLDFIRE 4 | ||
216 | |||
217 | #define CPU_68020 (1<<CPUB_68020) | ||
218 | #define CPU_68030 (1<<CPUB_68030) | ||
219 | #define CPU_68040 (1<<CPUB_68040) | ||
220 | #define CPU_68060 (1<<CPUB_68060) | ||
221 | #define CPU_COLDFIRE (1<<CPUB_COLDFIRE) | ||
222 | |||
223 | #define FPUB_68881 0 | ||
224 | #define FPUB_68882 1 | ||
225 | #define FPUB_68040 2 /* Internal FPU */ | ||
226 | #define FPUB_68060 3 /* Internal FPU */ | ||
227 | #define FPUB_SUNFPA 4 /* Sun-3 FPA */ | ||
228 | #define FPUB_COLDFIRE 5 /* ColdFire FPU */ | ||
229 | |||
230 | #define FPU_68881 (1<<FPUB_68881) | ||
231 | #define FPU_68882 (1<<FPUB_68882) | ||
232 | #define FPU_68040 (1<<FPUB_68040) | ||
233 | #define FPU_68060 (1<<FPUB_68060) | ||
234 | #define FPU_SUNFPA (1<<FPUB_SUNFPA) | ||
235 | #define FPU_COLDFIRE (1<<FPUB_COLDFIRE) | ||
236 | |||
237 | #define MMUB_68851 0 | ||
238 | #define MMUB_68030 1 /* Internal MMU */ | ||
239 | #define MMUB_68040 2 /* Internal MMU */ | ||
240 | #define MMUB_68060 3 /* Internal MMU */ | ||
241 | #define MMUB_APOLLO 4 /* Custom Apollo */ | ||
242 | #define MMUB_SUN3 5 /* Custom Sun-3 */ | ||
243 | #define MMUB_COLDFIRE 6 /* Internal MMU */ | ||
244 | |||
245 | #define MMU_68851 (1<<MMUB_68851) | ||
246 | #define MMU_68030 (1<<MMUB_68030) | ||
247 | #define MMU_68040 (1<<MMUB_68040) | ||
248 | #define MMU_68060 (1<<MMUB_68060) | ||
249 | #define MMU_SUN3 (1<<MMUB_SUN3) | ||
250 | #define MMU_APOLLO (1<<MMUB_APOLLO) | ||
251 | #define MMU_COLDFIRE (1<<MMUB_COLDFIRE) | ||
252 | |||
253 | #ifdef __KERNEL__ | ||
254 | 176 | ||
255 | #ifndef __ASSEMBLY__ | 177 | #ifndef __ASSEMBLY__ |
256 | extern unsigned long m68k_cputype; | 178 | extern unsigned long m68k_cputype; |
@@ -385,6 +307,4 @@ extern int m68k_realnum_memory; /* real # of memory blocks found */ | |||
385 | extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */ | 307 | extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */ |
386 | #endif | 308 | #endif |
387 | 309 | ||
388 | #endif /* __KERNEL__ */ | ||
389 | |||
390 | #endif /* _M68K_SETUP_H */ | 310 | #endif /* _M68K_SETUP_H */ |
diff --git a/arch/m68k/include/asm/signal.h b/arch/m68k/include/asm/signal.h index 60e88660169c..67e489d8d1bd 100644 --- a/arch/m68k/include/asm/signal.h +++ b/arch/m68k/include/asm/signal.h | |||
@@ -1,12 +1,8 @@ | |||
1 | #ifndef _M68K_SIGNAL_H | 1 | #ifndef _M68K_SIGNAL_H |
2 | #define _M68K_SIGNAL_H | 2 | #define _M68K_SIGNAL_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <uapi/asm/signal.h> |
5 | 5 | ||
6 | /* Avoid too many header ordering problems. */ | ||
7 | struct siginfo; | ||
8 | |||
9 | #ifdef __KERNEL__ | ||
10 | /* Most things should be clean enough to redefine this at will, if care | 6 | /* Most things should be clean enough to redefine this at will, if care |
11 | is taken to make libc match. */ | 7 | is taken to make libc match. */ |
12 | 8 | ||
@@ -20,92 +16,6 @@ typedef struct { | |||
20 | unsigned long sig[_NSIG_WORDS]; | 16 | unsigned long sig[_NSIG_WORDS]; |
21 | } sigset_t; | 17 | } sigset_t; |
22 | 18 | ||
23 | #else | ||
24 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
25 | |||
26 | #define NSIG 32 | ||
27 | typedef unsigned long sigset_t; | ||
28 | |||
29 | #endif /* __KERNEL__ */ | ||
30 | |||
31 | #define SIGHUP 1 | ||
32 | #define SIGINT 2 | ||
33 | #define SIGQUIT 3 | ||
34 | #define SIGILL 4 | ||
35 | #define SIGTRAP 5 | ||
36 | #define SIGABRT 6 | ||
37 | #define SIGIOT 6 | ||
38 | #define SIGBUS 7 | ||
39 | #define SIGFPE 8 | ||
40 | #define SIGKILL 9 | ||
41 | #define SIGUSR1 10 | ||
42 | #define SIGSEGV 11 | ||
43 | #define SIGUSR2 12 | ||
44 | #define SIGPIPE 13 | ||
45 | #define SIGALRM 14 | ||
46 | #define SIGTERM 15 | ||
47 | #define SIGSTKFLT 16 | ||
48 | #define SIGCHLD 17 | ||
49 | #define SIGCONT 18 | ||
50 | #define SIGSTOP 19 | ||
51 | #define SIGTSTP 20 | ||
52 | #define SIGTTIN 21 | ||
53 | #define SIGTTOU 22 | ||
54 | #define SIGURG 23 | ||
55 | #define SIGXCPU 24 | ||
56 | #define SIGXFSZ 25 | ||
57 | #define SIGVTALRM 26 | ||
58 | #define SIGPROF 27 | ||
59 | #define SIGWINCH 28 | ||
60 | #define SIGIO 29 | ||
61 | #define SIGPOLL SIGIO | ||
62 | /* | ||
63 | #define SIGLOST 29 | ||
64 | */ | ||
65 | #define SIGPWR 30 | ||
66 | #define SIGSYS 31 | ||
67 | #define SIGUNUSED 31 | ||
68 | |||
69 | /* These should not be considered constants from userland. */ | ||
70 | #define SIGRTMIN 32 | ||
71 | #define SIGRTMAX _NSIG | ||
72 | |||
73 | /* | ||
74 | * SA_FLAGS values: | ||
75 | * | ||
76 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
77 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
78 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
79 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
80 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
81 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
82 | * | ||
83 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
84 | * Unix names RESETHAND and NODEFER respectively. | ||
85 | */ | ||
86 | #define SA_NOCLDSTOP 0x00000001 | ||
87 | #define SA_NOCLDWAIT 0x00000002 | ||
88 | #define SA_SIGINFO 0x00000004 | ||
89 | #define SA_ONSTACK 0x08000000 | ||
90 | #define SA_RESTART 0x10000000 | ||
91 | #define SA_NODEFER 0x40000000 | ||
92 | #define SA_RESETHAND 0x80000000 | ||
93 | |||
94 | #define SA_NOMASK SA_NODEFER | ||
95 | #define SA_ONESHOT SA_RESETHAND | ||
96 | |||
97 | /* | ||
98 | * sigaltstack controls | ||
99 | */ | ||
100 | #define SS_ONSTACK 1 | ||
101 | #define SS_DISABLE 2 | ||
102 | |||
103 | #define MINSIGSTKSZ 2048 | ||
104 | #define SIGSTKSZ 8192 | ||
105 | |||
106 | #include <asm-generic/signal-defs.h> | ||
107 | |||
108 | #ifdef __KERNEL__ | ||
109 | struct old_sigaction { | 19 | struct old_sigaction { |
110 | __sighandler_t sa_handler; | 20 | __sighandler_t sa_handler; |
111 | old_sigset_t sa_mask; | 21 | old_sigset_t sa_mask; |
@@ -123,31 +33,6 @@ struct sigaction { | |||
123 | struct k_sigaction { | 33 | struct k_sigaction { |
124 | struct sigaction sa; | 34 | struct sigaction sa; |
125 | }; | 35 | }; |
126 | #else | ||
127 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
128 | |||
129 | struct sigaction { | ||
130 | union { | ||
131 | __sighandler_t _sa_handler; | ||
132 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
133 | } _u; | ||
134 | sigset_t sa_mask; | ||
135 | unsigned long sa_flags; | ||
136 | void (*sa_restorer)(void); | ||
137 | }; | ||
138 | |||
139 | #define sa_handler _u._sa_handler | ||
140 | #define sa_sigaction _u._sa_sigaction | ||
141 | |||
142 | #endif /* __KERNEL__ */ | ||
143 | |||
144 | typedef struct sigaltstack { | ||
145 | void __user *ss_sp; | ||
146 | int ss_flags; | ||
147 | size_t ss_size; | ||
148 | } stack_t; | ||
149 | |||
150 | #ifdef __KERNEL__ | ||
151 | #include <asm/sigcontext.h> | 36 | #include <asm/sigcontext.h> |
152 | 37 | ||
153 | #ifndef CONFIG_CPU_HAS_NO_BITFIELDS | 38 | #ifndef CONFIG_CPU_HAS_NO_BITFIELDS |
@@ -208,5 +93,4 @@ struct pt_regs; | |||
208 | extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie); | 93 | extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie); |
209 | #endif /* __uClinux__ */ | 94 | #endif /* __uClinux__ */ |
210 | 95 | ||
211 | #endif /* __KERNEL__ */ | ||
212 | #endif /* _M68K_SIGNAL_H */ | 96 | #endif /* _M68K_SIGNAL_H */ |
diff --git a/arch/m68k/include/asm/termios.h b/arch/m68k/include/asm/termios.h index 0823032e4045..ad8efb098663 100644 --- a/arch/m68k/include/asm/termios.h +++ b/arch/m68k/include/asm/termios.h | |||
@@ -1,27 +1,8 @@ | |||
1 | #ifndef _M68K_TERMIOS_H | 1 | #ifndef _M68K_TERMIOS_H |
2 | #define _M68K_TERMIOS_H | 2 | #define _M68K_TERMIOS_H |
3 | 3 | ||
4 | #include <asm/termbits.h> | 4 | #include <uapi/asm/termios.h> |
5 | #include <asm/ioctls.h> | ||
6 | 5 | ||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | #ifdef __KERNEL__ | ||
25 | /* intr=^C quit=^| erase=del kill=^U | 6 | /* intr=^C quit=^| erase=del kill=^U |
26 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | 7 | eof=^D vtime=\0 vmin=\1 sxtc=\0 |
27 | start=^Q stop=^S susp=^Z eol=\0 | 8 | start=^Q stop=^S susp=^Z eol=\0 |
@@ -29,27 +10,6 @@ struct termio { | |||
29 | eol2=\0 | 10 | eol2=\0 |
30 | */ | 11 | */ |
31 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" | 12 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" |
32 | #endif | ||
33 | |||
34 | /* modem lines */ | ||
35 | #define TIOCM_LE 0x001 | ||
36 | #define TIOCM_DTR 0x002 | ||
37 | #define TIOCM_RTS 0x004 | ||
38 | #define TIOCM_ST 0x008 | ||
39 | #define TIOCM_SR 0x010 | ||
40 | #define TIOCM_CTS 0x020 | ||
41 | #define TIOCM_CAR 0x040 | ||
42 | #define TIOCM_RNG 0x080 | ||
43 | #define TIOCM_DSR 0x100 | ||
44 | #define TIOCM_CD TIOCM_CAR | ||
45 | #define TIOCM_RI TIOCM_RNG | ||
46 | #define TIOCM_OUT1 0x2000 | ||
47 | #define TIOCM_OUT2 0x4000 | ||
48 | #define TIOCM_LOOP 0x8000 | ||
49 | |||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
51 | |||
52 | #ifdef __KERNEL__ | ||
53 | 13 | ||
54 | /* | 14 | /* |
55 | * Translate a "termio" structure into a "termios". Ugh. | 15 | * Translate a "termio" structure into a "termios". Ugh. |
@@ -87,6 +47,4 @@ struct termio { | |||
87 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | 47 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) |
88 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | 48 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) |
89 | 49 | ||
90 | #endif /* __KERNEL__ */ | ||
91 | |||
92 | #endif /* _M68K_TERMIOS_H */ | 50 | #endif /* _M68K_TERMIOS_H */ |
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index c702ad716791..5fc7f7bec1c8 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
@@ -1,361 +1,10 @@ | |||
1 | #ifndef _ASM_M68K_UNISTD_H_ | 1 | #ifndef _ASM_M68K_UNISTD_H_ |
2 | #define _ASM_M68K_UNISTD_H_ | 2 | #define _ASM_M68K_UNISTD_H_ |
3 | 3 | ||
4 | /* | 4 | #include <uapi/asm/unistd.h> |
5 | * This file contains the system call numbers. | ||
6 | */ | ||
7 | |||
8 | #define __NR_restart_syscall 0 | ||
9 | #define __NR_exit 1 | ||
10 | #define __NR_fork 2 | ||
11 | #define __NR_read 3 | ||
12 | #define __NR_write 4 | ||
13 | #define __NR_open 5 | ||
14 | #define __NR_close 6 | ||
15 | #define __NR_waitpid 7 | ||
16 | #define __NR_creat 8 | ||
17 | #define __NR_link 9 | ||
18 | #define __NR_unlink 10 | ||
19 | #define __NR_execve 11 | ||
20 | #define __NR_chdir 12 | ||
21 | #define __NR_time 13 | ||
22 | #define __NR_mknod 14 | ||
23 | #define __NR_chmod 15 | ||
24 | #define __NR_chown 16 | ||
25 | /*#define __NR_break 17*/ | ||
26 | #define __NR_oldstat 18 | ||
27 | #define __NR_lseek 19 | ||
28 | #define __NR_getpid 20 | ||
29 | #define __NR_mount 21 | ||
30 | #define __NR_umount 22 | ||
31 | #define __NR_setuid 23 | ||
32 | #define __NR_getuid 24 | ||
33 | #define __NR_stime 25 | ||
34 | #define __NR_ptrace 26 | ||
35 | #define __NR_alarm 27 | ||
36 | #define __NR_oldfstat 28 | ||
37 | #define __NR_pause 29 | ||
38 | #define __NR_utime 30 | ||
39 | /*#define __NR_stty 31*/ | ||
40 | /*#define __NR_gtty 32*/ | ||
41 | #define __NR_access 33 | ||
42 | #define __NR_nice 34 | ||
43 | /*#define __NR_ftime 35*/ | ||
44 | #define __NR_sync 36 | ||
45 | #define __NR_kill 37 | ||
46 | #define __NR_rename 38 | ||
47 | #define __NR_mkdir 39 | ||
48 | #define __NR_rmdir 40 | ||
49 | #define __NR_dup 41 | ||
50 | #define __NR_pipe 42 | ||
51 | #define __NR_times 43 | ||
52 | /*#define __NR_prof 44*/ | ||
53 | #define __NR_brk 45 | ||
54 | #define __NR_setgid 46 | ||
55 | #define __NR_getgid 47 | ||
56 | #define __NR_signal 48 | ||
57 | #define __NR_geteuid 49 | ||
58 | #define __NR_getegid 50 | ||
59 | #define __NR_acct 51 | ||
60 | #define __NR_umount2 52 | ||
61 | /*#define __NR_lock 53*/ | ||
62 | #define __NR_ioctl 54 | ||
63 | #define __NR_fcntl 55 | ||
64 | /*#define __NR_mpx 56*/ | ||
65 | #define __NR_setpgid 57 | ||
66 | /*#define __NR_ulimit 58*/ | ||
67 | /*#define __NR_oldolduname 59*/ | ||
68 | #define __NR_umask 60 | ||
69 | #define __NR_chroot 61 | ||
70 | #define __NR_ustat 62 | ||
71 | #define __NR_dup2 63 | ||
72 | #define __NR_getppid 64 | ||
73 | #define __NR_getpgrp 65 | ||
74 | #define __NR_setsid 66 | ||
75 | #define __NR_sigaction 67 | ||
76 | #define __NR_sgetmask 68 | ||
77 | #define __NR_ssetmask 69 | ||
78 | #define __NR_setreuid 70 | ||
79 | #define __NR_setregid 71 | ||
80 | #define __NR_sigsuspend 72 | ||
81 | #define __NR_sigpending 73 | ||
82 | #define __NR_sethostname 74 | ||
83 | #define __NR_setrlimit 75 | ||
84 | #define __NR_getrlimit 76 | ||
85 | #define __NR_getrusage 77 | ||
86 | #define __NR_gettimeofday 78 | ||
87 | #define __NR_settimeofday 79 | ||
88 | #define __NR_getgroups 80 | ||
89 | #define __NR_setgroups 81 | ||
90 | #define __NR_select 82 | ||
91 | #define __NR_symlink 83 | ||
92 | #define __NR_oldlstat 84 | ||
93 | #define __NR_readlink 85 | ||
94 | #define __NR_uselib 86 | ||
95 | #define __NR_swapon 87 | ||
96 | #define __NR_reboot 88 | ||
97 | #define __NR_readdir 89 | ||
98 | #define __NR_mmap 90 | ||
99 | #define __NR_munmap 91 | ||
100 | #define __NR_truncate 92 | ||
101 | #define __NR_ftruncate 93 | ||
102 | #define __NR_fchmod 94 | ||
103 | #define __NR_fchown 95 | ||
104 | #define __NR_getpriority 96 | ||
105 | #define __NR_setpriority 97 | ||
106 | /*#define __NR_profil 98*/ | ||
107 | #define __NR_statfs 99 | ||
108 | #define __NR_fstatfs 100 | ||
109 | /*#define __NR_ioperm 101*/ | ||
110 | #define __NR_socketcall 102 | ||
111 | #define __NR_syslog 103 | ||
112 | #define __NR_setitimer 104 | ||
113 | #define __NR_getitimer 105 | ||
114 | #define __NR_stat 106 | ||
115 | #define __NR_lstat 107 | ||
116 | #define __NR_fstat 108 | ||
117 | /*#define __NR_olduname 109*/ | ||
118 | /*#define __NR_iopl 110*/ /* not supported */ | ||
119 | #define __NR_vhangup 111 | ||
120 | /*#define __NR_idle 112*/ /* Obsolete */ | ||
121 | /*#define __NR_vm86 113*/ /* not supported */ | ||
122 | #define __NR_wait4 114 | ||
123 | #define __NR_swapoff 115 | ||
124 | #define __NR_sysinfo 116 | ||
125 | #define __NR_ipc 117 | ||
126 | #define __NR_fsync 118 | ||
127 | #define __NR_sigreturn 119 | ||
128 | #define __NR_clone 120 | ||
129 | #define __NR_setdomainname 121 | ||
130 | #define __NR_uname 122 | ||
131 | #define __NR_cacheflush 123 | ||
132 | #define __NR_adjtimex 124 | ||
133 | #define __NR_mprotect 125 | ||
134 | #define __NR_sigprocmask 126 | ||
135 | #define __NR_create_module 127 | ||
136 | #define __NR_init_module 128 | ||
137 | #define __NR_delete_module 129 | ||
138 | #define __NR_get_kernel_syms 130 | ||
139 | #define __NR_quotactl 131 | ||
140 | #define __NR_getpgid 132 | ||
141 | #define __NR_fchdir 133 | ||
142 | #define __NR_bdflush 134 | ||
143 | #define __NR_sysfs 135 | ||
144 | #define __NR_personality 136 | ||
145 | /*#define __NR_afs_syscall 137*/ /* Syscall for Andrew File System */ | ||
146 | #define __NR_setfsuid 138 | ||
147 | #define __NR_setfsgid 139 | ||
148 | #define __NR__llseek 140 | ||
149 | #define __NR_getdents 141 | ||
150 | #define __NR__newselect 142 | ||
151 | #define __NR_flock 143 | ||
152 | #define __NR_msync 144 | ||
153 | #define __NR_readv 145 | ||
154 | #define __NR_writev 146 | ||
155 | #define __NR_getsid 147 | ||
156 | #define __NR_fdatasync 148 | ||
157 | #define __NR__sysctl 149 | ||
158 | #define __NR_mlock 150 | ||
159 | #define __NR_munlock 151 | ||
160 | #define __NR_mlockall 152 | ||
161 | #define __NR_munlockall 153 | ||
162 | #define __NR_sched_setparam 154 | ||
163 | #define __NR_sched_getparam 155 | ||
164 | #define __NR_sched_setscheduler 156 | ||
165 | #define __NR_sched_getscheduler 157 | ||
166 | #define __NR_sched_yield 158 | ||
167 | #define __NR_sched_get_priority_max 159 | ||
168 | #define __NR_sched_get_priority_min 160 | ||
169 | #define __NR_sched_rr_get_interval 161 | ||
170 | #define __NR_nanosleep 162 | ||
171 | #define __NR_mremap 163 | ||
172 | #define __NR_setresuid 164 | ||
173 | #define __NR_getresuid 165 | ||
174 | #define __NR_getpagesize 166 | ||
175 | #define __NR_query_module 167 | ||
176 | #define __NR_poll 168 | ||
177 | #define __NR_nfsservctl 169 | ||
178 | #define __NR_setresgid 170 | ||
179 | #define __NR_getresgid 171 | ||
180 | #define __NR_prctl 172 | ||
181 | #define __NR_rt_sigreturn 173 | ||
182 | #define __NR_rt_sigaction 174 | ||
183 | #define __NR_rt_sigprocmask 175 | ||
184 | #define __NR_rt_sigpending 176 | ||
185 | #define __NR_rt_sigtimedwait 177 | ||
186 | #define __NR_rt_sigqueueinfo 178 | ||
187 | #define __NR_rt_sigsuspend 179 | ||
188 | #define __NR_pread64 180 | ||
189 | #define __NR_pwrite64 181 | ||
190 | #define __NR_lchown 182 | ||
191 | #define __NR_getcwd 183 | ||
192 | #define __NR_capget 184 | ||
193 | #define __NR_capset 185 | ||
194 | #define __NR_sigaltstack 186 | ||
195 | #define __NR_sendfile 187 | ||
196 | #define __NR_getpmsg 188 /* some people actually want streams */ | ||
197 | #define __NR_putpmsg 189 /* some people actually want streams */ | ||
198 | #define __NR_vfork 190 | ||
199 | #define __NR_ugetrlimit 191 | ||
200 | #define __NR_mmap2 192 | ||
201 | #define __NR_truncate64 193 | ||
202 | #define __NR_ftruncate64 194 | ||
203 | #define __NR_stat64 195 | ||
204 | #define __NR_lstat64 196 | ||
205 | #define __NR_fstat64 197 | ||
206 | #define __NR_chown32 198 | ||
207 | #define __NR_getuid32 199 | ||
208 | #define __NR_getgid32 200 | ||
209 | #define __NR_geteuid32 201 | ||
210 | #define __NR_getegid32 202 | ||
211 | #define __NR_setreuid32 203 | ||
212 | #define __NR_setregid32 204 | ||
213 | #define __NR_getgroups32 205 | ||
214 | #define __NR_setgroups32 206 | ||
215 | #define __NR_fchown32 207 | ||
216 | #define __NR_setresuid32 208 | ||
217 | #define __NR_getresuid32 209 | ||
218 | #define __NR_setresgid32 210 | ||
219 | #define __NR_getresgid32 211 | ||
220 | #define __NR_lchown32 212 | ||
221 | #define __NR_setuid32 213 | ||
222 | #define __NR_setgid32 214 | ||
223 | #define __NR_setfsuid32 215 | ||
224 | #define __NR_setfsgid32 216 | ||
225 | #define __NR_pivot_root 217 | ||
226 | /* 218*/ | ||
227 | /* 219*/ | ||
228 | #define __NR_getdents64 220 | ||
229 | #define __NR_gettid 221 | ||
230 | #define __NR_tkill 222 | ||
231 | #define __NR_setxattr 223 | ||
232 | #define __NR_lsetxattr 224 | ||
233 | #define __NR_fsetxattr 225 | ||
234 | #define __NR_getxattr 226 | ||
235 | #define __NR_lgetxattr 227 | ||
236 | #define __NR_fgetxattr 228 | ||
237 | #define __NR_listxattr 229 | ||
238 | #define __NR_llistxattr 230 | ||
239 | #define __NR_flistxattr 231 | ||
240 | #define __NR_removexattr 232 | ||
241 | #define __NR_lremovexattr 233 | ||
242 | #define __NR_fremovexattr 234 | ||
243 | #define __NR_futex 235 | ||
244 | #define __NR_sendfile64 236 | ||
245 | #define __NR_mincore 237 | ||
246 | #define __NR_madvise 238 | ||
247 | #define __NR_fcntl64 239 | ||
248 | #define __NR_readahead 240 | ||
249 | #define __NR_io_setup 241 | ||
250 | #define __NR_io_destroy 242 | ||
251 | #define __NR_io_getevents 243 | ||
252 | #define __NR_io_submit 244 | ||
253 | #define __NR_io_cancel 245 | ||
254 | #define __NR_fadvise64 246 | ||
255 | #define __NR_exit_group 247 | ||
256 | #define __NR_lookup_dcookie 248 | ||
257 | #define __NR_epoll_create 249 | ||
258 | #define __NR_epoll_ctl 250 | ||
259 | #define __NR_epoll_wait 251 | ||
260 | #define __NR_remap_file_pages 252 | ||
261 | #define __NR_set_tid_address 253 | ||
262 | #define __NR_timer_create 254 | ||
263 | #define __NR_timer_settime 255 | ||
264 | #define __NR_timer_gettime 256 | ||
265 | #define __NR_timer_getoverrun 257 | ||
266 | #define __NR_timer_delete 258 | ||
267 | #define __NR_clock_settime 259 | ||
268 | #define __NR_clock_gettime 260 | ||
269 | #define __NR_clock_getres 261 | ||
270 | #define __NR_clock_nanosleep 262 | ||
271 | #define __NR_statfs64 263 | ||
272 | #define __NR_fstatfs64 264 | ||
273 | #define __NR_tgkill 265 | ||
274 | #define __NR_utimes 266 | ||
275 | #define __NR_fadvise64_64 267 | ||
276 | #define __NR_mbind 268 | ||
277 | #define __NR_get_mempolicy 269 | ||
278 | #define __NR_set_mempolicy 270 | ||
279 | #define __NR_mq_open 271 | ||
280 | #define __NR_mq_unlink 272 | ||
281 | #define __NR_mq_timedsend 273 | ||
282 | #define __NR_mq_timedreceive 274 | ||
283 | #define __NR_mq_notify 275 | ||
284 | #define __NR_mq_getsetattr 276 | ||
285 | #define __NR_waitid 277 | ||
286 | /*#define __NR_vserver 278*/ | ||
287 | #define __NR_add_key 279 | ||
288 | #define __NR_request_key 280 | ||
289 | #define __NR_keyctl 281 | ||
290 | #define __NR_ioprio_set 282 | ||
291 | #define __NR_ioprio_get 283 | ||
292 | #define __NR_inotify_init 284 | ||
293 | #define __NR_inotify_add_watch 285 | ||
294 | #define __NR_inotify_rm_watch 286 | ||
295 | #define __NR_migrate_pages 287 | ||
296 | #define __NR_openat 288 | ||
297 | #define __NR_mkdirat 289 | ||
298 | #define __NR_mknodat 290 | ||
299 | #define __NR_fchownat 291 | ||
300 | #define __NR_futimesat 292 | ||
301 | #define __NR_fstatat64 293 | ||
302 | #define __NR_unlinkat 294 | ||
303 | #define __NR_renameat 295 | ||
304 | #define __NR_linkat 296 | ||
305 | #define __NR_symlinkat 297 | ||
306 | #define __NR_readlinkat 298 | ||
307 | #define __NR_fchmodat 299 | ||
308 | #define __NR_faccessat 300 | ||
309 | #define __NR_pselect6 301 | ||
310 | #define __NR_ppoll 302 | ||
311 | #define __NR_unshare 303 | ||
312 | #define __NR_set_robust_list 304 | ||
313 | #define __NR_get_robust_list 305 | ||
314 | #define __NR_splice 306 | ||
315 | #define __NR_sync_file_range 307 | ||
316 | #define __NR_tee 308 | ||
317 | #define __NR_vmsplice 309 | ||
318 | #define __NR_move_pages 310 | ||
319 | #define __NR_sched_setaffinity 311 | ||
320 | #define __NR_sched_getaffinity 312 | ||
321 | #define __NR_kexec_load 313 | ||
322 | #define __NR_getcpu 314 | ||
323 | #define __NR_epoll_pwait 315 | ||
324 | #define __NR_utimensat 316 | ||
325 | #define __NR_signalfd 317 | ||
326 | #define __NR_timerfd_create 318 | ||
327 | #define __NR_eventfd 319 | ||
328 | #define __NR_fallocate 320 | ||
329 | #define __NR_timerfd_settime 321 | ||
330 | #define __NR_timerfd_gettime 322 | ||
331 | #define __NR_signalfd4 323 | ||
332 | #define __NR_eventfd2 324 | ||
333 | #define __NR_epoll_create1 325 | ||
334 | #define __NR_dup3 326 | ||
335 | #define __NR_pipe2 327 | ||
336 | #define __NR_inotify_init1 328 | ||
337 | #define __NR_preadv 329 | ||
338 | #define __NR_pwritev 330 | ||
339 | #define __NR_rt_tgsigqueueinfo 331 | ||
340 | #define __NR_perf_event_open 332 | ||
341 | #define __NR_get_thread_area 333 | ||
342 | #define __NR_set_thread_area 334 | ||
343 | #define __NR_atomic_cmpxchg_32 335 | ||
344 | #define __NR_atomic_barrier 336 | ||
345 | #define __NR_fanotify_init 337 | ||
346 | #define __NR_fanotify_mark 338 | ||
347 | #define __NR_prlimit64 339 | ||
348 | #define __NR_name_to_handle_at 340 | ||
349 | #define __NR_open_by_handle_at 341 | ||
350 | #define __NR_clock_adjtime 342 | ||
351 | #define __NR_syncfs 343 | ||
352 | #define __NR_setns 344 | ||
353 | #define __NR_process_vm_readv 345 | ||
354 | #define __NR_process_vm_writev 346 | ||
355 | 5 | ||
356 | #ifdef __KERNEL__ | ||
357 | 6 | ||
358 | #define NR_syscalls 347 | 7 | #define NR_syscalls 348 |
359 | 8 | ||
360 | #define __ARCH_WANT_OLD_READDIR | 9 | #define __ARCH_WANT_OLD_READDIR |
361 | #define __ARCH_WANT_OLD_STAT | 10 | #define __ARCH_WANT_OLD_STAT |
@@ -393,5 +42,4 @@ | |||
393 | */ | 42 | */ |
394 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 43 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
395 | 44 | ||
396 | #endif /* __KERNEL__ */ | ||
397 | #endif /* _ASM_M68K_UNISTD_H_ */ | 45 | #endif /* _ASM_M68K_UNISTD_H_ */ |
diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild index baebb3da1d44..972bce120e1e 100644 --- a/arch/m68k/include/uapi/asm/Kbuild +++ b/arch/m68k/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,26 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += a.out.h | ||
5 | header-y += auxvec.h | ||
6 | header-y += byteorder.h | ||
7 | header-y += cachectl.h | ||
8 | header-y += fcntl.h | ||
9 | header-y += ioctls.h | ||
10 | header-y += msgbuf.h | ||
11 | header-y += param.h | ||
12 | header-y += poll.h | ||
13 | header-y += posix_types.h | ||
14 | header-y += ptrace.h | ||
15 | header-y += sembuf.h | ||
16 | header-y += setup.h | ||
17 | header-y += shmbuf.h | ||
18 | header-y += sigcontext.h | ||
19 | header-y += signal.h | ||
20 | header-y += socket.h | ||
21 | header-y += sockios.h | ||
22 | header-y += stat.h | ||
23 | header-y += swab.h | ||
24 | header-y += termbits.h | ||
25 | header-y += termios.h | ||
26 | header-y += unistd.h | ||
diff --git a/arch/m68k/include/asm/a.out.h b/arch/m68k/include/uapi/asm/a.out.h index 3885fe43432a..3885fe43432a 100644 --- a/arch/m68k/include/asm/a.out.h +++ b/arch/m68k/include/uapi/asm/a.out.h | |||
diff --git a/arch/m68k/include/asm/auxvec.h b/arch/m68k/include/uapi/asm/auxvec.h index 844d6d52204b..844d6d52204b 100644 --- a/arch/m68k/include/asm/auxvec.h +++ b/arch/m68k/include/uapi/asm/auxvec.h | |||
diff --git a/arch/m68k/include/asm/byteorder.h b/arch/m68k/include/uapi/asm/byteorder.h index 31b260a88803..31b260a88803 100644 --- a/arch/m68k/include/asm/byteorder.h +++ b/arch/m68k/include/uapi/asm/byteorder.h | |||
diff --git a/arch/m68k/include/asm/cachectl.h b/arch/m68k/include/uapi/asm/cachectl.h index 525978e959e3..525978e959e3 100644 --- a/arch/m68k/include/asm/cachectl.h +++ b/arch/m68k/include/uapi/asm/cachectl.h | |||
diff --git a/arch/m68k/include/asm/fcntl.h b/arch/m68k/include/uapi/asm/fcntl.h index 1c369b20dc45..1c369b20dc45 100644 --- a/arch/m68k/include/asm/fcntl.h +++ b/arch/m68k/include/uapi/asm/fcntl.h | |||
diff --git a/arch/m68k/include/asm/ioctls.h b/arch/m68k/include/uapi/asm/ioctls.h index 1332bb4ca5b0..1332bb4ca5b0 100644 --- a/arch/m68k/include/asm/ioctls.h +++ b/arch/m68k/include/uapi/asm/ioctls.h | |||
diff --git a/arch/m68k/include/asm/msgbuf.h b/arch/m68k/include/uapi/asm/msgbuf.h index 243cb798de8f..243cb798de8f 100644 --- a/arch/m68k/include/asm/msgbuf.h +++ b/arch/m68k/include/uapi/asm/msgbuf.h | |||
diff --git a/arch/m68k/include/asm/param.h b/arch/m68k/include/uapi/asm/param.h index 36265ccf5c7b..36265ccf5c7b 100644 --- a/arch/m68k/include/asm/param.h +++ b/arch/m68k/include/uapi/asm/param.h | |||
diff --git a/arch/m68k/include/asm/poll.h b/arch/m68k/include/uapi/asm/poll.h index f080fcdb61bf..f080fcdb61bf 100644 --- a/arch/m68k/include/asm/poll.h +++ b/arch/m68k/include/uapi/asm/poll.h | |||
diff --git a/arch/m68k/include/asm/posix_types.h b/arch/m68k/include/uapi/asm/posix_types.h index cf4dbf70fdc7..cf4dbf70fdc7 100644 --- a/arch/m68k/include/asm/posix_types.h +++ b/arch/m68k/include/uapi/asm/posix_types.h | |||
diff --git a/arch/m68k/include/uapi/asm/ptrace.h b/arch/m68k/include/uapi/asm/ptrace.h new file mode 100644 index 000000000000..caf92fd34939 --- /dev/null +++ b/arch/m68k/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,79 @@ | |||
1 | #ifndef _UAPI_M68K_PTRACE_H | ||
2 | #define _UAPI_M68K_PTRACE_H | ||
3 | |||
4 | #define PT_D1 0 | ||
5 | #define PT_D2 1 | ||
6 | #define PT_D3 2 | ||
7 | #define PT_D4 3 | ||
8 | #define PT_D5 4 | ||
9 | #define PT_D6 5 | ||
10 | #define PT_D7 6 | ||
11 | #define PT_A0 7 | ||
12 | #define PT_A1 8 | ||
13 | #define PT_A2 9 | ||
14 | #define PT_A3 10 | ||
15 | #define PT_A4 11 | ||
16 | #define PT_A5 12 | ||
17 | #define PT_A6 13 | ||
18 | #define PT_D0 14 | ||
19 | #define PT_USP 15 | ||
20 | #define PT_ORIG_D0 16 | ||
21 | #define PT_SR 17 | ||
22 | #define PT_PC 18 | ||
23 | |||
24 | #ifndef __ASSEMBLY__ | ||
25 | |||
26 | /* this struct defines the way the registers are stored on the | ||
27 | stack during a system call. */ | ||
28 | |||
29 | struct pt_regs { | ||
30 | long d1; | ||
31 | long d2; | ||
32 | long d3; | ||
33 | long d4; | ||
34 | long d5; | ||
35 | long a0; | ||
36 | long a1; | ||
37 | long a2; | ||
38 | long d0; | ||
39 | long orig_d0; | ||
40 | long stkadj; | ||
41 | #ifdef CONFIG_COLDFIRE | ||
42 | unsigned format : 4; /* frame format specifier */ | ||
43 | unsigned vector : 12; /* vector offset */ | ||
44 | unsigned short sr; | ||
45 | unsigned long pc; | ||
46 | #else | ||
47 | unsigned short sr; | ||
48 | unsigned long pc; | ||
49 | unsigned format : 4; /* frame format specifier */ | ||
50 | unsigned vector : 12; /* vector offset */ | ||
51 | #endif | ||
52 | }; | ||
53 | |||
54 | /* | ||
55 | * This is the extended stack used by signal handlers and the context | ||
56 | * switcher: it's pushed after the normal "struct pt_regs". | ||
57 | */ | ||
58 | struct switch_stack { | ||
59 | unsigned long d6; | ||
60 | unsigned long d7; | ||
61 | unsigned long a3; | ||
62 | unsigned long a4; | ||
63 | unsigned long a5; | ||
64 | unsigned long a6; | ||
65 | unsigned long retpc; | ||
66 | }; | ||
67 | |||
68 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ | ||
69 | #define PTRACE_GETREGS 12 | ||
70 | #define PTRACE_SETREGS 13 | ||
71 | #define PTRACE_GETFPREGS 14 | ||
72 | #define PTRACE_SETFPREGS 15 | ||
73 | |||
74 | #define PTRACE_GET_THREAD_AREA 25 | ||
75 | |||
76 | #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ | ||
77 | |||
78 | #endif /* __ASSEMBLY__ */ | ||
79 | #endif /* _UAPI_M68K_PTRACE_H */ | ||
diff --git a/arch/m68k/include/asm/sembuf.h b/arch/m68k/include/uapi/asm/sembuf.h index 2308052a8c24..2308052a8c24 100644 --- a/arch/m68k/include/asm/sembuf.h +++ b/arch/m68k/include/uapi/asm/sembuf.h | |||
diff --git a/arch/m68k/include/uapi/asm/setup.h b/arch/m68k/include/uapi/asm/setup.h new file mode 100644 index 000000000000..85579bff455c --- /dev/null +++ b/arch/m68k/include/uapi/asm/setup.h | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | ** asm/setup.h -- Definition of the Linux/m68k setup information | ||
3 | ** | ||
4 | ** Copyright 1992 by Greg Harp | ||
5 | ** | ||
6 | ** This file is subject to the terms and conditions of the GNU General Public | ||
7 | ** License. See the file COPYING in the main directory of this archive | ||
8 | ** for more details. | ||
9 | ** | ||
10 | ** Created 09/29/92 by Greg Harp | ||
11 | ** | ||
12 | ** 5/2/94 Roman Hodek: | ||
13 | ** Added bi_atari part of the machine dependent union bi_un; for now it | ||
14 | ** contains just a model field to distinguish between TT and Falcon. | ||
15 | ** 26/7/96 Roman Zippel: | ||
16 | ** Renamed to setup.h; added some useful macros to allow gcc some | ||
17 | ** optimizations if possible. | ||
18 | ** 5/10/96 Geert Uytterhoeven: | ||
19 | ** Redesign of the boot information structure; moved boot information | ||
20 | ** structure to bootinfo.h | ||
21 | */ | ||
22 | |||
23 | #ifndef _UAPI_M68K_SETUP_H | ||
24 | #define _UAPI_M68K_SETUP_H | ||
25 | |||
26 | |||
27 | |||
28 | /* | ||
29 | * Linux/m68k Architectures | ||
30 | */ | ||
31 | |||
32 | #define MACH_AMIGA 1 | ||
33 | #define MACH_ATARI 2 | ||
34 | #define MACH_MAC 3 | ||
35 | #define MACH_APOLLO 4 | ||
36 | #define MACH_SUN3 5 | ||
37 | #define MACH_MVME147 6 | ||
38 | #define MACH_MVME16x 7 | ||
39 | #define MACH_BVME6000 8 | ||
40 | #define MACH_HP300 9 | ||
41 | #define MACH_Q40 10 | ||
42 | #define MACH_SUN3X 11 | ||
43 | #define MACH_M54XX 12 | ||
44 | |||
45 | #define COMMAND_LINE_SIZE 256 | ||
46 | |||
47 | |||
48 | |||
49 | /* | ||
50 | * CPU, FPU and MMU types | ||
51 | * | ||
52 | * Note: we may rely on the following equalities: | ||
53 | * | ||
54 | * CPU_68020 == MMU_68851 | ||
55 | * CPU_68030 == MMU_68030 | ||
56 | * CPU_68040 == FPU_68040 == MMU_68040 | ||
57 | * CPU_68060 == FPU_68060 == MMU_68060 | ||
58 | */ | ||
59 | |||
60 | #define CPUB_68020 0 | ||
61 | #define CPUB_68030 1 | ||
62 | #define CPUB_68040 2 | ||
63 | #define CPUB_68060 3 | ||
64 | #define CPUB_COLDFIRE 4 | ||
65 | |||
66 | #define CPU_68020 (1<<CPUB_68020) | ||
67 | #define CPU_68030 (1<<CPUB_68030) | ||
68 | #define CPU_68040 (1<<CPUB_68040) | ||
69 | #define CPU_68060 (1<<CPUB_68060) | ||
70 | #define CPU_COLDFIRE (1<<CPUB_COLDFIRE) | ||
71 | |||
72 | #define FPUB_68881 0 | ||
73 | #define FPUB_68882 1 | ||
74 | #define FPUB_68040 2 /* Internal FPU */ | ||
75 | #define FPUB_68060 3 /* Internal FPU */ | ||
76 | #define FPUB_SUNFPA 4 /* Sun-3 FPA */ | ||
77 | #define FPUB_COLDFIRE 5 /* ColdFire FPU */ | ||
78 | |||
79 | #define FPU_68881 (1<<FPUB_68881) | ||
80 | #define FPU_68882 (1<<FPUB_68882) | ||
81 | #define FPU_68040 (1<<FPUB_68040) | ||
82 | #define FPU_68060 (1<<FPUB_68060) | ||
83 | #define FPU_SUNFPA (1<<FPUB_SUNFPA) | ||
84 | #define FPU_COLDFIRE (1<<FPUB_COLDFIRE) | ||
85 | |||
86 | #define MMUB_68851 0 | ||
87 | #define MMUB_68030 1 /* Internal MMU */ | ||
88 | #define MMUB_68040 2 /* Internal MMU */ | ||
89 | #define MMUB_68060 3 /* Internal MMU */ | ||
90 | #define MMUB_APOLLO 4 /* Custom Apollo */ | ||
91 | #define MMUB_SUN3 5 /* Custom Sun-3 */ | ||
92 | #define MMUB_COLDFIRE 6 /* Internal MMU */ | ||
93 | |||
94 | #define MMU_68851 (1<<MMUB_68851) | ||
95 | #define MMU_68030 (1<<MMUB_68030) | ||
96 | #define MMU_68040 (1<<MMUB_68040) | ||
97 | #define MMU_68060 (1<<MMUB_68060) | ||
98 | #define MMU_SUN3 (1<<MMUB_SUN3) | ||
99 | #define MMU_APOLLO (1<<MMUB_APOLLO) | ||
100 | #define MMU_COLDFIRE (1<<MMUB_COLDFIRE) | ||
101 | |||
102 | |||
103 | #endif /* _UAPI_M68K_SETUP_H */ | ||
diff --git a/arch/m68k/include/asm/shmbuf.h b/arch/m68k/include/uapi/asm/shmbuf.h index f8928d62f1b7..f8928d62f1b7 100644 --- a/arch/m68k/include/asm/shmbuf.h +++ b/arch/m68k/include/uapi/asm/shmbuf.h | |||
diff --git a/arch/m68k/include/asm/sigcontext.h b/arch/m68k/include/uapi/asm/sigcontext.h index 523db2a51cf3..523db2a51cf3 100644 --- a/arch/m68k/include/asm/sigcontext.h +++ b/arch/m68k/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/m68k/include/uapi/asm/signal.h b/arch/m68k/include/uapi/asm/signal.h new file mode 100644 index 000000000000..2b450f311bd9 --- /dev/null +++ b/arch/m68k/include/uapi/asm/signal.h | |||
@@ -0,0 +1,118 @@ | |||
1 | #ifndef _UAPI_M68K_SIGNAL_H | ||
2 | #define _UAPI_M68K_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* Avoid too many header ordering problems. */ | ||
7 | struct siginfo; | ||
8 | |||
9 | #ifndef __KERNEL__ | ||
10 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
11 | |||
12 | #define NSIG 32 | ||
13 | typedef unsigned long sigset_t; | ||
14 | |||
15 | #endif /* __KERNEL__ */ | ||
16 | |||
17 | #define SIGHUP 1 | ||
18 | #define SIGINT 2 | ||
19 | #define SIGQUIT 3 | ||
20 | #define SIGILL 4 | ||
21 | #define SIGTRAP 5 | ||
22 | #define SIGABRT 6 | ||
23 | #define SIGIOT 6 | ||
24 | #define SIGBUS 7 | ||
25 | #define SIGFPE 8 | ||
26 | #define SIGKILL 9 | ||
27 | #define SIGUSR1 10 | ||
28 | #define SIGSEGV 11 | ||
29 | #define SIGUSR2 12 | ||
30 | #define SIGPIPE 13 | ||
31 | #define SIGALRM 14 | ||
32 | #define SIGTERM 15 | ||
33 | #define SIGSTKFLT 16 | ||
34 | #define SIGCHLD 17 | ||
35 | #define SIGCONT 18 | ||
36 | #define SIGSTOP 19 | ||
37 | #define SIGTSTP 20 | ||
38 | #define SIGTTIN 21 | ||
39 | #define SIGTTOU 22 | ||
40 | #define SIGURG 23 | ||
41 | #define SIGXCPU 24 | ||
42 | #define SIGXFSZ 25 | ||
43 | #define SIGVTALRM 26 | ||
44 | #define SIGPROF 27 | ||
45 | #define SIGWINCH 28 | ||
46 | #define SIGIO 29 | ||
47 | #define SIGPOLL SIGIO | ||
48 | /* | ||
49 | #define SIGLOST 29 | ||
50 | */ | ||
51 | #define SIGPWR 30 | ||
52 | #define SIGSYS 31 | ||
53 | #define SIGUNUSED 31 | ||
54 | |||
55 | /* These should not be considered constants from userland. */ | ||
56 | #define SIGRTMIN 32 | ||
57 | #define SIGRTMAX _NSIG | ||
58 | |||
59 | /* | ||
60 | * SA_FLAGS values: | ||
61 | * | ||
62 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
63 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
64 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
65 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
66 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
67 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
68 | * | ||
69 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
70 | * Unix names RESETHAND and NODEFER respectively. | ||
71 | */ | ||
72 | #define SA_NOCLDSTOP 0x00000001 | ||
73 | #define SA_NOCLDWAIT 0x00000002 | ||
74 | #define SA_SIGINFO 0x00000004 | ||
75 | #define SA_ONSTACK 0x08000000 | ||
76 | #define SA_RESTART 0x10000000 | ||
77 | #define SA_NODEFER 0x40000000 | ||
78 | #define SA_RESETHAND 0x80000000 | ||
79 | |||
80 | #define SA_NOMASK SA_NODEFER | ||
81 | #define SA_ONESHOT SA_RESETHAND | ||
82 | |||
83 | /* | ||
84 | * sigaltstack controls | ||
85 | */ | ||
86 | #define SS_ONSTACK 1 | ||
87 | #define SS_DISABLE 2 | ||
88 | |||
89 | #define MINSIGSTKSZ 2048 | ||
90 | #define SIGSTKSZ 8192 | ||
91 | |||
92 | #include <asm-generic/signal-defs.h> | ||
93 | |||
94 | #ifndef __KERNEL__ | ||
95 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
96 | |||
97 | struct sigaction { | ||
98 | union { | ||
99 | __sighandler_t _sa_handler; | ||
100 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
101 | } _u; | ||
102 | sigset_t sa_mask; | ||
103 | unsigned long sa_flags; | ||
104 | void (*sa_restorer)(void); | ||
105 | }; | ||
106 | |||
107 | #define sa_handler _u._sa_handler | ||
108 | #define sa_sigaction _u._sa_sigaction | ||
109 | |||
110 | #endif /* __KERNEL__ */ | ||
111 | |||
112 | typedef struct sigaltstack { | ||
113 | void __user *ss_sp; | ||
114 | int ss_flags; | ||
115 | size_t ss_size; | ||
116 | } stack_t; | ||
117 | |||
118 | #endif /* _UAPI_M68K_SIGNAL_H */ | ||
diff --git a/arch/m68k/include/asm/socket.h b/arch/m68k/include/uapi/asm/socket.h index d1be684edf97..d1be684edf97 100644 --- a/arch/m68k/include/asm/socket.h +++ b/arch/m68k/include/uapi/asm/socket.h | |||
diff --git a/arch/m68k/include/asm/sockios.h b/arch/m68k/include/uapi/asm/sockios.h index c04a23943cb7..c04a23943cb7 100644 --- a/arch/m68k/include/asm/sockios.h +++ b/arch/m68k/include/uapi/asm/sockios.h | |||
diff --git a/arch/m68k/include/asm/stat.h b/arch/m68k/include/uapi/asm/stat.h index dd38bc2e9f98..dd38bc2e9f98 100644 --- a/arch/m68k/include/asm/stat.h +++ b/arch/m68k/include/uapi/asm/stat.h | |||
diff --git a/arch/m68k/include/asm/swab.h b/arch/m68k/include/uapi/asm/swab.h index b7b37a40defc..b7b37a40defc 100644 --- a/arch/m68k/include/asm/swab.h +++ b/arch/m68k/include/uapi/asm/swab.h | |||
diff --git a/arch/m68k/include/asm/termbits.h b/arch/m68k/include/uapi/asm/termbits.h index aea1e37b765a..aea1e37b765a 100644 --- a/arch/m68k/include/asm/termbits.h +++ b/arch/m68k/include/uapi/asm/termbits.h | |||
diff --git a/arch/m68k/include/uapi/asm/termios.h b/arch/m68k/include/uapi/asm/termios.h new file mode 100644 index 000000000000..ce2142c9ac1d --- /dev/null +++ b/arch/m68k/include/uapi/asm/termios.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #ifndef _UAPI_M68K_TERMIOS_H | ||
2 | #define _UAPI_M68K_TERMIOS_H | ||
3 | |||
4 | #include <asm/termbits.h> | ||
5 | #include <asm/ioctls.h> | ||
6 | |||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | |||
25 | /* modem lines */ | ||
26 | #define TIOCM_LE 0x001 | ||
27 | #define TIOCM_DTR 0x002 | ||
28 | #define TIOCM_RTS 0x004 | ||
29 | #define TIOCM_ST 0x008 | ||
30 | #define TIOCM_SR 0x010 | ||
31 | #define TIOCM_CTS 0x020 | ||
32 | #define TIOCM_CAR 0x040 | ||
33 | #define TIOCM_RNG 0x080 | ||
34 | #define TIOCM_DSR 0x100 | ||
35 | #define TIOCM_CD TIOCM_CAR | ||
36 | #define TIOCM_RI TIOCM_RNG | ||
37 | #define TIOCM_OUT1 0x2000 | ||
38 | #define TIOCM_OUT2 0x4000 | ||
39 | #define TIOCM_LOOP 0x8000 | ||
40 | |||
41 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
42 | |||
43 | |||
44 | #endif /* _UAPI_M68K_TERMIOS_H */ | ||
diff --git a/arch/m68k/include/uapi/asm/unistd.h b/arch/m68k/include/uapi/asm/unistd.h new file mode 100644 index 000000000000..b94bfbf90705 --- /dev/null +++ b/arch/m68k/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,357 @@ | |||
1 | #ifndef _UAPI_ASM_M68K_UNISTD_H_ | ||
2 | #define _UAPI_ASM_M68K_UNISTD_H_ | ||
3 | |||
4 | /* | ||
5 | * This file contains the system call numbers. | ||
6 | */ | ||
7 | |||
8 | #define __NR_restart_syscall 0 | ||
9 | #define __NR_exit 1 | ||
10 | #define __NR_fork 2 | ||
11 | #define __NR_read 3 | ||
12 | #define __NR_write 4 | ||
13 | #define __NR_open 5 | ||
14 | #define __NR_close 6 | ||
15 | #define __NR_waitpid 7 | ||
16 | #define __NR_creat 8 | ||
17 | #define __NR_link 9 | ||
18 | #define __NR_unlink 10 | ||
19 | #define __NR_execve 11 | ||
20 | #define __NR_chdir 12 | ||
21 | #define __NR_time 13 | ||
22 | #define __NR_mknod 14 | ||
23 | #define __NR_chmod 15 | ||
24 | #define __NR_chown 16 | ||
25 | /*#define __NR_break 17*/ | ||
26 | #define __NR_oldstat 18 | ||
27 | #define __NR_lseek 19 | ||
28 | #define __NR_getpid 20 | ||
29 | #define __NR_mount 21 | ||
30 | #define __NR_umount 22 | ||
31 | #define __NR_setuid 23 | ||
32 | #define __NR_getuid 24 | ||
33 | #define __NR_stime 25 | ||
34 | #define __NR_ptrace 26 | ||
35 | #define __NR_alarm 27 | ||
36 | #define __NR_oldfstat 28 | ||
37 | #define __NR_pause 29 | ||
38 | #define __NR_utime 30 | ||
39 | /*#define __NR_stty 31*/ | ||
40 | /*#define __NR_gtty 32*/ | ||
41 | #define __NR_access 33 | ||
42 | #define __NR_nice 34 | ||
43 | /*#define __NR_ftime 35*/ | ||
44 | #define __NR_sync 36 | ||
45 | #define __NR_kill 37 | ||
46 | #define __NR_rename 38 | ||
47 | #define __NR_mkdir 39 | ||
48 | #define __NR_rmdir 40 | ||
49 | #define __NR_dup 41 | ||
50 | #define __NR_pipe 42 | ||
51 | #define __NR_times 43 | ||
52 | /*#define __NR_prof 44*/ | ||
53 | #define __NR_brk 45 | ||
54 | #define __NR_setgid 46 | ||
55 | #define __NR_getgid 47 | ||
56 | #define __NR_signal 48 | ||
57 | #define __NR_geteuid 49 | ||
58 | #define __NR_getegid 50 | ||
59 | #define __NR_acct 51 | ||
60 | #define __NR_umount2 52 | ||
61 | /*#define __NR_lock 53*/ | ||
62 | #define __NR_ioctl 54 | ||
63 | #define __NR_fcntl 55 | ||
64 | /*#define __NR_mpx 56*/ | ||
65 | #define __NR_setpgid 57 | ||
66 | /*#define __NR_ulimit 58*/ | ||
67 | /*#define __NR_oldolduname 59*/ | ||
68 | #define __NR_umask 60 | ||
69 | #define __NR_chroot 61 | ||
70 | #define __NR_ustat 62 | ||
71 | #define __NR_dup2 63 | ||
72 | #define __NR_getppid 64 | ||
73 | #define __NR_getpgrp 65 | ||
74 | #define __NR_setsid 66 | ||
75 | #define __NR_sigaction 67 | ||
76 | #define __NR_sgetmask 68 | ||
77 | #define __NR_ssetmask 69 | ||
78 | #define __NR_setreuid 70 | ||
79 | #define __NR_setregid 71 | ||
80 | #define __NR_sigsuspend 72 | ||
81 | #define __NR_sigpending 73 | ||
82 | #define __NR_sethostname 74 | ||
83 | #define __NR_setrlimit 75 | ||
84 | #define __NR_getrlimit 76 | ||
85 | #define __NR_getrusage 77 | ||
86 | #define __NR_gettimeofday 78 | ||
87 | #define __NR_settimeofday 79 | ||
88 | #define __NR_getgroups 80 | ||
89 | #define __NR_setgroups 81 | ||
90 | #define __NR_select 82 | ||
91 | #define __NR_symlink 83 | ||
92 | #define __NR_oldlstat 84 | ||
93 | #define __NR_readlink 85 | ||
94 | #define __NR_uselib 86 | ||
95 | #define __NR_swapon 87 | ||
96 | #define __NR_reboot 88 | ||
97 | #define __NR_readdir 89 | ||
98 | #define __NR_mmap 90 | ||
99 | #define __NR_munmap 91 | ||
100 | #define __NR_truncate 92 | ||
101 | #define __NR_ftruncate 93 | ||
102 | #define __NR_fchmod 94 | ||
103 | #define __NR_fchown 95 | ||
104 | #define __NR_getpriority 96 | ||
105 | #define __NR_setpriority 97 | ||
106 | /*#define __NR_profil 98*/ | ||
107 | #define __NR_statfs 99 | ||
108 | #define __NR_fstatfs 100 | ||
109 | /*#define __NR_ioperm 101*/ | ||
110 | #define __NR_socketcall 102 | ||
111 | #define __NR_syslog 103 | ||
112 | #define __NR_setitimer 104 | ||
113 | #define __NR_getitimer 105 | ||
114 | #define __NR_stat 106 | ||
115 | #define __NR_lstat 107 | ||
116 | #define __NR_fstat 108 | ||
117 | /*#define __NR_olduname 109*/ | ||
118 | /*#define __NR_iopl 110*/ /* not supported */ | ||
119 | #define __NR_vhangup 111 | ||
120 | /*#define __NR_idle 112*/ /* Obsolete */ | ||
121 | /*#define __NR_vm86 113*/ /* not supported */ | ||
122 | #define __NR_wait4 114 | ||
123 | #define __NR_swapoff 115 | ||
124 | #define __NR_sysinfo 116 | ||
125 | #define __NR_ipc 117 | ||
126 | #define __NR_fsync 118 | ||
127 | #define __NR_sigreturn 119 | ||
128 | #define __NR_clone 120 | ||
129 | #define __NR_setdomainname 121 | ||
130 | #define __NR_uname 122 | ||
131 | #define __NR_cacheflush 123 | ||
132 | #define __NR_adjtimex 124 | ||
133 | #define __NR_mprotect 125 | ||
134 | #define __NR_sigprocmask 126 | ||
135 | #define __NR_create_module 127 | ||
136 | #define __NR_init_module 128 | ||
137 | #define __NR_delete_module 129 | ||
138 | #define __NR_get_kernel_syms 130 | ||
139 | #define __NR_quotactl 131 | ||
140 | #define __NR_getpgid 132 | ||
141 | #define __NR_fchdir 133 | ||
142 | #define __NR_bdflush 134 | ||
143 | #define __NR_sysfs 135 | ||
144 | #define __NR_personality 136 | ||
145 | /*#define __NR_afs_syscall 137*/ /* Syscall for Andrew File System */ | ||
146 | #define __NR_setfsuid 138 | ||
147 | #define __NR_setfsgid 139 | ||
148 | #define __NR__llseek 140 | ||
149 | #define __NR_getdents 141 | ||
150 | #define __NR__newselect 142 | ||
151 | #define __NR_flock 143 | ||
152 | #define __NR_msync 144 | ||
153 | #define __NR_readv 145 | ||
154 | #define __NR_writev 146 | ||
155 | #define __NR_getsid 147 | ||
156 | #define __NR_fdatasync 148 | ||
157 | #define __NR__sysctl 149 | ||
158 | #define __NR_mlock 150 | ||
159 | #define __NR_munlock 151 | ||
160 | #define __NR_mlockall 152 | ||
161 | #define __NR_munlockall 153 | ||
162 | #define __NR_sched_setparam 154 | ||
163 | #define __NR_sched_getparam 155 | ||
164 | #define __NR_sched_setscheduler 156 | ||
165 | #define __NR_sched_getscheduler 157 | ||
166 | #define __NR_sched_yield 158 | ||
167 | #define __NR_sched_get_priority_max 159 | ||
168 | #define __NR_sched_get_priority_min 160 | ||
169 | #define __NR_sched_rr_get_interval 161 | ||
170 | #define __NR_nanosleep 162 | ||
171 | #define __NR_mremap 163 | ||
172 | #define __NR_setresuid 164 | ||
173 | #define __NR_getresuid 165 | ||
174 | #define __NR_getpagesize 166 | ||
175 | #define __NR_query_module 167 | ||
176 | #define __NR_poll 168 | ||
177 | #define __NR_nfsservctl 169 | ||
178 | #define __NR_setresgid 170 | ||
179 | #define __NR_getresgid 171 | ||
180 | #define __NR_prctl 172 | ||
181 | #define __NR_rt_sigreturn 173 | ||
182 | #define __NR_rt_sigaction 174 | ||
183 | #define __NR_rt_sigprocmask 175 | ||
184 | #define __NR_rt_sigpending 176 | ||
185 | #define __NR_rt_sigtimedwait 177 | ||
186 | #define __NR_rt_sigqueueinfo 178 | ||
187 | #define __NR_rt_sigsuspend 179 | ||
188 | #define __NR_pread64 180 | ||
189 | #define __NR_pwrite64 181 | ||
190 | #define __NR_lchown 182 | ||
191 | #define __NR_getcwd 183 | ||
192 | #define __NR_capget 184 | ||
193 | #define __NR_capset 185 | ||
194 | #define __NR_sigaltstack 186 | ||
195 | #define __NR_sendfile 187 | ||
196 | #define __NR_getpmsg 188 /* some people actually want streams */ | ||
197 | #define __NR_putpmsg 189 /* some people actually want streams */ | ||
198 | #define __NR_vfork 190 | ||
199 | #define __NR_ugetrlimit 191 | ||
200 | #define __NR_mmap2 192 | ||
201 | #define __NR_truncate64 193 | ||
202 | #define __NR_ftruncate64 194 | ||
203 | #define __NR_stat64 195 | ||
204 | #define __NR_lstat64 196 | ||
205 | #define __NR_fstat64 197 | ||
206 | #define __NR_chown32 198 | ||
207 | #define __NR_getuid32 199 | ||
208 | #define __NR_getgid32 200 | ||
209 | #define __NR_geteuid32 201 | ||
210 | #define __NR_getegid32 202 | ||
211 | #define __NR_setreuid32 203 | ||
212 | #define __NR_setregid32 204 | ||
213 | #define __NR_getgroups32 205 | ||
214 | #define __NR_setgroups32 206 | ||
215 | #define __NR_fchown32 207 | ||
216 | #define __NR_setresuid32 208 | ||
217 | #define __NR_getresuid32 209 | ||
218 | #define __NR_setresgid32 210 | ||
219 | #define __NR_getresgid32 211 | ||
220 | #define __NR_lchown32 212 | ||
221 | #define __NR_setuid32 213 | ||
222 | #define __NR_setgid32 214 | ||
223 | #define __NR_setfsuid32 215 | ||
224 | #define __NR_setfsgid32 216 | ||
225 | #define __NR_pivot_root 217 | ||
226 | /* 218*/ | ||
227 | /* 219*/ | ||
228 | #define __NR_getdents64 220 | ||
229 | #define __NR_gettid 221 | ||
230 | #define __NR_tkill 222 | ||
231 | #define __NR_setxattr 223 | ||
232 | #define __NR_lsetxattr 224 | ||
233 | #define __NR_fsetxattr 225 | ||
234 | #define __NR_getxattr 226 | ||
235 | #define __NR_lgetxattr 227 | ||
236 | #define __NR_fgetxattr 228 | ||
237 | #define __NR_listxattr 229 | ||
238 | #define __NR_llistxattr 230 | ||
239 | #define __NR_flistxattr 231 | ||
240 | #define __NR_removexattr 232 | ||
241 | #define __NR_lremovexattr 233 | ||
242 | #define __NR_fremovexattr 234 | ||
243 | #define __NR_futex 235 | ||
244 | #define __NR_sendfile64 236 | ||
245 | #define __NR_mincore 237 | ||
246 | #define __NR_madvise 238 | ||
247 | #define __NR_fcntl64 239 | ||
248 | #define __NR_readahead 240 | ||
249 | #define __NR_io_setup 241 | ||
250 | #define __NR_io_destroy 242 | ||
251 | #define __NR_io_getevents 243 | ||
252 | #define __NR_io_submit 244 | ||
253 | #define __NR_io_cancel 245 | ||
254 | #define __NR_fadvise64 246 | ||
255 | #define __NR_exit_group 247 | ||
256 | #define __NR_lookup_dcookie 248 | ||
257 | #define __NR_epoll_create 249 | ||
258 | #define __NR_epoll_ctl 250 | ||
259 | #define __NR_epoll_wait 251 | ||
260 | #define __NR_remap_file_pages 252 | ||
261 | #define __NR_set_tid_address 253 | ||
262 | #define __NR_timer_create 254 | ||
263 | #define __NR_timer_settime 255 | ||
264 | #define __NR_timer_gettime 256 | ||
265 | #define __NR_timer_getoverrun 257 | ||
266 | #define __NR_timer_delete 258 | ||
267 | #define __NR_clock_settime 259 | ||
268 | #define __NR_clock_gettime 260 | ||
269 | #define __NR_clock_getres 261 | ||
270 | #define __NR_clock_nanosleep 262 | ||
271 | #define __NR_statfs64 263 | ||
272 | #define __NR_fstatfs64 264 | ||
273 | #define __NR_tgkill 265 | ||
274 | #define __NR_utimes 266 | ||
275 | #define __NR_fadvise64_64 267 | ||
276 | #define __NR_mbind 268 | ||
277 | #define __NR_get_mempolicy 269 | ||
278 | #define __NR_set_mempolicy 270 | ||
279 | #define __NR_mq_open 271 | ||
280 | #define __NR_mq_unlink 272 | ||
281 | #define __NR_mq_timedsend 273 | ||
282 | #define __NR_mq_timedreceive 274 | ||
283 | #define __NR_mq_notify 275 | ||
284 | #define __NR_mq_getsetattr 276 | ||
285 | #define __NR_waitid 277 | ||
286 | /*#define __NR_vserver 278*/ | ||
287 | #define __NR_add_key 279 | ||
288 | #define __NR_request_key 280 | ||
289 | #define __NR_keyctl 281 | ||
290 | #define __NR_ioprio_set 282 | ||
291 | #define __NR_ioprio_get 283 | ||
292 | #define __NR_inotify_init 284 | ||
293 | #define __NR_inotify_add_watch 285 | ||
294 | #define __NR_inotify_rm_watch 286 | ||
295 | #define __NR_migrate_pages 287 | ||
296 | #define __NR_openat 288 | ||
297 | #define __NR_mkdirat 289 | ||
298 | #define __NR_mknodat 290 | ||
299 | #define __NR_fchownat 291 | ||
300 | #define __NR_futimesat 292 | ||
301 | #define __NR_fstatat64 293 | ||
302 | #define __NR_unlinkat 294 | ||
303 | #define __NR_renameat 295 | ||
304 | #define __NR_linkat 296 | ||
305 | #define __NR_symlinkat 297 | ||
306 | #define __NR_readlinkat 298 | ||
307 | #define __NR_fchmodat 299 | ||
308 | #define __NR_faccessat 300 | ||
309 | #define __NR_pselect6 301 | ||
310 | #define __NR_ppoll 302 | ||
311 | #define __NR_unshare 303 | ||
312 | #define __NR_set_robust_list 304 | ||
313 | #define __NR_get_robust_list 305 | ||
314 | #define __NR_splice 306 | ||
315 | #define __NR_sync_file_range 307 | ||
316 | #define __NR_tee 308 | ||
317 | #define __NR_vmsplice 309 | ||
318 | #define __NR_move_pages 310 | ||
319 | #define __NR_sched_setaffinity 311 | ||
320 | #define __NR_sched_getaffinity 312 | ||
321 | #define __NR_kexec_load 313 | ||
322 | #define __NR_getcpu 314 | ||
323 | #define __NR_epoll_pwait 315 | ||
324 | #define __NR_utimensat 316 | ||
325 | #define __NR_signalfd 317 | ||
326 | #define __NR_timerfd_create 318 | ||
327 | #define __NR_eventfd 319 | ||
328 | #define __NR_fallocate 320 | ||
329 | #define __NR_timerfd_settime 321 | ||
330 | #define __NR_timerfd_gettime 322 | ||
331 | #define __NR_signalfd4 323 | ||
332 | #define __NR_eventfd2 324 | ||
333 | #define __NR_epoll_create1 325 | ||
334 | #define __NR_dup3 326 | ||
335 | #define __NR_pipe2 327 | ||
336 | #define __NR_inotify_init1 328 | ||
337 | #define __NR_preadv 329 | ||
338 | #define __NR_pwritev 330 | ||
339 | #define __NR_rt_tgsigqueueinfo 331 | ||
340 | #define __NR_perf_event_open 332 | ||
341 | #define __NR_get_thread_area 333 | ||
342 | #define __NR_set_thread_area 334 | ||
343 | #define __NR_atomic_cmpxchg_32 335 | ||
344 | #define __NR_atomic_barrier 336 | ||
345 | #define __NR_fanotify_init 337 | ||
346 | #define __NR_fanotify_mark 338 | ||
347 | #define __NR_prlimit64 339 | ||
348 | #define __NR_name_to_handle_at 340 | ||
349 | #define __NR_open_by_handle_at 341 | ||
350 | #define __NR_clock_adjtime 342 | ||
351 | #define __NR_syncfs 343 | ||
352 | #define __NR_setns 344 | ||
353 | #define __NR_process_vm_readv 345 | ||
354 | #define __NR_process_vm_writev 346 | ||
355 | #define __NR_kcmp 347 | ||
356 | |||
357 | #endif /* _UAPI_ASM_M68K_UNISTD_H_ */ | ||
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S index ce827b376110..4fc2e29b771b 100644 --- a/arch/m68k/kernel/syscalltable.S +++ b/arch/m68k/kernel/syscalltable.S | |||
@@ -367,4 +367,5 @@ ENTRY(sys_call_table) | |||
367 | .long sys_setns | 367 | .long sys_setns |
368 | .long sys_process_vm_readv /* 345 */ | 368 | .long sys_process_vm_readv /* 345 */ |
369 | .long sys_process_vm_writev | 369 | .long sys_process_vm_writev |
370 | .long sys_kcmp | ||
370 | 371 | ||
diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild index e69de29bb2d1..533053d12ced 100644 --- a/arch/mips/include/asm/Kbuild +++ b/arch/mips/include/asm/Kbuild | |||
@@ -0,0 +1 @@ | |||
# MIPS headers | |||
diff --git a/arch/mips/include/asm/delay.h b/arch/mips/include/asm/delay.h index e7cd78277c23..dc0a5f77a35c 100644 --- a/arch/mips/include/asm/delay.h +++ b/arch/mips/include/asm/delay.h | |||
@@ -13,9 +13,9 @@ | |||
13 | 13 | ||
14 | #include <linux/param.h> | 14 | #include <linux/param.h> |
15 | 15 | ||
16 | extern void __delay(unsigned int loops); | 16 | extern void __delay(unsigned long loops); |
17 | extern void __ndelay(unsigned int ns); | 17 | extern void __ndelay(unsigned long ns); |
18 | extern void __udelay(unsigned int us); | 18 | extern void __udelay(unsigned long us); |
19 | 19 | ||
20 | #define ndelay(ns) __ndelay(ns) | 20 | #define ndelay(ns) __ndelay(ns) |
21 | #define udelay(us) __udelay(us) | 21 | #define udelay(us) __udelay(us) |
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index c26e18250079..f5b521d5a67d 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #ifndef _ASM_PGTABLE_64_H | 9 | #ifndef _ASM_PGTABLE_64_H |
10 | #define _ASM_PGTABLE_64_H | 10 | #define _ASM_PGTABLE_64_H |
11 | 11 | ||
12 | #include <linux/compiler.h> | ||
12 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
13 | 14 | ||
14 | #include <asm/addrspace.h> | 15 | #include <asm/addrspace.h> |
@@ -172,7 +173,19 @@ static inline int pmd_none(pmd_t pmd) | |||
172 | return pmd_val(pmd) == (unsigned long) invalid_pte_table; | 173 | return pmd_val(pmd) == (unsigned long) invalid_pte_table; |
173 | } | 174 | } |
174 | 175 | ||
175 | #define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK) | 176 | static inline int pmd_bad(pmd_t pmd) |
177 | { | ||
178 | #ifdef CONFIG_HUGETLB_PAGE | ||
179 | /* pmd_huge(pmd) but inline */ | ||
180 | if (unlikely(pmd_val(pmd) & _PAGE_HUGE)) | ||
181 | return 0; | ||
182 | #endif | ||
183 | |||
184 | if (unlikely(pmd_val(pmd) & ~PAGE_MASK)) | ||
185 | return 1; | ||
186 | |||
187 | return 0; | ||
188 | } | ||
176 | 189 | ||
177 | static inline int pmd_present(pmd_t pmd) | 190 | static inline int pmd_present(pmd_t pmd) |
178 | { | 191 | { |
diff --git a/arch/mips/jz4740/serial.h b/arch/mips/jz4740/serial.h index b9fe3ade0289..8eb715bb1ea8 100644 --- a/arch/mips/jz4740/serial.h +++ b/arch/mips/jz4740/serial.h | |||
@@ -14,6 +14,9 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef __MIPS_JZ4740_SERIAL_H__ | 16 | #ifndef __MIPS_JZ4740_SERIAL_H__ |
17 | #define __MIPS_JZ4740_SERIAL_H__ | ||
18 | |||
19 | struct uart_port; | ||
17 | 20 | ||
18 | void jz4740_serial_out(struct uart_port *p, int offset, int value); | 21 | void jz4740_serial_out(struct uart_port *p, int offset, int value); |
19 | 22 | ||
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c index afc379ca3753..06cd0c610f44 100644 --- a/arch/mips/kernel/smp-cmp.c +++ b/arch/mips/kernel/smp-cmp.c | |||
@@ -97,7 +97,7 @@ static void cmp_init_secondary(void) | |||
97 | 97 | ||
98 | /* Enable per-cpu interrupts: platform specific */ | 98 | /* Enable per-cpu interrupts: platform specific */ |
99 | 99 | ||
100 | c->core = (read_c0_ebase() >> 1) & 0xff; | 100 | c->core = (read_c0_ebase() >> 1) & 0x1ff; |
101 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) | 101 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) |
102 | c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE; | 102 | c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE; |
103 | #endif | 103 | #endif |
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c index 5995969e8c42..dc81ca8dc0dd 100644 --- a/arch/mips/lib/delay.c +++ b/arch/mips/lib/delay.c | |||
@@ -15,13 +15,17 @@ | |||
15 | #include <asm/compiler.h> | 15 | #include <asm/compiler.h> |
16 | #include <asm/war.h> | 16 | #include <asm/war.h> |
17 | 17 | ||
18 | inline void __delay(unsigned int loops) | 18 | void __delay(unsigned long loops) |
19 | { | 19 | { |
20 | __asm__ __volatile__ ( | 20 | __asm__ __volatile__ ( |
21 | " .set noreorder \n" | 21 | " .set noreorder \n" |
22 | " .align 3 \n" | 22 | " .align 3 \n" |
23 | "1: bnez %0, 1b \n" | 23 | "1: bnez %0, 1b \n" |
24 | #if __SIZEOF_LONG__ == 4 | ||
24 | " subu %0, 1 \n" | 25 | " subu %0, 1 \n" |
26 | #else | ||
27 | " dsubu %0, 1 \n" | ||
28 | #endif | ||
25 | " .set reorder \n" | 29 | " .set reorder \n" |
26 | : "=r" (loops) | 30 | : "=r" (loops) |
27 | : "0" (loops)); | 31 | : "0" (loops)); |
diff --git a/arch/mips/lib/dump_tlb.c b/arch/mips/lib/dump_tlb.c index 3f69725556af..a99c1d3fc567 100644 --- a/arch/mips/lib/dump_tlb.c +++ b/arch/mips/lib/dump_tlb.c | |||
@@ -50,8 +50,9 @@ static void dump_tlb(int first, int last) | |||
50 | { | 50 | { |
51 | unsigned long s_entryhi, entryhi, asid; | 51 | unsigned long s_entryhi, entryhi, asid; |
52 | unsigned long long entrylo0, entrylo1; | 52 | unsigned long long entrylo0, entrylo1; |
53 | unsigned int s_index, pagemask, c0, c1, i; | 53 | unsigned int s_index, s_pagemask, pagemask, c0, c1, i; |
54 | 54 | ||
55 | s_pagemask = read_c0_pagemask(); | ||
55 | s_entryhi = read_c0_entryhi(); | 56 | s_entryhi = read_c0_entryhi(); |
56 | s_index = read_c0_index(); | 57 | s_index = read_c0_index(); |
57 | asid = s_entryhi & 0xff; | 58 | asid = s_entryhi & 0xff; |
@@ -103,6 +104,7 @@ static void dump_tlb(int first, int last) | |||
103 | 104 | ||
104 | write_c0_entryhi(s_entryhi); | 105 | write_c0_entryhi(s_entryhi); |
105 | write_c0_index(s_index); | 106 | write_c0_index(s_index); |
107 | write_c0_pagemask(s_pagemask); | ||
106 | } | 108 | } |
107 | 109 | ||
108 | void dump_tlb_all(void) | 110 | void dump_tlb_all(void) |
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 87b9cfcc30ff..4b9b935a070e 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
@@ -320,6 +320,7 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte) | |||
320 | tlb_write_random(); | 320 | tlb_write_random(); |
321 | else | 321 | else |
322 | tlb_write_indexed(); | 322 | tlb_write_indexed(); |
323 | tlbw_use_hazard(); | ||
323 | write_c0_pagemask(PM_DEFAULT_MASK); | 324 | write_c0_pagemask(PM_DEFAULT_MASK); |
324 | } else | 325 | } else |
325 | #endif | 326 | #endif |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 658a520364ce..2833dcb67b5a 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -148,8 +148,8 @@ enum label_id { | |||
148 | label_leave, | 148 | label_leave, |
149 | label_vmalloc, | 149 | label_vmalloc, |
150 | label_vmalloc_done, | 150 | label_vmalloc_done, |
151 | label_tlbw_hazard, | 151 | label_tlbw_hazard_0, |
152 | label_split, | 152 | label_split = label_tlbw_hazard_0 + 8, |
153 | label_tlbl_goaround1, | 153 | label_tlbl_goaround1, |
154 | label_tlbl_goaround2, | 154 | label_tlbl_goaround2, |
155 | label_nopage_tlbl, | 155 | label_nopage_tlbl, |
@@ -167,7 +167,7 @@ UASM_L_LA(_second_part) | |||
167 | UASM_L_LA(_leave) | 167 | UASM_L_LA(_leave) |
168 | UASM_L_LA(_vmalloc) | 168 | UASM_L_LA(_vmalloc) |
169 | UASM_L_LA(_vmalloc_done) | 169 | UASM_L_LA(_vmalloc_done) |
170 | UASM_L_LA(_tlbw_hazard) | 170 | /* _tlbw_hazard_x is handled differently. */ |
171 | UASM_L_LA(_split) | 171 | UASM_L_LA(_split) |
172 | UASM_L_LA(_tlbl_goaround1) | 172 | UASM_L_LA(_tlbl_goaround1) |
173 | UASM_L_LA(_tlbl_goaround2) | 173 | UASM_L_LA(_tlbl_goaround2) |
@@ -181,6 +181,30 @@ UASM_L_LA(_large_segbits_fault) | |||
181 | UASM_L_LA(_tlb_huge_update) | 181 | UASM_L_LA(_tlb_huge_update) |
182 | #endif | 182 | #endif |
183 | 183 | ||
184 | static int __cpuinitdata hazard_instance; | ||
185 | |||
186 | static void uasm_bgezl_hazard(u32 **p, struct uasm_reloc **r, int instance) | ||
187 | { | ||
188 | switch (instance) { | ||
189 | case 0 ... 7: | ||
190 | uasm_il_bgezl(p, r, 0, label_tlbw_hazard_0 + instance); | ||
191 | return; | ||
192 | default: | ||
193 | BUG(); | ||
194 | } | ||
195 | } | ||
196 | |||
197 | static void uasm_bgezl_label(struct uasm_label **l, u32 **p, int instance) | ||
198 | { | ||
199 | switch (instance) { | ||
200 | case 0 ... 7: | ||
201 | uasm_build_label(l, *p, label_tlbw_hazard_0 + instance); | ||
202 | break; | ||
203 | default: | ||
204 | BUG(); | ||
205 | } | ||
206 | } | ||
207 | |||
184 | /* | 208 | /* |
185 | * For debug purposes. | 209 | * For debug purposes. |
186 | */ | 210 | */ |
@@ -478,21 +502,28 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l, | |||
478 | * This branch uses up a mtc0 hazard nop slot and saves | 502 | * This branch uses up a mtc0 hazard nop slot and saves |
479 | * two nops after the tlbw instruction. | 503 | * two nops after the tlbw instruction. |
480 | */ | 504 | */ |
481 | uasm_il_bgezl(p, r, 0, label_tlbw_hazard); | 505 | uasm_bgezl_hazard(p, r, hazard_instance); |
482 | tlbw(p); | 506 | tlbw(p); |
483 | uasm_l_tlbw_hazard(l, *p); | 507 | uasm_bgezl_label(l, p, hazard_instance); |
508 | hazard_instance++; | ||
484 | uasm_i_nop(p); | 509 | uasm_i_nop(p); |
485 | break; | 510 | break; |
486 | 511 | ||
487 | case CPU_R4600: | 512 | case CPU_R4600: |
488 | case CPU_R4700: | 513 | case CPU_R4700: |
489 | case CPU_R5000: | ||
490 | case CPU_R5000A: | ||
491 | uasm_i_nop(p); | 514 | uasm_i_nop(p); |
492 | tlbw(p); | 515 | tlbw(p); |
493 | uasm_i_nop(p); | 516 | uasm_i_nop(p); |
494 | break; | 517 | break; |
495 | 518 | ||
519 | case CPU_R5000: | ||
520 | case CPU_R5000A: | ||
521 | case CPU_NEVADA: | ||
522 | uasm_i_nop(p); /* QED specifies 2 nops hazard */ | ||
523 | uasm_i_nop(p); /* QED specifies 2 nops hazard */ | ||
524 | tlbw(p); | ||
525 | break; | ||
526 | |||
496 | case CPU_R4300: | 527 | case CPU_R4300: |
497 | case CPU_5KC: | 528 | case CPU_5KC: |
498 | case CPU_TX49XX: | 529 | case CPU_TX49XX: |
@@ -526,17 +557,6 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l, | |||
526 | tlbw(p); | 557 | tlbw(p); |
527 | break; | 558 | break; |
528 | 559 | ||
529 | case CPU_NEVADA: | ||
530 | uasm_i_nop(p); /* QED specifies 2 nops hazard */ | ||
531 | /* | ||
532 | * This branch uses up a mtc0 hazard nop slot and saves | ||
533 | * a nop after the tlbw instruction. | ||
534 | */ | ||
535 | uasm_il_bgezl(p, r, 0, label_tlbw_hazard); | ||
536 | tlbw(p); | ||
537 | uasm_l_tlbw_hazard(l, *p); | ||
538 | break; | ||
539 | |||
540 | case CPU_RM7000: | 560 | case CPU_RM7000: |
541 | uasm_i_nop(p); | 561 | uasm_i_nop(p); |
542 | uasm_i_nop(p); | 562 | uasm_i_nop(p); |
diff --git a/arch/mn10300/include/uapi/asm/setup.h b/arch/mn10300/include/uapi/asm/setup.h index e69de29bb2d1..ae5704fa77ad 100644 --- a/arch/mn10300/include/uapi/asm/setup.h +++ b/arch/mn10300/include/uapi/asm/setup.h | |||
@@ -0,0 +1,4 @@ | |||
1 | /* | ||
2 | * There isn't anything here anymore, but the file must not be empty or patch | ||
3 | * will delete it. | ||
4 | */ | ||
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild index 458371a1565a..bac8debecffb 100644 --- a/arch/parisc/include/asm/Kbuild +++ b/arch/parisc/include/asm/Kbuild | |||
@@ -1,6 +1,5 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | header-y += pdc.h | 2 | generic-y += word-at-a-time.h auxvec.h user.h cputime.h emergency-restart.h \ |
4 | generic-y += clkdev.h | 3 | segment.h topology.h vga.h device.h percpu.h hw_irq.h mutex.h \ |
5 | generic-y += word-at-a-time.h | 4 | div64.h irq_regs.h kdebug.h kvm_para.h local64.h local.h param.h \ |
6 | generic-y += exec.h | 5 | poll.h xor.h clkdev.h exec.h |
diff --git a/arch/parisc/include/asm/auxvec.h b/arch/parisc/include/asm/auxvec.h deleted file mode 100644 index 9c3ac4b89dc9..000000000000 --- a/arch/parisc/include/asm/auxvec.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef __ASMPARISC_AUXVEC_H | ||
2 | #define __ASMPARISC_AUXVEC_H | ||
3 | |||
4 | #endif | ||
diff --git a/arch/parisc/include/asm/compat_signal.h b/arch/parisc/include/asm/compat_signal.h deleted file mode 100644 index 6ad02c360b21..000000000000 --- a/arch/parisc/include/asm/compat_signal.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | /* Use generic */ | ||
2 | #include <asm-generic/compat_signal.h> | ||
diff --git a/arch/parisc/include/asm/cputime.h b/arch/parisc/include/asm/cputime.h deleted file mode 100644 index dcdf2fbd7e72..000000000000 --- a/arch/parisc/include/asm/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __PARISC_CPUTIME_H | ||
2 | #define __PARISC_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* __PARISC_CPUTIME_H */ | ||
diff --git a/arch/parisc/include/asm/device.h b/arch/parisc/include/asm/device.h deleted file mode 100644 index d8f9872b0e2d..000000000000 --- a/arch/parisc/include/asm/device.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | /* | ||
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | #include <asm-generic/device.h> | ||
7 | |||
diff --git a/arch/parisc/include/asm/div64.h b/arch/parisc/include/asm/div64.h deleted file mode 100644 index 6cd978cefb28..000000000000 --- a/arch/parisc/include/asm/div64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/div64.h> | ||
diff --git a/arch/parisc/include/asm/emergency-restart.h b/arch/parisc/include/asm/emergency-restart.h deleted file mode 100644 index 108d8c48e42e..000000000000 --- a/arch/parisc/include/asm/emergency-restart.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | ||
2 | #define _ASM_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | ||
5 | |||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/arch/parisc/include/asm/hw_irq.h b/arch/parisc/include/asm/hw_irq.h deleted file mode 100644 index 6707f7df3921..000000000000 --- a/arch/parisc/include/asm/hw_irq.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _ASM_HW_IRQ_H | ||
2 | #define _ASM_HW_IRQ_H | ||
3 | |||
4 | /* | ||
5 | * linux/include/asm/hw_irq.h | ||
6 | */ | ||
7 | |||
8 | #endif | ||
diff --git a/arch/parisc/include/asm/irq_regs.h b/arch/parisc/include/asm/irq_regs.h deleted file mode 100644 index 3dd9c0b70270..000000000000 --- a/arch/parisc/include/asm/irq_regs.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/irq_regs.h> | ||
diff --git a/arch/parisc/include/asm/kdebug.h b/arch/parisc/include/asm/kdebug.h deleted file mode 100644 index 6ece1b037665..000000000000 --- a/arch/parisc/include/asm/kdebug.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kdebug.h> | ||
diff --git a/arch/parisc/include/asm/kvm_para.h b/arch/parisc/include/asm/kvm_para.h deleted file mode 100644 index 14fab8f0b957..000000000000 --- a/arch/parisc/include/asm/kvm_para.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kvm_para.h> | ||
diff --git a/arch/parisc/include/asm/local.h b/arch/parisc/include/asm/local.h deleted file mode 100644 index c11c530f74d0..000000000000 --- a/arch/parisc/include/asm/local.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/local.h> | ||
diff --git a/arch/parisc/include/asm/local64.h b/arch/parisc/include/asm/local64.h deleted file mode 100644 index 36c93b5cc239..000000000000 --- a/arch/parisc/include/asm/local64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/local64.h> | ||
diff --git a/arch/parisc/include/asm/mutex.h b/arch/parisc/include/asm/mutex.h deleted file mode 100644 index 458c1f7fbc18..000000000000 --- a/arch/parisc/include/asm/mutex.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * Pull in the generic implementation for the mutex fastpath. | ||
3 | * | ||
4 | * TODO: implement optimized primitives instead, or leave the generic | ||
5 | * implementation in place, or pick the atomic_xchg() based generic | ||
6 | * implementation. (see asm-generic/mutex-xchg.h for details) | ||
7 | */ | ||
8 | |||
9 | #include <asm-generic/mutex-dec.h> | ||
diff --git a/arch/parisc/include/asm/param.h b/arch/parisc/include/asm/param.h deleted file mode 100644 index 965d45427975..000000000000 --- a/arch/parisc/include/asm/param.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/param.h> | ||
diff --git a/arch/parisc/include/asm/pdc.h b/arch/parisc/include/asm/pdc.h index 7f0f2d23059d..7eb616e4bf8a 100644 --- a/arch/parisc/include/asm/pdc.h +++ b/arch/parisc/include/asm/pdc.h | |||
@@ -1,348 +1,10 @@ | |||
1 | #ifndef _PARISC_PDC_H | 1 | #ifndef _PARISC_PDC_H |
2 | #define _PARISC_PDC_H | 2 | #define _PARISC_PDC_H |
3 | 3 | ||
4 | /* | 4 | #include <uapi/asm/pdc.h> |
5 | * PDC return values ... | ||
6 | * All PDC calls return a subset of these errors. | ||
7 | */ | ||
8 | |||
9 | #define PDC_WARN 3 /* Call completed with a warning */ | ||
10 | #define PDC_REQ_ERR_1 2 /* See above */ | ||
11 | #define PDC_REQ_ERR_0 1 /* Call would generate a requestor error */ | ||
12 | #define PDC_OK 0 /* Call completed successfully */ | ||
13 | #define PDC_BAD_PROC -1 /* Called non-existent procedure*/ | ||
14 | #define PDC_BAD_OPTION -2 /* Called with non-existent option */ | ||
15 | #define PDC_ERROR -3 /* Call could not complete without an error */ | ||
16 | #define PDC_NE_MOD -5 /* Module not found */ | ||
17 | #define PDC_NE_CELL_MOD -7 /* Cell module not found */ | ||
18 | #define PDC_INVALID_ARG -10 /* Called with an invalid argument */ | ||
19 | #define PDC_BUS_POW_WARN -12 /* Call could not complete in allowed power budget */ | ||
20 | #define PDC_NOT_NARROW -17 /* Narrow mode not supported */ | ||
21 | |||
22 | /* | ||
23 | * PDC entry points... | ||
24 | */ | ||
25 | |||
26 | #define PDC_POW_FAIL 1 /* perform a power-fail */ | ||
27 | #define PDC_POW_FAIL_PREPARE 0 /* prepare for powerfail */ | ||
28 | |||
29 | #define PDC_CHASSIS 2 /* PDC-chassis functions */ | ||
30 | #define PDC_CHASSIS_DISP 0 /* update chassis display */ | ||
31 | #define PDC_CHASSIS_WARN 1 /* return chassis warnings */ | ||
32 | #define PDC_CHASSIS_DISPWARN 2 /* update&return chassis status */ | ||
33 | #define PDC_RETURN_CHASSIS_INFO 128 /* HVERSION dependent: return chassis LED/LCD info */ | ||
34 | |||
35 | #define PDC_PIM 3 /* Get PIM data */ | ||
36 | #define PDC_PIM_HPMC 0 /* Transfer HPMC data */ | ||
37 | #define PDC_PIM_RETURN_SIZE 1 /* Get Max buffer needed for PIM*/ | ||
38 | #define PDC_PIM_LPMC 2 /* Transfer HPMC data */ | ||
39 | #define PDC_PIM_SOFT_BOOT 3 /* Transfer Soft Boot data */ | ||
40 | #define PDC_PIM_TOC 4 /* Transfer TOC data */ | ||
41 | |||
42 | #define PDC_MODEL 4 /* PDC model information call */ | ||
43 | #define PDC_MODEL_INFO 0 /* returns information */ | ||
44 | #define PDC_MODEL_BOOTID 1 /* set the BOOT_ID */ | ||
45 | #define PDC_MODEL_VERSIONS 2 /* returns cpu-internal versions*/ | ||
46 | #define PDC_MODEL_SYSMODEL 3 /* return system model info */ | ||
47 | #define PDC_MODEL_ENSPEC 4 /* enable specific option */ | ||
48 | #define PDC_MODEL_DISPEC 5 /* disable specific option */ | ||
49 | #define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */ | ||
50 | #define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */ | ||
51 | /* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */ | ||
52 | #define PDC_MODEL_OS64 (1 << 0) | ||
53 | #define PDC_MODEL_OS32 (1 << 1) | ||
54 | #define PDC_MODEL_IOPDIR_FDC (1 << 2) | ||
55 | #define PDC_MODEL_NVA_MASK (3 << 4) | ||
56 | #define PDC_MODEL_NVA_SUPPORTED (0 << 4) | ||
57 | #define PDC_MODEL_NVA_SLOW (1 << 4) | ||
58 | #define PDC_MODEL_NVA_UNSUPPORTED (3 << 4) | ||
59 | #define PDC_MODEL_GET_BOOT__OP 8 /* returns boot test options */ | ||
60 | #define PDC_MODEL_SET_BOOT__OP 9 /* set boot test options */ | ||
61 | |||
62 | #define PA89_INSTRUCTION_SET 0x4 /* capatibilies returned */ | ||
63 | #define PA90_INSTRUCTION_SET 0x8 | ||
64 | |||
65 | #define PDC_CACHE 5 /* return/set cache (& TLB) info*/ | ||
66 | #define PDC_CACHE_INFO 0 /* returns information */ | ||
67 | #define PDC_CACHE_SET_COH 1 /* set coherence state */ | ||
68 | #define PDC_CACHE_RET_SPID 2 /* returns space-ID bits */ | ||
69 | |||
70 | #define PDC_HPA 6 /* return HPA of processor */ | ||
71 | #define PDC_HPA_PROCESSOR 0 | ||
72 | #define PDC_HPA_MODULES 1 | ||
73 | |||
74 | #define PDC_COPROC 7 /* Co-Processor (usually FP unit(s)) */ | ||
75 | #define PDC_COPROC_CFG 0 /* Co-Processor Cfg (FP unit(s) enabled?) */ | ||
76 | |||
77 | #define PDC_IODC 8 /* talk to IODC */ | ||
78 | #define PDC_IODC_READ 0 /* read IODC entry point */ | ||
79 | /* PDC_IODC_RI_ * INDEX parameter of PDC_IODC_READ */ | ||
80 | #define PDC_IODC_RI_DATA_BYTES 0 /* IODC Data Bytes */ | ||
81 | /* 1, 2 obsolete - HVERSION dependent*/ | ||
82 | #define PDC_IODC_RI_INIT 3 /* Initialize module */ | ||
83 | #define PDC_IODC_RI_IO 4 /* Module input/output */ | ||
84 | #define PDC_IODC_RI_SPA 5 /* Module input/output */ | ||
85 | #define PDC_IODC_RI_CONFIG 6 /* Module input/output */ | ||
86 | /* 7 obsolete - HVERSION dependent */ | ||
87 | #define PDC_IODC_RI_TEST 8 /* Module input/output */ | ||
88 | #define PDC_IODC_RI_TLB 9 /* Module input/output */ | ||
89 | #define PDC_IODC_NINIT 2 /* non-destructive init */ | ||
90 | #define PDC_IODC_DINIT 3 /* destructive init */ | ||
91 | #define PDC_IODC_MEMERR 4 /* check for memory errors */ | ||
92 | #define PDC_IODC_INDEX_DATA 0 /* get first 16 bytes from mod IODC */ | ||
93 | #define PDC_IODC_BUS_ERROR -4 /* bus error return value */ | ||
94 | #define PDC_IODC_INVALID_INDEX -5 /* invalid index return value */ | ||
95 | #define PDC_IODC_COUNT -6 /* count is too small */ | ||
96 | |||
97 | #define PDC_TOD 9 /* time-of-day clock (TOD) */ | ||
98 | #define PDC_TOD_READ 0 /* read TOD */ | ||
99 | #define PDC_TOD_WRITE 1 /* write TOD */ | ||
100 | |||
101 | |||
102 | #define PDC_STABLE 10 /* stable storage (sprockets) */ | ||
103 | #define PDC_STABLE_READ 0 | ||
104 | #define PDC_STABLE_WRITE 1 | ||
105 | #define PDC_STABLE_RETURN_SIZE 2 | ||
106 | #define PDC_STABLE_VERIFY_CONTENTS 3 | ||
107 | #define PDC_STABLE_INITIALIZE 4 | ||
108 | |||
109 | #define PDC_NVOLATILE 11 /* often not implemented */ | ||
110 | |||
111 | #define PDC_ADD_VALID 12 /* Memory validation PDC call */ | ||
112 | #define PDC_ADD_VALID_VERIFY 0 /* Make PDC_ADD_VALID verify region */ | ||
113 | |||
114 | #define PDC_INSTR 15 /* get instr to invoke PDCE_CHECK() */ | ||
115 | |||
116 | #define PDC_PROC 16 /* (sprockets) */ | ||
117 | |||
118 | #define PDC_CONFIG 16 /* (sprockets) */ | ||
119 | #define PDC_CONFIG_DECONFIG 0 | ||
120 | #define PDC_CONFIG_DRECONFIG 1 | ||
121 | #define PDC_CONFIG_DRETURN_CONFIG 2 | ||
122 | |||
123 | #define PDC_BLOCK_TLB 18 /* manage hardware block-TLB */ | ||
124 | #define PDC_BTLB_INFO 0 /* returns parameter */ | ||
125 | #define PDC_BTLB_INSERT 1 /* insert BTLB entry */ | ||
126 | #define PDC_BTLB_PURGE 2 /* purge BTLB entries */ | ||
127 | #define PDC_BTLB_PURGE_ALL 3 /* purge all BTLB entries */ | ||
128 | |||
129 | #define PDC_TLB 19 /* manage hardware TLB miss handling */ | ||
130 | #define PDC_TLB_INFO 0 /* returns parameter */ | ||
131 | #define PDC_TLB_SETUP 1 /* set up miss handling */ | ||
132 | |||
133 | #define PDC_MEM 20 /* Manage memory */ | ||
134 | #define PDC_MEM_MEMINFO 0 | ||
135 | #define PDC_MEM_ADD_PAGE 1 | ||
136 | #define PDC_MEM_CLEAR_PDT 2 | ||
137 | #define PDC_MEM_READ_PDT 3 | ||
138 | #define PDC_MEM_RESET_CLEAR 4 | ||
139 | #define PDC_MEM_GOODMEM 5 | ||
140 | #define PDC_MEM_TABLE 128 /* Non contig mem map (sprockets) */ | ||
141 | #define PDC_MEM_RETURN_ADDRESS_TABLE PDC_MEM_TABLE | ||
142 | #define PDC_MEM_GET_MEMORY_SYSTEM_TABLES_SIZE 131 | ||
143 | #define PDC_MEM_GET_MEMORY_SYSTEM_TABLES 132 | ||
144 | #define PDC_MEM_GET_PHYSICAL_LOCATION_FROM_MEMORY_ADDRESS 133 | ||
145 | |||
146 | #define PDC_MEM_RET_SBE_REPLACED 5 /* PDC_MEM return values */ | ||
147 | #define PDC_MEM_RET_DUPLICATE_ENTRY 4 | ||
148 | #define PDC_MEM_RET_BUF_SIZE_SMALL 1 | ||
149 | #define PDC_MEM_RET_PDT_FULL -11 | ||
150 | #define PDC_MEM_RET_INVALID_PHYSICAL_LOCATION ~0ULL | ||
151 | |||
152 | #define PDC_PSW 21 /* Get/Set default System Mask */ | ||
153 | #define PDC_PSW_MASK 0 /* Return mask */ | ||
154 | #define PDC_PSW_GET_DEFAULTS 1 /* Return defaults */ | ||
155 | #define PDC_PSW_SET_DEFAULTS 2 /* Set default */ | ||
156 | #define PDC_PSW_ENDIAN_BIT 1 /* set for big endian */ | ||
157 | #define PDC_PSW_WIDE_BIT 2 /* set for wide mode */ | ||
158 | |||
159 | #define PDC_SYSTEM_MAP 22 /* find system modules */ | ||
160 | #define PDC_FIND_MODULE 0 | ||
161 | #define PDC_FIND_ADDRESS 1 | ||
162 | #define PDC_TRANSLATE_PATH 2 | ||
163 | |||
164 | #define PDC_SOFT_POWER 23 /* soft power switch */ | ||
165 | #define PDC_SOFT_POWER_INFO 0 /* return info about the soft power switch */ | ||
166 | #define PDC_SOFT_POWER_ENABLE 1 /* enable/disable soft power switch */ | ||
167 | |||
168 | |||
169 | /* HVERSION dependent */ | ||
170 | |||
171 | /* The PDC_MEM_MAP calls */ | ||
172 | #define PDC_MEM_MAP 128 /* on s700: return page info */ | ||
173 | #define PDC_MEM_MAP_HPA 0 /* returns hpa of a module */ | ||
174 | |||
175 | #define PDC_EEPROM 129 /* EEPROM access */ | ||
176 | #define PDC_EEPROM_READ_WORD 0 | ||
177 | #define PDC_EEPROM_WRITE_WORD 1 | ||
178 | #define PDC_EEPROM_READ_BYTE 2 | ||
179 | #define PDC_EEPROM_WRITE_BYTE 3 | ||
180 | #define PDC_EEPROM_EEPROM_PASSWORD -1000 | ||
181 | |||
182 | #define PDC_NVM 130 /* NVM (non-volatile memory) access */ | ||
183 | #define PDC_NVM_READ_WORD 0 | ||
184 | #define PDC_NVM_WRITE_WORD 1 | ||
185 | #define PDC_NVM_READ_BYTE 2 | ||
186 | #define PDC_NVM_WRITE_BYTE 3 | ||
187 | |||
188 | #define PDC_SEED_ERROR 132 /* (sprockets) */ | ||
189 | |||
190 | #define PDC_IO 135 /* log error info, reset IO system */ | ||
191 | #define PDC_IO_READ_AND_CLEAR_ERRORS 0 | ||
192 | #define PDC_IO_RESET 1 | ||
193 | #define PDC_IO_RESET_DEVICES 2 | ||
194 | /* sets bits 6&7 (little endian) of the HcControl Register */ | ||
195 | #define PDC_IO_USB_SUSPEND 0xC000000000000000 | ||
196 | #define PDC_IO_EEPROM_IO_ERR_TABLE_FULL -5 /* return value */ | ||
197 | #define PDC_IO_NO_SUSPEND -6 /* return value */ | ||
198 | |||
199 | #define PDC_BROADCAST_RESET 136 /* reset all processors */ | ||
200 | #define PDC_DO_RESET 0 /* option: perform a broadcast reset */ | ||
201 | #define PDC_DO_FIRM_TEST_RESET 1 /* Do broadcast reset with bitmap */ | ||
202 | #define PDC_BR_RECONFIGURATION 2 /* reset w/reconfiguration */ | ||
203 | #define PDC_FIRM_TEST_MAGIC 0xab9ec36fUL /* for this reboot only */ | ||
204 | |||
205 | #define PDC_LAN_STATION_ID 138 /* Hversion dependent mechanism for */ | ||
206 | #define PDC_LAN_STATION_ID_READ 0 /* getting the lan station address */ | ||
207 | |||
208 | #define PDC_LAN_STATION_ID_SIZE 6 | ||
209 | |||
210 | #define PDC_CHECK_RANGES 139 /* (sprockets) */ | ||
211 | |||
212 | #define PDC_NV_SECTIONS 141 /* (sprockets) */ | ||
213 | |||
214 | #define PDC_PERFORMANCE 142 /* performance monitoring */ | ||
215 | |||
216 | #define PDC_SYSTEM_INFO 143 /* system information */ | ||
217 | #define PDC_SYSINFO_RETURN_INFO_SIZE 0 | ||
218 | #define PDC_SYSINFO_RRETURN_SYS_INFO 1 | ||
219 | #define PDC_SYSINFO_RRETURN_ERRORS 2 | ||
220 | #define PDC_SYSINFO_RRETURN_WARNINGS 3 | ||
221 | #define PDC_SYSINFO_RETURN_REVISIONS 4 | ||
222 | #define PDC_SYSINFO_RRETURN_DIAGNOSE 5 | ||
223 | #define PDC_SYSINFO_RRETURN_HV_DIAGNOSE 1005 | ||
224 | |||
225 | #define PDC_RDR 144 /* (sprockets) */ | ||
226 | #define PDC_RDR_READ_BUFFER 0 | ||
227 | #define PDC_RDR_READ_SINGLE 1 | ||
228 | #define PDC_RDR_WRITE_SINGLE 2 | ||
229 | |||
230 | #define PDC_INTRIGUE 145 /* (sprockets) */ | ||
231 | #define PDC_INTRIGUE_WRITE_BUFFER 0 | ||
232 | #define PDC_INTRIGUE_GET_SCRATCH_BUFSIZE 1 | ||
233 | #define PDC_INTRIGUE_START_CPU_COUNTERS 2 | ||
234 | #define PDC_INTRIGUE_STOP_CPU_COUNTERS 3 | ||
235 | |||
236 | #define PDC_STI 146 /* STI access */ | ||
237 | /* same as PDC_PCI_XXX values (see below) */ | ||
238 | |||
239 | /* Legacy PDC definitions for same stuff */ | ||
240 | #define PDC_PCI_INDEX 147 | ||
241 | #define PDC_PCI_INTERFACE_INFO 0 | ||
242 | #define PDC_PCI_SLOT_INFO 1 | ||
243 | #define PDC_PCI_INFLIGHT_BYTES 2 | ||
244 | #define PDC_PCI_READ_CONFIG 3 | ||
245 | #define PDC_PCI_WRITE_CONFIG 4 | ||
246 | #define PDC_PCI_READ_PCI_IO 5 | ||
247 | #define PDC_PCI_WRITE_PCI_IO 6 | ||
248 | #define PDC_PCI_READ_CONFIG_DELAY 7 | ||
249 | #define PDC_PCI_UPDATE_CONFIG_DELAY 8 | ||
250 | #define PDC_PCI_PCI_PATH_TO_PCI_HPA 9 | ||
251 | #define PDC_PCI_PCI_HPA_TO_PCI_PATH 10 | ||
252 | #define PDC_PCI_PCI_PATH_TO_PCI_BUS 11 | ||
253 | #define PDC_PCI_PCI_RESERVED 12 | ||
254 | #define PDC_PCI_PCI_INT_ROUTE_SIZE 13 | ||
255 | #define PDC_PCI_GET_INT_TBL_SIZE PDC_PCI_PCI_INT_ROUTE_SIZE | ||
256 | #define PDC_PCI_PCI_INT_ROUTE 14 | ||
257 | #define PDC_PCI_GET_INT_TBL PDC_PCI_PCI_INT_ROUTE | ||
258 | #define PDC_PCI_READ_MON_TYPE 15 | ||
259 | #define PDC_PCI_WRITE_MON_TYPE 16 | ||
260 | |||
261 | |||
262 | /* Get SCSI Interface Card info: SDTR, SCSI ID, mode (SE vs LVD) */ | ||
263 | #define PDC_INITIATOR 163 | ||
264 | #define PDC_GET_INITIATOR 0 | ||
265 | #define PDC_SET_INITIATOR 1 | ||
266 | #define PDC_DELETE_INITIATOR 2 | ||
267 | #define PDC_RETURN_TABLE_SIZE 3 | ||
268 | #define PDC_RETURN_TABLE 4 | ||
269 | |||
270 | #define PDC_LINK 165 /* (sprockets) */ | ||
271 | #define PDC_LINK_PCI_ENTRY_POINTS 0 /* list (Arg1) = 0 */ | ||
272 | #define PDC_LINK_USB_ENTRY_POINTS 1 /* list (Arg1) = 1 */ | ||
273 | |||
274 | /* cl_class | ||
275 | * page 3-33 of IO-Firmware ARS | ||
276 | * IODC ENTRY_INIT(Search first) RET[1] | ||
277 | */ | ||
278 | #define CL_NULL 0 /* invalid */ | ||
279 | #define CL_RANDOM 1 /* random access (as disk) */ | ||
280 | #define CL_SEQU 2 /* sequential access (as tape) */ | ||
281 | #define CL_DUPLEX 7 /* full-duplex point-to-point (RS-232, Net) */ | ||
282 | #define CL_KEYBD 8 /* half-duplex console (HIL Keyboard) */ | ||
283 | #define CL_DISPL 9 /* half-duplex console (display) */ | ||
284 | #define CL_FC 10 /* FiberChannel access media */ | ||
285 | |||
286 | /* IODC ENTRY_INIT() */ | ||
287 | #define ENTRY_INIT_SRCH_FRST 2 | ||
288 | #define ENTRY_INIT_SRCH_NEXT 3 | ||
289 | #define ENTRY_INIT_MOD_DEV 4 | ||
290 | #define ENTRY_INIT_DEV 5 | ||
291 | #define ENTRY_INIT_MOD 6 | ||
292 | #define ENTRY_INIT_MSG 9 | ||
293 | |||
294 | /* IODC ENTRY_IO() */ | ||
295 | #define ENTRY_IO_BOOTIN 0 | ||
296 | #define ENTRY_IO_BOOTOUT 1 | ||
297 | #define ENTRY_IO_CIN 2 | ||
298 | #define ENTRY_IO_COUT 3 | ||
299 | #define ENTRY_IO_CLOSE 4 | ||
300 | #define ENTRY_IO_GETMSG 9 | ||
301 | #define ENTRY_IO_BBLOCK_IN 16 | ||
302 | #define ENTRY_IO_BBLOCK_OUT 17 | ||
303 | |||
304 | /* IODC ENTRY_SPA() */ | ||
305 | |||
306 | /* IODC ENTRY_CONFIG() */ | ||
307 | |||
308 | /* IODC ENTRY_TEST() */ | ||
309 | |||
310 | /* IODC ENTRY_TLB() */ | ||
311 | |||
312 | /* constants for OS (NVM...) */ | ||
313 | #define OS_ID_NONE 0 /* Undefined OS ID */ | ||
314 | #define OS_ID_HPUX 1 /* HP-UX OS */ | ||
315 | #define OS_ID_MPEXL 2 /* MPE XL OS */ | ||
316 | #define OS_ID_OSF 3 /* OSF OS */ | ||
317 | #define OS_ID_HPRT 4 /* HP-RT OS */ | ||
318 | #define OS_ID_NOVEL 5 /* NOVELL OS */ | ||
319 | #define OS_ID_LINUX 6 /* Linux */ | ||
320 | |||
321 | |||
322 | /* constants for PDC_CHASSIS */ | ||
323 | #define OSTAT_OFF 0 | ||
324 | #define OSTAT_FLT 1 | ||
325 | #define OSTAT_TEST 2 | ||
326 | #define OSTAT_INIT 3 | ||
327 | #define OSTAT_SHUT 4 | ||
328 | #define OSTAT_WARN 5 | ||
329 | #define OSTAT_RUN 6 | ||
330 | #define OSTAT_ON 7 | ||
331 | |||
332 | /* Page Zero constant offsets used by the HPMC handler */ | ||
333 | #define BOOT_CONSOLE_HPA_OFFSET 0x3c0 | ||
334 | #define BOOT_CONSOLE_SPA_OFFSET 0x3c4 | ||
335 | #define BOOT_CONSOLE_PATH_OFFSET 0x3a8 | ||
336 | |||
337 | /* size of the pdc_result buffer for firmware.c */ | ||
338 | #define NUM_PDC_RESULT 32 | ||
339 | 5 | ||
340 | #if !defined(__ASSEMBLY__) | 6 | #if !defined(__ASSEMBLY__) |
341 | 7 | ||
342 | #include <linux/types.h> | ||
343 | |||
344 | #ifdef __KERNEL__ | ||
345 | |||
346 | extern int pdc_type; | 8 | extern int pdc_type; |
347 | 9 | ||
348 | /* Values for pdc_type */ | 10 | /* Values for pdc_type */ |
@@ -673,88 +335,5 @@ static inline char * os_id_to_string(u16 os_id) { | |||
673 | } | 335 | } |
674 | } | 336 | } |
675 | 337 | ||
676 | #endif /* __KERNEL__ */ | ||
677 | |||
678 | /* flags of the device_path */ | ||
679 | #define PF_AUTOBOOT 0x80 | ||
680 | #define PF_AUTOSEARCH 0x40 | ||
681 | #define PF_TIMER 0x0F | ||
682 | |||
683 | struct device_path { /* page 1-69 */ | ||
684 | unsigned char flags; /* flags see above! */ | ||
685 | unsigned char bc[6]; /* bus converter routing info */ | ||
686 | unsigned char mod; | ||
687 | unsigned int layers[6];/* device-specific layer-info */ | ||
688 | } __attribute__((aligned(8))) ; | ||
689 | |||
690 | struct pz_device { | ||
691 | struct device_path dp; /* see above */ | ||
692 | /* struct iomod *hpa; */ | ||
693 | unsigned int hpa; /* HPA base address */ | ||
694 | /* char *spa; */ | ||
695 | unsigned int spa; /* SPA base address */ | ||
696 | /* int (*iodc_io)(struct iomod*, ...); */ | ||
697 | unsigned int iodc_io; /* device entry point */ | ||
698 | short pad; /* reserved */ | ||
699 | unsigned short cl_class;/* see below */ | ||
700 | } __attribute__((aligned(8))) ; | ||
701 | |||
702 | struct zeropage { | ||
703 | /* [0x000] initialize vectors (VEC) */ | ||
704 | unsigned int vec_special; /* must be zero */ | ||
705 | /* int (*vec_pow_fail)(void);*/ | ||
706 | unsigned int vec_pow_fail; /* power failure handler */ | ||
707 | /* int (*vec_toc)(void); */ | ||
708 | unsigned int vec_toc; | ||
709 | unsigned int vec_toclen; | ||
710 | /* int (*vec_rendz)(void); */ | ||
711 | unsigned int vec_rendz; | ||
712 | int vec_pow_fail_flen; | ||
713 | int vec_pad[10]; | ||
714 | |||
715 | /* [0x040] reserved processor dependent */ | ||
716 | int pad0[112]; | ||
717 | |||
718 | /* [0x200] reserved */ | ||
719 | int pad1[84]; | ||
720 | |||
721 | /* [0x350] memory configuration (MC) */ | ||
722 | int memc_cont; /* contiguous mem size (bytes) */ | ||
723 | int memc_phsize; /* physical memory size */ | ||
724 | int memc_adsize; /* additional mem size, bytes of SPA space used by PDC */ | ||
725 | unsigned int mem_pdc_hi; /* used for 64-bit */ | ||
726 | |||
727 | /* [0x360] various parameters for the boot-CPU */ | ||
728 | /* unsigned int *mem_booterr[8]; */ | ||
729 | unsigned int mem_booterr[8]; /* ptr to boot errors */ | ||
730 | unsigned int mem_free; /* first location, where OS can be loaded */ | ||
731 | /* struct iomod *mem_hpa; */ | ||
732 | unsigned int mem_hpa; /* HPA of the boot-CPU */ | ||
733 | /* int (*mem_pdc)(int, ...); */ | ||
734 | unsigned int mem_pdc; /* PDC entry point */ | ||
735 | unsigned int mem_10msec; /* number of clock ticks in 10msec */ | ||
736 | |||
737 | /* [0x390] initial memory module (IMM) */ | ||
738 | /* struct iomod *imm_hpa; */ | ||
739 | unsigned int imm_hpa; /* HPA of the IMM */ | ||
740 | int imm_soft_boot; /* 0 = was hard boot, 1 = was soft boot */ | ||
741 | unsigned int imm_spa_size; /* SPA size of the IMM in bytes */ | ||
742 | unsigned int imm_max_mem; /* bytes of mem in IMM */ | ||
743 | |||
744 | /* [0x3A0] boot console, display device and keyboard */ | ||
745 | struct pz_device mem_cons; /* description of console device */ | ||
746 | struct pz_device mem_boot; /* description of boot device */ | ||
747 | struct pz_device mem_kbd; /* description of keyboard device */ | ||
748 | |||
749 | /* [0x430] reserved */ | ||
750 | int pad430[116]; | ||
751 | |||
752 | /* [0x600] processor dependent */ | ||
753 | __u32 pad600[1]; | ||
754 | __u32 proc_sti; /* pointer to STI ROM */ | ||
755 | __u32 pad608[126]; | ||
756 | }; | ||
757 | |||
758 | #endif /* !defined(__ASSEMBLY__) */ | 338 | #endif /* !defined(__ASSEMBLY__) */ |
759 | |||
760 | #endif /* _PARISC_PDC_H */ | 339 | #endif /* _PARISC_PDC_H */ |
diff --git a/arch/parisc/include/asm/percpu.h b/arch/parisc/include/asm/percpu.h deleted file mode 100644 index a0dcd1970128..000000000000 --- a/arch/parisc/include/asm/percpu.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _PARISC_PERCPU_H | ||
2 | #define _PARISC_PERCPU_H | ||
3 | |||
4 | #include <asm-generic/percpu.h> | ||
5 | |||
6 | #endif | ||
7 | |||
diff --git a/arch/parisc/include/asm/poll.h b/arch/parisc/include/asm/poll.h deleted file mode 100644 index c98509d3149e..000000000000 --- a/arch/parisc/include/asm/poll.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/poll.h> | ||
diff --git a/arch/parisc/include/asm/ptrace.h b/arch/parisc/include/asm/ptrace.h index 250ae35aa062..a2db278a5def 100644 --- a/arch/parisc/include/asm/ptrace.h +++ b/arch/parisc/include/asm/ptrace.h | |||
@@ -1,49 +1,11 @@ | |||
1 | #ifndef _PARISC_PTRACE_H | ||
2 | #define _PARISC_PTRACE_H | ||
3 | |||
4 | /* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg | 1 | /* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg |
5 | ** Copyright (C) 2000 Grant Grundler, Hewlett-Packard | 2 | ** Copyright (C) 2000 Grant Grundler, Hewlett-Packard |
6 | */ | 3 | */ |
4 | #ifndef _PARISC_PTRACE_H | ||
5 | #define _PARISC_PTRACE_H | ||
7 | 6 | ||
8 | #include <linux/types.h> | 7 | #include <uapi/asm/ptrace.h> |
9 | |||
10 | /* This struct defines the way the registers are stored on the | ||
11 | * stack during a system call. | ||
12 | * | ||
13 | * N.B. gdb/strace care about the size and offsets within this | ||
14 | * structure. If you change things, you may break object compatibility | ||
15 | * for those applications. | ||
16 | */ | ||
17 | |||
18 | struct pt_regs { | ||
19 | unsigned long gr[32]; /* PSW is in gr[0] */ | ||
20 | __u64 fr[32]; | ||
21 | unsigned long sr[ 8]; | ||
22 | unsigned long iasq[2]; | ||
23 | unsigned long iaoq[2]; | ||
24 | unsigned long cr27; | ||
25 | unsigned long pad0; /* available for other uses */ | ||
26 | unsigned long orig_r28; | ||
27 | unsigned long ksp; | ||
28 | unsigned long kpc; | ||
29 | unsigned long sar; /* CR11 */ | ||
30 | unsigned long iir; /* CR19 */ | ||
31 | unsigned long isr; /* CR20 */ | ||
32 | unsigned long ior; /* CR21 */ | ||
33 | unsigned long ipsw; /* CR22 */ | ||
34 | }; | ||
35 | |||
36 | /* | ||
37 | * The numbers chosen here are somewhat arbitrary but absolutely MUST | ||
38 | * not overlap with any of the number assigned in <linux/ptrace.h>. | ||
39 | * | ||
40 | * These ones are taken from IA-64 on the assumption that theirs are | ||
41 | * the most correct (and we also want to support PTRACE_SINGLEBLOCK | ||
42 | * since we have taken branch traps too) | ||
43 | */ | ||
44 | #define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */ | ||
45 | 8 | ||
46 | #ifdef __KERNEL__ | ||
47 | 9 | ||
48 | #define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS)) | 10 | #define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS)) |
49 | 11 | ||
@@ -58,6 +20,4 @@ struct pt_regs { | |||
58 | unsigned long profile_pc(struct pt_regs *); | 20 | unsigned long profile_pc(struct pt_regs *); |
59 | 21 | ||
60 | 22 | ||
61 | #endif /* __KERNEL__ */ | ||
62 | |||
63 | #endif | 23 | #endif |
diff --git a/arch/parisc/include/asm/real.h b/arch/parisc/include/asm/real.h deleted file mode 100644 index 82acb25db395..000000000000 --- a/arch/parisc/include/asm/real.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | #ifndef _PARISC_REAL_H | ||
2 | #define _PARISC_REAL_H | ||
3 | |||
4 | |||
5 | #endif | ||
diff --git a/arch/parisc/include/asm/segment.h b/arch/parisc/include/asm/segment.h deleted file mode 100644 index 26794ddb6524..000000000000 --- a/arch/parisc/include/asm/segment.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __PARISC_SEGMENT_H | ||
2 | #define __PARISC_SEGMENT_H | ||
3 | |||
4 | /* Only here because we have some old header files that expect it.. */ | ||
5 | |||
6 | #endif | ||
diff --git a/arch/parisc/include/asm/signal.h b/arch/parisc/include/asm/signal.h index c20356375d1d..21abf4fc169a 100644 --- a/arch/parisc/include/asm/signal.h +++ b/arch/parisc/include/asm/signal.h | |||
@@ -1,129 +1,19 @@ | |||
1 | #ifndef _ASM_PARISC_SIGNAL_H | 1 | #ifndef _ASM_PARISC_SIGNAL_H |
2 | #define _ASM_PARISC_SIGNAL_H | 2 | #define _ASM_PARISC_SIGNAL_H |
3 | 3 | ||
4 | #define SIGHUP 1 | 4 | #include <uapi/asm/signal.h> |
5 | #define SIGINT 2 | ||
6 | #define SIGQUIT 3 | ||
7 | #define SIGILL 4 | ||
8 | #define SIGTRAP 5 | ||
9 | #define SIGABRT 6 | ||
10 | #define SIGIOT 6 | ||
11 | #define SIGEMT 7 | ||
12 | #define SIGFPE 8 | ||
13 | #define SIGKILL 9 | ||
14 | #define SIGBUS 10 | ||
15 | #define SIGSEGV 11 | ||
16 | #define SIGSYS 12 /* Linux doesn't use this */ | ||
17 | #define SIGPIPE 13 | ||
18 | #define SIGALRM 14 | ||
19 | #define SIGTERM 15 | ||
20 | #define SIGUSR1 16 | ||
21 | #define SIGUSR2 17 | ||
22 | #define SIGCHLD 18 | ||
23 | #define SIGPWR 19 | ||
24 | #define SIGVTALRM 20 | ||
25 | #define SIGPROF 21 | ||
26 | #define SIGIO 22 | ||
27 | #define SIGPOLL SIGIO | ||
28 | #define SIGWINCH 23 | ||
29 | #define SIGSTOP 24 | ||
30 | #define SIGTSTP 25 | ||
31 | #define SIGCONT 26 | ||
32 | #define SIGTTIN 27 | ||
33 | #define SIGTTOU 28 | ||
34 | #define SIGURG 29 | ||
35 | #define SIGLOST 30 /* Linux doesn't use this either */ | ||
36 | #define SIGUNUSED 31 | ||
37 | #define SIGRESERVE SIGUNUSED | ||
38 | 5 | ||
39 | #define SIGXCPU 33 | ||
40 | #define SIGXFSZ 34 | ||
41 | #define SIGSTKFLT 36 | ||
42 | |||
43 | /* These should not be considered constants from userland. */ | ||
44 | #define SIGRTMIN 37 | ||
45 | #define SIGRTMAX _NSIG /* it's 44 under HP/UX */ | ||
46 | |||
47 | /* | ||
48 | * SA_FLAGS values: | ||
49 | * | ||
50 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
51 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
52 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
53 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
54 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
55 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
56 | * | ||
57 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
58 | * Unix names RESETHAND and NODEFER respectively. | ||
59 | */ | ||
60 | #define SA_ONSTACK 0x00000001 | ||
61 | #define SA_RESETHAND 0x00000004 | ||
62 | #define SA_NOCLDSTOP 0x00000008 | ||
63 | #define SA_SIGINFO 0x00000010 | ||
64 | #define SA_NODEFER 0x00000020 | ||
65 | #define SA_RESTART 0x00000040 | ||
66 | #define SA_NOCLDWAIT 0x00000080 | ||
67 | #define _SA_SIGGFAULT 0x00000100 /* HPUX */ | ||
68 | |||
69 | #define SA_NOMASK SA_NODEFER | ||
70 | #define SA_ONESHOT SA_RESETHAND | ||
71 | |||
72 | #define SA_RESTORER 0x04000000 /* obsolete -- ignored */ | ||
73 | |||
74 | /* | ||
75 | * sigaltstack controls | ||
76 | */ | ||
77 | #define SS_ONSTACK 1 | ||
78 | #define SS_DISABLE 2 | ||
79 | |||
80 | #define MINSIGSTKSZ 2048 | ||
81 | #define SIGSTKSZ 8192 | ||
82 | |||
83 | #ifdef __KERNEL__ | ||
84 | 6 | ||
85 | #define _NSIG 64 | 7 | #define _NSIG 64 |
86 | /* bits-per-word, where word apparently means 'long' not 'int' */ | 8 | /* bits-per-word, where word apparently means 'long' not 'int' */ |
87 | #define _NSIG_BPW BITS_PER_LONG | 9 | #define _NSIG_BPW BITS_PER_LONG |
88 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | 10 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) |
89 | 11 | ||
90 | #endif /* __KERNEL__ */ | ||
91 | |||
92 | #define SIG_BLOCK 0 /* for blocking signals */ | ||
93 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
94 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
95 | |||
96 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
97 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
98 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
99 | |||
100 | # ifndef __ASSEMBLY__ | 12 | # ifndef __ASSEMBLY__ |
101 | |||
102 | # include <linux/types.h> | ||
103 | |||
104 | /* Avoid too many header ordering problems. */ | ||
105 | struct siginfo; | ||
106 | |||
107 | /* Type of a signal handler. */ | ||
108 | #ifdef CONFIG_64BIT | 13 | #ifdef CONFIG_64BIT |
109 | /* function pointers on 64-bit parisc are pointers to little structs and the | ||
110 | * compiler doesn't support code which changes or tests the address of | ||
111 | * the function in the little struct. This is really ugly -PB | ||
112 | */ | ||
113 | typedef char __user *__sighandler_t; | ||
114 | #else | 14 | #else |
115 | typedef void __signalfn_t(int); | ||
116 | typedef __signalfn_t __user *__sighandler_t; | ||
117 | #endif | 15 | #endif |
118 | 16 | ||
119 | typedef struct sigaltstack { | ||
120 | void __user *ss_sp; | ||
121 | int ss_flags; | ||
122 | size_t ss_size; | ||
123 | } stack_t; | ||
124 | |||
125 | #ifdef __KERNEL__ | ||
126 | |||
127 | /* Most things should be clean enough to redefine this at will, if care | 17 | /* Most things should be clean enough to redefine this at will, if care |
128 | is taken to make libc match. */ | 18 | is taken to make libc match. */ |
129 | 19 | ||
@@ -148,6 +38,5 @@ struct k_sigaction { | |||
148 | 38 | ||
149 | #include <asm/sigcontext.h> | 39 | #include <asm/sigcontext.h> |
150 | 40 | ||
151 | #endif /* __KERNEL__ */ | ||
152 | #endif /* !__ASSEMBLY */ | 41 | #endif /* !__ASSEMBLY */ |
153 | #endif /* _ASM_PARISC_SIGNAL_H */ | 42 | #endif /* _ASM_PARISC_SIGNAL_H */ |
diff --git a/arch/parisc/include/asm/termios.h b/arch/parisc/include/asm/termios.h index a2a57a4548af..9bbc0c8974ea 100644 --- a/arch/parisc/include/asm/termios.h +++ b/arch/parisc/include/asm/termios.h | |||
@@ -1,45 +1,8 @@ | |||
1 | #ifndef _PARISC_TERMIOS_H | 1 | #ifndef _PARISC_TERMIOS_H |
2 | #define _PARISC_TERMIOS_H | 2 | #define _PARISC_TERMIOS_H |
3 | 3 | ||
4 | #include <asm/termbits.h> | 4 | #include <uapi/asm/termios.h> |
5 | #include <asm/ioctls.h> | ||
6 | 5 | ||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | /* modem lines */ | ||
25 | #define TIOCM_LE 0x001 | ||
26 | #define TIOCM_DTR 0x002 | ||
27 | #define TIOCM_RTS 0x004 | ||
28 | #define TIOCM_ST 0x008 | ||
29 | #define TIOCM_SR 0x010 | ||
30 | #define TIOCM_CTS 0x020 | ||
31 | #define TIOCM_CAR 0x040 | ||
32 | #define TIOCM_RNG 0x080 | ||
33 | #define TIOCM_DSR 0x100 | ||
34 | #define TIOCM_CD TIOCM_CAR | ||
35 | #define TIOCM_RI TIOCM_RNG | ||
36 | #define TIOCM_OUT1 0x2000 | ||
37 | #define TIOCM_OUT2 0x4000 | ||
38 | #define TIOCM_LOOP 0x8000 | ||
39 | |||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
41 | |||
42 | #ifdef __KERNEL__ | ||
43 | 6 | ||
44 | /* intr=^C quit=^\ erase=del kill=^U | 7 | /* intr=^C quit=^\ erase=del kill=^U |
45 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | 8 | eof=^D vtime=\0 vmin=\1 sxtc=\0 |
@@ -85,6 +48,4 @@ struct termio { | |||
85 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | 48 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) |
86 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | 49 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) |
87 | 50 | ||
88 | #endif /* __KERNEL__ */ | ||
89 | |||
90 | #endif /* _PARISC_TERMIOS_H */ | 51 | #endif /* _PARISC_TERMIOS_H */ |
diff --git a/arch/parisc/include/asm/topology.h b/arch/parisc/include/asm/topology.h deleted file mode 100644 index d8133eb0b1e7..000000000000 --- a/arch/parisc/include/asm/topology.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_PARISC_TOPOLOGY_H | ||
2 | #define _ASM_PARISC_TOPOLOGY_H | ||
3 | |||
4 | #include <asm-generic/topology.h> | ||
5 | |||
6 | #endif /* _ASM_PARISC_TOPOLOGY_H */ | ||
diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h index d61de64f990a..541639c3f607 100644 --- a/arch/parisc/include/asm/unistd.h +++ b/arch/parisc/include/asm/unistd.h | |||
@@ -1,840 +1,8 @@ | |||
1 | #ifndef _ASM_PARISC_UNISTD_H_ | 1 | #ifndef _ASM_PARISC_UNISTD_H_ |
2 | #define _ASM_PARISC_UNISTD_H_ | 2 | #define _ASM_PARISC_UNISTD_H_ |
3 | 3 | ||
4 | /* | 4 | #include <uapi/asm/unistd.h> |
5 | * This file contains the system call numbers. | ||
6 | */ | ||
7 | |||
8 | /* | ||
9 | * HP-UX system calls get their native numbers for binary compatibility. | ||
10 | */ | ||
11 | |||
12 | #define __NR_HPUX_exit 1 | ||
13 | #define __NR_HPUX_fork 2 | ||
14 | #define __NR_HPUX_read 3 | ||
15 | #define __NR_HPUX_write 4 | ||
16 | #define __NR_HPUX_open 5 | ||
17 | #define __NR_HPUX_close 6 | ||
18 | #define __NR_HPUX_wait 7 | ||
19 | #define __NR_HPUX_creat 8 | ||
20 | #define __NR_HPUX_link 9 | ||
21 | #define __NR_HPUX_unlink 10 | ||
22 | #define __NR_HPUX_execv 11 | ||
23 | #define __NR_HPUX_chdir 12 | ||
24 | #define __NR_HPUX_time 13 | ||
25 | #define __NR_HPUX_mknod 14 | ||
26 | #define __NR_HPUX_chmod 15 | ||
27 | #define __NR_HPUX_chown 16 | ||
28 | #define __NR_HPUX_break 17 | ||
29 | #define __NR_HPUX_lchmod 18 | ||
30 | #define __NR_HPUX_lseek 19 | ||
31 | #define __NR_HPUX_getpid 20 | ||
32 | #define __NR_HPUX_mount 21 | ||
33 | #define __NR_HPUX_umount 22 | ||
34 | #define __NR_HPUX_setuid 23 | ||
35 | #define __NR_HPUX_getuid 24 | ||
36 | #define __NR_HPUX_stime 25 | ||
37 | #define __NR_HPUX_ptrace 26 | ||
38 | #define __NR_HPUX_alarm 27 | ||
39 | #define __NR_HPUX_oldfstat 28 | ||
40 | #define __NR_HPUX_pause 29 | ||
41 | #define __NR_HPUX_utime 30 | ||
42 | #define __NR_HPUX_stty 31 | ||
43 | #define __NR_HPUX_gtty 32 | ||
44 | #define __NR_HPUX_access 33 | ||
45 | #define __NR_HPUX_nice 34 | ||
46 | #define __NR_HPUX_ftime 35 | ||
47 | #define __NR_HPUX_sync 36 | ||
48 | #define __NR_HPUX_kill 37 | ||
49 | #define __NR_HPUX_stat 38 | ||
50 | #define __NR_HPUX_setpgrp3 39 | ||
51 | #define __NR_HPUX_lstat 40 | ||
52 | #define __NR_HPUX_dup 41 | ||
53 | #define __NR_HPUX_pipe 42 | ||
54 | #define __NR_HPUX_times 43 | ||
55 | #define __NR_HPUX_profil 44 | ||
56 | #define __NR_HPUX_ki_call 45 | ||
57 | #define __NR_HPUX_setgid 46 | ||
58 | #define __NR_HPUX_getgid 47 | ||
59 | #define __NR_HPUX_sigsys 48 | ||
60 | #define __NR_HPUX_reserved1 49 | ||
61 | #define __NR_HPUX_reserved2 50 | ||
62 | #define __NR_HPUX_acct 51 | ||
63 | #define __NR_HPUX_set_userthreadid 52 | ||
64 | #define __NR_HPUX_oldlock 53 | ||
65 | #define __NR_HPUX_ioctl 54 | ||
66 | #define __NR_HPUX_reboot 55 | ||
67 | #define __NR_HPUX_symlink 56 | ||
68 | #define __NR_HPUX_utssys 57 | ||
69 | #define __NR_HPUX_readlink 58 | ||
70 | #define __NR_HPUX_execve 59 | ||
71 | #define __NR_HPUX_umask 60 | ||
72 | #define __NR_HPUX_chroot 61 | ||
73 | #define __NR_HPUX_fcntl 62 | ||
74 | #define __NR_HPUX_ulimit 63 | ||
75 | #define __NR_HPUX_getpagesize 64 | ||
76 | #define __NR_HPUX_mremap 65 | ||
77 | #define __NR_HPUX_vfork 66 | ||
78 | #define __NR_HPUX_vread 67 | ||
79 | #define __NR_HPUX_vwrite 68 | ||
80 | #define __NR_HPUX_sbrk 69 | ||
81 | #define __NR_HPUX_sstk 70 | ||
82 | #define __NR_HPUX_mmap 71 | ||
83 | #define __NR_HPUX_vadvise 72 | ||
84 | #define __NR_HPUX_munmap 73 | ||
85 | #define __NR_HPUX_mprotect 74 | ||
86 | #define __NR_HPUX_madvise 75 | ||
87 | #define __NR_HPUX_vhangup 76 | ||
88 | #define __NR_HPUX_swapoff 77 | ||
89 | #define __NR_HPUX_mincore 78 | ||
90 | #define __NR_HPUX_getgroups 79 | ||
91 | #define __NR_HPUX_setgroups 80 | ||
92 | #define __NR_HPUX_getpgrp2 81 | ||
93 | #define __NR_HPUX_setpgrp2 82 | ||
94 | #define __NR_HPUX_setitimer 83 | ||
95 | #define __NR_HPUX_wait3 84 | ||
96 | #define __NR_HPUX_swapon 85 | ||
97 | #define __NR_HPUX_getitimer 86 | ||
98 | #define __NR_HPUX_gethostname42 87 | ||
99 | #define __NR_HPUX_sethostname42 88 | ||
100 | #define __NR_HPUX_getdtablesize 89 | ||
101 | #define __NR_HPUX_dup2 90 | ||
102 | #define __NR_HPUX_getdopt 91 | ||
103 | #define __NR_HPUX_fstat 92 | ||
104 | #define __NR_HPUX_select 93 | ||
105 | #define __NR_HPUX_setdopt 94 | ||
106 | #define __NR_HPUX_fsync 95 | ||
107 | #define __NR_HPUX_setpriority 96 | ||
108 | #define __NR_HPUX_socket_old 97 | ||
109 | #define __NR_HPUX_connect_old 98 | ||
110 | #define __NR_HPUX_accept_old 99 | ||
111 | #define __NR_HPUX_getpriority 100 | ||
112 | #define __NR_HPUX_send_old 101 | ||
113 | #define __NR_HPUX_recv_old 102 | ||
114 | #define __NR_HPUX_socketaddr_old 103 | ||
115 | #define __NR_HPUX_bind_old 104 | ||
116 | #define __NR_HPUX_setsockopt_old 105 | ||
117 | #define __NR_HPUX_listen_old 106 | ||
118 | #define __NR_HPUX_vtimes_old 107 | ||
119 | #define __NR_HPUX_sigvector 108 | ||
120 | #define __NR_HPUX_sigblock 109 | ||
121 | #define __NR_HPUX_siggetmask 110 | ||
122 | #define __NR_HPUX_sigpause 111 | ||
123 | #define __NR_HPUX_sigstack 112 | ||
124 | #define __NR_HPUX_recvmsg_old 113 | ||
125 | #define __NR_HPUX_sendmsg_old 114 | ||
126 | #define __NR_HPUX_vtrace_old 115 | ||
127 | #define __NR_HPUX_gettimeofday 116 | ||
128 | #define __NR_HPUX_getrusage 117 | ||
129 | #define __NR_HPUX_getsockopt_old 118 | ||
130 | #define __NR_HPUX_resuba_old 119 | ||
131 | #define __NR_HPUX_readv 120 | ||
132 | #define __NR_HPUX_writev 121 | ||
133 | #define __NR_HPUX_settimeofday 122 | ||
134 | #define __NR_HPUX_fchown 123 | ||
135 | #define __NR_HPUX_fchmod 124 | ||
136 | #define __NR_HPUX_recvfrom_old 125 | ||
137 | #define __NR_HPUX_setresuid 126 | ||
138 | #define __NR_HPUX_setresgid 127 | ||
139 | #define __NR_HPUX_rename 128 | ||
140 | #define __NR_HPUX_truncate 129 | ||
141 | #define __NR_HPUX_ftruncate 130 | ||
142 | #define __NR_HPUX_flock_old 131 | ||
143 | #define __NR_HPUX_sysconf 132 | ||
144 | #define __NR_HPUX_sendto_old 133 | ||
145 | #define __NR_HPUX_shutdown_old 134 | ||
146 | #define __NR_HPUX_socketpair_old 135 | ||
147 | #define __NR_HPUX_mkdir 136 | ||
148 | #define __NR_HPUX_rmdir 137 | ||
149 | #define __NR_HPUX_utimes_old 138 | ||
150 | #define __NR_HPUX_sigcleanup_old 139 | ||
151 | #define __NR_HPUX_setcore 140 | ||
152 | #define __NR_HPUX_getpeername_old 141 | ||
153 | #define __NR_HPUX_gethostid 142 | ||
154 | #define __NR_HPUX_sethostid 143 | ||
155 | #define __NR_HPUX_getrlimit 144 | ||
156 | #define __NR_HPUX_setrlimit 145 | ||
157 | #define __NR_HPUX_killpg_old 146 | ||
158 | #define __NR_HPUX_cachectl 147 | ||
159 | #define __NR_HPUX_quotactl 148 | ||
160 | #define __NR_HPUX_get_sysinfo 149 | ||
161 | #define __NR_HPUX_getsockname_old 150 | ||
162 | #define __NR_HPUX_privgrp 151 | ||
163 | #define __NR_HPUX_rtprio 152 | ||
164 | #define __NR_HPUX_plock 153 | ||
165 | #define __NR_HPUX_reserved3 154 | ||
166 | #define __NR_HPUX_lockf 155 | ||
167 | #define __NR_HPUX_semget 156 | ||
168 | #define __NR_HPUX_osemctl 157 | ||
169 | #define __NR_HPUX_semop 158 | ||
170 | #define __NR_HPUX_msgget 159 | ||
171 | #define __NR_HPUX_omsgctl 160 | ||
172 | #define __NR_HPUX_msgsnd 161 | ||
173 | #define __NR_HPUX_msgrecv 162 | ||
174 | #define __NR_HPUX_shmget 163 | ||
175 | #define __NR_HPUX_oshmctl 164 | ||
176 | #define __NR_HPUX_shmat 165 | ||
177 | #define __NR_HPUX_shmdt 166 | ||
178 | #define __NR_HPUX_m68020_advise 167 | ||
179 | /* [168,189] are for Discless/DUX */ | ||
180 | #define __NR_HPUX_csp 168 | ||
181 | #define __NR_HPUX_cluster 169 | ||
182 | #define __NR_HPUX_mkrnod 170 | ||
183 | #define __NR_HPUX_test 171 | ||
184 | #define __NR_HPUX_unsp_open 172 | ||
185 | #define __NR_HPUX_reserved4 173 | ||
186 | #define __NR_HPUX_getcontext_old 174 | ||
187 | #define __NR_HPUX_osetcontext 175 | ||
188 | #define __NR_HPUX_bigio 176 | ||
189 | #define __NR_HPUX_pipenode 177 | ||
190 | #define __NR_HPUX_lsync 178 | ||
191 | #define __NR_HPUX_getmachineid 179 | ||
192 | #define __NR_HPUX_cnodeid 180 | ||
193 | #define __NR_HPUX_cnodes 181 | ||
194 | #define __NR_HPUX_swapclients 182 | ||
195 | #define __NR_HPUX_rmt_process 183 | ||
196 | #define __NR_HPUX_dskless_stats 184 | ||
197 | #define __NR_HPUX_sigprocmask 185 | ||
198 | #define __NR_HPUX_sigpending 186 | ||
199 | #define __NR_HPUX_sigsuspend 187 | ||
200 | #define __NR_HPUX_sigaction 188 | ||
201 | #define __NR_HPUX_reserved5 189 | ||
202 | #define __NR_HPUX_nfssvc 190 | ||
203 | #define __NR_HPUX_getfh 191 | ||
204 | #define __NR_HPUX_getdomainname 192 | ||
205 | #define __NR_HPUX_setdomainname 193 | ||
206 | #define __NR_HPUX_async_daemon 194 | ||
207 | #define __NR_HPUX_getdirentries 195 | ||
208 | #define __NR_HPUX_statfs 196 | ||
209 | #define __NR_HPUX_fstatfs 197 | ||
210 | #define __NR_HPUX_vfsmount 198 | ||
211 | #define __NR_HPUX_reserved6 199 | ||
212 | #define __NR_HPUX_waitpid 200 | ||
213 | /* 201 - 223 missing */ | ||
214 | #define __NR_HPUX_sigsetreturn 224 | ||
215 | #define __NR_HPUX_sigsetstatemask 225 | ||
216 | /* 226 missing */ | ||
217 | #define __NR_HPUX_cs 227 | ||
218 | #define __NR_HPUX_cds 228 | ||
219 | #define __NR_HPUX_set_no_trunc 229 | ||
220 | #define __NR_HPUX_pathconf 230 | ||
221 | #define __NR_HPUX_fpathconf 231 | ||
222 | /* 232, 233 missing */ | ||
223 | #define __NR_HPUX_nfs_fcntl 234 | ||
224 | #define __NR_HPUX_ogetacl 235 | ||
225 | #define __NR_HPUX_ofgetacl 236 | ||
226 | #define __NR_HPUX_osetacl 237 | ||
227 | #define __NR_HPUX_ofsetacl 238 | ||
228 | #define __NR_HPUX_pstat 239 | ||
229 | #define __NR_HPUX_getaudid 240 | ||
230 | #define __NR_HPUX_setaudid 241 | ||
231 | #define __NR_HPUX_getaudproc 242 | ||
232 | #define __NR_HPUX_setaudproc 243 | ||
233 | #define __NR_HPUX_getevent 244 | ||
234 | #define __NR_HPUX_setevent 245 | ||
235 | #define __NR_HPUX_audwrite 246 | ||
236 | #define __NR_HPUX_audswitch 247 | ||
237 | #define __NR_HPUX_audctl 248 | ||
238 | #define __NR_HPUX_ogetaccess 249 | ||
239 | #define __NR_HPUX_fsctl 250 | ||
240 | /* 251 - 258 missing */ | ||
241 | #define __NR_HPUX_swapfs 259 | ||
242 | #define __NR_HPUX_fss 260 | ||
243 | /* 261 - 266 missing */ | ||
244 | #define __NR_HPUX_tsync 267 | ||
245 | #define __NR_HPUX_getnumfds 268 | ||
246 | #define __NR_HPUX_poll 269 | ||
247 | #define __NR_HPUX_getmsg 270 | ||
248 | #define __NR_HPUX_putmsg 271 | ||
249 | #define __NR_HPUX_fchdir 272 | ||
250 | #define __NR_HPUX_getmount_cnt 273 | ||
251 | #define __NR_HPUX_getmount_entry 274 | ||
252 | #define __NR_HPUX_accept 275 | ||
253 | #define __NR_HPUX_bind 276 | ||
254 | #define __NR_HPUX_connect 277 | ||
255 | #define __NR_HPUX_getpeername 278 | ||
256 | #define __NR_HPUX_getsockname 279 | ||
257 | #define __NR_HPUX_getsockopt 280 | ||
258 | #define __NR_HPUX_listen 281 | ||
259 | #define __NR_HPUX_recv 282 | ||
260 | #define __NR_HPUX_recvfrom 283 | ||
261 | #define __NR_HPUX_recvmsg 284 | ||
262 | #define __NR_HPUX_send 285 | ||
263 | #define __NR_HPUX_sendmsg 286 | ||
264 | #define __NR_HPUX_sendto 287 | ||
265 | #define __NR_HPUX_setsockopt 288 | ||
266 | #define __NR_HPUX_shutdown 289 | ||
267 | #define __NR_HPUX_socket 290 | ||
268 | #define __NR_HPUX_socketpair 291 | ||
269 | #define __NR_HPUX_proc_open 292 | ||
270 | #define __NR_HPUX_proc_close 293 | ||
271 | #define __NR_HPUX_proc_send 294 | ||
272 | #define __NR_HPUX_proc_recv 295 | ||
273 | #define __NR_HPUX_proc_sendrecv 296 | ||
274 | #define __NR_HPUX_proc_syscall 297 | ||
275 | /* 298 - 311 missing */ | ||
276 | #define __NR_HPUX_semctl 312 | ||
277 | #define __NR_HPUX_msgctl 313 | ||
278 | #define __NR_HPUX_shmctl 314 | ||
279 | #define __NR_HPUX_mpctl 315 | ||
280 | #define __NR_HPUX_exportfs 316 | ||
281 | #define __NR_HPUX_getpmsg 317 | ||
282 | #define __NR_HPUX_putpmsg 318 | ||
283 | /* 319 missing */ | ||
284 | #define __NR_HPUX_msync 320 | ||
285 | #define __NR_HPUX_msleep 321 | ||
286 | #define __NR_HPUX_mwakeup 322 | ||
287 | #define __NR_HPUX_msem_init 323 | ||
288 | #define __NR_HPUX_msem_remove 324 | ||
289 | #define __NR_HPUX_adjtime 325 | ||
290 | #define __NR_HPUX_kload 326 | ||
291 | #define __NR_HPUX_fattach 327 | ||
292 | #define __NR_HPUX_fdetach 328 | ||
293 | #define __NR_HPUX_serialize 329 | ||
294 | #define __NR_HPUX_statvfs 330 | ||
295 | #define __NR_HPUX_fstatvfs 331 | ||
296 | #define __NR_HPUX_lchown 332 | ||
297 | #define __NR_HPUX_getsid 333 | ||
298 | #define __NR_HPUX_sysfs 334 | ||
299 | /* 335, 336 missing */ | ||
300 | #define __NR_HPUX_sched_setparam 337 | ||
301 | #define __NR_HPUX_sched_getparam 338 | ||
302 | #define __NR_HPUX_sched_setscheduler 339 | ||
303 | #define __NR_HPUX_sched_getscheduler 340 | ||
304 | #define __NR_HPUX_sched_yield 341 | ||
305 | #define __NR_HPUX_sched_get_priority_max 342 | ||
306 | #define __NR_HPUX_sched_get_priority_min 343 | ||
307 | #define __NR_HPUX_sched_rr_get_interval 344 | ||
308 | #define __NR_HPUX_clock_settime 345 | ||
309 | #define __NR_HPUX_clock_gettime 346 | ||
310 | #define __NR_HPUX_clock_getres 347 | ||
311 | #define __NR_HPUX_timer_create 348 | ||
312 | #define __NR_HPUX_timer_delete 349 | ||
313 | #define __NR_HPUX_timer_settime 350 | ||
314 | #define __NR_HPUX_timer_gettime 351 | ||
315 | #define __NR_HPUX_timer_getoverrun 352 | ||
316 | #define __NR_HPUX_nanosleep 353 | ||
317 | #define __NR_HPUX_toolbox 354 | ||
318 | /* 355 missing */ | ||
319 | #define __NR_HPUX_getdents 356 | ||
320 | #define __NR_HPUX_getcontext 357 | ||
321 | #define __NR_HPUX_sysinfo 358 | ||
322 | #define __NR_HPUX_fcntl64 359 | ||
323 | #define __NR_HPUX_ftruncate64 360 | ||
324 | #define __NR_HPUX_fstat64 361 | ||
325 | #define __NR_HPUX_getdirentries64 362 | ||
326 | #define __NR_HPUX_getrlimit64 363 | ||
327 | #define __NR_HPUX_lockf64 364 | ||
328 | #define __NR_HPUX_lseek64 365 | ||
329 | #define __NR_HPUX_lstat64 366 | ||
330 | #define __NR_HPUX_mmap64 367 | ||
331 | #define __NR_HPUX_setrlimit64 368 | ||
332 | #define __NR_HPUX_stat64 369 | ||
333 | #define __NR_HPUX_truncate64 370 | ||
334 | #define __NR_HPUX_ulimit64 371 | ||
335 | #define __NR_HPUX_pread 372 | ||
336 | #define __NR_HPUX_preadv 373 | ||
337 | #define __NR_HPUX_pwrite 374 | ||
338 | #define __NR_HPUX_pwritev 375 | ||
339 | #define __NR_HPUX_pread64 376 | ||
340 | #define __NR_HPUX_preadv64 377 | ||
341 | #define __NR_HPUX_pwrite64 378 | ||
342 | #define __NR_HPUX_pwritev64 379 | ||
343 | #define __NR_HPUX_setcontext 380 | ||
344 | #define __NR_HPUX_sigaltstack 381 | ||
345 | #define __NR_HPUX_waitid 382 | ||
346 | #define __NR_HPUX_setpgrp 383 | ||
347 | #define __NR_HPUX_recvmsg2 384 | ||
348 | #define __NR_HPUX_sendmsg2 385 | ||
349 | #define __NR_HPUX_socket2 386 | ||
350 | #define __NR_HPUX_socketpair2 387 | ||
351 | #define __NR_HPUX_setregid 388 | ||
352 | #define __NR_HPUX_lwp_create 389 | ||
353 | #define __NR_HPUX_lwp_terminate 390 | ||
354 | #define __NR_HPUX_lwp_wait 391 | ||
355 | #define __NR_HPUX_lwp_suspend 392 | ||
356 | #define __NR_HPUX_lwp_resume 393 | ||
357 | /* 394 missing */ | ||
358 | #define __NR_HPUX_lwp_abort_syscall 395 | ||
359 | #define __NR_HPUX_lwp_info 396 | ||
360 | #define __NR_HPUX_lwp_kill 397 | ||
361 | #define __NR_HPUX_ksleep 398 | ||
362 | #define __NR_HPUX_kwakeup 399 | ||
363 | /* 400 missing */ | ||
364 | #define __NR_HPUX_pstat_getlwp 401 | ||
365 | #define __NR_HPUX_lwp_exit 402 | ||
366 | #define __NR_HPUX_lwp_continue 403 | ||
367 | #define __NR_HPUX_getacl 404 | ||
368 | #define __NR_HPUX_fgetacl 405 | ||
369 | #define __NR_HPUX_setacl 406 | ||
370 | #define __NR_HPUX_fsetacl 407 | ||
371 | #define __NR_HPUX_getaccess 408 | ||
372 | #define __NR_HPUX_lwp_mutex_init 409 | ||
373 | #define __NR_HPUX_lwp_mutex_lock_sys 410 | ||
374 | #define __NR_HPUX_lwp_mutex_unlock 411 | ||
375 | #define __NR_HPUX_lwp_cond_init 412 | ||
376 | #define __NR_HPUX_lwp_cond_signal 413 | ||
377 | #define __NR_HPUX_lwp_cond_broadcast 414 | ||
378 | #define __NR_HPUX_lwp_cond_wait_sys 415 | ||
379 | #define __NR_HPUX_lwp_getscheduler 416 | ||
380 | #define __NR_HPUX_lwp_setscheduler 417 | ||
381 | #define __NR_HPUX_lwp_getstate 418 | ||
382 | #define __NR_HPUX_lwp_setstate 419 | ||
383 | #define __NR_HPUX_lwp_detach 420 | ||
384 | #define __NR_HPUX_mlock 421 | ||
385 | #define __NR_HPUX_munlock 422 | ||
386 | #define __NR_HPUX_mlockall 423 | ||
387 | #define __NR_HPUX_munlockall 424 | ||
388 | #define __NR_HPUX_shm_open 425 | ||
389 | #define __NR_HPUX_shm_unlink 426 | ||
390 | #define __NR_HPUX_sigqueue 427 | ||
391 | #define __NR_HPUX_sigwaitinfo 428 | ||
392 | #define __NR_HPUX_sigtimedwait 429 | ||
393 | #define __NR_HPUX_sigwait 430 | ||
394 | #define __NR_HPUX_aio_read 431 | ||
395 | #define __NR_HPUX_aio_write 432 | ||
396 | #define __NR_HPUX_lio_listio 433 | ||
397 | #define __NR_HPUX_aio_error 434 | ||
398 | #define __NR_HPUX_aio_return 435 | ||
399 | #define __NR_HPUX_aio_cancel 436 | ||
400 | #define __NR_HPUX_aio_suspend 437 | ||
401 | #define __NR_HPUX_aio_fsync 438 | ||
402 | #define __NR_HPUX_mq_open 439 | ||
403 | #define __NR_HPUX_mq_close 440 | ||
404 | #define __NR_HPUX_mq_unlink 441 | ||
405 | #define __NR_HPUX_mq_send 442 | ||
406 | #define __NR_HPUX_mq_receive 443 | ||
407 | #define __NR_HPUX_mq_notify 444 | ||
408 | #define __NR_HPUX_mq_setattr 445 | ||
409 | #define __NR_HPUX_mq_getattr 446 | ||
410 | #define __NR_HPUX_ksem_open 447 | ||
411 | #define __NR_HPUX_ksem_unlink 448 | ||
412 | #define __NR_HPUX_ksem_close 449 | ||
413 | #define __NR_HPUX_ksem_post 450 | ||
414 | #define __NR_HPUX_ksem_wait 451 | ||
415 | #define __NR_HPUX_ksem_read 452 | ||
416 | #define __NR_HPUX_ksem_trywait 453 | ||
417 | #define __NR_HPUX_lwp_rwlock_init 454 | ||
418 | #define __NR_HPUX_lwp_rwlock_destroy 455 | ||
419 | #define __NR_HPUX_lwp_rwlock_rdlock_sys 456 | ||
420 | #define __NR_HPUX_lwp_rwlock_wrlock_sys 457 | ||
421 | #define __NR_HPUX_lwp_rwlock_tryrdlock 458 | ||
422 | #define __NR_HPUX_lwp_rwlock_trywrlock 459 | ||
423 | #define __NR_HPUX_lwp_rwlock_unlock 460 | ||
424 | #define __NR_HPUX_ttrace 461 | ||
425 | #define __NR_HPUX_ttrace_wait 462 | ||
426 | #define __NR_HPUX_lf_wire_mem 463 | ||
427 | #define __NR_HPUX_lf_unwire_mem 464 | ||
428 | #define __NR_HPUX_lf_send_pin_map 465 | ||
429 | #define __NR_HPUX_lf_free_buf 466 | ||
430 | #define __NR_HPUX_lf_wait_nq 467 | ||
431 | #define __NR_HPUX_lf_wakeup_conn_q 468 | ||
432 | #define __NR_HPUX_lf_unused 469 | ||
433 | #define __NR_HPUX_lwp_sema_init 470 | ||
434 | #define __NR_HPUX_lwp_sema_post 471 | ||
435 | #define __NR_HPUX_lwp_sema_wait 472 | ||
436 | #define __NR_HPUX_lwp_sema_trywait 473 | ||
437 | #define __NR_HPUX_lwp_sema_destroy 474 | ||
438 | #define __NR_HPUX_statvfs64 475 | ||
439 | #define __NR_HPUX_fstatvfs64 476 | ||
440 | #define __NR_HPUX_msh_register 477 | ||
441 | #define __NR_HPUX_ptrace64 478 | ||
442 | #define __NR_HPUX_sendfile 479 | ||
443 | #define __NR_HPUX_sendpath 480 | ||
444 | #define __NR_HPUX_sendfile64 481 | ||
445 | #define __NR_HPUX_sendpath64 482 | ||
446 | #define __NR_HPUX_modload 483 | ||
447 | #define __NR_HPUX_moduload 484 | ||
448 | #define __NR_HPUX_modpath 485 | ||
449 | #define __NR_HPUX_getksym 486 | ||
450 | #define __NR_HPUX_modadm 487 | ||
451 | #define __NR_HPUX_modstat 488 | ||
452 | #define __NR_HPUX_lwp_detached_exit 489 | ||
453 | #define __NR_HPUX_crashconf 490 | ||
454 | #define __NR_HPUX_siginhibit 491 | ||
455 | #define __NR_HPUX_sigenable 492 | ||
456 | #define __NR_HPUX_spuctl 493 | ||
457 | #define __NR_HPUX_zerokernelsum 494 | ||
458 | #define __NR_HPUX_nfs_kstat 495 | ||
459 | #define __NR_HPUX_aio_read64 496 | ||
460 | #define __NR_HPUX_aio_write64 497 | ||
461 | #define __NR_HPUX_aio_error64 498 | ||
462 | #define __NR_HPUX_aio_return64 499 | ||
463 | #define __NR_HPUX_aio_cancel64 500 | ||
464 | #define __NR_HPUX_aio_suspend64 501 | ||
465 | #define __NR_HPUX_aio_fsync64 502 | ||
466 | #define __NR_HPUX_lio_listio64 503 | ||
467 | #define __NR_HPUX_recv2 504 | ||
468 | #define __NR_HPUX_recvfrom2 505 | ||
469 | #define __NR_HPUX_send2 506 | ||
470 | #define __NR_HPUX_sendto2 507 | ||
471 | #define __NR_HPUX_acl 508 | ||
472 | #define __NR_HPUX___cnx_p2p_ctl 509 | ||
473 | #define __NR_HPUX___cnx_gsched_ctl 510 | ||
474 | #define __NR_HPUX___cnx_pmon_ctl 511 | ||
475 | |||
476 | #define __NR_HPUX_syscalls 512 | ||
477 | |||
478 | /* | ||
479 | * Linux system call numbers. | ||
480 | * | ||
481 | * Cary Coutant says that we should just use another syscall gateway | ||
482 | * page to avoid clashing with the HPUX space, and I think he's right: | ||
483 | * it will would keep a branch out of our syscall entry path, at the | ||
484 | * very least. If we decide to change it later, we can ``just'' tweak | ||
485 | * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be | ||
486 | * 1024 or something. Oh, and recompile libc. =) | ||
487 | * | ||
488 | * 64-bit HPUX binaries get the syscall gateway address passed in a register | ||
489 | * from the kernel at startup, which seems a sane strategy. | ||
490 | */ | ||
491 | |||
492 | #define __NR_Linux 0 | ||
493 | #define __NR_restart_syscall (__NR_Linux + 0) | ||
494 | #define __NR_exit (__NR_Linux + 1) | ||
495 | #define __NR_fork (__NR_Linux + 2) | ||
496 | #define __NR_read (__NR_Linux + 3) | ||
497 | #define __NR_write (__NR_Linux + 4) | ||
498 | #define __NR_open (__NR_Linux + 5) | ||
499 | #define __NR_close (__NR_Linux + 6) | ||
500 | #define __NR_waitpid (__NR_Linux + 7) | ||
501 | #define __NR_creat (__NR_Linux + 8) | ||
502 | #define __NR_link (__NR_Linux + 9) | ||
503 | #define __NR_unlink (__NR_Linux + 10) | ||
504 | #define __NR_execve (__NR_Linux + 11) | ||
505 | #define __NR_chdir (__NR_Linux + 12) | ||
506 | #define __NR_time (__NR_Linux + 13) | ||
507 | #define __NR_mknod (__NR_Linux + 14) | ||
508 | #define __NR_chmod (__NR_Linux + 15) | ||
509 | #define __NR_lchown (__NR_Linux + 16) | ||
510 | #define __NR_socket (__NR_Linux + 17) | ||
511 | #define __NR_stat (__NR_Linux + 18) | ||
512 | #define __NR_lseek (__NR_Linux + 19) | ||
513 | #define __NR_getpid (__NR_Linux + 20) | ||
514 | #define __NR_mount (__NR_Linux + 21) | ||
515 | #define __NR_bind (__NR_Linux + 22) | ||
516 | #define __NR_setuid (__NR_Linux + 23) | ||
517 | #define __NR_getuid (__NR_Linux + 24) | ||
518 | #define __NR_stime (__NR_Linux + 25) | ||
519 | #define __NR_ptrace (__NR_Linux + 26) | ||
520 | #define __NR_alarm (__NR_Linux + 27) | ||
521 | #define __NR_fstat (__NR_Linux + 28) | ||
522 | #define __NR_pause (__NR_Linux + 29) | ||
523 | #define __NR_utime (__NR_Linux + 30) | ||
524 | #define __NR_connect (__NR_Linux + 31) | ||
525 | #define __NR_listen (__NR_Linux + 32) | ||
526 | #define __NR_access (__NR_Linux + 33) | ||
527 | #define __NR_nice (__NR_Linux + 34) | ||
528 | #define __NR_accept (__NR_Linux + 35) | ||
529 | #define __NR_sync (__NR_Linux + 36) | ||
530 | #define __NR_kill (__NR_Linux + 37) | ||
531 | #define __NR_rename (__NR_Linux + 38) | ||
532 | #define __NR_mkdir (__NR_Linux + 39) | ||
533 | #define __NR_rmdir (__NR_Linux + 40) | ||
534 | #define __NR_dup (__NR_Linux + 41) | ||
535 | #define __NR_pipe (__NR_Linux + 42) | ||
536 | #define __NR_times (__NR_Linux + 43) | ||
537 | #define __NR_getsockname (__NR_Linux + 44) | ||
538 | #define __NR_brk (__NR_Linux + 45) | ||
539 | #define __NR_setgid (__NR_Linux + 46) | ||
540 | #define __NR_getgid (__NR_Linux + 47) | ||
541 | #define __NR_signal (__NR_Linux + 48) | ||
542 | #define __NR_geteuid (__NR_Linux + 49) | ||
543 | #define __NR_getegid (__NR_Linux + 50) | ||
544 | #define __NR_acct (__NR_Linux + 51) | ||
545 | #define __NR_umount2 (__NR_Linux + 52) | ||
546 | #define __NR_getpeername (__NR_Linux + 53) | ||
547 | #define __NR_ioctl (__NR_Linux + 54) | ||
548 | #define __NR_fcntl (__NR_Linux + 55) | ||
549 | #define __NR_socketpair (__NR_Linux + 56) | ||
550 | #define __NR_setpgid (__NR_Linux + 57) | ||
551 | #define __NR_send (__NR_Linux + 58) | ||
552 | #define __NR_uname (__NR_Linux + 59) | ||
553 | #define __NR_umask (__NR_Linux + 60) | ||
554 | #define __NR_chroot (__NR_Linux + 61) | ||
555 | #define __NR_ustat (__NR_Linux + 62) | ||
556 | #define __NR_dup2 (__NR_Linux + 63) | ||
557 | #define __NR_getppid (__NR_Linux + 64) | ||
558 | #define __NR_getpgrp (__NR_Linux + 65) | ||
559 | #define __NR_setsid (__NR_Linux + 66) | ||
560 | #define __NR_pivot_root (__NR_Linux + 67) | ||
561 | #define __NR_sgetmask (__NR_Linux + 68) | ||
562 | #define __NR_ssetmask (__NR_Linux + 69) | ||
563 | #define __NR_setreuid (__NR_Linux + 70) | ||
564 | #define __NR_setregid (__NR_Linux + 71) | ||
565 | #define __NR_mincore (__NR_Linux + 72) | ||
566 | #define __NR_sigpending (__NR_Linux + 73) | ||
567 | #define __NR_sethostname (__NR_Linux + 74) | ||
568 | #define __NR_setrlimit (__NR_Linux + 75) | ||
569 | #define __NR_getrlimit (__NR_Linux + 76) | ||
570 | #define __NR_getrusage (__NR_Linux + 77) | ||
571 | #define __NR_gettimeofday (__NR_Linux + 78) | ||
572 | #define __NR_settimeofday (__NR_Linux + 79) | ||
573 | #define __NR_getgroups (__NR_Linux + 80) | ||
574 | #define __NR_setgroups (__NR_Linux + 81) | ||
575 | #define __NR_sendto (__NR_Linux + 82) | ||
576 | #define __NR_symlink (__NR_Linux + 83) | ||
577 | #define __NR_lstat (__NR_Linux + 84) | ||
578 | #define __NR_readlink (__NR_Linux + 85) | ||
579 | #define __NR_uselib (__NR_Linux + 86) | ||
580 | #define __NR_swapon (__NR_Linux + 87) | ||
581 | #define __NR_reboot (__NR_Linux + 88) | ||
582 | #define __NR_mmap2 (__NR_Linux + 89) | ||
583 | #define __NR_mmap (__NR_Linux + 90) | ||
584 | #define __NR_munmap (__NR_Linux + 91) | ||
585 | #define __NR_truncate (__NR_Linux + 92) | ||
586 | #define __NR_ftruncate (__NR_Linux + 93) | ||
587 | #define __NR_fchmod (__NR_Linux + 94) | ||
588 | #define __NR_fchown (__NR_Linux + 95) | ||
589 | #define __NR_getpriority (__NR_Linux + 96) | ||
590 | #define __NR_setpriority (__NR_Linux + 97) | ||
591 | #define __NR_recv (__NR_Linux + 98) | ||
592 | #define __NR_statfs (__NR_Linux + 99) | ||
593 | #define __NR_fstatfs (__NR_Linux + 100) | ||
594 | #define __NR_stat64 (__NR_Linux + 101) | ||
595 | /* #define __NR_socketcall (__NR_Linux + 102) */ | ||
596 | #define __NR_syslog (__NR_Linux + 103) | ||
597 | #define __NR_setitimer (__NR_Linux + 104) | ||
598 | #define __NR_getitimer (__NR_Linux + 105) | ||
599 | #define __NR_capget (__NR_Linux + 106) | ||
600 | #define __NR_capset (__NR_Linux + 107) | ||
601 | #define __NR_pread64 (__NR_Linux + 108) | ||
602 | #define __NR_pwrite64 (__NR_Linux + 109) | ||
603 | #define __NR_getcwd (__NR_Linux + 110) | ||
604 | #define __NR_vhangup (__NR_Linux + 111) | ||
605 | #define __NR_fstat64 (__NR_Linux + 112) | ||
606 | #define __NR_vfork (__NR_Linux + 113) | ||
607 | #define __NR_wait4 (__NR_Linux + 114) | ||
608 | #define __NR_swapoff (__NR_Linux + 115) | ||
609 | #define __NR_sysinfo (__NR_Linux + 116) | ||
610 | #define __NR_shutdown (__NR_Linux + 117) | ||
611 | #define __NR_fsync (__NR_Linux + 118) | ||
612 | #define __NR_madvise (__NR_Linux + 119) | ||
613 | #define __NR_clone (__NR_Linux + 120) | ||
614 | #define __NR_setdomainname (__NR_Linux + 121) | ||
615 | #define __NR_sendfile (__NR_Linux + 122) | ||
616 | #define __NR_recvfrom (__NR_Linux + 123) | ||
617 | #define __NR_adjtimex (__NR_Linux + 124) | ||
618 | #define __NR_mprotect (__NR_Linux + 125) | ||
619 | #define __NR_sigprocmask (__NR_Linux + 126) | ||
620 | #define __NR_create_module (__NR_Linux + 127) | ||
621 | #define __NR_init_module (__NR_Linux + 128) | ||
622 | #define __NR_delete_module (__NR_Linux + 129) | ||
623 | #define __NR_get_kernel_syms (__NR_Linux + 130) | ||
624 | #define __NR_quotactl (__NR_Linux + 131) | ||
625 | #define __NR_getpgid (__NR_Linux + 132) | ||
626 | #define __NR_fchdir (__NR_Linux + 133) | ||
627 | #define __NR_bdflush (__NR_Linux + 134) | ||
628 | #define __NR_sysfs (__NR_Linux + 135) | ||
629 | #define __NR_personality (__NR_Linux + 136) | ||
630 | #define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */ | ||
631 | #define __NR_setfsuid (__NR_Linux + 138) | ||
632 | #define __NR_setfsgid (__NR_Linux + 139) | ||
633 | #define __NR__llseek (__NR_Linux + 140) | ||
634 | #define __NR_getdents (__NR_Linux + 141) | ||
635 | #define __NR__newselect (__NR_Linux + 142) | ||
636 | #define __NR_flock (__NR_Linux + 143) | ||
637 | #define __NR_msync (__NR_Linux + 144) | ||
638 | #define __NR_readv (__NR_Linux + 145) | ||
639 | #define __NR_writev (__NR_Linux + 146) | ||
640 | #define __NR_getsid (__NR_Linux + 147) | ||
641 | #define __NR_fdatasync (__NR_Linux + 148) | ||
642 | #define __NR__sysctl (__NR_Linux + 149) | ||
643 | #define __NR_mlock (__NR_Linux + 150) | ||
644 | #define __NR_munlock (__NR_Linux + 151) | ||
645 | #define __NR_mlockall (__NR_Linux + 152) | ||
646 | #define __NR_munlockall (__NR_Linux + 153) | ||
647 | #define __NR_sched_setparam (__NR_Linux + 154) | ||
648 | #define __NR_sched_getparam (__NR_Linux + 155) | ||
649 | #define __NR_sched_setscheduler (__NR_Linux + 156) | ||
650 | #define __NR_sched_getscheduler (__NR_Linux + 157) | ||
651 | #define __NR_sched_yield (__NR_Linux + 158) | ||
652 | #define __NR_sched_get_priority_max (__NR_Linux + 159) | ||
653 | #define __NR_sched_get_priority_min (__NR_Linux + 160) | ||
654 | #define __NR_sched_rr_get_interval (__NR_Linux + 161) | ||
655 | #define __NR_nanosleep (__NR_Linux + 162) | ||
656 | #define __NR_mremap (__NR_Linux + 163) | ||
657 | #define __NR_setresuid (__NR_Linux + 164) | ||
658 | #define __NR_getresuid (__NR_Linux + 165) | ||
659 | #define __NR_sigaltstack (__NR_Linux + 166) | ||
660 | #define __NR_query_module (__NR_Linux + 167) | ||
661 | #define __NR_poll (__NR_Linux + 168) | ||
662 | #define __NR_nfsservctl (__NR_Linux + 169) | ||
663 | #define __NR_setresgid (__NR_Linux + 170) | ||
664 | #define __NR_getresgid (__NR_Linux + 171) | ||
665 | #define __NR_prctl (__NR_Linux + 172) | ||
666 | #define __NR_rt_sigreturn (__NR_Linux + 173) | ||
667 | #define __NR_rt_sigaction (__NR_Linux + 174) | ||
668 | #define __NR_rt_sigprocmask (__NR_Linux + 175) | ||
669 | #define __NR_rt_sigpending (__NR_Linux + 176) | ||
670 | #define __NR_rt_sigtimedwait (__NR_Linux + 177) | ||
671 | #define __NR_rt_sigqueueinfo (__NR_Linux + 178) | ||
672 | #define __NR_rt_sigsuspend (__NR_Linux + 179) | ||
673 | #define __NR_chown (__NR_Linux + 180) | ||
674 | #define __NR_setsockopt (__NR_Linux + 181) | ||
675 | #define __NR_getsockopt (__NR_Linux + 182) | ||
676 | #define __NR_sendmsg (__NR_Linux + 183) | ||
677 | #define __NR_recvmsg (__NR_Linux + 184) | ||
678 | #define __NR_semop (__NR_Linux + 185) | ||
679 | #define __NR_semget (__NR_Linux + 186) | ||
680 | #define __NR_semctl (__NR_Linux + 187) | ||
681 | #define __NR_msgsnd (__NR_Linux + 188) | ||
682 | #define __NR_msgrcv (__NR_Linux + 189) | ||
683 | #define __NR_msgget (__NR_Linux + 190) | ||
684 | #define __NR_msgctl (__NR_Linux + 191) | ||
685 | #define __NR_shmat (__NR_Linux + 192) | ||
686 | #define __NR_shmdt (__NR_Linux + 193) | ||
687 | #define __NR_shmget (__NR_Linux + 194) | ||
688 | #define __NR_shmctl (__NR_Linux + 195) | ||
689 | |||
690 | #define __NR_getpmsg (__NR_Linux + 196) /* Somebody *wants* streams? */ | ||
691 | #define __NR_putpmsg (__NR_Linux + 197) | ||
692 | |||
693 | #define __NR_lstat64 (__NR_Linux + 198) | ||
694 | #define __NR_truncate64 (__NR_Linux + 199) | ||
695 | #define __NR_ftruncate64 (__NR_Linux + 200) | ||
696 | #define __NR_getdents64 (__NR_Linux + 201) | ||
697 | #define __NR_fcntl64 (__NR_Linux + 202) | ||
698 | #define __NR_attrctl (__NR_Linux + 203) | ||
699 | #define __NR_acl_get (__NR_Linux + 204) | ||
700 | #define __NR_acl_set (__NR_Linux + 205) | ||
701 | #define __NR_gettid (__NR_Linux + 206) | ||
702 | #define __NR_readahead (__NR_Linux + 207) | ||
703 | #define __NR_tkill (__NR_Linux + 208) | ||
704 | #define __NR_sendfile64 (__NR_Linux + 209) | ||
705 | #define __NR_futex (__NR_Linux + 210) | ||
706 | #define __NR_sched_setaffinity (__NR_Linux + 211) | ||
707 | #define __NR_sched_getaffinity (__NR_Linux + 212) | ||
708 | #define __NR_set_thread_area (__NR_Linux + 213) | ||
709 | #define __NR_get_thread_area (__NR_Linux + 214) | ||
710 | #define __NR_io_setup (__NR_Linux + 215) | ||
711 | #define __NR_io_destroy (__NR_Linux + 216) | ||
712 | #define __NR_io_getevents (__NR_Linux + 217) | ||
713 | #define __NR_io_submit (__NR_Linux + 218) | ||
714 | #define __NR_io_cancel (__NR_Linux + 219) | ||
715 | #define __NR_alloc_hugepages (__NR_Linux + 220) | ||
716 | #define __NR_free_hugepages (__NR_Linux + 221) | ||
717 | #define __NR_exit_group (__NR_Linux + 222) | ||
718 | #define __NR_lookup_dcookie (__NR_Linux + 223) | ||
719 | #define __NR_epoll_create (__NR_Linux + 224) | ||
720 | #define __NR_epoll_ctl (__NR_Linux + 225) | ||
721 | #define __NR_epoll_wait (__NR_Linux + 226) | ||
722 | #define __NR_remap_file_pages (__NR_Linux + 227) | ||
723 | #define __NR_semtimedop (__NR_Linux + 228) | ||
724 | #define __NR_mq_open (__NR_Linux + 229) | ||
725 | #define __NR_mq_unlink (__NR_Linux + 230) | ||
726 | #define __NR_mq_timedsend (__NR_Linux + 231) | ||
727 | #define __NR_mq_timedreceive (__NR_Linux + 232) | ||
728 | #define __NR_mq_notify (__NR_Linux + 233) | ||
729 | #define __NR_mq_getsetattr (__NR_Linux + 234) | ||
730 | #define __NR_waitid (__NR_Linux + 235) | ||
731 | #define __NR_fadvise64_64 (__NR_Linux + 236) | ||
732 | #define __NR_set_tid_address (__NR_Linux + 237) | ||
733 | #define __NR_setxattr (__NR_Linux + 238) | ||
734 | #define __NR_lsetxattr (__NR_Linux + 239) | ||
735 | #define __NR_fsetxattr (__NR_Linux + 240) | ||
736 | #define __NR_getxattr (__NR_Linux + 241) | ||
737 | #define __NR_lgetxattr (__NR_Linux + 242) | ||
738 | #define __NR_fgetxattr (__NR_Linux + 243) | ||
739 | #define __NR_listxattr (__NR_Linux + 244) | ||
740 | #define __NR_llistxattr (__NR_Linux + 245) | ||
741 | #define __NR_flistxattr (__NR_Linux + 246) | ||
742 | #define __NR_removexattr (__NR_Linux + 247) | ||
743 | #define __NR_lremovexattr (__NR_Linux + 248) | ||
744 | #define __NR_fremovexattr (__NR_Linux + 249) | ||
745 | #define __NR_timer_create (__NR_Linux + 250) | ||
746 | #define __NR_timer_settime (__NR_Linux + 251) | ||
747 | #define __NR_timer_gettime (__NR_Linux + 252) | ||
748 | #define __NR_timer_getoverrun (__NR_Linux + 253) | ||
749 | #define __NR_timer_delete (__NR_Linux + 254) | ||
750 | #define __NR_clock_settime (__NR_Linux + 255) | ||
751 | #define __NR_clock_gettime (__NR_Linux + 256) | ||
752 | #define __NR_clock_getres (__NR_Linux + 257) | ||
753 | #define __NR_clock_nanosleep (__NR_Linux + 258) | ||
754 | #define __NR_tgkill (__NR_Linux + 259) | ||
755 | #define __NR_mbind (__NR_Linux + 260) | ||
756 | #define __NR_get_mempolicy (__NR_Linux + 261) | ||
757 | #define __NR_set_mempolicy (__NR_Linux + 262) | ||
758 | #define __NR_vserver (__NR_Linux + 263) | ||
759 | #define __NR_add_key (__NR_Linux + 264) | ||
760 | #define __NR_request_key (__NR_Linux + 265) | ||
761 | #define __NR_keyctl (__NR_Linux + 266) | ||
762 | #define __NR_ioprio_set (__NR_Linux + 267) | ||
763 | #define __NR_ioprio_get (__NR_Linux + 268) | ||
764 | #define __NR_inotify_init (__NR_Linux + 269) | ||
765 | #define __NR_inotify_add_watch (__NR_Linux + 270) | ||
766 | #define __NR_inotify_rm_watch (__NR_Linux + 271) | ||
767 | #define __NR_migrate_pages (__NR_Linux + 272) | ||
768 | #define __NR_pselect6 (__NR_Linux + 273) | ||
769 | #define __NR_ppoll (__NR_Linux + 274) | ||
770 | #define __NR_openat (__NR_Linux + 275) | ||
771 | #define __NR_mkdirat (__NR_Linux + 276) | ||
772 | #define __NR_mknodat (__NR_Linux + 277) | ||
773 | #define __NR_fchownat (__NR_Linux + 278) | ||
774 | #define __NR_futimesat (__NR_Linux + 279) | ||
775 | #define __NR_fstatat64 (__NR_Linux + 280) | ||
776 | #define __NR_unlinkat (__NR_Linux + 281) | ||
777 | #define __NR_renameat (__NR_Linux + 282) | ||
778 | #define __NR_linkat (__NR_Linux + 283) | ||
779 | #define __NR_symlinkat (__NR_Linux + 284) | ||
780 | #define __NR_readlinkat (__NR_Linux + 285) | ||
781 | #define __NR_fchmodat (__NR_Linux + 286) | ||
782 | #define __NR_faccessat (__NR_Linux + 287) | ||
783 | #define __NR_unshare (__NR_Linux + 288) | ||
784 | #define __NR_set_robust_list (__NR_Linux + 289) | ||
785 | #define __NR_get_robust_list (__NR_Linux + 290) | ||
786 | #define __NR_splice (__NR_Linux + 291) | ||
787 | #define __NR_sync_file_range (__NR_Linux + 292) | ||
788 | #define __NR_tee (__NR_Linux + 293) | ||
789 | #define __NR_vmsplice (__NR_Linux + 294) | ||
790 | #define __NR_move_pages (__NR_Linux + 295) | ||
791 | #define __NR_getcpu (__NR_Linux + 296) | ||
792 | #define __NR_epoll_pwait (__NR_Linux + 297) | ||
793 | #define __NR_statfs64 (__NR_Linux + 298) | ||
794 | #define __NR_fstatfs64 (__NR_Linux + 299) | ||
795 | #define __NR_kexec_load (__NR_Linux + 300) | ||
796 | #define __NR_utimensat (__NR_Linux + 301) | ||
797 | #define __NR_signalfd (__NR_Linux + 302) | ||
798 | #define __NR_timerfd (__NR_Linux + 303) | ||
799 | #define __NR_eventfd (__NR_Linux + 304) | ||
800 | #define __NR_fallocate (__NR_Linux + 305) | ||
801 | #define __NR_timerfd_create (__NR_Linux + 306) | ||
802 | #define __NR_timerfd_settime (__NR_Linux + 307) | ||
803 | #define __NR_timerfd_gettime (__NR_Linux + 308) | ||
804 | #define __NR_signalfd4 (__NR_Linux + 309) | ||
805 | #define __NR_eventfd2 (__NR_Linux + 310) | ||
806 | #define __NR_epoll_create1 (__NR_Linux + 311) | ||
807 | #define __NR_dup3 (__NR_Linux + 312) | ||
808 | #define __NR_pipe2 (__NR_Linux + 313) | ||
809 | #define __NR_inotify_init1 (__NR_Linux + 314) | ||
810 | #define __NR_preadv (__NR_Linux + 315) | ||
811 | #define __NR_pwritev (__NR_Linux + 316) | ||
812 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 317) | ||
813 | #define __NR_perf_event_open (__NR_Linux + 318) | ||
814 | #define __NR_recvmmsg (__NR_Linux + 319) | ||
815 | #define __NR_accept4 (__NR_Linux + 320) | ||
816 | #define __NR_prlimit64 (__NR_Linux + 321) | ||
817 | #define __NR_fanotify_init (__NR_Linux + 322) | ||
818 | #define __NR_fanotify_mark (__NR_Linux + 323) | ||
819 | #define __NR_clock_adjtime (__NR_Linux + 324) | ||
820 | #define __NR_name_to_handle_at (__NR_Linux + 325) | ||
821 | #define __NR_open_by_handle_at (__NR_Linux + 326) | ||
822 | #define __NR_syncfs (__NR_Linux + 327) | ||
823 | #define __NR_setns (__NR_Linux + 328) | ||
824 | #define __NR_sendmmsg (__NR_Linux + 329) | ||
825 | |||
826 | #define __NR_Linux_syscalls (__NR_sendmmsg + 1) | ||
827 | |||
828 | |||
829 | #define __IGNORE_select /* newselect */ | ||
830 | #define __IGNORE_fadvise64 /* fadvise64_64 */ | ||
831 | #define __IGNORE_utimes /* utime */ | ||
832 | |||
833 | |||
834 | #define HPUX_GATEWAY_ADDR 0xC0000004 | ||
835 | #define LINUX_GATEWAY_ADDR 0x100 | ||
836 | 5 | ||
837 | #ifdef __KERNEL__ | ||
838 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
839 | 7 | ||
840 | #define SYS_ify(syscall_name) __NR_##syscall_name | 8 | #define SYS_ify(syscall_name) __NR_##syscall_name |
@@ -1008,5 +176,4 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ | |||
1008 | */ | 176 | */ |
1009 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 177 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
1010 | 178 | ||
1011 | #endif /* __KERNEL__ */ | ||
1012 | #endif /* _ASM_PARISC_UNISTD_H_ */ | 179 | #endif /* _ASM_PARISC_UNISTD_H_ */ |
diff --git a/arch/parisc/include/asm/user.h b/arch/parisc/include/asm/user.h deleted file mode 100644 index 80224753e508..000000000000 --- a/arch/parisc/include/asm/user.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* This file should not exist, but lots of generic code still includes | ||
2 | it. It's a hangover from old a.out days and the traditional core | ||
3 | dump format. We are ELF-only, and so are our core dumps. If we | ||
4 | need to support HP/UX core format then we'll do it here | ||
5 | eventually. */ | ||
diff --git a/arch/parisc/include/asm/vga.h b/arch/parisc/include/asm/vga.h deleted file mode 100644 index 171399a88ca6..000000000000 --- a/arch/parisc/include/asm/vga.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_PARISC_VGA_H__ | ||
2 | #define __ASM_PARISC_VGA_H__ | ||
3 | |||
4 | /* nothing */ | ||
5 | |||
6 | #endif /* __ASM_PARISC_VGA_H__ */ | ||
diff --git a/arch/parisc/include/asm/xor.h b/arch/parisc/include/asm/xor.h deleted file mode 100644 index c82eb12a5b18..000000000000 --- a/arch/parisc/include/asm/xor.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/xor.h> | ||
diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild index baebb3da1d44..a580642555b6 100644 --- a/arch/parisc/include/uapi/asm/Kbuild +++ b/arch/parisc/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,31 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += bitsperlong.h | ||
5 | header-y += byteorder.h | ||
6 | header-y += errno.h | ||
7 | header-y += fcntl.h | ||
8 | header-y += ioctl.h | ||
9 | header-y += ioctls.h | ||
10 | header-y += ipcbuf.h | ||
11 | header-y += mman.h | ||
12 | header-y += msgbuf.h | ||
13 | header-y += pdc.h | ||
14 | header-y += posix_types.h | ||
15 | header-y += ptrace.h | ||
16 | header-y += resource.h | ||
17 | header-y += sembuf.h | ||
18 | header-y += setup.h | ||
19 | header-y += shmbuf.h | ||
20 | header-y += sigcontext.h | ||
21 | header-y += siginfo.h | ||
22 | header-y += signal.h | ||
23 | header-y += socket.h | ||
24 | header-y += sockios.h | ||
25 | header-y += stat.h | ||
26 | header-y += statfs.h | ||
27 | header-y += swab.h | ||
28 | header-y += termbits.h | ||
29 | header-y += termios.h | ||
30 | header-y += types.h | ||
31 | header-y += unistd.h | ||
diff --git a/arch/parisc/include/asm/bitsperlong.h b/arch/parisc/include/uapi/asm/bitsperlong.h index 75196b415d3f..75196b415d3f 100644 --- a/arch/parisc/include/asm/bitsperlong.h +++ b/arch/parisc/include/uapi/asm/bitsperlong.h | |||
diff --git a/arch/parisc/include/asm/byteorder.h b/arch/parisc/include/uapi/asm/byteorder.h index 58af2c5f5d61..58af2c5f5d61 100644 --- a/arch/parisc/include/asm/byteorder.h +++ b/arch/parisc/include/uapi/asm/byteorder.h | |||
diff --git a/arch/parisc/include/asm/errno.h b/arch/parisc/include/uapi/asm/errno.h index 135ad6047e51..135ad6047e51 100644 --- a/arch/parisc/include/asm/errno.h +++ b/arch/parisc/include/uapi/asm/errno.h | |||
diff --git a/arch/parisc/include/asm/fcntl.h b/arch/parisc/include/uapi/asm/fcntl.h index 0304b92ccfea..0304b92ccfea 100644 --- a/arch/parisc/include/asm/fcntl.h +++ b/arch/parisc/include/uapi/asm/fcntl.h | |||
diff --git a/arch/parisc/include/asm/ioctl.h b/arch/parisc/include/uapi/asm/ioctl.h index ec8efa02beda..ec8efa02beda 100644 --- a/arch/parisc/include/asm/ioctl.h +++ b/arch/parisc/include/uapi/asm/ioctl.h | |||
diff --git a/arch/parisc/include/asm/ioctls.h b/arch/parisc/include/uapi/asm/ioctls.h index 054ec06f9e23..054ec06f9e23 100644 --- a/arch/parisc/include/asm/ioctls.h +++ b/arch/parisc/include/uapi/asm/ioctls.h | |||
diff --git a/arch/parisc/include/asm/ipcbuf.h b/arch/parisc/include/uapi/asm/ipcbuf.h index bd956c425785..bd956c425785 100644 --- a/arch/parisc/include/asm/ipcbuf.h +++ b/arch/parisc/include/uapi/asm/ipcbuf.h | |||
diff --git a/arch/parisc/include/asm/mman.h b/arch/parisc/include/uapi/asm/mman.h index 12219ebce869..12219ebce869 100644 --- a/arch/parisc/include/asm/mman.h +++ b/arch/parisc/include/uapi/asm/mman.h | |||
diff --git a/arch/parisc/include/asm/msgbuf.h b/arch/parisc/include/uapi/asm/msgbuf.h index fe88f2649418..fe88f2649418 100644 --- a/arch/parisc/include/asm/msgbuf.h +++ b/arch/parisc/include/uapi/asm/msgbuf.h | |||
diff --git a/arch/parisc/include/uapi/asm/pdc.h b/arch/parisc/include/uapi/asm/pdc.h new file mode 100644 index 000000000000..702498f7705b --- /dev/null +++ b/arch/parisc/include/uapi/asm/pdc.h | |||
@@ -0,0 +1,427 @@ | |||
1 | #ifndef _UAPI_PARISC_PDC_H | ||
2 | #define _UAPI_PARISC_PDC_H | ||
3 | |||
4 | /* | ||
5 | * PDC return values ... | ||
6 | * All PDC calls return a subset of these errors. | ||
7 | */ | ||
8 | |||
9 | #define PDC_WARN 3 /* Call completed with a warning */ | ||
10 | #define PDC_REQ_ERR_1 2 /* See above */ | ||
11 | #define PDC_REQ_ERR_0 1 /* Call would generate a requestor error */ | ||
12 | #define PDC_OK 0 /* Call completed successfully */ | ||
13 | #define PDC_BAD_PROC -1 /* Called non-existent procedure*/ | ||
14 | #define PDC_BAD_OPTION -2 /* Called with non-existent option */ | ||
15 | #define PDC_ERROR -3 /* Call could not complete without an error */ | ||
16 | #define PDC_NE_MOD -5 /* Module not found */ | ||
17 | #define PDC_NE_CELL_MOD -7 /* Cell module not found */ | ||
18 | #define PDC_INVALID_ARG -10 /* Called with an invalid argument */ | ||
19 | #define PDC_BUS_POW_WARN -12 /* Call could not complete in allowed power budget */ | ||
20 | #define PDC_NOT_NARROW -17 /* Narrow mode not supported */ | ||
21 | |||
22 | /* | ||
23 | * PDC entry points... | ||
24 | */ | ||
25 | |||
26 | #define PDC_POW_FAIL 1 /* perform a power-fail */ | ||
27 | #define PDC_POW_FAIL_PREPARE 0 /* prepare for powerfail */ | ||
28 | |||
29 | #define PDC_CHASSIS 2 /* PDC-chassis functions */ | ||
30 | #define PDC_CHASSIS_DISP 0 /* update chassis display */ | ||
31 | #define PDC_CHASSIS_WARN 1 /* return chassis warnings */ | ||
32 | #define PDC_CHASSIS_DISPWARN 2 /* update&return chassis status */ | ||
33 | #define PDC_RETURN_CHASSIS_INFO 128 /* HVERSION dependent: return chassis LED/LCD info */ | ||
34 | |||
35 | #define PDC_PIM 3 /* Get PIM data */ | ||
36 | #define PDC_PIM_HPMC 0 /* Transfer HPMC data */ | ||
37 | #define PDC_PIM_RETURN_SIZE 1 /* Get Max buffer needed for PIM*/ | ||
38 | #define PDC_PIM_LPMC 2 /* Transfer HPMC data */ | ||
39 | #define PDC_PIM_SOFT_BOOT 3 /* Transfer Soft Boot data */ | ||
40 | #define PDC_PIM_TOC 4 /* Transfer TOC data */ | ||
41 | |||
42 | #define PDC_MODEL 4 /* PDC model information call */ | ||
43 | #define PDC_MODEL_INFO 0 /* returns information */ | ||
44 | #define PDC_MODEL_BOOTID 1 /* set the BOOT_ID */ | ||
45 | #define PDC_MODEL_VERSIONS 2 /* returns cpu-internal versions*/ | ||
46 | #define PDC_MODEL_SYSMODEL 3 /* return system model info */ | ||
47 | #define PDC_MODEL_ENSPEC 4 /* enable specific option */ | ||
48 | #define PDC_MODEL_DISPEC 5 /* disable specific option */ | ||
49 | #define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */ | ||
50 | #define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */ | ||
51 | /* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */ | ||
52 | #define PDC_MODEL_OS64 (1 << 0) | ||
53 | #define PDC_MODEL_OS32 (1 << 1) | ||
54 | #define PDC_MODEL_IOPDIR_FDC (1 << 2) | ||
55 | #define PDC_MODEL_NVA_MASK (3 << 4) | ||
56 | #define PDC_MODEL_NVA_SUPPORTED (0 << 4) | ||
57 | #define PDC_MODEL_NVA_SLOW (1 << 4) | ||
58 | #define PDC_MODEL_NVA_UNSUPPORTED (3 << 4) | ||
59 | #define PDC_MODEL_GET_BOOT__OP 8 /* returns boot test options */ | ||
60 | #define PDC_MODEL_SET_BOOT__OP 9 /* set boot test options */ | ||
61 | |||
62 | #define PA89_INSTRUCTION_SET 0x4 /* capatibilies returned */ | ||
63 | #define PA90_INSTRUCTION_SET 0x8 | ||
64 | |||
65 | #define PDC_CACHE 5 /* return/set cache (& TLB) info*/ | ||
66 | #define PDC_CACHE_INFO 0 /* returns information */ | ||
67 | #define PDC_CACHE_SET_COH 1 /* set coherence state */ | ||
68 | #define PDC_CACHE_RET_SPID 2 /* returns space-ID bits */ | ||
69 | |||
70 | #define PDC_HPA 6 /* return HPA of processor */ | ||
71 | #define PDC_HPA_PROCESSOR 0 | ||
72 | #define PDC_HPA_MODULES 1 | ||
73 | |||
74 | #define PDC_COPROC 7 /* Co-Processor (usually FP unit(s)) */ | ||
75 | #define PDC_COPROC_CFG 0 /* Co-Processor Cfg (FP unit(s) enabled?) */ | ||
76 | |||
77 | #define PDC_IODC 8 /* talk to IODC */ | ||
78 | #define PDC_IODC_READ 0 /* read IODC entry point */ | ||
79 | /* PDC_IODC_RI_ * INDEX parameter of PDC_IODC_READ */ | ||
80 | #define PDC_IODC_RI_DATA_BYTES 0 /* IODC Data Bytes */ | ||
81 | /* 1, 2 obsolete - HVERSION dependent*/ | ||
82 | #define PDC_IODC_RI_INIT 3 /* Initialize module */ | ||
83 | #define PDC_IODC_RI_IO 4 /* Module input/output */ | ||
84 | #define PDC_IODC_RI_SPA 5 /* Module input/output */ | ||
85 | #define PDC_IODC_RI_CONFIG 6 /* Module input/output */ | ||
86 | /* 7 obsolete - HVERSION dependent */ | ||
87 | #define PDC_IODC_RI_TEST 8 /* Module input/output */ | ||
88 | #define PDC_IODC_RI_TLB 9 /* Module input/output */ | ||
89 | #define PDC_IODC_NINIT 2 /* non-destructive init */ | ||
90 | #define PDC_IODC_DINIT 3 /* destructive init */ | ||
91 | #define PDC_IODC_MEMERR 4 /* check for memory errors */ | ||
92 | #define PDC_IODC_INDEX_DATA 0 /* get first 16 bytes from mod IODC */ | ||
93 | #define PDC_IODC_BUS_ERROR -4 /* bus error return value */ | ||
94 | #define PDC_IODC_INVALID_INDEX -5 /* invalid index return value */ | ||
95 | #define PDC_IODC_COUNT -6 /* count is too small */ | ||
96 | |||
97 | #define PDC_TOD 9 /* time-of-day clock (TOD) */ | ||
98 | #define PDC_TOD_READ 0 /* read TOD */ | ||
99 | #define PDC_TOD_WRITE 1 /* write TOD */ | ||
100 | |||
101 | |||
102 | #define PDC_STABLE 10 /* stable storage (sprockets) */ | ||
103 | #define PDC_STABLE_READ 0 | ||
104 | #define PDC_STABLE_WRITE 1 | ||
105 | #define PDC_STABLE_RETURN_SIZE 2 | ||
106 | #define PDC_STABLE_VERIFY_CONTENTS 3 | ||
107 | #define PDC_STABLE_INITIALIZE 4 | ||
108 | |||
109 | #define PDC_NVOLATILE 11 /* often not implemented */ | ||
110 | |||
111 | #define PDC_ADD_VALID 12 /* Memory validation PDC call */ | ||
112 | #define PDC_ADD_VALID_VERIFY 0 /* Make PDC_ADD_VALID verify region */ | ||
113 | |||
114 | #define PDC_INSTR 15 /* get instr to invoke PDCE_CHECK() */ | ||
115 | |||
116 | #define PDC_PROC 16 /* (sprockets) */ | ||
117 | |||
118 | #define PDC_CONFIG 16 /* (sprockets) */ | ||
119 | #define PDC_CONFIG_DECONFIG 0 | ||
120 | #define PDC_CONFIG_DRECONFIG 1 | ||
121 | #define PDC_CONFIG_DRETURN_CONFIG 2 | ||
122 | |||
123 | #define PDC_BLOCK_TLB 18 /* manage hardware block-TLB */ | ||
124 | #define PDC_BTLB_INFO 0 /* returns parameter */ | ||
125 | #define PDC_BTLB_INSERT 1 /* insert BTLB entry */ | ||
126 | #define PDC_BTLB_PURGE 2 /* purge BTLB entries */ | ||
127 | #define PDC_BTLB_PURGE_ALL 3 /* purge all BTLB entries */ | ||
128 | |||
129 | #define PDC_TLB 19 /* manage hardware TLB miss handling */ | ||
130 | #define PDC_TLB_INFO 0 /* returns parameter */ | ||
131 | #define PDC_TLB_SETUP 1 /* set up miss handling */ | ||
132 | |||
133 | #define PDC_MEM 20 /* Manage memory */ | ||
134 | #define PDC_MEM_MEMINFO 0 | ||
135 | #define PDC_MEM_ADD_PAGE 1 | ||
136 | #define PDC_MEM_CLEAR_PDT 2 | ||
137 | #define PDC_MEM_READ_PDT 3 | ||
138 | #define PDC_MEM_RESET_CLEAR 4 | ||
139 | #define PDC_MEM_GOODMEM 5 | ||
140 | #define PDC_MEM_TABLE 128 /* Non contig mem map (sprockets) */ | ||
141 | #define PDC_MEM_RETURN_ADDRESS_TABLE PDC_MEM_TABLE | ||
142 | #define PDC_MEM_GET_MEMORY_SYSTEM_TABLES_SIZE 131 | ||
143 | #define PDC_MEM_GET_MEMORY_SYSTEM_TABLES 132 | ||
144 | #define PDC_MEM_GET_PHYSICAL_LOCATION_FROM_MEMORY_ADDRESS 133 | ||
145 | |||
146 | #define PDC_MEM_RET_SBE_REPLACED 5 /* PDC_MEM return values */ | ||
147 | #define PDC_MEM_RET_DUPLICATE_ENTRY 4 | ||
148 | #define PDC_MEM_RET_BUF_SIZE_SMALL 1 | ||
149 | #define PDC_MEM_RET_PDT_FULL -11 | ||
150 | #define PDC_MEM_RET_INVALID_PHYSICAL_LOCATION ~0ULL | ||
151 | |||
152 | #define PDC_PSW 21 /* Get/Set default System Mask */ | ||
153 | #define PDC_PSW_MASK 0 /* Return mask */ | ||
154 | #define PDC_PSW_GET_DEFAULTS 1 /* Return defaults */ | ||
155 | #define PDC_PSW_SET_DEFAULTS 2 /* Set default */ | ||
156 | #define PDC_PSW_ENDIAN_BIT 1 /* set for big endian */ | ||
157 | #define PDC_PSW_WIDE_BIT 2 /* set for wide mode */ | ||
158 | |||
159 | #define PDC_SYSTEM_MAP 22 /* find system modules */ | ||
160 | #define PDC_FIND_MODULE 0 | ||
161 | #define PDC_FIND_ADDRESS 1 | ||
162 | #define PDC_TRANSLATE_PATH 2 | ||
163 | |||
164 | #define PDC_SOFT_POWER 23 /* soft power switch */ | ||
165 | #define PDC_SOFT_POWER_INFO 0 /* return info about the soft power switch */ | ||
166 | #define PDC_SOFT_POWER_ENABLE 1 /* enable/disable soft power switch */ | ||
167 | |||
168 | |||
169 | /* HVERSION dependent */ | ||
170 | |||
171 | /* The PDC_MEM_MAP calls */ | ||
172 | #define PDC_MEM_MAP 128 /* on s700: return page info */ | ||
173 | #define PDC_MEM_MAP_HPA 0 /* returns hpa of a module */ | ||
174 | |||
175 | #define PDC_EEPROM 129 /* EEPROM access */ | ||
176 | #define PDC_EEPROM_READ_WORD 0 | ||
177 | #define PDC_EEPROM_WRITE_WORD 1 | ||
178 | #define PDC_EEPROM_READ_BYTE 2 | ||
179 | #define PDC_EEPROM_WRITE_BYTE 3 | ||
180 | #define PDC_EEPROM_EEPROM_PASSWORD -1000 | ||
181 | |||
182 | #define PDC_NVM 130 /* NVM (non-volatile memory) access */ | ||
183 | #define PDC_NVM_READ_WORD 0 | ||
184 | #define PDC_NVM_WRITE_WORD 1 | ||
185 | #define PDC_NVM_READ_BYTE 2 | ||
186 | #define PDC_NVM_WRITE_BYTE 3 | ||
187 | |||
188 | #define PDC_SEED_ERROR 132 /* (sprockets) */ | ||
189 | |||
190 | #define PDC_IO 135 /* log error info, reset IO system */ | ||
191 | #define PDC_IO_READ_AND_CLEAR_ERRORS 0 | ||
192 | #define PDC_IO_RESET 1 | ||
193 | #define PDC_IO_RESET_DEVICES 2 | ||
194 | /* sets bits 6&7 (little endian) of the HcControl Register */ | ||
195 | #define PDC_IO_USB_SUSPEND 0xC000000000000000 | ||
196 | #define PDC_IO_EEPROM_IO_ERR_TABLE_FULL -5 /* return value */ | ||
197 | #define PDC_IO_NO_SUSPEND -6 /* return value */ | ||
198 | |||
199 | #define PDC_BROADCAST_RESET 136 /* reset all processors */ | ||
200 | #define PDC_DO_RESET 0 /* option: perform a broadcast reset */ | ||
201 | #define PDC_DO_FIRM_TEST_RESET 1 /* Do broadcast reset with bitmap */ | ||
202 | #define PDC_BR_RECONFIGURATION 2 /* reset w/reconfiguration */ | ||
203 | #define PDC_FIRM_TEST_MAGIC 0xab9ec36fUL /* for this reboot only */ | ||
204 | |||
205 | #define PDC_LAN_STATION_ID 138 /* Hversion dependent mechanism for */ | ||
206 | #define PDC_LAN_STATION_ID_READ 0 /* getting the lan station address */ | ||
207 | |||
208 | #define PDC_LAN_STATION_ID_SIZE 6 | ||
209 | |||
210 | #define PDC_CHECK_RANGES 139 /* (sprockets) */ | ||
211 | |||
212 | #define PDC_NV_SECTIONS 141 /* (sprockets) */ | ||
213 | |||
214 | #define PDC_PERFORMANCE 142 /* performance monitoring */ | ||
215 | |||
216 | #define PDC_SYSTEM_INFO 143 /* system information */ | ||
217 | #define PDC_SYSINFO_RETURN_INFO_SIZE 0 | ||
218 | #define PDC_SYSINFO_RRETURN_SYS_INFO 1 | ||
219 | #define PDC_SYSINFO_RRETURN_ERRORS 2 | ||
220 | #define PDC_SYSINFO_RRETURN_WARNINGS 3 | ||
221 | #define PDC_SYSINFO_RETURN_REVISIONS 4 | ||
222 | #define PDC_SYSINFO_RRETURN_DIAGNOSE 5 | ||
223 | #define PDC_SYSINFO_RRETURN_HV_DIAGNOSE 1005 | ||
224 | |||
225 | #define PDC_RDR 144 /* (sprockets) */ | ||
226 | #define PDC_RDR_READ_BUFFER 0 | ||
227 | #define PDC_RDR_READ_SINGLE 1 | ||
228 | #define PDC_RDR_WRITE_SINGLE 2 | ||
229 | |||
230 | #define PDC_INTRIGUE 145 /* (sprockets) */ | ||
231 | #define PDC_INTRIGUE_WRITE_BUFFER 0 | ||
232 | #define PDC_INTRIGUE_GET_SCRATCH_BUFSIZE 1 | ||
233 | #define PDC_INTRIGUE_START_CPU_COUNTERS 2 | ||
234 | #define PDC_INTRIGUE_STOP_CPU_COUNTERS 3 | ||
235 | |||
236 | #define PDC_STI 146 /* STI access */ | ||
237 | /* same as PDC_PCI_XXX values (see below) */ | ||
238 | |||
239 | /* Legacy PDC definitions for same stuff */ | ||
240 | #define PDC_PCI_INDEX 147 | ||
241 | #define PDC_PCI_INTERFACE_INFO 0 | ||
242 | #define PDC_PCI_SLOT_INFO 1 | ||
243 | #define PDC_PCI_INFLIGHT_BYTES 2 | ||
244 | #define PDC_PCI_READ_CONFIG 3 | ||
245 | #define PDC_PCI_WRITE_CONFIG 4 | ||
246 | #define PDC_PCI_READ_PCI_IO 5 | ||
247 | #define PDC_PCI_WRITE_PCI_IO 6 | ||
248 | #define PDC_PCI_READ_CONFIG_DELAY 7 | ||
249 | #define PDC_PCI_UPDATE_CONFIG_DELAY 8 | ||
250 | #define PDC_PCI_PCI_PATH_TO_PCI_HPA 9 | ||
251 | #define PDC_PCI_PCI_HPA_TO_PCI_PATH 10 | ||
252 | #define PDC_PCI_PCI_PATH_TO_PCI_BUS 11 | ||
253 | #define PDC_PCI_PCI_RESERVED 12 | ||
254 | #define PDC_PCI_PCI_INT_ROUTE_SIZE 13 | ||
255 | #define PDC_PCI_GET_INT_TBL_SIZE PDC_PCI_PCI_INT_ROUTE_SIZE | ||
256 | #define PDC_PCI_PCI_INT_ROUTE 14 | ||
257 | #define PDC_PCI_GET_INT_TBL PDC_PCI_PCI_INT_ROUTE | ||
258 | #define PDC_PCI_READ_MON_TYPE 15 | ||
259 | #define PDC_PCI_WRITE_MON_TYPE 16 | ||
260 | |||
261 | |||
262 | /* Get SCSI Interface Card info: SDTR, SCSI ID, mode (SE vs LVD) */ | ||
263 | #define PDC_INITIATOR 163 | ||
264 | #define PDC_GET_INITIATOR 0 | ||
265 | #define PDC_SET_INITIATOR 1 | ||
266 | #define PDC_DELETE_INITIATOR 2 | ||
267 | #define PDC_RETURN_TABLE_SIZE 3 | ||
268 | #define PDC_RETURN_TABLE 4 | ||
269 | |||
270 | #define PDC_LINK 165 /* (sprockets) */ | ||
271 | #define PDC_LINK_PCI_ENTRY_POINTS 0 /* list (Arg1) = 0 */ | ||
272 | #define PDC_LINK_USB_ENTRY_POINTS 1 /* list (Arg1) = 1 */ | ||
273 | |||
274 | /* cl_class | ||
275 | * page 3-33 of IO-Firmware ARS | ||
276 | * IODC ENTRY_INIT(Search first) RET[1] | ||
277 | */ | ||
278 | #define CL_NULL 0 /* invalid */ | ||
279 | #define CL_RANDOM 1 /* random access (as disk) */ | ||
280 | #define CL_SEQU 2 /* sequential access (as tape) */ | ||
281 | #define CL_DUPLEX 7 /* full-duplex point-to-point (RS-232, Net) */ | ||
282 | #define CL_KEYBD 8 /* half-duplex console (HIL Keyboard) */ | ||
283 | #define CL_DISPL 9 /* half-duplex console (display) */ | ||
284 | #define CL_FC 10 /* FiberChannel access media */ | ||
285 | |||
286 | /* IODC ENTRY_INIT() */ | ||
287 | #define ENTRY_INIT_SRCH_FRST 2 | ||
288 | #define ENTRY_INIT_SRCH_NEXT 3 | ||
289 | #define ENTRY_INIT_MOD_DEV 4 | ||
290 | #define ENTRY_INIT_DEV 5 | ||
291 | #define ENTRY_INIT_MOD 6 | ||
292 | #define ENTRY_INIT_MSG 9 | ||
293 | |||
294 | /* IODC ENTRY_IO() */ | ||
295 | #define ENTRY_IO_BOOTIN 0 | ||
296 | #define ENTRY_IO_BOOTOUT 1 | ||
297 | #define ENTRY_IO_CIN 2 | ||
298 | #define ENTRY_IO_COUT 3 | ||
299 | #define ENTRY_IO_CLOSE 4 | ||
300 | #define ENTRY_IO_GETMSG 9 | ||
301 | #define ENTRY_IO_BBLOCK_IN 16 | ||
302 | #define ENTRY_IO_BBLOCK_OUT 17 | ||
303 | |||
304 | /* IODC ENTRY_SPA() */ | ||
305 | |||
306 | /* IODC ENTRY_CONFIG() */ | ||
307 | |||
308 | /* IODC ENTRY_TEST() */ | ||
309 | |||
310 | /* IODC ENTRY_TLB() */ | ||
311 | |||
312 | /* constants for OS (NVM...) */ | ||
313 | #define OS_ID_NONE 0 /* Undefined OS ID */ | ||
314 | #define OS_ID_HPUX 1 /* HP-UX OS */ | ||
315 | #define OS_ID_MPEXL 2 /* MPE XL OS */ | ||
316 | #define OS_ID_OSF 3 /* OSF OS */ | ||
317 | #define OS_ID_HPRT 4 /* HP-RT OS */ | ||
318 | #define OS_ID_NOVEL 5 /* NOVELL OS */ | ||
319 | #define OS_ID_LINUX 6 /* Linux */ | ||
320 | |||
321 | |||
322 | /* constants for PDC_CHASSIS */ | ||
323 | #define OSTAT_OFF 0 | ||
324 | #define OSTAT_FLT 1 | ||
325 | #define OSTAT_TEST 2 | ||
326 | #define OSTAT_INIT 3 | ||
327 | #define OSTAT_SHUT 4 | ||
328 | #define OSTAT_WARN 5 | ||
329 | #define OSTAT_RUN 6 | ||
330 | #define OSTAT_ON 7 | ||
331 | |||
332 | /* Page Zero constant offsets used by the HPMC handler */ | ||
333 | #define BOOT_CONSOLE_HPA_OFFSET 0x3c0 | ||
334 | #define BOOT_CONSOLE_SPA_OFFSET 0x3c4 | ||
335 | #define BOOT_CONSOLE_PATH_OFFSET 0x3a8 | ||
336 | |||
337 | /* size of the pdc_result buffer for firmware.c */ | ||
338 | #define NUM_PDC_RESULT 32 | ||
339 | |||
340 | #if !defined(__ASSEMBLY__) | ||
341 | |||
342 | #include <linux/types.h> | ||
343 | |||
344 | |||
345 | /* flags of the device_path */ | ||
346 | #define PF_AUTOBOOT 0x80 | ||
347 | #define PF_AUTOSEARCH 0x40 | ||
348 | #define PF_TIMER 0x0F | ||
349 | |||
350 | struct device_path { /* page 1-69 */ | ||
351 | unsigned char flags; /* flags see above! */ | ||
352 | unsigned char bc[6]; /* bus converter routing info */ | ||
353 | unsigned char mod; | ||
354 | unsigned int layers[6];/* device-specific layer-info */ | ||
355 | } __attribute__((aligned(8))) ; | ||
356 | |||
357 | struct pz_device { | ||
358 | struct device_path dp; /* see above */ | ||
359 | /* struct iomod *hpa; */ | ||
360 | unsigned int hpa; /* HPA base address */ | ||
361 | /* char *spa; */ | ||
362 | unsigned int spa; /* SPA base address */ | ||
363 | /* int (*iodc_io)(struct iomod*, ...); */ | ||
364 | unsigned int iodc_io; /* device entry point */ | ||
365 | short pad; /* reserved */ | ||
366 | unsigned short cl_class;/* see below */ | ||
367 | } __attribute__((aligned(8))) ; | ||
368 | |||
369 | struct zeropage { | ||
370 | /* [0x000] initialize vectors (VEC) */ | ||
371 | unsigned int vec_special; /* must be zero */ | ||
372 | /* int (*vec_pow_fail)(void);*/ | ||
373 | unsigned int vec_pow_fail; /* power failure handler */ | ||
374 | /* int (*vec_toc)(void); */ | ||
375 | unsigned int vec_toc; | ||
376 | unsigned int vec_toclen; | ||
377 | /* int (*vec_rendz)(void); */ | ||
378 | unsigned int vec_rendz; | ||
379 | int vec_pow_fail_flen; | ||
380 | int vec_pad[10]; | ||
381 | |||
382 | /* [0x040] reserved processor dependent */ | ||
383 | int pad0[112]; | ||
384 | |||
385 | /* [0x200] reserved */ | ||
386 | int pad1[84]; | ||
387 | |||
388 | /* [0x350] memory configuration (MC) */ | ||
389 | int memc_cont; /* contiguous mem size (bytes) */ | ||
390 | int memc_phsize; /* physical memory size */ | ||
391 | int memc_adsize; /* additional mem size, bytes of SPA space used by PDC */ | ||
392 | unsigned int mem_pdc_hi; /* used for 64-bit */ | ||
393 | |||
394 | /* [0x360] various parameters for the boot-CPU */ | ||
395 | /* unsigned int *mem_booterr[8]; */ | ||
396 | unsigned int mem_booterr[8]; /* ptr to boot errors */ | ||
397 | unsigned int mem_free; /* first location, where OS can be loaded */ | ||
398 | /* struct iomod *mem_hpa; */ | ||
399 | unsigned int mem_hpa; /* HPA of the boot-CPU */ | ||
400 | /* int (*mem_pdc)(int, ...); */ | ||
401 | unsigned int mem_pdc; /* PDC entry point */ | ||
402 | unsigned int mem_10msec; /* number of clock ticks in 10msec */ | ||
403 | |||
404 | /* [0x390] initial memory module (IMM) */ | ||
405 | /* struct iomod *imm_hpa; */ | ||
406 | unsigned int imm_hpa; /* HPA of the IMM */ | ||
407 | int imm_soft_boot; /* 0 = was hard boot, 1 = was soft boot */ | ||
408 | unsigned int imm_spa_size; /* SPA size of the IMM in bytes */ | ||
409 | unsigned int imm_max_mem; /* bytes of mem in IMM */ | ||
410 | |||
411 | /* [0x3A0] boot console, display device and keyboard */ | ||
412 | struct pz_device mem_cons; /* description of console device */ | ||
413 | struct pz_device mem_boot; /* description of boot device */ | ||
414 | struct pz_device mem_kbd; /* description of keyboard device */ | ||
415 | |||
416 | /* [0x430] reserved */ | ||
417 | int pad430[116]; | ||
418 | |||
419 | /* [0x600] processor dependent */ | ||
420 | __u32 pad600[1]; | ||
421 | __u32 proc_sti; /* pointer to STI ROM */ | ||
422 | __u32 pad608[126]; | ||
423 | }; | ||
424 | |||
425 | #endif /* !defined(__ASSEMBLY__) */ | ||
426 | |||
427 | #endif /* _UAPI_PARISC_PDC_H */ | ||
diff --git a/arch/parisc/include/asm/posix_types.h b/arch/parisc/include/uapi/asm/posix_types.h index b9344256f76b..b9344256f76b 100644 --- a/arch/parisc/include/asm/posix_types.h +++ b/arch/parisc/include/uapi/asm/posix_types.h | |||
diff --git a/arch/parisc/include/uapi/asm/ptrace.h b/arch/parisc/include/uapi/asm/ptrace.h new file mode 100644 index 000000000000..c4fa6c8b9ad9 --- /dev/null +++ b/arch/parisc/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg | ||
2 | ** Copyright (C) 2000 Grant Grundler, Hewlett-Packard | ||
3 | */ | ||
4 | #ifndef _UAPI_PARISC_PTRACE_H | ||
5 | #define _UAPI_PARISC_PTRACE_H | ||
6 | |||
7 | |||
8 | #include <linux/types.h> | ||
9 | |||
10 | /* This struct defines the way the registers are stored on the | ||
11 | * stack during a system call. | ||
12 | * | ||
13 | * N.B. gdb/strace care about the size and offsets within this | ||
14 | * structure. If you change things, you may break object compatibility | ||
15 | * for those applications. | ||
16 | */ | ||
17 | |||
18 | struct pt_regs { | ||
19 | unsigned long gr[32]; /* PSW is in gr[0] */ | ||
20 | __u64 fr[32]; | ||
21 | unsigned long sr[ 8]; | ||
22 | unsigned long iasq[2]; | ||
23 | unsigned long iaoq[2]; | ||
24 | unsigned long cr27; | ||
25 | unsigned long pad0; /* available for other uses */ | ||
26 | unsigned long orig_r28; | ||
27 | unsigned long ksp; | ||
28 | unsigned long kpc; | ||
29 | unsigned long sar; /* CR11 */ | ||
30 | unsigned long iir; /* CR19 */ | ||
31 | unsigned long isr; /* CR20 */ | ||
32 | unsigned long ior; /* CR21 */ | ||
33 | unsigned long ipsw; /* CR22 */ | ||
34 | }; | ||
35 | |||
36 | /* | ||
37 | * The numbers chosen here are somewhat arbitrary but absolutely MUST | ||
38 | * not overlap with any of the number assigned in <linux/ptrace.h>. | ||
39 | * | ||
40 | * These ones are taken from IA-64 on the assumption that theirs are | ||
41 | * the most correct (and we also want to support PTRACE_SINGLEBLOCK | ||
42 | * since we have taken branch traps too) | ||
43 | */ | ||
44 | #define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */ | ||
45 | |||
46 | |||
47 | #endif /* _UAPI_PARISC_PTRACE_H */ | ||
diff --git a/arch/parisc/include/asm/resource.h b/arch/parisc/include/uapi/asm/resource.h index 8b06343b62ed..8b06343b62ed 100644 --- a/arch/parisc/include/asm/resource.h +++ b/arch/parisc/include/uapi/asm/resource.h | |||
diff --git a/arch/parisc/include/asm/sembuf.h b/arch/parisc/include/uapi/asm/sembuf.h index 1e59ffd3bd1e..1e59ffd3bd1e 100644 --- a/arch/parisc/include/asm/sembuf.h +++ b/arch/parisc/include/uapi/asm/sembuf.h | |||
diff --git a/arch/parisc/include/asm/setup.h b/arch/parisc/include/uapi/asm/setup.h index 7da2e5b8747e..7da2e5b8747e 100644 --- a/arch/parisc/include/asm/setup.h +++ b/arch/parisc/include/uapi/asm/setup.h | |||
diff --git a/arch/parisc/include/asm/shmbuf.h b/arch/parisc/include/uapi/asm/shmbuf.h index 0a3eada1863b..0a3eada1863b 100644 --- a/arch/parisc/include/asm/shmbuf.h +++ b/arch/parisc/include/uapi/asm/shmbuf.h | |||
diff --git a/arch/parisc/include/asm/sigcontext.h b/arch/parisc/include/uapi/asm/sigcontext.h index 27ef31bb3b6e..27ef31bb3b6e 100644 --- a/arch/parisc/include/asm/sigcontext.h +++ b/arch/parisc/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/parisc/include/asm/siginfo.h b/arch/parisc/include/uapi/asm/siginfo.h index d7034728f377..d7034728f377 100644 --- a/arch/parisc/include/asm/siginfo.h +++ b/arch/parisc/include/uapi/asm/siginfo.h | |||
diff --git a/arch/parisc/include/uapi/asm/signal.h b/arch/parisc/include/uapi/asm/signal.h new file mode 100644 index 000000000000..b1ddaa243376 --- /dev/null +++ b/arch/parisc/include/uapi/asm/signal.h | |||
@@ -0,0 +1,118 @@ | |||
1 | #ifndef _UAPI_ASM_PARISC_SIGNAL_H | ||
2 | #define _UAPI_ASM_PARISC_SIGNAL_H | ||
3 | |||
4 | #define SIGHUP 1 | ||
5 | #define SIGINT 2 | ||
6 | #define SIGQUIT 3 | ||
7 | #define SIGILL 4 | ||
8 | #define SIGTRAP 5 | ||
9 | #define SIGABRT 6 | ||
10 | #define SIGIOT 6 | ||
11 | #define SIGEMT 7 | ||
12 | #define SIGFPE 8 | ||
13 | #define SIGKILL 9 | ||
14 | #define SIGBUS 10 | ||
15 | #define SIGSEGV 11 | ||
16 | #define SIGSYS 12 /* Linux doesn't use this */ | ||
17 | #define SIGPIPE 13 | ||
18 | #define SIGALRM 14 | ||
19 | #define SIGTERM 15 | ||
20 | #define SIGUSR1 16 | ||
21 | #define SIGUSR2 17 | ||
22 | #define SIGCHLD 18 | ||
23 | #define SIGPWR 19 | ||
24 | #define SIGVTALRM 20 | ||
25 | #define SIGPROF 21 | ||
26 | #define SIGIO 22 | ||
27 | #define SIGPOLL SIGIO | ||
28 | #define SIGWINCH 23 | ||
29 | #define SIGSTOP 24 | ||
30 | #define SIGTSTP 25 | ||
31 | #define SIGCONT 26 | ||
32 | #define SIGTTIN 27 | ||
33 | #define SIGTTOU 28 | ||
34 | #define SIGURG 29 | ||
35 | #define SIGLOST 30 /* Linux doesn't use this either */ | ||
36 | #define SIGUNUSED 31 | ||
37 | #define SIGRESERVE SIGUNUSED | ||
38 | |||
39 | #define SIGXCPU 33 | ||
40 | #define SIGXFSZ 34 | ||
41 | #define SIGSTKFLT 36 | ||
42 | |||
43 | /* These should not be considered constants from userland. */ | ||
44 | #define SIGRTMIN 37 | ||
45 | #define SIGRTMAX _NSIG /* it's 44 under HP/UX */ | ||
46 | |||
47 | /* | ||
48 | * SA_FLAGS values: | ||
49 | * | ||
50 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
51 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
52 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
53 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
54 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
55 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
56 | * | ||
57 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
58 | * Unix names RESETHAND and NODEFER respectively. | ||
59 | */ | ||
60 | #define SA_ONSTACK 0x00000001 | ||
61 | #define SA_RESETHAND 0x00000004 | ||
62 | #define SA_NOCLDSTOP 0x00000008 | ||
63 | #define SA_SIGINFO 0x00000010 | ||
64 | #define SA_NODEFER 0x00000020 | ||
65 | #define SA_RESTART 0x00000040 | ||
66 | #define SA_NOCLDWAIT 0x00000080 | ||
67 | #define _SA_SIGGFAULT 0x00000100 /* HPUX */ | ||
68 | |||
69 | #define SA_NOMASK SA_NODEFER | ||
70 | #define SA_ONESHOT SA_RESETHAND | ||
71 | |||
72 | #define SA_RESTORER 0x04000000 /* obsolete -- ignored */ | ||
73 | |||
74 | /* | ||
75 | * sigaltstack controls | ||
76 | */ | ||
77 | #define SS_ONSTACK 1 | ||
78 | #define SS_DISABLE 2 | ||
79 | |||
80 | #define MINSIGSTKSZ 2048 | ||
81 | #define SIGSTKSZ 8192 | ||
82 | |||
83 | |||
84 | #define SIG_BLOCK 0 /* for blocking signals */ | ||
85 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
86 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
87 | |||
88 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
89 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
90 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
91 | |||
92 | # ifndef __ASSEMBLY__ | ||
93 | |||
94 | # include <linux/types.h> | ||
95 | |||
96 | /* Avoid too many header ordering problems. */ | ||
97 | struct siginfo; | ||
98 | |||
99 | /* Type of a signal handler. */ | ||
100 | #ifdef CONFIG_64BIT | ||
101 | /* function pointers on 64-bit parisc are pointers to little structs and the | ||
102 | * compiler doesn't support code which changes or tests the address of | ||
103 | * the function in the little struct. This is really ugly -PB | ||
104 | */ | ||
105 | typedef char __user *__sighandler_t; | ||
106 | #else | ||
107 | typedef void __signalfn_t(int); | ||
108 | typedef __signalfn_t __user *__sighandler_t; | ||
109 | #endif | ||
110 | |||
111 | typedef struct sigaltstack { | ||
112 | void __user *ss_sp; | ||
113 | int ss_flags; | ||
114 | size_t ss_size; | ||
115 | } stack_t; | ||
116 | |||
117 | #endif /* !__ASSEMBLY */ | ||
118 | #endif /* _UAPI_ASM_PARISC_SIGNAL_H */ | ||
diff --git a/arch/parisc/include/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h index 1b52c2c31a7a..1b52c2c31a7a 100644 --- a/arch/parisc/include/asm/socket.h +++ b/arch/parisc/include/uapi/asm/socket.h | |||
diff --git a/arch/parisc/include/asm/sockios.h b/arch/parisc/include/uapi/asm/sockios.h index dabfbc7483f6..dabfbc7483f6 100644 --- a/arch/parisc/include/asm/sockios.h +++ b/arch/parisc/include/uapi/asm/sockios.h | |||
diff --git a/arch/parisc/include/asm/stat.h b/arch/parisc/include/uapi/asm/stat.h index d76fbda5d62c..d76fbda5d62c 100644 --- a/arch/parisc/include/asm/stat.h +++ b/arch/parisc/include/uapi/asm/stat.h | |||
diff --git a/arch/parisc/include/asm/statfs.h b/arch/parisc/include/uapi/asm/statfs.h index 324bea905dc6..324bea905dc6 100644 --- a/arch/parisc/include/asm/statfs.h +++ b/arch/parisc/include/uapi/asm/statfs.h | |||
diff --git a/arch/parisc/include/asm/swab.h b/arch/parisc/include/uapi/asm/swab.h index e78403b129ef..e78403b129ef 100644 --- a/arch/parisc/include/asm/swab.h +++ b/arch/parisc/include/uapi/asm/swab.h | |||
diff --git a/arch/parisc/include/asm/termbits.h b/arch/parisc/include/uapi/asm/termbits.h index d1ab92177a5c..d1ab92177a5c 100644 --- a/arch/parisc/include/asm/termbits.h +++ b/arch/parisc/include/uapi/asm/termbits.h | |||
diff --git a/arch/parisc/include/uapi/asm/termios.h b/arch/parisc/include/uapi/asm/termios.h new file mode 100644 index 000000000000..f3377395070d --- /dev/null +++ b/arch/parisc/include/uapi/asm/termios.h | |||
@@ -0,0 +1,43 @@ | |||
1 | #ifndef _UAPI_PARISC_TERMIOS_H | ||
2 | #define _UAPI_PARISC_TERMIOS_H | ||
3 | |||
4 | #include <asm/termbits.h> | ||
5 | #include <asm/ioctls.h> | ||
6 | |||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | /* modem lines */ | ||
25 | #define TIOCM_LE 0x001 | ||
26 | #define TIOCM_DTR 0x002 | ||
27 | #define TIOCM_RTS 0x004 | ||
28 | #define TIOCM_ST 0x008 | ||
29 | #define TIOCM_SR 0x010 | ||
30 | #define TIOCM_CTS 0x020 | ||
31 | #define TIOCM_CAR 0x040 | ||
32 | #define TIOCM_RNG 0x080 | ||
33 | #define TIOCM_DSR 0x100 | ||
34 | #define TIOCM_CD TIOCM_CAR | ||
35 | #define TIOCM_RI TIOCM_RNG | ||
36 | #define TIOCM_OUT1 0x2000 | ||
37 | #define TIOCM_OUT2 0x4000 | ||
38 | #define TIOCM_LOOP 0x8000 | ||
39 | |||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
41 | |||
42 | |||
43 | #endif /* _UAPI_PARISC_TERMIOS_H */ | ||
diff --git a/arch/parisc/include/asm/types.h b/arch/parisc/include/uapi/asm/types.h index 8866f9bbdeaf..8866f9bbdeaf 100644 --- a/arch/parisc/include/asm/types.h +++ b/arch/parisc/include/uapi/asm/types.h | |||
diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h new file mode 100644 index 000000000000..e178f30f2ccc --- /dev/null +++ b/arch/parisc/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,837 @@ | |||
1 | #ifndef _UAPI_ASM_PARISC_UNISTD_H_ | ||
2 | #define _UAPI_ASM_PARISC_UNISTD_H_ | ||
3 | |||
4 | /* | ||
5 | * This file contains the system call numbers. | ||
6 | */ | ||
7 | |||
8 | /* | ||
9 | * HP-UX system calls get their native numbers for binary compatibility. | ||
10 | */ | ||
11 | |||
12 | #define __NR_HPUX_exit 1 | ||
13 | #define __NR_HPUX_fork 2 | ||
14 | #define __NR_HPUX_read 3 | ||
15 | #define __NR_HPUX_write 4 | ||
16 | #define __NR_HPUX_open 5 | ||
17 | #define __NR_HPUX_close 6 | ||
18 | #define __NR_HPUX_wait 7 | ||
19 | #define __NR_HPUX_creat 8 | ||
20 | #define __NR_HPUX_link 9 | ||
21 | #define __NR_HPUX_unlink 10 | ||
22 | #define __NR_HPUX_execv 11 | ||
23 | #define __NR_HPUX_chdir 12 | ||
24 | #define __NR_HPUX_time 13 | ||
25 | #define __NR_HPUX_mknod 14 | ||
26 | #define __NR_HPUX_chmod 15 | ||
27 | #define __NR_HPUX_chown 16 | ||
28 | #define __NR_HPUX_break 17 | ||
29 | #define __NR_HPUX_lchmod 18 | ||
30 | #define __NR_HPUX_lseek 19 | ||
31 | #define __NR_HPUX_getpid 20 | ||
32 | #define __NR_HPUX_mount 21 | ||
33 | #define __NR_HPUX_umount 22 | ||
34 | #define __NR_HPUX_setuid 23 | ||
35 | #define __NR_HPUX_getuid 24 | ||
36 | #define __NR_HPUX_stime 25 | ||
37 | #define __NR_HPUX_ptrace 26 | ||
38 | #define __NR_HPUX_alarm 27 | ||
39 | #define __NR_HPUX_oldfstat 28 | ||
40 | #define __NR_HPUX_pause 29 | ||
41 | #define __NR_HPUX_utime 30 | ||
42 | #define __NR_HPUX_stty 31 | ||
43 | #define __NR_HPUX_gtty 32 | ||
44 | #define __NR_HPUX_access 33 | ||
45 | #define __NR_HPUX_nice 34 | ||
46 | #define __NR_HPUX_ftime 35 | ||
47 | #define __NR_HPUX_sync 36 | ||
48 | #define __NR_HPUX_kill 37 | ||
49 | #define __NR_HPUX_stat 38 | ||
50 | #define __NR_HPUX_setpgrp3 39 | ||
51 | #define __NR_HPUX_lstat 40 | ||
52 | #define __NR_HPUX_dup 41 | ||
53 | #define __NR_HPUX_pipe 42 | ||
54 | #define __NR_HPUX_times 43 | ||
55 | #define __NR_HPUX_profil 44 | ||
56 | #define __NR_HPUX_ki_call 45 | ||
57 | #define __NR_HPUX_setgid 46 | ||
58 | #define __NR_HPUX_getgid 47 | ||
59 | #define __NR_HPUX_sigsys 48 | ||
60 | #define __NR_HPUX_reserved1 49 | ||
61 | #define __NR_HPUX_reserved2 50 | ||
62 | #define __NR_HPUX_acct 51 | ||
63 | #define __NR_HPUX_set_userthreadid 52 | ||
64 | #define __NR_HPUX_oldlock 53 | ||
65 | #define __NR_HPUX_ioctl 54 | ||
66 | #define __NR_HPUX_reboot 55 | ||
67 | #define __NR_HPUX_symlink 56 | ||
68 | #define __NR_HPUX_utssys 57 | ||
69 | #define __NR_HPUX_readlink 58 | ||
70 | #define __NR_HPUX_execve 59 | ||
71 | #define __NR_HPUX_umask 60 | ||
72 | #define __NR_HPUX_chroot 61 | ||
73 | #define __NR_HPUX_fcntl 62 | ||
74 | #define __NR_HPUX_ulimit 63 | ||
75 | #define __NR_HPUX_getpagesize 64 | ||
76 | #define __NR_HPUX_mremap 65 | ||
77 | #define __NR_HPUX_vfork 66 | ||
78 | #define __NR_HPUX_vread 67 | ||
79 | #define __NR_HPUX_vwrite 68 | ||
80 | #define __NR_HPUX_sbrk 69 | ||
81 | #define __NR_HPUX_sstk 70 | ||
82 | #define __NR_HPUX_mmap 71 | ||
83 | #define __NR_HPUX_vadvise 72 | ||
84 | #define __NR_HPUX_munmap 73 | ||
85 | #define __NR_HPUX_mprotect 74 | ||
86 | #define __NR_HPUX_madvise 75 | ||
87 | #define __NR_HPUX_vhangup 76 | ||
88 | #define __NR_HPUX_swapoff 77 | ||
89 | #define __NR_HPUX_mincore 78 | ||
90 | #define __NR_HPUX_getgroups 79 | ||
91 | #define __NR_HPUX_setgroups 80 | ||
92 | #define __NR_HPUX_getpgrp2 81 | ||
93 | #define __NR_HPUX_setpgrp2 82 | ||
94 | #define __NR_HPUX_setitimer 83 | ||
95 | #define __NR_HPUX_wait3 84 | ||
96 | #define __NR_HPUX_swapon 85 | ||
97 | #define __NR_HPUX_getitimer 86 | ||
98 | #define __NR_HPUX_gethostname42 87 | ||
99 | #define __NR_HPUX_sethostname42 88 | ||
100 | #define __NR_HPUX_getdtablesize 89 | ||
101 | #define __NR_HPUX_dup2 90 | ||
102 | #define __NR_HPUX_getdopt 91 | ||
103 | #define __NR_HPUX_fstat 92 | ||
104 | #define __NR_HPUX_select 93 | ||
105 | #define __NR_HPUX_setdopt 94 | ||
106 | #define __NR_HPUX_fsync 95 | ||
107 | #define __NR_HPUX_setpriority 96 | ||
108 | #define __NR_HPUX_socket_old 97 | ||
109 | #define __NR_HPUX_connect_old 98 | ||
110 | #define __NR_HPUX_accept_old 99 | ||
111 | #define __NR_HPUX_getpriority 100 | ||
112 | #define __NR_HPUX_send_old 101 | ||
113 | #define __NR_HPUX_recv_old 102 | ||
114 | #define __NR_HPUX_socketaddr_old 103 | ||
115 | #define __NR_HPUX_bind_old 104 | ||
116 | #define __NR_HPUX_setsockopt_old 105 | ||
117 | #define __NR_HPUX_listen_old 106 | ||
118 | #define __NR_HPUX_vtimes_old 107 | ||
119 | #define __NR_HPUX_sigvector 108 | ||
120 | #define __NR_HPUX_sigblock 109 | ||
121 | #define __NR_HPUX_siggetmask 110 | ||
122 | #define __NR_HPUX_sigpause 111 | ||
123 | #define __NR_HPUX_sigstack 112 | ||
124 | #define __NR_HPUX_recvmsg_old 113 | ||
125 | #define __NR_HPUX_sendmsg_old 114 | ||
126 | #define __NR_HPUX_vtrace_old 115 | ||
127 | #define __NR_HPUX_gettimeofday 116 | ||
128 | #define __NR_HPUX_getrusage 117 | ||
129 | #define __NR_HPUX_getsockopt_old 118 | ||
130 | #define __NR_HPUX_resuba_old 119 | ||
131 | #define __NR_HPUX_readv 120 | ||
132 | #define __NR_HPUX_writev 121 | ||
133 | #define __NR_HPUX_settimeofday 122 | ||
134 | #define __NR_HPUX_fchown 123 | ||
135 | #define __NR_HPUX_fchmod 124 | ||
136 | #define __NR_HPUX_recvfrom_old 125 | ||
137 | #define __NR_HPUX_setresuid 126 | ||
138 | #define __NR_HPUX_setresgid 127 | ||
139 | #define __NR_HPUX_rename 128 | ||
140 | #define __NR_HPUX_truncate 129 | ||
141 | #define __NR_HPUX_ftruncate 130 | ||
142 | #define __NR_HPUX_flock_old 131 | ||
143 | #define __NR_HPUX_sysconf 132 | ||
144 | #define __NR_HPUX_sendto_old 133 | ||
145 | #define __NR_HPUX_shutdown_old 134 | ||
146 | #define __NR_HPUX_socketpair_old 135 | ||
147 | #define __NR_HPUX_mkdir 136 | ||
148 | #define __NR_HPUX_rmdir 137 | ||
149 | #define __NR_HPUX_utimes_old 138 | ||
150 | #define __NR_HPUX_sigcleanup_old 139 | ||
151 | #define __NR_HPUX_setcore 140 | ||
152 | #define __NR_HPUX_getpeername_old 141 | ||
153 | #define __NR_HPUX_gethostid 142 | ||
154 | #define __NR_HPUX_sethostid 143 | ||
155 | #define __NR_HPUX_getrlimit 144 | ||
156 | #define __NR_HPUX_setrlimit 145 | ||
157 | #define __NR_HPUX_killpg_old 146 | ||
158 | #define __NR_HPUX_cachectl 147 | ||
159 | #define __NR_HPUX_quotactl 148 | ||
160 | #define __NR_HPUX_get_sysinfo 149 | ||
161 | #define __NR_HPUX_getsockname_old 150 | ||
162 | #define __NR_HPUX_privgrp 151 | ||
163 | #define __NR_HPUX_rtprio 152 | ||
164 | #define __NR_HPUX_plock 153 | ||
165 | #define __NR_HPUX_reserved3 154 | ||
166 | #define __NR_HPUX_lockf 155 | ||
167 | #define __NR_HPUX_semget 156 | ||
168 | #define __NR_HPUX_osemctl 157 | ||
169 | #define __NR_HPUX_semop 158 | ||
170 | #define __NR_HPUX_msgget 159 | ||
171 | #define __NR_HPUX_omsgctl 160 | ||
172 | #define __NR_HPUX_msgsnd 161 | ||
173 | #define __NR_HPUX_msgrecv 162 | ||
174 | #define __NR_HPUX_shmget 163 | ||
175 | #define __NR_HPUX_oshmctl 164 | ||
176 | #define __NR_HPUX_shmat 165 | ||
177 | #define __NR_HPUX_shmdt 166 | ||
178 | #define __NR_HPUX_m68020_advise 167 | ||
179 | /* [168,189] are for Discless/DUX */ | ||
180 | #define __NR_HPUX_csp 168 | ||
181 | #define __NR_HPUX_cluster 169 | ||
182 | #define __NR_HPUX_mkrnod 170 | ||
183 | #define __NR_HPUX_test 171 | ||
184 | #define __NR_HPUX_unsp_open 172 | ||
185 | #define __NR_HPUX_reserved4 173 | ||
186 | #define __NR_HPUX_getcontext_old 174 | ||
187 | #define __NR_HPUX_osetcontext 175 | ||
188 | #define __NR_HPUX_bigio 176 | ||
189 | #define __NR_HPUX_pipenode 177 | ||
190 | #define __NR_HPUX_lsync 178 | ||
191 | #define __NR_HPUX_getmachineid 179 | ||
192 | #define __NR_HPUX_cnodeid 180 | ||
193 | #define __NR_HPUX_cnodes 181 | ||
194 | #define __NR_HPUX_swapclients 182 | ||
195 | #define __NR_HPUX_rmt_process 183 | ||
196 | #define __NR_HPUX_dskless_stats 184 | ||
197 | #define __NR_HPUX_sigprocmask 185 | ||
198 | #define __NR_HPUX_sigpending 186 | ||
199 | #define __NR_HPUX_sigsuspend 187 | ||
200 | #define __NR_HPUX_sigaction 188 | ||
201 | #define __NR_HPUX_reserved5 189 | ||
202 | #define __NR_HPUX_nfssvc 190 | ||
203 | #define __NR_HPUX_getfh 191 | ||
204 | #define __NR_HPUX_getdomainname 192 | ||
205 | #define __NR_HPUX_setdomainname 193 | ||
206 | #define __NR_HPUX_async_daemon 194 | ||
207 | #define __NR_HPUX_getdirentries 195 | ||
208 | #define __NR_HPUX_statfs 196 | ||
209 | #define __NR_HPUX_fstatfs 197 | ||
210 | #define __NR_HPUX_vfsmount 198 | ||
211 | #define __NR_HPUX_reserved6 199 | ||
212 | #define __NR_HPUX_waitpid 200 | ||
213 | /* 201 - 223 missing */ | ||
214 | #define __NR_HPUX_sigsetreturn 224 | ||
215 | #define __NR_HPUX_sigsetstatemask 225 | ||
216 | /* 226 missing */ | ||
217 | #define __NR_HPUX_cs 227 | ||
218 | #define __NR_HPUX_cds 228 | ||
219 | #define __NR_HPUX_set_no_trunc 229 | ||
220 | #define __NR_HPUX_pathconf 230 | ||
221 | #define __NR_HPUX_fpathconf 231 | ||
222 | /* 232, 233 missing */ | ||
223 | #define __NR_HPUX_nfs_fcntl 234 | ||
224 | #define __NR_HPUX_ogetacl 235 | ||
225 | #define __NR_HPUX_ofgetacl 236 | ||
226 | #define __NR_HPUX_osetacl 237 | ||
227 | #define __NR_HPUX_ofsetacl 238 | ||
228 | #define __NR_HPUX_pstat 239 | ||
229 | #define __NR_HPUX_getaudid 240 | ||
230 | #define __NR_HPUX_setaudid 241 | ||
231 | #define __NR_HPUX_getaudproc 242 | ||
232 | #define __NR_HPUX_setaudproc 243 | ||
233 | #define __NR_HPUX_getevent 244 | ||
234 | #define __NR_HPUX_setevent 245 | ||
235 | #define __NR_HPUX_audwrite 246 | ||
236 | #define __NR_HPUX_audswitch 247 | ||
237 | #define __NR_HPUX_audctl 248 | ||
238 | #define __NR_HPUX_ogetaccess 249 | ||
239 | #define __NR_HPUX_fsctl 250 | ||
240 | /* 251 - 258 missing */ | ||
241 | #define __NR_HPUX_swapfs 259 | ||
242 | #define __NR_HPUX_fss 260 | ||
243 | /* 261 - 266 missing */ | ||
244 | #define __NR_HPUX_tsync 267 | ||
245 | #define __NR_HPUX_getnumfds 268 | ||
246 | #define __NR_HPUX_poll 269 | ||
247 | #define __NR_HPUX_getmsg 270 | ||
248 | #define __NR_HPUX_putmsg 271 | ||
249 | #define __NR_HPUX_fchdir 272 | ||
250 | #define __NR_HPUX_getmount_cnt 273 | ||
251 | #define __NR_HPUX_getmount_entry 274 | ||
252 | #define __NR_HPUX_accept 275 | ||
253 | #define __NR_HPUX_bind 276 | ||
254 | #define __NR_HPUX_connect 277 | ||
255 | #define __NR_HPUX_getpeername 278 | ||
256 | #define __NR_HPUX_getsockname 279 | ||
257 | #define __NR_HPUX_getsockopt 280 | ||
258 | #define __NR_HPUX_listen 281 | ||
259 | #define __NR_HPUX_recv 282 | ||
260 | #define __NR_HPUX_recvfrom 283 | ||
261 | #define __NR_HPUX_recvmsg 284 | ||
262 | #define __NR_HPUX_send 285 | ||
263 | #define __NR_HPUX_sendmsg 286 | ||
264 | #define __NR_HPUX_sendto 287 | ||
265 | #define __NR_HPUX_setsockopt 288 | ||
266 | #define __NR_HPUX_shutdown 289 | ||
267 | #define __NR_HPUX_socket 290 | ||
268 | #define __NR_HPUX_socketpair 291 | ||
269 | #define __NR_HPUX_proc_open 292 | ||
270 | #define __NR_HPUX_proc_close 293 | ||
271 | #define __NR_HPUX_proc_send 294 | ||
272 | #define __NR_HPUX_proc_recv 295 | ||
273 | #define __NR_HPUX_proc_sendrecv 296 | ||
274 | #define __NR_HPUX_proc_syscall 297 | ||
275 | /* 298 - 311 missing */ | ||
276 | #define __NR_HPUX_semctl 312 | ||
277 | #define __NR_HPUX_msgctl 313 | ||
278 | #define __NR_HPUX_shmctl 314 | ||
279 | #define __NR_HPUX_mpctl 315 | ||
280 | #define __NR_HPUX_exportfs 316 | ||
281 | #define __NR_HPUX_getpmsg 317 | ||
282 | #define __NR_HPUX_putpmsg 318 | ||
283 | /* 319 missing */ | ||
284 | #define __NR_HPUX_msync 320 | ||
285 | #define __NR_HPUX_msleep 321 | ||
286 | #define __NR_HPUX_mwakeup 322 | ||
287 | #define __NR_HPUX_msem_init 323 | ||
288 | #define __NR_HPUX_msem_remove 324 | ||
289 | #define __NR_HPUX_adjtime 325 | ||
290 | #define __NR_HPUX_kload 326 | ||
291 | #define __NR_HPUX_fattach 327 | ||
292 | #define __NR_HPUX_fdetach 328 | ||
293 | #define __NR_HPUX_serialize 329 | ||
294 | #define __NR_HPUX_statvfs 330 | ||
295 | #define __NR_HPUX_fstatvfs 331 | ||
296 | #define __NR_HPUX_lchown 332 | ||
297 | #define __NR_HPUX_getsid 333 | ||
298 | #define __NR_HPUX_sysfs 334 | ||
299 | /* 335, 336 missing */ | ||
300 | #define __NR_HPUX_sched_setparam 337 | ||
301 | #define __NR_HPUX_sched_getparam 338 | ||
302 | #define __NR_HPUX_sched_setscheduler 339 | ||
303 | #define __NR_HPUX_sched_getscheduler 340 | ||
304 | #define __NR_HPUX_sched_yield 341 | ||
305 | #define __NR_HPUX_sched_get_priority_max 342 | ||
306 | #define __NR_HPUX_sched_get_priority_min 343 | ||
307 | #define __NR_HPUX_sched_rr_get_interval 344 | ||
308 | #define __NR_HPUX_clock_settime 345 | ||
309 | #define __NR_HPUX_clock_gettime 346 | ||
310 | #define __NR_HPUX_clock_getres 347 | ||
311 | #define __NR_HPUX_timer_create 348 | ||
312 | #define __NR_HPUX_timer_delete 349 | ||
313 | #define __NR_HPUX_timer_settime 350 | ||
314 | #define __NR_HPUX_timer_gettime 351 | ||
315 | #define __NR_HPUX_timer_getoverrun 352 | ||
316 | #define __NR_HPUX_nanosleep 353 | ||
317 | #define __NR_HPUX_toolbox 354 | ||
318 | /* 355 missing */ | ||
319 | #define __NR_HPUX_getdents 356 | ||
320 | #define __NR_HPUX_getcontext 357 | ||
321 | #define __NR_HPUX_sysinfo 358 | ||
322 | #define __NR_HPUX_fcntl64 359 | ||
323 | #define __NR_HPUX_ftruncate64 360 | ||
324 | #define __NR_HPUX_fstat64 361 | ||
325 | #define __NR_HPUX_getdirentries64 362 | ||
326 | #define __NR_HPUX_getrlimit64 363 | ||
327 | #define __NR_HPUX_lockf64 364 | ||
328 | #define __NR_HPUX_lseek64 365 | ||
329 | #define __NR_HPUX_lstat64 366 | ||
330 | #define __NR_HPUX_mmap64 367 | ||
331 | #define __NR_HPUX_setrlimit64 368 | ||
332 | #define __NR_HPUX_stat64 369 | ||
333 | #define __NR_HPUX_truncate64 370 | ||
334 | #define __NR_HPUX_ulimit64 371 | ||
335 | #define __NR_HPUX_pread 372 | ||
336 | #define __NR_HPUX_preadv 373 | ||
337 | #define __NR_HPUX_pwrite 374 | ||
338 | #define __NR_HPUX_pwritev 375 | ||
339 | #define __NR_HPUX_pread64 376 | ||
340 | #define __NR_HPUX_preadv64 377 | ||
341 | #define __NR_HPUX_pwrite64 378 | ||
342 | #define __NR_HPUX_pwritev64 379 | ||
343 | #define __NR_HPUX_setcontext 380 | ||
344 | #define __NR_HPUX_sigaltstack 381 | ||
345 | #define __NR_HPUX_waitid 382 | ||
346 | #define __NR_HPUX_setpgrp 383 | ||
347 | #define __NR_HPUX_recvmsg2 384 | ||
348 | #define __NR_HPUX_sendmsg2 385 | ||
349 | #define __NR_HPUX_socket2 386 | ||
350 | #define __NR_HPUX_socketpair2 387 | ||
351 | #define __NR_HPUX_setregid 388 | ||
352 | #define __NR_HPUX_lwp_create 389 | ||
353 | #define __NR_HPUX_lwp_terminate 390 | ||
354 | #define __NR_HPUX_lwp_wait 391 | ||
355 | #define __NR_HPUX_lwp_suspend 392 | ||
356 | #define __NR_HPUX_lwp_resume 393 | ||
357 | /* 394 missing */ | ||
358 | #define __NR_HPUX_lwp_abort_syscall 395 | ||
359 | #define __NR_HPUX_lwp_info 396 | ||
360 | #define __NR_HPUX_lwp_kill 397 | ||
361 | #define __NR_HPUX_ksleep 398 | ||
362 | #define __NR_HPUX_kwakeup 399 | ||
363 | /* 400 missing */ | ||
364 | #define __NR_HPUX_pstat_getlwp 401 | ||
365 | #define __NR_HPUX_lwp_exit 402 | ||
366 | #define __NR_HPUX_lwp_continue 403 | ||
367 | #define __NR_HPUX_getacl 404 | ||
368 | #define __NR_HPUX_fgetacl 405 | ||
369 | #define __NR_HPUX_setacl 406 | ||
370 | #define __NR_HPUX_fsetacl 407 | ||
371 | #define __NR_HPUX_getaccess 408 | ||
372 | #define __NR_HPUX_lwp_mutex_init 409 | ||
373 | #define __NR_HPUX_lwp_mutex_lock_sys 410 | ||
374 | #define __NR_HPUX_lwp_mutex_unlock 411 | ||
375 | #define __NR_HPUX_lwp_cond_init 412 | ||
376 | #define __NR_HPUX_lwp_cond_signal 413 | ||
377 | #define __NR_HPUX_lwp_cond_broadcast 414 | ||
378 | #define __NR_HPUX_lwp_cond_wait_sys 415 | ||
379 | #define __NR_HPUX_lwp_getscheduler 416 | ||
380 | #define __NR_HPUX_lwp_setscheduler 417 | ||
381 | #define __NR_HPUX_lwp_getstate 418 | ||
382 | #define __NR_HPUX_lwp_setstate 419 | ||
383 | #define __NR_HPUX_lwp_detach 420 | ||
384 | #define __NR_HPUX_mlock 421 | ||
385 | #define __NR_HPUX_munlock 422 | ||
386 | #define __NR_HPUX_mlockall 423 | ||
387 | #define __NR_HPUX_munlockall 424 | ||
388 | #define __NR_HPUX_shm_open 425 | ||
389 | #define __NR_HPUX_shm_unlink 426 | ||
390 | #define __NR_HPUX_sigqueue 427 | ||
391 | #define __NR_HPUX_sigwaitinfo 428 | ||
392 | #define __NR_HPUX_sigtimedwait 429 | ||
393 | #define __NR_HPUX_sigwait 430 | ||
394 | #define __NR_HPUX_aio_read 431 | ||
395 | #define __NR_HPUX_aio_write 432 | ||
396 | #define __NR_HPUX_lio_listio 433 | ||
397 | #define __NR_HPUX_aio_error 434 | ||
398 | #define __NR_HPUX_aio_return 435 | ||
399 | #define __NR_HPUX_aio_cancel 436 | ||
400 | #define __NR_HPUX_aio_suspend 437 | ||
401 | #define __NR_HPUX_aio_fsync 438 | ||
402 | #define __NR_HPUX_mq_open 439 | ||
403 | #define __NR_HPUX_mq_close 440 | ||
404 | #define __NR_HPUX_mq_unlink 441 | ||
405 | #define __NR_HPUX_mq_send 442 | ||
406 | #define __NR_HPUX_mq_receive 443 | ||
407 | #define __NR_HPUX_mq_notify 444 | ||
408 | #define __NR_HPUX_mq_setattr 445 | ||
409 | #define __NR_HPUX_mq_getattr 446 | ||
410 | #define __NR_HPUX_ksem_open 447 | ||
411 | #define __NR_HPUX_ksem_unlink 448 | ||
412 | #define __NR_HPUX_ksem_close 449 | ||
413 | #define __NR_HPUX_ksem_post 450 | ||
414 | #define __NR_HPUX_ksem_wait 451 | ||
415 | #define __NR_HPUX_ksem_read 452 | ||
416 | #define __NR_HPUX_ksem_trywait 453 | ||
417 | #define __NR_HPUX_lwp_rwlock_init 454 | ||
418 | #define __NR_HPUX_lwp_rwlock_destroy 455 | ||
419 | #define __NR_HPUX_lwp_rwlock_rdlock_sys 456 | ||
420 | #define __NR_HPUX_lwp_rwlock_wrlock_sys 457 | ||
421 | #define __NR_HPUX_lwp_rwlock_tryrdlock 458 | ||
422 | #define __NR_HPUX_lwp_rwlock_trywrlock 459 | ||
423 | #define __NR_HPUX_lwp_rwlock_unlock 460 | ||
424 | #define __NR_HPUX_ttrace 461 | ||
425 | #define __NR_HPUX_ttrace_wait 462 | ||
426 | #define __NR_HPUX_lf_wire_mem 463 | ||
427 | #define __NR_HPUX_lf_unwire_mem 464 | ||
428 | #define __NR_HPUX_lf_send_pin_map 465 | ||
429 | #define __NR_HPUX_lf_free_buf 466 | ||
430 | #define __NR_HPUX_lf_wait_nq 467 | ||
431 | #define __NR_HPUX_lf_wakeup_conn_q 468 | ||
432 | #define __NR_HPUX_lf_unused 469 | ||
433 | #define __NR_HPUX_lwp_sema_init 470 | ||
434 | #define __NR_HPUX_lwp_sema_post 471 | ||
435 | #define __NR_HPUX_lwp_sema_wait 472 | ||
436 | #define __NR_HPUX_lwp_sema_trywait 473 | ||
437 | #define __NR_HPUX_lwp_sema_destroy 474 | ||
438 | #define __NR_HPUX_statvfs64 475 | ||
439 | #define __NR_HPUX_fstatvfs64 476 | ||
440 | #define __NR_HPUX_msh_register 477 | ||
441 | #define __NR_HPUX_ptrace64 478 | ||
442 | #define __NR_HPUX_sendfile 479 | ||
443 | #define __NR_HPUX_sendpath 480 | ||
444 | #define __NR_HPUX_sendfile64 481 | ||
445 | #define __NR_HPUX_sendpath64 482 | ||
446 | #define __NR_HPUX_modload 483 | ||
447 | #define __NR_HPUX_moduload 484 | ||
448 | #define __NR_HPUX_modpath 485 | ||
449 | #define __NR_HPUX_getksym 486 | ||
450 | #define __NR_HPUX_modadm 487 | ||
451 | #define __NR_HPUX_modstat 488 | ||
452 | #define __NR_HPUX_lwp_detached_exit 489 | ||
453 | #define __NR_HPUX_crashconf 490 | ||
454 | #define __NR_HPUX_siginhibit 491 | ||
455 | #define __NR_HPUX_sigenable 492 | ||
456 | #define __NR_HPUX_spuctl 493 | ||
457 | #define __NR_HPUX_zerokernelsum 494 | ||
458 | #define __NR_HPUX_nfs_kstat 495 | ||
459 | #define __NR_HPUX_aio_read64 496 | ||
460 | #define __NR_HPUX_aio_write64 497 | ||
461 | #define __NR_HPUX_aio_error64 498 | ||
462 | #define __NR_HPUX_aio_return64 499 | ||
463 | #define __NR_HPUX_aio_cancel64 500 | ||
464 | #define __NR_HPUX_aio_suspend64 501 | ||
465 | #define __NR_HPUX_aio_fsync64 502 | ||
466 | #define __NR_HPUX_lio_listio64 503 | ||
467 | #define __NR_HPUX_recv2 504 | ||
468 | #define __NR_HPUX_recvfrom2 505 | ||
469 | #define __NR_HPUX_send2 506 | ||
470 | #define __NR_HPUX_sendto2 507 | ||
471 | #define __NR_HPUX_acl 508 | ||
472 | #define __NR_HPUX___cnx_p2p_ctl 509 | ||
473 | #define __NR_HPUX___cnx_gsched_ctl 510 | ||
474 | #define __NR_HPUX___cnx_pmon_ctl 511 | ||
475 | |||
476 | #define __NR_HPUX_syscalls 512 | ||
477 | |||
478 | /* | ||
479 | * Linux system call numbers. | ||
480 | * | ||
481 | * Cary Coutant says that we should just use another syscall gateway | ||
482 | * page to avoid clashing with the HPUX space, and I think he's right: | ||
483 | * it will would keep a branch out of our syscall entry path, at the | ||
484 | * very least. If we decide to change it later, we can ``just'' tweak | ||
485 | * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be | ||
486 | * 1024 or something. Oh, and recompile libc. =) | ||
487 | * | ||
488 | * 64-bit HPUX binaries get the syscall gateway address passed in a register | ||
489 | * from the kernel at startup, which seems a sane strategy. | ||
490 | */ | ||
491 | |||
492 | #define __NR_Linux 0 | ||
493 | #define __NR_restart_syscall (__NR_Linux + 0) | ||
494 | #define __NR_exit (__NR_Linux + 1) | ||
495 | #define __NR_fork (__NR_Linux + 2) | ||
496 | #define __NR_read (__NR_Linux + 3) | ||
497 | #define __NR_write (__NR_Linux + 4) | ||
498 | #define __NR_open (__NR_Linux + 5) | ||
499 | #define __NR_close (__NR_Linux + 6) | ||
500 | #define __NR_waitpid (__NR_Linux + 7) | ||
501 | #define __NR_creat (__NR_Linux + 8) | ||
502 | #define __NR_link (__NR_Linux + 9) | ||
503 | #define __NR_unlink (__NR_Linux + 10) | ||
504 | #define __NR_execve (__NR_Linux + 11) | ||
505 | #define __NR_chdir (__NR_Linux + 12) | ||
506 | #define __NR_time (__NR_Linux + 13) | ||
507 | #define __NR_mknod (__NR_Linux + 14) | ||
508 | #define __NR_chmod (__NR_Linux + 15) | ||
509 | #define __NR_lchown (__NR_Linux + 16) | ||
510 | #define __NR_socket (__NR_Linux + 17) | ||
511 | #define __NR_stat (__NR_Linux + 18) | ||
512 | #define __NR_lseek (__NR_Linux + 19) | ||
513 | #define __NR_getpid (__NR_Linux + 20) | ||
514 | #define __NR_mount (__NR_Linux + 21) | ||
515 | #define __NR_bind (__NR_Linux + 22) | ||
516 | #define __NR_setuid (__NR_Linux + 23) | ||
517 | #define __NR_getuid (__NR_Linux + 24) | ||
518 | #define __NR_stime (__NR_Linux + 25) | ||
519 | #define __NR_ptrace (__NR_Linux + 26) | ||
520 | #define __NR_alarm (__NR_Linux + 27) | ||
521 | #define __NR_fstat (__NR_Linux + 28) | ||
522 | #define __NR_pause (__NR_Linux + 29) | ||
523 | #define __NR_utime (__NR_Linux + 30) | ||
524 | #define __NR_connect (__NR_Linux + 31) | ||
525 | #define __NR_listen (__NR_Linux + 32) | ||
526 | #define __NR_access (__NR_Linux + 33) | ||
527 | #define __NR_nice (__NR_Linux + 34) | ||
528 | #define __NR_accept (__NR_Linux + 35) | ||
529 | #define __NR_sync (__NR_Linux + 36) | ||
530 | #define __NR_kill (__NR_Linux + 37) | ||
531 | #define __NR_rename (__NR_Linux + 38) | ||
532 | #define __NR_mkdir (__NR_Linux + 39) | ||
533 | #define __NR_rmdir (__NR_Linux + 40) | ||
534 | #define __NR_dup (__NR_Linux + 41) | ||
535 | #define __NR_pipe (__NR_Linux + 42) | ||
536 | #define __NR_times (__NR_Linux + 43) | ||
537 | #define __NR_getsockname (__NR_Linux + 44) | ||
538 | #define __NR_brk (__NR_Linux + 45) | ||
539 | #define __NR_setgid (__NR_Linux + 46) | ||
540 | #define __NR_getgid (__NR_Linux + 47) | ||
541 | #define __NR_signal (__NR_Linux + 48) | ||
542 | #define __NR_geteuid (__NR_Linux + 49) | ||
543 | #define __NR_getegid (__NR_Linux + 50) | ||
544 | #define __NR_acct (__NR_Linux + 51) | ||
545 | #define __NR_umount2 (__NR_Linux + 52) | ||
546 | #define __NR_getpeername (__NR_Linux + 53) | ||
547 | #define __NR_ioctl (__NR_Linux + 54) | ||
548 | #define __NR_fcntl (__NR_Linux + 55) | ||
549 | #define __NR_socketpair (__NR_Linux + 56) | ||
550 | #define __NR_setpgid (__NR_Linux + 57) | ||
551 | #define __NR_send (__NR_Linux + 58) | ||
552 | #define __NR_uname (__NR_Linux + 59) | ||
553 | #define __NR_umask (__NR_Linux + 60) | ||
554 | #define __NR_chroot (__NR_Linux + 61) | ||
555 | #define __NR_ustat (__NR_Linux + 62) | ||
556 | #define __NR_dup2 (__NR_Linux + 63) | ||
557 | #define __NR_getppid (__NR_Linux + 64) | ||
558 | #define __NR_getpgrp (__NR_Linux + 65) | ||
559 | #define __NR_setsid (__NR_Linux + 66) | ||
560 | #define __NR_pivot_root (__NR_Linux + 67) | ||
561 | #define __NR_sgetmask (__NR_Linux + 68) | ||
562 | #define __NR_ssetmask (__NR_Linux + 69) | ||
563 | #define __NR_setreuid (__NR_Linux + 70) | ||
564 | #define __NR_setregid (__NR_Linux + 71) | ||
565 | #define __NR_mincore (__NR_Linux + 72) | ||
566 | #define __NR_sigpending (__NR_Linux + 73) | ||
567 | #define __NR_sethostname (__NR_Linux + 74) | ||
568 | #define __NR_setrlimit (__NR_Linux + 75) | ||
569 | #define __NR_getrlimit (__NR_Linux + 76) | ||
570 | #define __NR_getrusage (__NR_Linux + 77) | ||
571 | #define __NR_gettimeofday (__NR_Linux + 78) | ||
572 | #define __NR_settimeofday (__NR_Linux + 79) | ||
573 | #define __NR_getgroups (__NR_Linux + 80) | ||
574 | #define __NR_setgroups (__NR_Linux + 81) | ||
575 | #define __NR_sendto (__NR_Linux + 82) | ||
576 | #define __NR_symlink (__NR_Linux + 83) | ||
577 | #define __NR_lstat (__NR_Linux + 84) | ||
578 | #define __NR_readlink (__NR_Linux + 85) | ||
579 | #define __NR_uselib (__NR_Linux + 86) | ||
580 | #define __NR_swapon (__NR_Linux + 87) | ||
581 | #define __NR_reboot (__NR_Linux + 88) | ||
582 | #define __NR_mmap2 (__NR_Linux + 89) | ||
583 | #define __NR_mmap (__NR_Linux + 90) | ||
584 | #define __NR_munmap (__NR_Linux + 91) | ||
585 | #define __NR_truncate (__NR_Linux + 92) | ||
586 | #define __NR_ftruncate (__NR_Linux + 93) | ||
587 | #define __NR_fchmod (__NR_Linux + 94) | ||
588 | #define __NR_fchown (__NR_Linux + 95) | ||
589 | #define __NR_getpriority (__NR_Linux + 96) | ||
590 | #define __NR_setpriority (__NR_Linux + 97) | ||
591 | #define __NR_recv (__NR_Linux + 98) | ||
592 | #define __NR_statfs (__NR_Linux + 99) | ||
593 | #define __NR_fstatfs (__NR_Linux + 100) | ||
594 | #define __NR_stat64 (__NR_Linux + 101) | ||
595 | /* #define __NR_socketcall (__NR_Linux + 102) */ | ||
596 | #define __NR_syslog (__NR_Linux + 103) | ||
597 | #define __NR_setitimer (__NR_Linux + 104) | ||
598 | #define __NR_getitimer (__NR_Linux + 105) | ||
599 | #define __NR_capget (__NR_Linux + 106) | ||
600 | #define __NR_capset (__NR_Linux + 107) | ||
601 | #define __NR_pread64 (__NR_Linux + 108) | ||
602 | #define __NR_pwrite64 (__NR_Linux + 109) | ||
603 | #define __NR_getcwd (__NR_Linux + 110) | ||
604 | #define __NR_vhangup (__NR_Linux + 111) | ||
605 | #define __NR_fstat64 (__NR_Linux + 112) | ||
606 | #define __NR_vfork (__NR_Linux + 113) | ||
607 | #define __NR_wait4 (__NR_Linux + 114) | ||
608 | #define __NR_swapoff (__NR_Linux + 115) | ||
609 | #define __NR_sysinfo (__NR_Linux + 116) | ||
610 | #define __NR_shutdown (__NR_Linux + 117) | ||
611 | #define __NR_fsync (__NR_Linux + 118) | ||
612 | #define __NR_madvise (__NR_Linux + 119) | ||
613 | #define __NR_clone (__NR_Linux + 120) | ||
614 | #define __NR_setdomainname (__NR_Linux + 121) | ||
615 | #define __NR_sendfile (__NR_Linux + 122) | ||
616 | #define __NR_recvfrom (__NR_Linux + 123) | ||
617 | #define __NR_adjtimex (__NR_Linux + 124) | ||
618 | #define __NR_mprotect (__NR_Linux + 125) | ||
619 | #define __NR_sigprocmask (__NR_Linux + 126) | ||
620 | #define __NR_create_module (__NR_Linux + 127) | ||
621 | #define __NR_init_module (__NR_Linux + 128) | ||
622 | #define __NR_delete_module (__NR_Linux + 129) | ||
623 | #define __NR_get_kernel_syms (__NR_Linux + 130) | ||
624 | #define __NR_quotactl (__NR_Linux + 131) | ||
625 | #define __NR_getpgid (__NR_Linux + 132) | ||
626 | #define __NR_fchdir (__NR_Linux + 133) | ||
627 | #define __NR_bdflush (__NR_Linux + 134) | ||
628 | #define __NR_sysfs (__NR_Linux + 135) | ||
629 | #define __NR_personality (__NR_Linux + 136) | ||
630 | #define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */ | ||
631 | #define __NR_setfsuid (__NR_Linux + 138) | ||
632 | #define __NR_setfsgid (__NR_Linux + 139) | ||
633 | #define __NR__llseek (__NR_Linux + 140) | ||
634 | #define __NR_getdents (__NR_Linux + 141) | ||
635 | #define __NR__newselect (__NR_Linux + 142) | ||
636 | #define __NR_flock (__NR_Linux + 143) | ||
637 | #define __NR_msync (__NR_Linux + 144) | ||
638 | #define __NR_readv (__NR_Linux + 145) | ||
639 | #define __NR_writev (__NR_Linux + 146) | ||
640 | #define __NR_getsid (__NR_Linux + 147) | ||
641 | #define __NR_fdatasync (__NR_Linux + 148) | ||
642 | #define __NR__sysctl (__NR_Linux + 149) | ||
643 | #define __NR_mlock (__NR_Linux + 150) | ||
644 | #define __NR_munlock (__NR_Linux + 151) | ||
645 | #define __NR_mlockall (__NR_Linux + 152) | ||
646 | #define __NR_munlockall (__NR_Linux + 153) | ||
647 | #define __NR_sched_setparam (__NR_Linux + 154) | ||
648 | #define __NR_sched_getparam (__NR_Linux + 155) | ||
649 | #define __NR_sched_setscheduler (__NR_Linux + 156) | ||
650 | #define __NR_sched_getscheduler (__NR_Linux + 157) | ||
651 | #define __NR_sched_yield (__NR_Linux + 158) | ||
652 | #define __NR_sched_get_priority_max (__NR_Linux + 159) | ||
653 | #define __NR_sched_get_priority_min (__NR_Linux + 160) | ||
654 | #define __NR_sched_rr_get_interval (__NR_Linux + 161) | ||
655 | #define __NR_nanosleep (__NR_Linux + 162) | ||
656 | #define __NR_mremap (__NR_Linux + 163) | ||
657 | #define __NR_setresuid (__NR_Linux + 164) | ||
658 | #define __NR_getresuid (__NR_Linux + 165) | ||
659 | #define __NR_sigaltstack (__NR_Linux + 166) | ||
660 | #define __NR_query_module (__NR_Linux + 167) | ||
661 | #define __NR_poll (__NR_Linux + 168) | ||
662 | #define __NR_nfsservctl (__NR_Linux + 169) | ||
663 | #define __NR_setresgid (__NR_Linux + 170) | ||
664 | #define __NR_getresgid (__NR_Linux + 171) | ||
665 | #define __NR_prctl (__NR_Linux + 172) | ||
666 | #define __NR_rt_sigreturn (__NR_Linux + 173) | ||
667 | #define __NR_rt_sigaction (__NR_Linux + 174) | ||
668 | #define __NR_rt_sigprocmask (__NR_Linux + 175) | ||
669 | #define __NR_rt_sigpending (__NR_Linux + 176) | ||
670 | #define __NR_rt_sigtimedwait (__NR_Linux + 177) | ||
671 | #define __NR_rt_sigqueueinfo (__NR_Linux + 178) | ||
672 | #define __NR_rt_sigsuspend (__NR_Linux + 179) | ||
673 | #define __NR_chown (__NR_Linux + 180) | ||
674 | #define __NR_setsockopt (__NR_Linux + 181) | ||
675 | #define __NR_getsockopt (__NR_Linux + 182) | ||
676 | #define __NR_sendmsg (__NR_Linux + 183) | ||
677 | #define __NR_recvmsg (__NR_Linux + 184) | ||
678 | #define __NR_semop (__NR_Linux + 185) | ||
679 | #define __NR_semget (__NR_Linux + 186) | ||
680 | #define __NR_semctl (__NR_Linux + 187) | ||
681 | #define __NR_msgsnd (__NR_Linux + 188) | ||
682 | #define __NR_msgrcv (__NR_Linux + 189) | ||
683 | #define __NR_msgget (__NR_Linux + 190) | ||
684 | #define __NR_msgctl (__NR_Linux + 191) | ||
685 | #define __NR_shmat (__NR_Linux + 192) | ||
686 | #define __NR_shmdt (__NR_Linux + 193) | ||
687 | #define __NR_shmget (__NR_Linux + 194) | ||
688 | #define __NR_shmctl (__NR_Linux + 195) | ||
689 | |||
690 | #define __NR_getpmsg (__NR_Linux + 196) /* Somebody *wants* streams? */ | ||
691 | #define __NR_putpmsg (__NR_Linux + 197) | ||
692 | |||
693 | #define __NR_lstat64 (__NR_Linux + 198) | ||
694 | #define __NR_truncate64 (__NR_Linux + 199) | ||
695 | #define __NR_ftruncate64 (__NR_Linux + 200) | ||
696 | #define __NR_getdents64 (__NR_Linux + 201) | ||
697 | #define __NR_fcntl64 (__NR_Linux + 202) | ||
698 | #define __NR_attrctl (__NR_Linux + 203) | ||
699 | #define __NR_acl_get (__NR_Linux + 204) | ||
700 | #define __NR_acl_set (__NR_Linux + 205) | ||
701 | #define __NR_gettid (__NR_Linux + 206) | ||
702 | #define __NR_readahead (__NR_Linux + 207) | ||
703 | #define __NR_tkill (__NR_Linux + 208) | ||
704 | #define __NR_sendfile64 (__NR_Linux + 209) | ||
705 | #define __NR_futex (__NR_Linux + 210) | ||
706 | #define __NR_sched_setaffinity (__NR_Linux + 211) | ||
707 | #define __NR_sched_getaffinity (__NR_Linux + 212) | ||
708 | #define __NR_set_thread_area (__NR_Linux + 213) | ||
709 | #define __NR_get_thread_area (__NR_Linux + 214) | ||
710 | #define __NR_io_setup (__NR_Linux + 215) | ||
711 | #define __NR_io_destroy (__NR_Linux + 216) | ||
712 | #define __NR_io_getevents (__NR_Linux + 217) | ||
713 | #define __NR_io_submit (__NR_Linux + 218) | ||
714 | #define __NR_io_cancel (__NR_Linux + 219) | ||
715 | #define __NR_alloc_hugepages (__NR_Linux + 220) | ||
716 | #define __NR_free_hugepages (__NR_Linux + 221) | ||
717 | #define __NR_exit_group (__NR_Linux + 222) | ||
718 | #define __NR_lookup_dcookie (__NR_Linux + 223) | ||
719 | #define __NR_epoll_create (__NR_Linux + 224) | ||
720 | #define __NR_epoll_ctl (__NR_Linux + 225) | ||
721 | #define __NR_epoll_wait (__NR_Linux + 226) | ||
722 | #define __NR_remap_file_pages (__NR_Linux + 227) | ||
723 | #define __NR_semtimedop (__NR_Linux + 228) | ||
724 | #define __NR_mq_open (__NR_Linux + 229) | ||
725 | #define __NR_mq_unlink (__NR_Linux + 230) | ||
726 | #define __NR_mq_timedsend (__NR_Linux + 231) | ||
727 | #define __NR_mq_timedreceive (__NR_Linux + 232) | ||
728 | #define __NR_mq_notify (__NR_Linux + 233) | ||
729 | #define __NR_mq_getsetattr (__NR_Linux + 234) | ||
730 | #define __NR_waitid (__NR_Linux + 235) | ||
731 | #define __NR_fadvise64_64 (__NR_Linux + 236) | ||
732 | #define __NR_set_tid_address (__NR_Linux + 237) | ||
733 | #define __NR_setxattr (__NR_Linux + 238) | ||
734 | #define __NR_lsetxattr (__NR_Linux + 239) | ||
735 | #define __NR_fsetxattr (__NR_Linux + 240) | ||
736 | #define __NR_getxattr (__NR_Linux + 241) | ||
737 | #define __NR_lgetxattr (__NR_Linux + 242) | ||
738 | #define __NR_fgetxattr (__NR_Linux + 243) | ||
739 | #define __NR_listxattr (__NR_Linux + 244) | ||
740 | #define __NR_llistxattr (__NR_Linux + 245) | ||
741 | #define __NR_flistxattr (__NR_Linux + 246) | ||
742 | #define __NR_removexattr (__NR_Linux + 247) | ||
743 | #define __NR_lremovexattr (__NR_Linux + 248) | ||
744 | #define __NR_fremovexattr (__NR_Linux + 249) | ||
745 | #define __NR_timer_create (__NR_Linux + 250) | ||
746 | #define __NR_timer_settime (__NR_Linux + 251) | ||
747 | #define __NR_timer_gettime (__NR_Linux + 252) | ||
748 | #define __NR_timer_getoverrun (__NR_Linux + 253) | ||
749 | #define __NR_timer_delete (__NR_Linux + 254) | ||
750 | #define __NR_clock_settime (__NR_Linux + 255) | ||
751 | #define __NR_clock_gettime (__NR_Linux + 256) | ||
752 | #define __NR_clock_getres (__NR_Linux + 257) | ||
753 | #define __NR_clock_nanosleep (__NR_Linux + 258) | ||
754 | #define __NR_tgkill (__NR_Linux + 259) | ||
755 | #define __NR_mbind (__NR_Linux + 260) | ||
756 | #define __NR_get_mempolicy (__NR_Linux + 261) | ||
757 | #define __NR_set_mempolicy (__NR_Linux + 262) | ||
758 | #define __NR_vserver (__NR_Linux + 263) | ||
759 | #define __NR_add_key (__NR_Linux + 264) | ||
760 | #define __NR_request_key (__NR_Linux + 265) | ||
761 | #define __NR_keyctl (__NR_Linux + 266) | ||
762 | #define __NR_ioprio_set (__NR_Linux + 267) | ||
763 | #define __NR_ioprio_get (__NR_Linux + 268) | ||
764 | #define __NR_inotify_init (__NR_Linux + 269) | ||
765 | #define __NR_inotify_add_watch (__NR_Linux + 270) | ||
766 | #define __NR_inotify_rm_watch (__NR_Linux + 271) | ||
767 | #define __NR_migrate_pages (__NR_Linux + 272) | ||
768 | #define __NR_pselect6 (__NR_Linux + 273) | ||
769 | #define __NR_ppoll (__NR_Linux + 274) | ||
770 | #define __NR_openat (__NR_Linux + 275) | ||
771 | #define __NR_mkdirat (__NR_Linux + 276) | ||
772 | #define __NR_mknodat (__NR_Linux + 277) | ||
773 | #define __NR_fchownat (__NR_Linux + 278) | ||
774 | #define __NR_futimesat (__NR_Linux + 279) | ||
775 | #define __NR_fstatat64 (__NR_Linux + 280) | ||
776 | #define __NR_unlinkat (__NR_Linux + 281) | ||
777 | #define __NR_renameat (__NR_Linux + 282) | ||
778 | #define __NR_linkat (__NR_Linux + 283) | ||
779 | #define __NR_symlinkat (__NR_Linux + 284) | ||
780 | #define __NR_readlinkat (__NR_Linux + 285) | ||
781 | #define __NR_fchmodat (__NR_Linux + 286) | ||
782 | #define __NR_faccessat (__NR_Linux + 287) | ||
783 | #define __NR_unshare (__NR_Linux + 288) | ||
784 | #define __NR_set_robust_list (__NR_Linux + 289) | ||
785 | #define __NR_get_robust_list (__NR_Linux + 290) | ||
786 | #define __NR_splice (__NR_Linux + 291) | ||
787 | #define __NR_sync_file_range (__NR_Linux + 292) | ||
788 | #define __NR_tee (__NR_Linux + 293) | ||
789 | #define __NR_vmsplice (__NR_Linux + 294) | ||
790 | #define __NR_move_pages (__NR_Linux + 295) | ||
791 | #define __NR_getcpu (__NR_Linux + 296) | ||
792 | #define __NR_epoll_pwait (__NR_Linux + 297) | ||
793 | #define __NR_statfs64 (__NR_Linux + 298) | ||
794 | #define __NR_fstatfs64 (__NR_Linux + 299) | ||
795 | #define __NR_kexec_load (__NR_Linux + 300) | ||
796 | #define __NR_utimensat (__NR_Linux + 301) | ||
797 | #define __NR_signalfd (__NR_Linux + 302) | ||
798 | #define __NR_timerfd (__NR_Linux + 303) | ||
799 | #define __NR_eventfd (__NR_Linux + 304) | ||
800 | #define __NR_fallocate (__NR_Linux + 305) | ||
801 | #define __NR_timerfd_create (__NR_Linux + 306) | ||
802 | #define __NR_timerfd_settime (__NR_Linux + 307) | ||
803 | #define __NR_timerfd_gettime (__NR_Linux + 308) | ||
804 | #define __NR_signalfd4 (__NR_Linux + 309) | ||
805 | #define __NR_eventfd2 (__NR_Linux + 310) | ||
806 | #define __NR_epoll_create1 (__NR_Linux + 311) | ||
807 | #define __NR_dup3 (__NR_Linux + 312) | ||
808 | #define __NR_pipe2 (__NR_Linux + 313) | ||
809 | #define __NR_inotify_init1 (__NR_Linux + 314) | ||
810 | #define __NR_preadv (__NR_Linux + 315) | ||
811 | #define __NR_pwritev (__NR_Linux + 316) | ||
812 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 317) | ||
813 | #define __NR_perf_event_open (__NR_Linux + 318) | ||
814 | #define __NR_recvmmsg (__NR_Linux + 319) | ||
815 | #define __NR_accept4 (__NR_Linux + 320) | ||
816 | #define __NR_prlimit64 (__NR_Linux + 321) | ||
817 | #define __NR_fanotify_init (__NR_Linux + 322) | ||
818 | #define __NR_fanotify_mark (__NR_Linux + 323) | ||
819 | #define __NR_clock_adjtime (__NR_Linux + 324) | ||
820 | #define __NR_name_to_handle_at (__NR_Linux + 325) | ||
821 | #define __NR_open_by_handle_at (__NR_Linux + 326) | ||
822 | #define __NR_syncfs (__NR_Linux + 327) | ||
823 | #define __NR_setns (__NR_Linux + 328) | ||
824 | #define __NR_sendmmsg (__NR_Linux + 329) | ||
825 | |||
826 | #define __NR_Linux_syscalls (__NR_sendmmsg + 1) | ||
827 | |||
828 | |||
829 | #define __IGNORE_select /* newselect */ | ||
830 | #define __IGNORE_fadvise64 /* fadvise64_64 */ | ||
831 | #define __IGNORE_utimes /* utime */ | ||
832 | |||
833 | |||
834 | #define HPUX_GATEWAY_ADDR 0xC0000004 | ||
835 | #define LINUX_GATEWAY_ADDR 0x100 | ||
836 | |||
837 | #endif /* _UAPI_ASM_PARISC_UNISTD_H_ */ | ||
diff --git a/arch/powerpc/include/asm/kvm_book3s_32.h b/arch/powerpc/include/asm/kvm_book3s_32.h index 38040ff82063..ce0ef6ce8f86 100644 --- a/arch/powerpc/include/asm/kvm_book3s_32.h +++ b/arch/powerpc/include/asm/kvm_book3s_32.h | |||
@@ -42,5 +42,6 @@ static inline void svcpu_put(struct kvmppc_book3s_shadow_vcpu *svcpu) | |||
42 | #define SID_SHIFT 28 | 42 | #define SID_SHIFT 28 |
43 | #define ESID_MASK 0xf0000000 | 43 | #define ESID_MASK 0xf0000000 |
44 | #define VSID_MASK 0x00fffffff0000000ULL | 44 | #define VSID_MASK 0x00fffffff0000000ULL |
45 | #define VPN_SHIFT 12 | ||
45 | 46 | ||
46 | #endif /* __ASM_KVM_BOOK3S_32_H__ */ | 47 | #endif /* __ASM_KVM_BOOK3S_32_H__ */ |
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 8734b3855272..87502046c0dc 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h | |||
@@ -388,9 +388,9 @@ extern int powersave_nap; /* set if nap mode can be used in idle loop */ | |||
388 | extern void power7_nap(void); | 388 | extern void power7_nap(void); |
389 | 389 | ||
390 | #ifdef CONFIG_PSERIES_IDLE | 390 | #ifdef CONFIG_PSERIES_IDLE |
391 | extern void update_smt_snooze_delay(int snooze); | 391 | extern void update_smt_snooze_delay(int cpu, int residency); |
392 | #else | 392 | #else |
393 | static inline void update_smt_snooze_delay(int snooze) {} | 393 | static inline void update_smt_snooze_delay(int cpu, int residency) {} |
394 | #endif | 394 | #endif |
395 | 395 | ||
396 | extern void flush_instruction_cache(void); | 396 | extern void flush_instruction_cache(void); |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 8302af649219..cf357a059ddb 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -50,7 +50,7 @@ static ssize_t store_smt_snooze_delay(struct device *dev, | |||
50 | return -EINVAL; | 50 | return -EINVAL; |
51 | 51 | ||
52 | per_cpu(smt_snooze_delay, cpu->dev.id) = snooze; | 52 | per_cpu(smt_snooze_delay, cpu->dev.id) = snooze; |
53 | update_smt_snooze_delay(snooze); | 53 | update_smt_snooze_delay(cpu->dev.id, snooze); |
54 | 54 | ||
55 | return count; | 55 | return count; |
56 | } | 56 | } |
diff --git a/arch/powerpc/kvm/book3s_32_mmu_host.c b/arch/powerpc/kvm/book3s_32_mmu_host.c index 00aa61268e0d..b0f625a33345 100644 --- a/arch/powerpc/kvm/book3s_32_mmu_host.c +++ b/arch/powerpc/kvm/book3s_32_mmu_host.c | |||
@@ -173,8 +173,8 @@ int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *orig_pte) | |||
173 | BUG_ON(!map); | 173 | BUG_ON(!map); |
174 | 174 | ||
175 | vsid = map->host_vsid; | 175 | vsid = map->host_vsid; |
176 | vpn = (vsid << (SID_SHIFT - VPN_SHIFT)) | ((eaddr & ~ESID_MASK) >> VPN_SHIFT) | 176 | vpn = (vsid << (SID_SHIFT - VPN_SHIFT)) | |
177 | 177 | ((eaddr & ~ESID_MASK) >> VPN_SHIFT); | |
178 | next_pteg: | 178 | next_pteg: |
179 | if (rr == 16) { | 179 | if (rr == 16) { |
180 | primary = !primary; | 180 | primary = !primary; |
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 0db88f501f91..aa2465e21f1a 100644 --- a/arch/powerpc/perf/core-book3s.c +++ b/arch/powerpc/perf/core-book3s.c | |||
@@ -1463,7 +1463,7 @@ static void perf_event_interrupt(struct pt_regs *regs) | |||
1463 | if (!event->hw.idx || is_limited_pmc(event->hw.idx)) | 1463 | if (!event->hw.idx || is_limited_pmc(event->hw.idx)) |
1464 | continue; | 1464 | continue; |
1465 | val = read_pmc(event->hw.idx); | 1465 | val = read_pmc(event->hw.idx); |
1466 | if (pmc_overflow(val)) { | 1466 | if ((int)val < 0) { |
1467 | /* event has overflowed */ | 1467 | /* event has overflowed */ |
1468 | found = 1; | 1468 | found = 1; |
1469 | record_and_restart(event, val, regs); | 1469 | record_and_restart(event, val, regs); |
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c index 455760b1fe6e..45d00e5fe14d 100644 --- a/arch/powerpc/platforms/pseries/processor_idle.c +++ b/arch/powerpc/platforms/pseries/processor_idle.c | |||
@@ -33,13 +33,6 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1; | |||
33 | static struct cpuidle_device __percpu *pseries_cpuidle_devices; | 33 | static struct cpuidle_device __percpu *pseries_cpuidle_devices; |
34 | static struct cpuidle_state *cpuidle_state_table; | 34 | static struct cpuidle_state *cpuidle_state_table; |
35 | 35 | ||
36 | void update_smt_snooze_delay(int snooze) | ||
37 | { | ||
38 | struct cpuidle_driver *drv = cpuidle_get_driver(); | ||
39 | if (drv) | ||
40 | drv->states[0].target_residency = snooze; | ||
41 | } | ||
42 | |||
43 | static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before) | 36 | static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before) |
44 | { | 37 | { |
45 | 38 | ||
@@ -66,32 +59,22 @@ static int snooze_loop(struct cpuidle_device *dev, | |||
66 | { | 59 | { |
67 | unsigned long in_purr; | 60 | unsigned long in_purr; |
68 | ktime_t kt_before; | 61 | ktime_t kt_before; |
69 | unsigned long start_snooze; | 62 | int cpu = dev->cpu; |
70 | long snooze = drv->states[0].target_residency; | ||
71 | 63 | ||
72 | idle_loop_prolog(&in_purr, &kt_before); | 64 | idle_loop_prolog(&in_purr, &kt_before); |
65 | local_irq_enable(); | ||
66 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
73 | 67 | ||
74 | if (snooze) { | 68 | while ((!need_resched()) && cpu_online(cpu)) { |
75 | start_snooze = get_tb() + snooze * tb_ticks_per_usec; | 69 | ppc64_runlatch_off(); |
76 | local_irq_enable(); | 70 | HMT_low(); |
77 | set_thread_flag(TIF_POLLING_NRFLAG); | 71 | HMT_very_low(); |
78 | |||
79 | while ((snooze < 0) || (get_tb() < start_snooze)) { | ||
80 | if (need_resched() || cpu_is_offline(dev->cpu)) | ||
81 | goto out; | ||
82 | ppc64_runlatch_off(); | ||
83 | HMT_low(); | ||
84 | HMT_very_low(); | ||
85 | } | ||
86 | |||
87 | HMT_medium(); | ||
88 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
89 | smp_mb(); | ||
90 | local_irq_disable(); | ||
91 | } | 72 | } |
92 | 73 | ||
93 | out: | ||
94 | HMT_medium(); | 74 | HMT_medium(); |
75 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
76 | smp_mb(); | ||
77 | |||
95 | dev->last_residency = | 78 | dev->last_residency = |
96 | (int)idle_loop_epilog(in_purr, kt_before); | 79 | (int)idle_loop_epilog(in_purr, kt_before); |
97 | return index; | 80 | return index; |
@@ -172,8 +155,8 @@ static struct cpuidle_state dedicated_states[MAX_IDLE_STATE_COUNT] = { | |||
172 | .name = "CEDE", | 155 | .name = "CEDE", |
173 | .desc = "CEDE", | 156 | .desc = "CEDE", |
174 | .flags = CPUIDLE_FLAG_TIME_VALID, | 157 | .flags = CPUIDLE_FLAG_TIME_VALID, |
175 | .exit_latency = 1, | 158 | .exit_latency = 10, |
176 | .target_residency = 10, | 159 | .target_residency = 100, |
177 | .enter = &dedicated_cede_loop }, | 160 | .enter = &dedicated_cede_loop }, |
178 | }; | 161 | }; |
179 | 162 | ||
@@ -190,6 +173,23 @@ static struct cpuidle_state shared_states[MAX_IDLE_STATE_COUNT] = { | |||
190 | .enter = &shared_cede_loop }, | 173 | .enter = &shared_cede_loop }, |
191 | }; | 174 | }; |
192 | 175 | ||
176 | void update_smt_snooze_delay(int cpu, int residency) | ||
177 | { | ||
178 | struct cpuidle_driver *drv = cpuidle_get_driver(); | ||
179 | struct cpuidle_device *dev = per_cpu(cpuidle_devices, cpu); | ||
180 | |||
181 | if (cpuidle_state_table != dedicated_states) | ||
182 | return; | ||
183 | |||
184 | if (residency < 0) { | ||
185 | /* Disable the Nap state on that cpu */ | ||
186 | if (dev) | ||
187 | dev->states_usage[1].disable = 1; | ||
188 | } else | ||
189 | if (drv) | ||
190 | drv->states[1].target_residency = residency; | ||
191 | } | ||
192 | |||
193 | static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n, | 193 | static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n, |
194 | unsigned long action, void *hcpu) | 194 | unsigned long action, void *hcpu) |
195 | { | 195 | { |
@@ -246,10 +246,6 @@ static int pseries_cpuidle_driver_init(void) | |||
246 | drv->states[drv->state_count] = /* structure copy */ | 246 | drv->states[drv->state_count] = /* structure copy */ |
247 | cpuidle_state_table[idle_state]; | 247 | cpuidle_state_table[idle_state]; |
248 | 248 | ||
249 | if (cpuidle_state_table == dedicated_states) | ||
250 | drv->states[drv->state_count].target_residency = | ||
251 | __get_cpu_var(smt_snooze_delay); | ||
252 | |||
253 | drv->state_count += 1; | 249 | drv->state_count += 1; |
254 | } | 250 | } |
255 | 251 | ||
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 3f3d9ca7a5b6..5dba755a43e6 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -130,6 +130,7 @@ config S390 | |||
130 | select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE | 130 | select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE |
131 | select HAVE_UID16 if 32BIT | 131 | select HAVE_UID16 if 32BIT |
132 | select ARCH_WANT_IPC_PARSE_VERSION | 132 | select ARCH_WANT_IPC_PARSE_VERSION |
133 | select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT | ||
133 | select GENERIC_SMP_IDLE_THREAD | 134 | select GENERIC_SMP_IDLE_THREAD |
134 | select GENERIC_TIME_VSYSCALL_OLD | 135 | select GENERIC_TIME_VSYSCALL_OLD |
135 | select GENERIC_CLOCKEVENTS | 136 | select GENERIC_CLOCKEVENTS |
diff --git a/arch/s390/boot/compressed/vmlinux.lds.S b/arch/s390/boot/compressed/vmlinux.lds.S index d80f79d8dd9c..8e1fb8239287 100644 --- a/arch/s390/boot/compressed/vmlinux.lds.S +++ b/arch/s390/boot/compressed/vmlinux.lds.S | |||
@@ -5,7 +5,7 @@ OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390") | |||
5 | OUTPUT_ARCH(s390:64-bit) | 5 | OUTPUT_ARCH(s390:64-bit) |
6 | #else | 6 | #else |
7 | OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") | 7 | OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") |
8 | OUTPUT_ARCH(s390) | 8 | OUTPUT_ARCH(s390:31-bit) |
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | ENTRY(startup) | 11 | ENTRY(startup) |
diff --git a/arch/s390/include/asm/perf_event.h b/arch/s390/include/asm/perf_event.h index 7941968e12b4..5f0173a31693 100644 --- a/arch/s390/include/asm/perf_event.h +++ b/arch/s390/include/asm/perf_event.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <asm/cpu_mf.h> | 9 | #include <asm/cpu_mf.h> |
10 | 10 | ||
11 | /* CPU-measurement counter facility */ | 11 | /* CPU-measurement counter facility */ |
12 | #define PERF_CPUM_CF_MAX_CTR 160 | 12 | #define PERF_CPUM_CF_MAX_CTR 256 |
13 | 13 | ||
14 | /* Per-CPU flags for PMU states */ | 14 | /* Per-CPU flags for PMU states */ |
15 | #define PMU_F_RESERVED 0x1000 | 15 | #define PMU_F_RESERVED 0x1000 |
diff --git a/arch/s390/include/uapi/asm/chpid.h b/arch/s390/include/uapi/asm/chpid.h index 581992dfae27..6b4fb29cc197 100644 --- a/arch/s390/include/uapi/asm/chpid.h +++ b/arch/s390/include/uapi/asm/chpid.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright IBM Corp. 2007 | 2 | * Copyright IBM Corp. 2007, 2012 |
3 | * Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com> | 3 | * Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com> |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -12,10 +12,10 @@ | |||
12 | #define __MAX_CHPID 255 | 12 | #define __MAX_CHPID 255 |
13 | 13 | ||
14 | struct chp_id { | 14 | struct chp_id { |
15 | u8 reserved1; | 15 | __u8 reserved1; |
16 | u8 cssid; | 16 | __u8 cssid; |
17 | u8 reserved2; | 17 | __u8 reserved2; |
18 | u8 id; | 18 | __u8 id; |
19 | } __attribute__((packed)); | 19 | } __attribute__((packed)); |
20 | 20 | ||
21 | 21 | ||
diff --git a/arch/s390/include/uapi/asm/kvm_para.h b/arch/s390/include/uapi/asm/kvm_para.h index e69de29bb2d1..ff1f4e7b3015 100644 --- a/arch/s390/include/uapi/asm/kvm_para.h +++ b/arch/s390/include/uapi/asm/kvm_para.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * User API definitions for paravirtual devices on s390 | ||
3 | * | ||
4 | * Copyright IBM Corp. 2008 | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License (version 2 only) | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * Author(s): Christian Borntraeger <borntraeger@de.ibm.com> | ||
11 | */ | ||
diff --git a/arch/s390/kernel/cache.c b/arch/s390/kernel/cache.c index 8df8d8a19c98..64b24650e4f8 100644 --- a/arch/s390/kernel/cache.c +++ b/arch/s390/kernel/cache.c | |||
@@ -59,8 +59,8 @@ enum { | |||
59 | 59 | ||
60 | enum { | 60 | enum { |
61 | CACHE_TI_UNIFIED = 0, | 61 | CACHE_TI_UNIFIED = 0, |
62 | CACHE_TI_INSTRUCTION = 0, | 62 | CACHE_TI_DATA = 0, |
63 | CACHE_TI_DATA, | 63 | CACHE_TI_INSTRUCTION, |
64 | }; | 64 | }; |
65 | 65 | ||
66 | struct cache_info { | 66 | struct cache_info { |
@@ -121,7 +121,10 @@ static int __init cache_add(int level, int private, int type) | |||
121 | cache = kzalloc(sizeof(*cache), GFP_KERNEL); | 121 | cache = kzalloc(sizeof(*cache), GFP_KERNEL); |
122 | if (!cache) | 122 | if (!cache) |
123 | return -ENOMEM; | 123 | return -ENOMEM; |
124 | ti = type == CACHE_TYPE_DATA ? CACHE_TI_DATA : CACHE_TI_UNIFIED; | 124 | if (type == CACHE_TYPE_INSTRUCTION) |
125 | ti = CACHE_TI_INSTRUCTION; | ||
126 | else | ||
127 | ti = CACHE_TI_UNIFIED; | ||
125 | cache->size = ecag(EXTRACT_SIZE, level, ti); | 128 | cache->size = ecag(EXTRACT_SIZE, level, ti); |
126 | cache->line_size = ecag(EXTRACT_LINE_SIZE, level, ti); | 129 | cache->line_size = ecag(EXTRACT_LINE_SIZE, level, ti); |
127 | cache->associativity = ecag(EXTRACT_ASSOCIATIVITY, level, ti); | 130 | cache->associativity = ecag(EXTRACT_ASSOCIATIVITY, level, ti); |
diff --git a/arch/s390/kernel/head_kdump.S b/arch/s390/kernel/head_kdump.S index acaaaf4b7055..085a95eb315f 100644 --- a/arch/s390/kernel/head_kdump.S +++ b/arch/s390/kernel/head_kdump.S | |||
@@ -85,16 +85,10 @@ | |||
85 | .align 2 | 85 | .align 2 |
86 | startup_kdump_relocated: | 86 | startup_kdump_relocated: |
87 | basr %r13,0 | 87 | basr %r13,0 |
88 | 0: | 88 | 0: lpswe .Lrestart_psw-0b(%r13) # Start new kernel... |
89 | mvc 0(8,%r0),.Lrestart_psw-0b(%r13) # Setup restart PSW | ||
90 | sam31 # Switch to 31 bit addr mode | ||
91 | sr %r1,%r1 # Erase register r1 | ||
92 | sr %r2,%r2 # Erase register r2 | ||
93 | sigp %r1,%r2,SIGP_SET_ARCHITECTURE # Switch to 31 bit arch mode | ||
94 | lpsw 0 # Start new kernel... | ||
95 | .align 8 | 89 | .align 8 |
96 | .Lrestart_psw: | 90 | .Lrestart_psw: |
97 | .long 0x00080000,0x80000000 + startup | 91 | .quad 0x0000000080000000,0x0000000000000000 + startup |
98 | #else | 92 | #else |
99 | .align 2 | 93 | .align 2 |
100 | .Lep_startup_kdump: | 94 | .Lep_startup_kdump: |
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c index 9871b1971ed7..c4e7269d4a09 100644 --- a/arch/s390/kernel/perf_cpum_cf.c +++ b/arch/s390/kernel/perf_cpum_cf.c | |||
@@ -94,7 +94,7 @@ static int get_counter_set(u64 event) | |||
94 | set = CPUMF_CTR_SET_USER; | 94 | set = CPUMF_CTR_SET_USER; |
95 | else if (event < 128) | 95 | else if (event < 128) |
96 | set = CPUMF_CTR_SET_CRYPTO; | 96 | set = CPUMF_CTR_SET_CRYPTO; |
97 | else if (event < 160) | 97 | else if (event < 256) |
98 | set = CPUMF_CTR_SET_EXT; | 98 | set = CPUMF_CTR_SET_EXT; |
99 | 99 | ||
100 | return set; | 100 | return set; |
@@ -138,6 +138,10 @@ static int validate_ctr_version(const struct hw_perf_event *hwc) | |||
138 | case CPUMF_CTR_SET_EXT: | 138 | case CPUMF_CTR_SET_EXT: |
139 | if (cpuhw->info.csvn < 1) | 139 | if (cpuhw->info.csvn < 1) |
140 | err = -EOPNOTSUPP; | 140 | err = -EOPNOTSUPP; |
141 | if ((cpuhw->info.csvn == 1 && hwc->config > 159) || | ||
142 | (cpuhw->info.csvn == 2 && hwc->config > 175) || | ||
143 | (cpuhw->info.csvn > 2 && hwc->config > 255)) | ||
144 | err = -EOPNOTSUPP; | ||
141 | break; | 145 | break; |
142 | } | 146 | } |
143 | 147 | ||
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index de8fa9bbd35e..79cb51adc741 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | #ifndef CONFIG_64BIT | 9 | #ifndef CONFIG_64BIT |
10 | OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") | 10 | OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") |
11 | OUTPUT_ARCH(s390) | 11 | OUTPUT_ARCH(s390:31-bit) |
12 | ENTRY(startup) | 12 | ENTRY(startup) |
13 | jiffies = jiffies_64 + 4; | 13 | jiffies = jiffies_64 + 4; |
14 | #else | 14 | #else |
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild index 86eadceff097..29f83beeef7a 100644 --- a/arch/sh/include/asm/Kbuild +++ b/arch/sh/include/asm/Kbuild | |||
@@ -1,4 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | generic-y += bitsperlong.h | 2 | generic-y += bitsperlong.h |
4 | generic-y += cputime.h | 3 | generic-y += cputime.h |
@@ -34,13 +33,3 @@ generic-y += termbits.h | |||
34 | generic-y += termios.h | 33 | generic-y += termios.h |
35 | generic-y += ucontext.h | 34 | generic-y += ucontext.h |
36 | generic-y += xor.h | 35 | generic-y += xor.h |
37 | |||
38 | header-y += cachectl.h | ||
39 | header-y += cpu-features.h | ||
40 | header-y += hw_breakpoint.h | ||
41 | header-y += posix_types_32.h | ||
42 | header-y += posix_types_64.h | ||
43 | header-y += ptrace_32.h | ||
44 | header-y += ptrace_64.h | ||
45 | header-y += unistd_32.h | ||
46 | header-y += unistd_64.h | ||
diff --git a/arch/sh/include/asm/hw_breakpoint.h b/arch/sh/include/asm/hw_breakpoint.h index 89890f61a7b9..ec9ad593c3da 100644 --- a/arch/sh/include/asm/hw_breakpoint.h +++ b/arch/sh/include/asm/hw_breakpoint.h | |||
@@ -1,7 +1,8 @@ | |||
1 | #ifndef __ASM_SH_HW_BREAKPOINT_H | 1 | #ifndef __ASM_SH_HW_BREAKPOINT_H |
2 | #define __ASM_SH_HW_BREAKPOINT_H | 2 | #define __ASM_SH_HW_BREAKPOINT_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <uapi/asm/hw_breakpoint.h> |
5 | |||
5 | #define __ARCH_HW_BREAKPOINT_H | 6 | #define __ARCH_HW_BREAKPOINT_H |
6 | 7 | ||
7 | #include <linux/kdebug.h> | 8 | #include <linux/kdebug.h> |
@@ -66,5 +67,4 @@ extern int register_sh_ubc(struct sh_ubc *); | |||
66 | 67 | ||
67 | extern struct pmu perf_ops_bp; | 68 | extern struct pmu perf_ops_bp; |
68 | 69 | ||
69 | #endif /* __KERNEL__ */ | ||
70 | #endif /* __ASM_SH_HW_BREAKPOINT_H */ | 70 | #endif /* __ASM_SH_HW_BREAKPOINT_H */ |
diff --git a/arch/sh/include/asm/posix_types.h b/arch/sh/include/asm/posix_types.h index f08449bcbde7..1aa781079b1e 100644 --- a/arch/sh/include/asm/posix_types.h +++ b/arch/sh/include/asm/posix_types.h | |||
@@ -1,13 +1,5 @@ | |||
1 | #ifdef __KERNEL__ | ||
2 | # ifdef CONFIG_SUPERH32 | 1 | # ifdef CONFIG_SUPERH32 |
3 | # include <asm/posix_types_32.h> | 2 | # include <asm/posix_types_32.h> |
4 | # else | 3 | # else |
5 | # include <asm/posix_types_64.h> | 4 | # include <asm/posix_types_64.h> |
6 | # endif | 5 | # endif |
7 | #else | ||
8 | # ifdef __SH5__ | ||
9 | # include <asm/posix_types_64.h> | ||
10 | # else | ||
11 | # include <asm/posix_types_32.h> | ||
12 | # endif | ||
13 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h index a4a38dff997a..2506c7db76b7 100644 --- a/arch/sh/include/asm/ptrace.h +++ b/arch/sh/include/asm/ptrace.h | |||
@@ -1,42 +1,16 @@ | |||
1 | #ifndef __ASM_SH_PTRACE_H | ||
2 | #define __ASM_SH_PTRACE_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Copyright (C) 1999, 2000 Niibe Yutaka | 2 | * Copyright (C) 1999, 2000 Niibe Yutaka |
6 | */ | 3 | */ |
4 | #ifndef __ASM_SH_PTRACE_H | ||
5 | #define __ASM_SH_PTRACE_H | ||
7 | 6 | ||
8 | #define PTRACE_GETREGS 12 /* General registers */ | ||
9 | #define PTRACE_SETREGS 13 | ||
10 | |||
11 | #define PTRACE_GETFPREGS 14 /* FPU registers */ | ||
12 | #define PTRACE_SETFPREGS 15 | ||
13 | |||
14 | #define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ | ||
15 | |||
16 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ | ||
17 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ | ||
18 | |||
19 | #define PTRACE_GETDSPREGS 55 /* DSP registers */ | ||
20 | #define PTRACE_SETDSPREGS 56 | ||
21 | |||
22 | #define PT_TEXT_END_ADDR 240 | ||
23 | #define PT_TEXT_ADDR 244 /* &(struct user)->start_code */ | ||
24 | #define PT_DATA_ADDR 248 /* &(struct user)->start_data */ | ||
25 | #define PT_TEXT_LEN 252 | ||
26 | |||
27 | #if defined(__SH5__) || defined(CONFIG_CPU_SH5) | ||
28 | #include <asm/ptrace_64.h> | ||
29 | #else | ||
30 | #include <asm/ptrace_32.h> | ||
31 | #endif | ||
32 | |||
33 | #ifdef __KERNEL__ | ||
34 | 7 | ||
35 | #include <linux/stringify.h> | 8 | #include <linux/stringify.h> |
36 | #include <linux/stddef.h> | 9 | #include <linux/stddef.h> |
37 | #include <linux/thread_info.h> | 10 | #include <linux/thread_info.h> |
38 | #include <asm/addrspace.h> | 11 | #include <asm/addrspace.h> |
39 | #include <asm/page.h> | 12 | #include <asm/page.h> |
13 | #include <uapi/asm/ptrace.h> | ||
40 | 14 | ||
41 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) | 15 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) |
42 | #define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15]) | 16 | #define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15]) |
@@ -140,6 +114,4 @@ static inline unsigned long profile_pc(struct pt_regs *regs) | |||
140 | #define profile_pc profile_pc | 114 | #define profile_pc profile_pc |
141 | 115 | ||
142 | #include <asm-generic/ptrace.h> | 116 | #include <asm-generic/ptrace.h> |
143 | #endif /* __KERNEL__ */ | ||
144 | |||
145 | #endif /* __ASM_SH_PTRACE_H */ | 117 | #endif /* __ASM_SH_PTRACE_H */ |
diff --git a/arch/sh/include/asm/ptrace_32.h b/arch/sh/include/asm/ptrace_32.h index 2d3e906aa722..1dd4480c5363 100644 --- a/arch/sh/include/asm/ptrace_32.h +++ b/arch/sh/include/asm/ptrace_32.h | |||
@@ -1,79 +1,8 @@ | |||
1 | #ifndef __ASM_SH_PTRACE_32_H | 1 | #ifndef __ASM_SH_PTRACE_32_H |
2 | #define __ASM_SH_PTRACE_32_H | 2 | #define __ASM_SH_PTRACE_32_H |
3 | 3 | ||
4 | /* | 4 | #include <uapi/asm/ptrace_32.h> |
5 | * GCC defines register number like this: | ||
6 | * ----------------------------- | ||
7 | * 0 - 15 are integer registers | ||
8 | * 17 - 22 are control/special registers | ||
9 | * 24 - 39 fp registers | ||
10 | * 40 - 47 xd registers | ||
11 | * 48 - fpscr register | ||
12 | * ----------------------------- | ||
13 | * | ||
14 | * We follows above, except: | ||
15 | * 16 --- program counter (PC) | ||
16 | * 22 --- syscall # | ||
17 | * 23 --- floating point communication register | ||
18 | */ | ||
19 | #define REG_REG0 0 | ||
20 | #define REG_REG15 15 | ||
21 | 5 | ||
22 | #define REG_PC 16 | ||
23 | |||
24 | #define REG_PR 17 | ||
25 | #define REG_SR 18 | ||
26 | #define REG_GBR 19 | ||
27 | #define REG_MACH 20 | ||
28 | #define REG_MACL 21 | ||
29 | |||
30 | #define REG_SYSCALL 22 | ||
31 | |||
32 | #define REG_FPREG0 23 | ||
33 | #define REG_FPREG15 38 | ||
34 | #define REG_XFREG0 39 | ||
35 | #define REG_XFREG15 54 | ||
36 | |||
37 | #define REG_FPSCR 55 | ||
38 | #define REG_FPUL 56 | ||
39 | |||
40 | /* | ||
41 | * This struct defines the way the registers are stored on the | ||
42 | * kernel stack during a system call or other kernel entry. | ||
43 | */ | ||
44 | struct pt_regs { | ||
45 | unsigned long regs[16]; | ||
46 | unsigned long pc; | ||
47 | unsigned long pr; | ||
48 | unsigned long sr; | ||
49 | unsigned long gbr; | ||
50 | unsigned long mach; | ||
51 | unsigned long macl; | ||
52 | long tra; | ||
53 | }; | ||
54 | |||
55 | /* | ||
56 | * This struct defines the way the DSP registers are stored on the | ||
57 | * kernel stack during a system call or other kernel entry. | ||
58 | */ | ||
59 | struct pt_dspregs { | ||
60 | unsigned long a1; | ||
61 | unsigned long a0g; | ||
62 | unsigned long a1g; | ||
63 | unsigned long m0; | ||
64 | unsigned long m1; | ||
65 | unsigned long a0; | ||
66 | unsigned long x0; | ||
67 | unsigned long x1; | ||
68 | unsigned long y0; | ||
69 | unsigned long y1; | ||
70 | unsigned long dsr; | ||
71 | unsigned long rs; | ||
72 | unsigned long re; | ||
73 | unsigned long mod; | ||
74 | }; | ||
75 | |||
76 | #ifdef __KERNEL__ | ||
77 | 6 | ||
78 | #define MAX_REG_OFFSET offsetof(struct pt_regs, tra) | 7 | #define MAX_REG_OFFSET offsetof(struct pt_regs, tra) |
79 | static inline long regs_return_value(struct pt_regs *regs) | 8 | static inline long regs_return_value(struct pt_regs *regs) |
@@ -81,6 +10,4 @@ static inline long regs_return_value(struct pt_regs *regs) | |||
81 | return regs->regs[0]; | 10 | return regs->regs[0]; |
82 | } | 11 | } |
83 | 12 | ||
84 | #endif /* __KERNEL__ */ | ||
85 | |||
86 | #endif /* __ASM_SH_PTRACE_32_H */ | 13 | #endif /* __ASM_SH_PTRACE_32_H */ |
diff --git a/arch/sh/include/asm/ptrace_64.h b/arch/sh/include/asm/ptrace_64.h index eb3fcceaf64b..97f4b5660f2c 100644 --- a/arch/sh/include/asm/ptrace_64.h +++ b/arch/sh/include/asm/ptrace_64.h | |||
@@ -1,16 +1,8 @@ | |||
1 | #ifndef __ASM_SH_PTRACE_64_H | 1 | #ifndef __ASM_SH_PTRACE_64_H |
2 | #define __ASM_SH_PTRACE_64_H | 2 | #define __ASM_SH_PTRACE_64_H |
3 | 3 | ||
4 | struct pt_regs { | 4 | #include <uapi/asm/ptrace_64.h> |
5 | unsigned long long pc; | ||
6 | unsigned long long sr; | ||
7 | long long syscall_nr; | ||
8 | unsigned long long regs[63]; | ||
9 | unsigned long long tregs[8]; | ||
10 | unsigned long long pad[2]; | ||
11 | }; | ||
12 | 5 | ||
13 | #ifdef __KERNEL__ | ||
14 | 6 | ||
15 | #define MAX_REG_OFFSET offsetof(struct pt_regs, tregs[7]) | 7 | #define MAX_REG_OFFSET offsetof(struct pt_regs, tregs[7]) |
16 | static inline long regs_return_value(struct pt_regs *regs) | 8 | static inline long regs_return_value(struct pt_regs *regs) |
@@ -18,6 +10,4 @@ static inline long regs_return_value(struct pt_regs *regs) | |||
18 | return regs->regs[3]; | 10 | return regs->regs[3]; |
19 | } | 11 | } |
20 | 12 | ||
21 | #endif /* __KERNEL__ */ | ||
22 | |||
23 | #endif /* __ASM_SH_PTRACE_64_H */ | 13 | #endif /* __ASM_SH_PTRACE_64_H */ |
diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h index 465a22df8fd0..99238108e7a5 100644 --- a/arch/sh/include/asm/setup.h +++ b/arch/sh/include/asm/setup.h | |||
@@ -1,9 +1,8 @@ | |||
1 | #ifndef _SH_SETUP_H | 1 | #ifndef _SH_SETUP_H |
2 | #define _SH_SETUP_H | 2 | #define _SH_SETUP_H |
3 | 3 | ||
4 | #include <asm-generic/setup.h> | 4 | #include <uapi/asm/setup.h> |
5 | 5 | ||
6 | #ifdef __KERNEL__ | ||
7 | /* | 6 | /* |
8 | * This is set up by the setup-routine at boot-time | 7 | * This is set up by the setup-routine at boot-time |
9 | */ | 8 | */ |
@@ -22,6 +21,4 @@ void sh_mv_setup(void); | |||
22 | void check_for_initrd(void); | 21 | void check_for_initrd(void); |
23 | void per_cpu_trap_init(void); | 22 | void per_cpu_trap_init(void); |
24 | 23 | ||
25 | #endif /* __KERNEL__ */ | ||
26 | |||
27 | #endif /* _SH_SETUP_H */ | 24 | #endif /* _SH_SETUP_H */ |
diff --git a/arch/sh/include/asm/types.h b/arch/sh/include/asm/types.h index f8421f7ad63a..6a31053fa5e3 100644 --- a/arch/sh/include/asm/types.h +++ b/arch/sh/include/asm/types.h | |||
@@ -1,12 +1,11 @@ | |||
1 | #ifndef __ASM_SH_TYPES_H | 1 | #ifndef __ASM_SH_TYPES_H |
2 | #define __ASM_SH_TYPES_H | 2 | #define __ASM_SH_TYPES_H |
3 | 3 | ||
4 | #include <asm-generic/types.h> | 4 | #include <uapi/asm/types.h> |
5 | 5 | ||
6 | /* | 6 | /* |
7 | * These aren't exported outside the kernel to avoid name space clashes | 7 | * These aren't exported outside the kernel to avoid name space clashes |
8 | */ | 8 | */ |
9 | #ifdef __KERNEL__ | ||
10 | #ifndef __ASSEMBLY__ | 9 | #ifndef __ASSEMBLY__ |
11 | 10 | ||
12 | #ifdef CONFIG_SUPERH32 | 11 | #ifdef CONFIG_SUPERH32 |
@@ -18,6 +17,4 @@ typedef u64 reg_size_t; | |||
18 | #endif | 17 | #endif |
19 | 18 | ||
20 | #endif /* __ASSEMBLY__ */ | 19 | #endif /* __ASSEMBLY__ */ |
21 | #endif /* __KERNEL__ */ | ||
22 | |||
23 | #endif /* __ASM_SH_TYPES_H */ | 20 | #endif /* __ASM_SH_TYPES_H */ |
diff --git a/arch/sh/include/asm/unistd.h b/arch/sh/include/asm/unistd.h index 307201a854f3..38956dfa76f7 100644 --- a/arch/sh/include/asm/unistd.h +++ b/arch/sh/include/asm/unistd.h | |||
@@ -1,4 +1,3 @@ | |||
1 | #ifdef __KERNEL__ | ||
2 | # ifdef CONFIG_SUPERH32 | 1 | # ifdef CONFIG_SUPERH32 |
3 | # include <asm/unistd_32.h> | 2 | # include <asm/unistd_32.h> |
4 | # else | 3 | # else |
@@ -38,10 +37,4 @@ | |||
38 | */ | 37 | */ |
39 | # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 38 | # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
40 | 39 | ||
41 | #else | 40 | #include <uapi/asm/unistd.h> |
42 | # ifdef __SH5__ | ||
43 | # include <asm/unistd_64.h> | ||
44 | # else | ||
45 | # include <asm/unistd_32.h> | ||
46 | # endif | ||
47 | #endif | ||
diff --git a/arch/sh/include/uapi/asm/Kbuild b/arch/sh/include/uapi/asm/Kbuild index baebb3da1d44..60613ae78513 100644 --- a/arch/sh/include/uapi/asm/Kbuild +++ b/arch/sh/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,25 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += auxvec.h | ||
5 | header-y += byteorder.h | ||
6 | header-y += cachectl.h | ||
7 | header-y += cpu-features.h | ||
8 | header-y += hw_breakpoint.h | ||
9 | header-y += ioctls.h | ||
10 | header-y += posix_types.h | ||
11 | header-y += posix_types_32.h | ||
12 | header-y += posix_types_64.h | ||
13 | header-y += ptrace.h | ||
14 | header-y += ptrace_32.h | ||
15 | header-y += ptrace_64.h | ||
16 | header-y += setup.h | ||
17 | header-y += sigcontext.h | ||
18 | header-y += signal.h | ||
19 | header-y += sockios.h | ||
20 | header-y += stat.h | ||
21 | header-y += swab.h | ||
22 | header-y += types.h | ||
23 | header-y += unistd.h | ||
24 | header-y += unistd_32.h | ||
25 | header-y += unistd_64.h | ||
diff --git a/arch/sh/include/asm/auxvec.h b/arch/sh/include/uapi/asm/auxvec.h index 8bcc51af9367..8bcc51af9367 100644 --- a/arch/sh/include/asm/auxvec.h +++ b/arch/sh/include/uapi/asm/auxvec.h | |||
diff --git a/arch/sh/include/asm/byteorder.h b/arch/sh/include/uapi/asm/byteorder.h index db2f5d7cb17d..db2f5d7cb17d 100644 --- a/arch/sh/include/asm/byteorder.h +++ b/arch/sh/include/uapi/asm/byteorder.h | |||
diff --git a/arch/sh/include/asm/cachectl.h b/arch/sh/include/uapi/asm/cachectl.h index 6ffb4b7a212e..6ffb4b7a212e 100644 --- a/arch/sh/include/asm/cachectl.h +++ b/arch/sh/include/uapi/asm/cachectl.h | |||
diff --git a/arch/sh/include/asm/cpu-features.h b/arch/sh/include/uapi/asm/cpu-features.h index 694abe490edb..694abe490edb 100644 --- a/arch/sh/include/asm/cpu-features.h +++ b/arch/sh/include/uapi/asm/cpu-features.h | |||
diff --git a/arch/sh/include/uapi/asm/hw_breakpoint.h b/arch/sh/include/uapi/asm/hw_breakpoint.h new file mode 100644 index 000000000000..ae5704fa77ad --- /dev/null +++ b/arch/sh/include/uapi/asm/hw_breakpoint.h | |||
@@ -0,0 +1,4 @@ | |||
1 | /* | ||
2 | * There isn't anything here anymore, but the file must not be empty or patch | ||
3 | * will delete it. | ||
4 | */ | ||
diff --git a/arch/sh/include/asm/ioctls.h b/arch/sh/include/uapi/asm/ioctls.h index a6769f352bf6..a6769f352bf6 100644 --- a/arch/sh/include/asm/ioctls.h +++ b/arch/sh/include/uapi/asm/ioctls.h | |||
diff --git a/arch/sh/include/uapi/asm/posix_types.h b/arch/sh/include/uapi/asm/posix_types.h new file mode 100644 index 000000000000..dc55e5adfe1e --- /dev/null +++ b/arch/sh/include/uapi/asm/posix_types.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __KERNEL__ | ||
2 | # ifdef __SH5__ | ||
3 | # include <asm/posix_types_64.h> | ||
4 | # else | ||
5 | # include <asm/posix_types_32.h> | ||
6 | # endif | ||
7 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/sh/include/asm/posix_types_32.h b/arch/sh/include/uapi/asm/posix_types_32.h index ba0bdc423b07..ba0bdc423b07 100644 --- a/arch/sh/include/asm/posix_types_32.h +++ b/arch/sh/include/uapi/asm/posix_types_32.h | |||
diff --git a/arch/sh/include/asm/posix_types_64.h b/arch/sh/include/uapi/asm/posix_types_64.h index 244f7e950e17..244f7e950e17 100644 --- a/arch/sh/include/asm/posix_types_64.h +++ b/arch/sh/include/uapi/asm/posix_types_64.h | |||
diff --git a/arch/sh/include/uapi/asm/ptrace.h b/arch/sh/include/uapi/asm/ptrace.h new file mode 100644 index 000000000000..8b8c5aca9c28 --- /dev/null +++ b/arch/sh/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999, 2000 Niibe Yutaka | ||
3 | */ | ||
4 | #ifndef _UAPI__ASM_SH_PTRACE_H | ||
5 | #define _UAPI__ASM_SH_PTRACE_H | ||
6 | |||
7 | |||
8 | #define PTRACE_GETREGS 12 /* General registers */ | ||
9 | #define PTRACE_SETREGS 13 | ||
10 | |||
11 | #define PTRACE_GETFPREGS 14 /* FPU registers */ | ||
12 | #define PTRACE_SETFPREGS 15 | ||
13 | |||
14 | #define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ | ||
15 | |||
16 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ | ||
17 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ | ||
18 | |||
19 | #define PTRACE_GETDSPREGS 55 /* DSP registers */ | ||
20 | #define PTRACE_SETDSPREGS 56 | ||
21 | |||
22 | #define PT_TEXT_END_ADDR 240 | ||
23 | #define PT_TEXT_ADDR 244 /* &(struct user)->start_code */ | ||
24 | #define PT_DATA_ADDR 248 /* &(struct user)->start_data */ | ||
25 | #define PT_TEXT_LEN 252 | ||
26 | |||
27 | #if defined(__SH5__) || defined(CONFIG_CPU_SH5) | ||
28 | #include <asm/ptrace_64.h> | ||
29 | #else | ||
30 | #include <asm/ptrace_32.h> | ||
31 | #endif | ||
32 | |||
33 | |||
34 | #endif /* _UAPI__ASM_SH_PTRACE_H */ | ||
diff --git a/arch/sh/include/uapi/asm/ptrace_32.h b/arch/sh/include/uapi/asm/ptrace_32.h new file mode 100644 index 000000000000..926e0cefc2bb --- /dev/null +++ b/arch/sh/include/uapi/asm/ptrace_32.h | |||
@@ -0,0 +1,77 @@ | |||
1 | #ifndef _UAPI__ASM_SH_PTRACE_32_H | ||
2 | #define _UAPI__ASM_SH_PTRACE_32_H | ||
3 | |||
4 | /* | ||
5 | * GCC defines register number like this: | ||
6 | * ----------------------------- | ||
7 | * 0 - 15 are integer registers | ||
8 | * 17 - 22 are control/special registers | ||
9 | * 24 - 39 fp registers | ||
10 | * 40 - 47 xd registers | ||
11 | * 48 - fpscr register | ||
12 | * ----------------------------- | ||
13 | * | ||
14 | * We follows above, except: | ||
15 | * 16 --- program counter (PC) | ||
16 | * 22 --- syscall # | ||
17 | * 23 --- floating point communication register | ||
18 | */ | ||
19 | #define REG_REG0 0 | ||
20 | #define REG_REG15 15 | ||
21 | |||
22 | #define REG_PC 16 | ||
23 | |||
24 | #define REG_PR 17 | ||
25 | #define REG_SR 18 | ||
26 | #define REG_GBR 19 | ||
27 | #define REG_MACH 20 | ||
28 | #define REG_MACL 21 | ||
29 | |||
30 | #define REG_SYSCALL 22 | ||
31 | |||
32 | #define REG_FPREG0 23 | ||
33 | #define REG_FPREG15 38 | ||
34 | #define REG_XFREG0 39 | ||
35 | #define REG_XFREG15 54 | ||
36 | |||
37 | #define REG_FPSCR 55 | ||
38 | #define REG_FPUL 56 | ||
39 | |||
40 | /* | ||
41 | * This struct defines the way the registers are stored on the | ||
42 | * kernel stack during a system call or other kernel entry. | ||
43 | */ | ||
44 | struct pt_regs { | ||
45 | unsigned long regs[16]; | ||
46 | unsigned long pc; | ||
47 | unsigned long pr; | ||
48 | unsigned long sr; | ||
49 | unsigned long gbr; | ||
50 | unsigned long mach; | ||
51 | unsigned long macl; | ||
52 | long tra; | ||
53 | }; | ||
54 | |||
55 | /* | ||
56 | * This struct defines the way the DSP registers are stored on the | ||
57 | * kernel stack during a system call or other kernel entry. | ||
58 | */ | ||
59 | struct pt_dspregs { | ||
60 | unsigned long a1; | ||
61 | unsigned long a0g; | ||
62 | unsigned long a1g; | ||
63 | unsigned long m0; | ||
64 | unsigned long m1; | ||
65 | unsigned long a0; | ||
66 | unsigned long x0; | ||
67 | unsigned long x1; | ||
68 | unsigned long y0; | ||
69 | unsigned long y1; | ||
70 | unsigned long dsr; | ||
71 | unsigned long rs; | ||
72 | unsigned long re; | ||
73 | unsigned long mod; | ||
74 | }; | ||
75 | |||
76 | |||
77 | #endif /* _UAPI__ASM_SH_PTRACE_32_H */ | ||
diff --git a/arch/sh/include/uapi/asm/ptrace_64.h b/arch/sh/include/uapi/asm/ptrace_64.h new file mode 100644 index 000000000000..0e52ee83e946 --- /dev/null +++ b/arch/sh/include/uapi/asm/ptrace_64.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _UAPI__ASM_SH_PTRACE_64_H | ||
2 | #define _UAPI__ASM_SH_PTRACE_64_H | ||
3 | |||
4 | struct pt_regs { | ||
5 | unsigned long long pc; | ||
6 | unsigned long long sr; | ||
7 | long long syscall_nr; | ||
8 | unsigned long long regs[63]; | ||
9 | unsigned long long tregs[8]; | ||
10 | unsigned long long pad[2]; | ||
11 | }; | ||
12 | |||
13 | |||
14 | #endif /* _UAPI__ASM_SH_PTRACE_64_H */ | ||
diff --git a/arch/sh/include/uapi/asm/setup.h b/arch/sh/include/uapi/asm/setup.h new file mode 100644 index 000000000000..552df83f1a49 --- /dev/null +++ b/arch/sh/include/uapi/asm/setup.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/setup.h> | |||
diff --git a/arch/sh/include/asm/sigcontext.h b/arch/sh/include/uapi/asm/sigcontext.h index 8ce1435bc0bf..8ce1435bc0bf 100644 --- a/arch/sh/include/asm/sigcontext.h +++ b/arch/sh/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/sh/include/asm/signal.h b/arch/sh/include/uapi/asm/signal.h index 9ac530a90bce..9ac530a90bce 100644 --- a/arch/sh/include/asm/signal.h +++ b/arch/sh/include/uapi/asm/signal.h | |||
diff --git a/arch/sh/include/asm/sockios.h b/arch/sh/include/uapi/asm/sockios.h index cf8b96b1f9ab..cf8b96b1f9ab 100644 --- a/arch/sh/include/asm/sockios.h +++ b/arch/sh/include/uapi/asm/sockios.h | |||
diff --git a/arch/sh/include/asm/stat.h b/arch/sh/include/uapi/asm/stat.h index e1810cc6e3da..e1810cc6e3da 100644 --- a/arch/sh/include/asm/stat.h +++ b/arch/sh/include/uapi/asm/stat.h | |||
diff --git a/arch/sh/include/asm/swab.h b/arch/sh/include/uapi/asm/swab.h index 1cd09767a7a3..1cd09767a7a3 100644 --- a/arch/sh/include/asm/swab.h +++ b/arch/sh/include/uapi/asm/swab.h | |||
diff --git a/arch/sh/include/uapi/asm/types.h b/arch/sh/include/uapi/asm/types.h new file mode 100644 index 000000000000..b9e79bc580dd --- /dev/null +++ b/arch/sh/include/uapi/asm/types.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/types.h> | |||
diff --git a/arch/sh/include/uapi/asm/unistd.h b/arch/sh/include/uapi/asm/unistd.h new file mode 100644 index 000000000000..eeef88dd53ce --- /dev/null +++ b/arch/sh/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __KERNEL__ | ||
2 | # ifdef __SH5__ | ||
3 | # include <asm/unistd_64.h> | ||
4 | # else | ||
5 | # include <asm/unistd_32.h> | ||
6 | # endif | ||
7 | #endif | ||
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/uapi/asm/unistd_32.h index 72fd1e061006..9e465f246dc1 100644 --- a/arch/sh/include/asm/unistd_32.h +++ b/arch/sh/include/uapi/asm/unistd_32.h | |||
@@ -378,7 +378,8 @@ | |||
378 | #define __NR_setns 364 | 378 | #define __NR_setns 364 |
379 | #define __NR_process_vm_readv 365 | 379 | #define __NR_process_vm_readv 365 |
380 | #define __NR_process_vm_writev 366 | 380 | #define __NR_process_vm_writev 366 |
381 | #define __NR_kcmp 367 | ||
381 | 382 | ||
382 | #define NR_syscalls 367 | 383 | #define NR_syscalls 368 |
383 | 384 | ||
384 | #endif /* __ASM_SH_UNISTD_32_H */ | 385 | #endif /* __ASM_SH_UNISTD_32_H */ |
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/uapi/asm/unistd_64.h index a28edc329692..8e3a2edd284e 100644 --- a/arch/sh/include/asm/unistd_64.h +++ b/arch/sh/include/uapi/asm/unistd_64.h | |||
@@ -398,7 +398,8 @@ | |||
398 | #define __NR_setns 375 | 398 | #define __NR_setns 375 |
399 | #define __NR_process_vm_readv 376 | 399 | #define __NR_process_vm_readv 376 |
400 | #define __NR_process_vm_writev 377 | 400 | #define __NR_process_vm_writev 377 |
401 | #define __NR_kcmp 378 | ||
401 | 402 | ||
402 | #define NR_syscalls 378 | 403 | #define NR_syscalls 379 |
403 | 404 | ||
404 | #endif /* __ASM_SH_UNISTD_64_H */ | 405 | #endif /* __ASM_SH_UNISTD_64_H */ |
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S index 4b68f0f79761..fe97ae5e56f1 100644 --- a/arch/sh/kernel/syscalls_32.S +++ b/arch/sh/kernel/syscalls_32.S | |||
@@ -384,3 +384,4 @@ ENTRY(sys_call_table) | |||
384 | .long sys_setns | 384 | .long sys_setns |
385 | .long sys_process_vm_readv /* 365 */ | 385 | .long sys_process_vm_readv /* 365 */ |
386 | .long sys_process_vm_writev | 386 | .long sys_process_vm_writev |
387 | .long sys_kcmp | ||
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S index 0956345b36ef..5c7b1c67bdc1 100644 --- a/arch/sh/kernel/syscalls_64.S +++ b/arch/sh/kernel/syscalls_64.S | |||
@@ -404,3 +404,4 @@ sys_call_table: | |||
404 | .long sys_setns /* 375 */ | 404 | .long sys_setns /* 375 */ |
405 | .long sys_process_vm_readv | 405 | .long sys_process_vm_readv |
406 | .long sys_process_vm_writev | 406 | .long sys_process_vm_writev |
407 | .long sys_kcmp | ||
diff --git a/arch/sparc/include/asm/ptrace.h b/arch/sparc/include/asm/ptrace.h index 0c6f6b068289..da43bdc62294 100644 --- a/arch/sparc/include/asm/ptrace.h +++ b/arch/sparc/include/asm/ptrace.h | |||
@@ -42,7 +42,18 @@ struct global_reg_snapshot { | |||
42 | struct thread_info *thread; | 42 | struct thread_info *thread; |
43 | unsigned long pad1; | 43 | unsigned long pad1; |
44 | }; | 44 | }; |
45 | extern struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; | 45 | |
46 | struct global_pmu_snapshot { | ||
47 | unsigned long pcr[4]; | ||
48 | unsigned long pic[4]; | ||
49 | }; | ||
50 | |||
51 | union global_cpu_snapshot { | ||
52 | struct global_reg_snapshot reg; | ||
53 | struct global_pmu_snapshot pmu; | ||
54 | }; | ||
55 | |||
56 | extern union global_cpu_snapshot global_cpu_snapshot[NR_CPUS]; | ||
46 | 57 | ||
47 | #define force_successful_syscall_return() \ | 58 | #define force_successful_syscall_return() \ |
48 | do { current_thread_info()->syscall_noerror = 1; \ | 59 | do { current_thread_info()->syscall_noerror = 1; \ |
diff --git a/arch/sparc/include/asm/smp_64.h b/arch/sparc/include/asm/smp_64.h index 29862a9e9065..dd3bef4b9896 100644 --- a/arch/sparc/include/asm/smp_64.h +++ b/arch/sparc/include/asm/smp_64.h | |||
@@ -48,6 +48,7 @@ extern void smp_fill_in_sib_core_maps(void); | |||
48 | extern void cpu_play_dead(void); | 48 | extern void cpu_play_dead(void); |
49 | 49 | ||
50 | extern void smp_fetch_global_regs(void); | 50 | extern void smp_fetch_global_regs(void); |
51 | extern void smp_fetch_global_pmu(void); | ||
51 | 52 | ||
52 | struct seq_file; | 53 | struct seq_file; |
53 | void smp_bogo(struct seq_file *); | 54 | void smp_bogo(struct seq_file *); |
@@ -65,6 +66,7 @@ extern void __cpu_die(unsigned int cpu); | |||
65 | #define hard_smp_processor_id() 0 | 66 | #define hard_smp_processor_id() 0 |
66 | #define smp_fill_in_sib_core_maps() do { } while (0) | 67 | #define smp_fill_in_sib_core_maps() do { } while (0) |
67 | #define smp_fetch_global_regs() do { } while (0) | 68 | #define smp_fetch_global_regs() do { } while (0) |
69 | #define smp_fetch_global_pmu() do { } while (0) | ||
68 | 70 | ||
69 | #endif /* !(CONFIG_SMP) */ | 71 | #endif /* !(CONFIG_SMP) */ |
70 | 72 | ||
diff --git a/arch/sparc/include/uapi/asm/sigcontext.h b/arch/sparc/include/uapi/asm/sigcontext.h index e69de29bb2d1..ae5704fa77ad 100644 --- a/arch/sparc/include/uapi/asm/sigcontext.h +++ b/arch/sparc/include/uapi/asm/sigcontext.h | |||
@@ -0,0 +1,4 @@ | |||
1 | /* | ||
2 | * There isn't anything here anymore, but the file must not be empty or patch | ||
3 | * will delete it. | ||
4 | */ | ||
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index e48651dace1b..885a8af74064 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -817,15 +817,17 @@ static u64 nop_for_index(int idx) | |||
817 | 817 | ||
818 | static inline void sparc_pmu_enable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, int idx) | 818 | static inline void sparc_pmu_enable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, int idx) |
819 | { | 819 | { |
820 | u64 val, mask = mask_for_index(idx); | 820 | u64 enc, val, mask = mask_for_index(idx); |
821 | int pcr_index = 0; | 821 | int pcr_index = 0; |
822 | 822 | ||
823 | if (sparc_pmu->num_pcrs > 1) | 823 | if (sparc_pmu->num_pcrs > 1) |
824 | pcr_index = idx; | 824 | pcr_index = idx; |
825 | 825 | ||
826 | enc = perf_event_get_enc(cpuc->events[idx]); | ||
827 | |||
826 | val = cpuc->pcr[pcr_index]; | 828 | val = cpuc->pcr[pcr_index]; |
827 | val &= ~mask; | 829 | val &= ~mask; |
828 | val |= hwc->config; | 830 | val |= event_encoding(enc, idx); |
829 | cpuc->pcr[pcr_index] = val; | 831 | cpuc->pcr[pcr_index] = val; |
830 | 832 | ||
831 | pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]); | 833 | pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]); |
@@ -1738,8 +1740,6 @@ static void perf_callchain_user_64(struct perf_callchain_entry *entry, | |||
1738 | { | 1740 | { |
1739 | unsigned long ufp; | 1741 | unsigned long ufp; |
1740 | 1742 | ||
1741 | perf_callchain_store(entry, regs->tpc); | ||
1742 | |||
1743 | ufp = regs->u_regs[UREG_I6] + STACK_BIAS; | 1743 | ufp = regs->u_regs[UREG_I6] + STACK_BIAS; |
1744 | do { | 1744 | do { |
1745 | struct sparc_stackf *usf, sf; | 1745 | struct sparc_stackf *usf, sf; |
@@ -1760,8 +1760,6 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry, | |||
1760 | { | 1760 | { |
1761 | unsigned long ufp; | 1761 | unsigned long ufp; |
1762 | 1762 | ||
1763 | perf_callchain_store(entry, regs->tpc); | ||
1764 | |||
1765 | ufp = regs->u_regs[UREG_I6] & 0xffffffffUL; | 1763 | ufp = regs->u_regs[UREG_I6] & 0xffffffffUL; |
1766 | do { | 1764 | do { |
1767 | struct sparc_stackf32 *usf, sf; | 1765 | struct sparc_stackf32 *usf, sf; |
@@ -1780,6 +1778,11 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry, | |||
1780 | void | 1778 | void |
1781 | perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) | 1779 | perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) |
1782 | { | 1780 | { |
1781 | perf_callchain_store(entry, regs->tpc); | ||
1782 | |||
1783 | if (!current->mm) | ||
1784 | return; | ||
1785 | |||
1783 | flushw_user(); | 1786 | flushw_user(); |
1784 | if (test_thread_flag(TIF_32BIT)) | 1787 | if (test_thread_flag(TIF_32BIT)) |
1785 | perf_callchain_user_32(entry, regs); | 1788 | perf_callchain_user_32(entry, regs); |
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index fcaa59421126..d778248ef3f8 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/tick.h> | 27 | #include <linux/tick.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/cpu.h> | 29 | #include <linux/cpu.h> |
30 | #include <linux/perf_event.h> | ||
30 | #include <linux/elfcore.h> | 31 | #include <linux/elfcore.h> |
31 | #include <linux/sysrq.h> | 32 | #include <linux/sysrq.h> |
32 | #include <linux/nmi.h> | 33 | #include <linux/nmi.h> |
@@ -47,6 +48,7 @@ | |||
47 | #include <asm/syscalls.h> | 48 | #include <asm/syscalls.h> |
48 | #include <asm/irq_regs.h> | 49 | #include <asm/irq_regs.h> |
49 | #include <asm/smp.h> | 50 | #include <asm/smp.h> |
51 | #include <asm/pcr.h> | ||
50 | 52 | ||
51 | #include "kstack.h" | 53 | #include "kstack.h" |
52 | 54 | ||
@@ -204,18 +206,22 @@ void show_regs(struct pt_regs *regs) | |||
204 | show_stack(current, (unsigned long *) regs->u_regs[UREG_FP]); | 206 | show_stack(current, (unsigned long *) regs->u_regs[UREG_FP]); |
205 | } | 207 | } |
206 | 208 | ||
207 | struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; | 209 | union global_cpu_snapshot global_cpu_snapshot[NR_CPUS]; |
208 | static DEFINE_SPINLOCK(global_reg_snapshot_lock); | 210 | static DEFINE_SPINLOCK(global_cpu_snapshot_lock); |
209 | 211 | ||
210 | static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, | 212 | static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, |
211 | int this_cpu) | 213 | int this_cpu) |
212 | { | 214 | { |
215 | struct global_reg_snapshot *rp; | ||
216 | |||
213 | flushw_all(); | 217 | flushw_all(); |
214 | 218 | ||
215 | global_reg_snapshot[this_cpu].tstate = regs->tstate; | 219 | rp = &global_cpu_snapshot[this_cpu].reg; |
216 | global_reg_snapshot[this_cpu].tpc = regs->tpc; | 220 | |
217 | global_reg_snapshot[this_cpu].tnpc = regs->tnpc; | 221 | rp->tstate = regs->tstate; |
218 | global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7]; | 222 | rp->tpc = regs->tpc; |
223 | rp->tnpc = regs->tnpc; | ||
224 | rp->o7 = regs->u_regs[UREG_I7]; | ||
219 | 225 | ||
220 | if (regs->tstate & TSTATE_PRIV) { | 226 | if (regs->tstate & TSTATE_PRIV) { |
221 | struct reg_window *rw; | 227 | struct reg_window *rw; |
@@ -223,17 +229,17 @@ static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, | |||
223 | rw = (struct reg_window *) | 229 | rw = (struct reg_window *) |
224 | (regs->u_regs[UREG_FP] + STACK_BIAS); | 230 | (regs->u_regs[UREG_FP] + STACK_BIAS); |
225 | if (kstack_valid(tp, (unsigned long) rw)) { | 231 | if (kstack_valid(tp, (unsigned long) rw)) { |
226 | global_reg_snapshot[this_cpu].i7 = rw->ins[7]; | 232 | rp->i7 = rw->ins[7]; |
227 | rw = (struct reg_window *) | 233 | rw = (struct reg_window *) |
228 | (rw->ins[6] + STACK_BIAS); | 234 | (rw->ins[6] + STACK_BIAS); |
229 | if (kstack_valid(tp, (unsigned long) rw)) | 235 | if (kstack_valid(tp, (unsigned long) rw)) |
230 | global_reg_snapshot[this_cpu].rpc = rw->ins[7]; | 236 | rp->rpc = rw->ins[7]; |
231 | } | 237 | } |
232 | } else { | 238 | } else { |
233 | global_reg_snapshot[this_cpu].i7 = 0; | 239 | rp->i7 = 0; |
234 | global_reg_snapshot[this_cpu].rpc = 0; | 240 | rp->rpc = 0; |
235 | } | 241 | } |
236 | global_reg_snapshot[this_cpu].thread = tp; | 242 | rp->thread = tp; |
237 | } | 243 | } |
238 | 244 | ||
239 | /* In order to avoid hangs we do not try to synchronize with the | 245 | /* In order to avoid hangs we do not try to synchronize with the |
@@ -261,9 +267,9 @@ void arch_trigger_all_cpu_backtrace(void) | |||
261 | if (!regs) | 267 | if (!regs) |
262 | regs = tp->kregs; | 268 | regs = tp->kregs; |
263 | 269 | ||
264 | spin_lock_irqsave(&global_reg_snapshot_lock, flags); | 270 | spin_lock_irqsave(&global_cpu_snapshot_lock, flags); |
265 | 271 | ||
266 | memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot)); | 272 | memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot)); |
267 | 273 | ||
268 | this_cpu = raw_smp_processor_id(); | 274 | this_cpu = raw_smp_processor_id(); |
269 | 275 | ||
@@ -272,7 +278,7 @@ void arch_trigger_all_cpu_backtrace(void) | |||
272 | smp_fetch_global_regs(); | 278 | smp_fetch_global_regs(); |
273 | 279 | ||
274 | for_each_online_cpu(cpu) { | 280 | for_each_online_cpu(cpu) { |
275 | struct global_reg_snapshot *gp = &global_reg_snapshot[cpu]; | 281 | struct global_reg_snapshot *gp = &global_cpu_snapshot[cpu].reg; |
276 | 282 | ||
277 | __global_reg_poll(gp); | 283 | __global_reg_poll(gp); |
278 | 284 | ||
@@ -295,9 +301,9 @@ void arch_trigger_all_cpu_backtrace(void) | |||
295 | } | 301 | } |
296 | } | 302 | } |
297 | 303 | ||
298 | memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot)); | 304 | memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot)); |
299 | 305 | ||
300 | spin_unlock_irqrestore(&global_reg_snapshot_lock, flags); | 306 | spin_unlock_irqrestore(&global_cpu_snapshot_lock, flags); |
301 | } | 307 | } |
302 | 308 | ||
303 | #ifdef CONFIG_MAGIC_SYSRQ | 309 | #ifdef CONFIG_MAGIC_SYSRQ |
@@ -309,16 +315,90 @@ static void sysrq_handle_globreg(int key) | |||
309 | 315 | ||
310 | static struct sysrq_key_op sparc_globalreg_op = { | 316 | static struct sysrq_key_op sparc_globalreg_op = { |
311 | .handler = sysrq_handle_globreg, | 317 | .handler = sysrq_handle_globreg, |
312 | .help_msg = "Globalregs", | 318 | .help_msg = "global-regs(Y)", |
313 | .action_msg = "Show Global CPU Regs", | 319 | .action_msg = "Show Global CPU Regs", |
314 | }; | 320 | }; |
315 | 321 | ||
316 | static int __init sparc_globreg_init(void) | 322 | static void __global_pmu_self(int this_cpu) |
323 | { | ||
324 | struct global_pmu_snapshot *pp; | ||
325 | int i, num; | ||
326 | |||
327 | pp = &global_cpu_snapshot[this_cpu].pmu; | ||
328 | |||
329 | num = 1; | ||
330 | if (tlb_type == hypervisor && | ||
331 | sun4v_chip_type >= SUN4V_CHIP_NIAGARA4) | ||
332 | num = 4; | ||
333 | |||
334 | for (i = 0; i < num; i++) { | ||
335 | pp->pcr[i] = pcr_ops->read_pcr(i); | ||
336 | pp->pic[i] = pcr_ops->read_pic(i); | ||
337 | } | ||
338 | } | ||
339 | |||
340 | static void __global_pmu_poll(struct global_pmu_snapshot *pp) | ||
341 | { | ||
342 | int limit = 0; | ||
343 | |||
344 | while (!pp->pcr[0] && ++limit < 100) { | ||
345 | barrier(); | ||
346 | udelay(1); | ||
347 | } | ||
348 | } | ||
349 | |||
350 | static void pmu_snapshot_all_cpus(void) | ||
317 | { | 351 | { |
318 | return register_sysrq_key('y', &sparc_globalreg_op); | 352 | unsigned long flags; |
353 | int this_cpu, cpu; | ||
354 | |||
355 | spin_lock_irqsave(&global_cpu_snapshot_lock, flags); | ||
356 | |||
357 | memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot)); | ||
358 | |||
359 | this_cpu = raw_smp_processor_id(); | ||
360 | |||
361 | __global_pmu_self(this_cpu); | ||
362 | |||
363 | smp_fetch_global_pmu(); | ||
364 | |||
365 | for_each_online_cpu(cpu) { | ||
366 | struct global_pmu_snapshot *pp = &global_cpu_snapshot[cpu].pmu; | ||
367 | |||
368 | __global_pmu_poll(pp); | ||
369 | |||
370 | printk("%c CPU[%3d]: PCR[%08lx:%08lx:%08lx:%08lx] PIC[%08lx:%08lx:%08lx:%08lx]\n", | ||
371 | (cpu == this_cpu ? '*' : ' '), cpu, | ||
372 | pp->pcr[0], pp->pcr[1], pp->pcr[2], pp->pcr[3], | ||
373 | pp->pic[0], pp->pic[1], pp->pic[2], pp->pic[3]); | ||
374 | } | ||
375 | |||
376 | memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot)); | ||
377 | |||
378 | spin_unlock_irqrestore(&global_cpu_snapshot_lock, flags); | ||
379 | } | ||
380 | |||
381 | static void sysrq_handle_globpmu(int key) | ||
382 | { | ||
383 | pmu_snapshot_all_cpus(); | ||
384 | } | ||
385 | |||
386 | static struct sysrq_key_op sparc_globalpmu_op = { | ||
387 | .handler = sysrq_handle_globpmu, | ||
388 | .help_msg = "global-pmu(X)", | ||
389 | .action_msg = "Show Global PMU Regs", | ||
390 | }; | ||
391 | |||
392 | static int __init sparc_sysrq_init(void) | ||
393 | { | ||
394 | int ret = register_sysrq_key('y', &sparc_globalreg_op); | ||
395 | |||
396 | if (!ret) | ||
397 | ret = register_sysrq_key('x', &sparc_globalpmu_op); | ||
398 | return ret; | ||
319 | } | 399 | } |
320 | 400 | ||
321 | core_initcall(sparc_globreg_init); | 401 | core_initcall(sparc_sysrq_init); |
322 | 402 | ||
323 | #endif | 403 | #endif |
324 | 404 | ||
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 781bcb10b8bd..d94b878577b7 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -852,6 +852,8 @@ extern unsigned long xcall_flush_tlb_mm; | |||
852 | extern unsigned long xcall_flush_tlb_pending; | 852 | extern unsigned long xcall_flush_tlb_pending; |
853 | extern unsigned long xcall_flush_tlb_kernel_range; | 853 | extern unsigned long xcall_flush_tlb_kernel_range; |
854 | extern unsigned long xcall_fetch_glob_regs; | 854 | extern unsigned long xcall_fetch_glob_regs; |
855 | extern unsigned long xcall_fetch_glob_pmu; | ||
856 | extern unsigned long xcall_fetch_glob_pmu_n4; | ||
855 | extern unsigned long xcall_receive_signal; | 857 | extern unsigned long xcall_receive_signal; |
856 | extern unsigned long xcall_new_mmu_context_version; | 858 | extern unsigned long xcall_new_mmu_context_version; |
857 | #ifdef CONFIG_KGDB | 859 | #ifdef CONFIG_KGDB |
@@ -1000,6 +1002,15 @@ void smp_fetch_global_regs(void) | |||
1000 | smp_cross_call(&xcall_fetch_glob_regs, 0, 0, 0); | 1002 | smp_cross_call(&xcall_fetch_glob_regs, 0, 0, 0); |
1001 | } | 1003 | } |
1002 | 1004 | ||
1005 | void smp_fetch_global_pmu(void) | ||
1006 | { | ||
1007 | if (tlb_type == hypervisor && | ||
1008 | sun4v_chip_type >= SUN4V_CHIP_NIAGARA4) | ||
1009 | smp_cross_call(&xcall_fetch_glob_pmu_n4, 0, 0, 0); | ||
1010 | else | ||
1011 | smp_cross_call(&xcall_fetch_glob_pmu, 0, 0, 0); | ||
1012 | } | ||
1013 | |||
1003 | /* We know that the window frames of the user have been flushed | 1014 | /* We know that the window frames of the user have been flushed |
1004 | * to the stack before we get here because all callers of us | 1015 | * to the stack before we get here because all callers of us |
1005 | * are flush_tlb_*() routines, and these run after flush_cache_*() | 1016 | * are flush_tlb_*() routines, and these run after flush_cache_*() |
diff --git a/arch/sparc/mm/ultra.S b/arch/sparc/mm/ultra.S index 874162a11ceb..f8e13d421fcb 100644 --- a/arch/sparc/mm/ultra.S +++ b/arch/sparc/mm/ultra.S | |||
@@ -481,8 +481,8 @@ xcall_sync_tick: | |||
481 | 481 | ||
482 | .globl xcall_fetch_glob_regs | 482 | .globl xcall_fetch_glob_regs |
483 | xcall_fetch_glob_regs: | 483 | xcall_fetch_glob_regs: |
484 | sethi %hi(global_reg_snapshot), %g1 | 484 | sethi %hi(global_cpu_snapshot), %g1 |
485 | or %g1, %lo(global_reg_snapshot), %g1 | 485 | or %g1, %lo(global_cpu_snapshot), %g1 |
486 | __GET_CPUID(%g2) | 486 | __GET_CPUID(%g2) |
487 | sllx %g2, 6, %g3 | 487 | sllx %g2, 6, %g3 |
488 | add %g1, %g3, %g1 | 488 | add %g1, %g3, %g1 |
@@ -509,6 +509,66 @@ xcall_fetch_glob_regs: | |||
509 | stx %g3, [%g1 + GR_SNAP_THREAD] | 509 | stx %g3, [%g1 + GR_SNAP_THREAD] |
510 | retry | 510 | retry |
511 | 511 | ||
512 | .globl xcall_fetch_glob_pmu | ||
513 | xcall_fetch_glob_pmu: | ||
514 | sethi %hi(global_cpu_snapshot), %g1 | ||
515 | or %g1, %lo(global_cpu_snapshot), %g1 | ||
516 | __GET_CPUID(%g2) | ||
517 | sllx %g2, 6, %g3 | ||
518 | add %g1, %g3, %g1 | ||
519 | rd %pic, %g7 | ||
520 | stx %g7, [%g1 + (4 * 8)] | ||
521 | rd %pcr, %g7 | ||
522 | stx %g7, [%g1 + (0 * 8)] | ||
523 | retry | ||
524 | |||
525 | .globl xcall_fetch_glob_pmu_n4 | ||
526 | xcall_fetch_glob_pmu_n4: | ||
527 | sethi %hi(global_cpu_snapshot), %g1 | ||
528 | or %g1, %lo(global_cpu_snapshot), %g1 | ||
529 | __GET_CPUID(%g2) | ||
530 | sllx %g2, 6, %g3 | ||
531 | add %g1, %g3, %g1 | ||
532 | |||
533 | ldxa [%g0] ASI_PIC, %g7 | ||
534 | stx %g7, [%g1 + (4 * 8)] | ||
535 | mov 0x08, %g3 | ||
536 | ldxa [%g3] ASI_PIC, %g7 | ||
537 | stx %g7, [%g1 + (5 * 8)] | ||
538 | mov 0x10, %g3 | ||
539 | ldxa [%g3] ASI_PIC, %g7 | ||
540 | stx %g7, [%g1 + (6 * 8)] | ||
541 | mov 0x18, %g3 | ||
542 | ldxa [%g3] ASI_PIC, %g7 | ||
543 | stx %g7, [%g1 + (7 * 8)] | ||
544 | |||
545 | mov %o0, %g2 | ||
546 | mov %o1, %g3 | ||
547 | mov %o5, %g7 | ||
548 | |||
549 | mov HV_FAST_VT_GET_PERFREG, %o5 | ||
550 | mov 3, %o0 | ||
551 | ta HV_FAST_TRAP | ||
552 | stx %o1, [%g1 + (3 * 8)] | ||
553 | mov HV_FAST_VT_GET_PERFREG, %o5 | ||
554 | mov 2, %o0 | ||
555 | ta HV_FAST_TRAP | ||
556 | stx %o1, [%g1 + (2 * 8)] | ||
557 | mov HV_FAST_VT_GET_PERFREG, %o5 | ||
558 | mov 1, %o0 | ||
559 | ta HV_FAST_TRAP | ||
560 | stx %o1, [%g1 + (1 * 8)] | ||
561 | mov HV_FAST_VT_GET_PERFREG, %o5 | ||
562 | mov 0, %o0 | ||
563 | ta HV_FAST_TRAP | ||
564 | stx %o1, [%g1 + (0 * 8)] | ||
565 | |||
566 | mov %g2, %o0 | ||
567 | mov %g3, %o1 | ||
568 | mov %g7, %o5 | ||
569 | |||
570 | retry | ||
571 | |||
512 | #ifdef DCACHE_ALIASING_POSSIBLE | 572 | #ifdef DCACHE_ALIASING_POSSIBLE |
513 | .align 32 | 573 | .align 32 |
514 | .globl xcall_flush_dcache_page_cheetah | 574 | .globl xcall_flush_dcache_page_cheetah |
diff --git a/arch/tile/Makefile b/arch/tile/Makefile index 55640cf92597..3d15364c6071 100644 --- a/arch/tile/Makefile +++ b/arch/tile/Makefile | |||
@@ -26,6 +26,10 @@ $(error Set TILERA_ROOT or CROSS_COMPILE when building $(ARCH) on $(HOST_ARCH)) | |||
26 | endif | 26 | endif |
27 | endif | 27 | endif |
28 | 28 | ||
29 | # The tile compiler may emit .eh_frame information for backtracing. | ||
30 | # In kernel modules, this causes load failures due to unsupported relocations. | ||
31 | KBUILD_CFLAGS += -fno-asynchronous-unwind-tables | ||
32 | |||
29 | ifneq ($(CONFIG_DEBUG_EXTRA_FLAGS),"") | 33 | ifneq ($(CONFIG_DEBUG_EXTRA_FLAGS),"") |
30 | KBUILD_CFLAGS += $(CONFIG_DEBUG_EXTRA_FLAGS) | 34 | KBUILD_CFLAGS += $(CONFIG_DEBUG_EXTRA_FLAGS) |
31 | endif | 35 | endif |
diff --git a/arch/tile/include/arch/Kbuild b/arch/tile/include/arch/Kbuild index e69de29bb2d1..3751c9fabcf2 100644 --- a/arch/tile/include/arch/Kbuild +++ b/arch/tile/include/arch/Kbuild | |||
@@ -0,0 +1 @@ | |||
# Tile arch headers | |||
diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild index c68808a09da7..6948015e08a2 100644 --- a/arch/tile/include/asm/Kbuild +++ b/arch/tile/include/asm/Kbuild | |||
@@ -1,8 +1,6 @@ | |||
1 | 1 | ||
2 | header-y += ../arch/ | 2 | header-y += ../arch/ |
3 | 3 | ||
4 | header-y += ucontext.h | ||
5 | |||
6 | generic-y += bug.h | 4 | generic-y += bug.h |
7 | generic-y += bugs.h | 5 | generic-y += bugs.h |
8 | generic-y += clkdev.h | 6 | generic-y += clkdev.h |
@@ -37,5 +35,4 @@ generic-y += statfs.h | |||
37 | generic-y += termbits.h | 35 | generic-y += termbits.h |
38 | generic-y += termios.h | 36 | generic-y += termios.h |
39 | generic-y += types.h | 37 | generic-y += types.h |
40 | generic-y += ucontext.h | ||
41 | generic-y += xor.h | 38 | generic-y += xor.h |
diff --git a/arch/tile/include/uapi/asm/Kbuild b/arch/tile/include/uapi/asm/Kbuild index 5c6915fd30b5..c20db8e428bf 100644 --- a/arch/tile/include/uapi/asm/Kbuild +++ b/arch/tile/include/uapi/asm/Kbuild | |||
@@ -15,4 +15,7 @@ header-y += siginfo.h | |||
15 | header-y += signal.h | 15 | header-y += signal.h |
16 | header-y += stat.h | 16 | header-y += stat.h |
17 | header-y += swab.h | 17 | header-y += swab.h |
18 | header-y += ucontext.h | ||
18 | header-y += unistd.h | 19 | header-y += unistd.h |
20 | |||
21 | generic-y += ucontext.h | ||
diff --git a/arch/tile/kernel/module.c b/arch/tile/kernel/module.c index 001cbfa10ac6..243ffebe38d6 100644 --- a/arch/tile/kernel/module.c +++ b/arch/tile/kernel/module.c | |||
@@ -24,16 +24,6 @@ | |||
24 | #include <asm/homecache.h> | 24 | #include <asm/homecache.h> |
25 | #include <arch/opcode.h> | 25 | #include <arch/opcode.h> |
26 | 26 | ||
27 | #ifdef __tilegx__ | ||
28 | # define Elf_Rela Elf64_Rela | ||
29 | # define ELF_R_SYM ELF64_R_SYM | ||
30 | # define ELF_R_TYPE ELF64_R_TYPE | ||
31 | #else | ||
32 | # define Elf_Rela Elf32_Rela | ||
33 | # define ELF_R_SYM ELF32_R_SYM | ||
34 | # define ELF_R_TYPE ELF32_R_TYPE | ||
35 | #endif | ||
36 | |||
37 | #ifdef MODULE_DEBUG | 27 | #ifdef MODULE_DEBUG |
38 | #define DEBUGP printk | 28 | #define DEBUGP printk |
39 | #else | 29 | #else |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 58790bd85c1d..05afcca66de6 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
@@ -142,7 +142,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-avx,) | |||
142 | KBUILD_CFLAGS += $(mflags-y) | 142 | KBUILD_CFLAGS += $(mflags-y) |
143 | KBUILD_AFLAGS += $(mflags-y) | 143 | KBUILD_AFLAGS += $(mflags-y) |
144 | 144 | ||
145 | archscripts: | 145 | archscripts: scripts_basic |
146 | $(Q)$(MAKE) $(build)=arch/x86/tools relocs | 146 | $(Q)$(MAKE) $(build)=arch/x86/tools relocs |
147 | 147 | ||
148 | ### | 148 | ### |
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 7c04d0da709b..1b9c22bea8a7 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
@@ -515,6 +515,11 @@ static int xts_aesni_setkey(struct crypto_tfm *tfm, const u8 *key, | |||
515 | } | 515 | } |
516 | 516 | ||
517 | 517 | ||
518 | static void aesni_xts_tweak(void *ctx, u8 *out, const u8 *in) | ||
519 | { | ||
520 | aesni_enc(ctx, out, in); | ||
521 | } | ||
522 | |||
518 | static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, | 523 | static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, |
519 | struct scatterlist *src, unsigned int nbytes) | 524 | struct scatterlist *src, unsigned int nbytes) |
520 | { | 525 | { |
@@ -525,7 +530,7 @@ static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, | |||
525 | .tbuflen = sizeof(buf), | 530 | .tbuflen = sizeof(buf), |
526 | 531 | ||
527 | .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx), | 532 | .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx), |
528 | .tweak_fn = XTS_TWEAK_CAST(aesni_enc), | 533 | .tweak_fn = aesni_xts_tweak, |
529 | .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx), | 534 | .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx), |
530 | .crypt_fn = lrw_xts_encrypt_callback, | 535 | .crypt_fn = lrw_xts_encrypt_callback, |
531 | }; | 536 | }; |
@@ -550,7 +555,7 @@ static int xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, | |||
550 | .tbuflen = sizeof(buf), | 555 | .tbuflen = sizeof(buf), |
551 | 556 | ||
552 | .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx), | 557 | .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx), |
553 | .tweak_fn = XTS_TWEAK_CAST(aesni_enc), | 558 | .tweak_fn = aesni_xts_tweak, |
554 | .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx), | 559 | .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx), |
555 | .crypt_fn = lrw_xts_decrypt_callback, | 560 | .crypt_fn = lrw_xts_decrypt_callback, |
556 | }; | 561 | }; |
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index c9dcc181d4d1..6e8fdf5ad113 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h | |||
@@ -35,7 +35,7 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...); | |||
35 | #define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \ | 35 | #define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \ |
36 | efi_call_virt(f, a1, a2, a3, a4, a5, a6) | 36 | efi_call_virt(f, a1, a2, a3, a4, a5, a6) |
37 | 37 | ||
38 | #define efi_ioremap(addr, size, type) ioremap_cache(addr, size) | 38 | #define efi_ioremap(addr, size, type, attr) ioremap_cache(addr, size) |
39 | 39 | ||
40 | #else /* !CONFIG_X86_32 */ | 40 | #else /* !CONFIG_X86_32 */ |
41 | 41 | ||
@@ -89,7 +89,7 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3, | |||
89 | (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6)) | 89 | (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6)) |
90 | 90 | ||
91 | extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size, | 91 | extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size, |
92 | u32 type); | 92 | u32 type, u64 attribute); |
93 | 93 | ||
94 | #endif /* CONFIG_X86_32 */ | 94 | #endif /* CONFIG_X86_32 */ |
95 | 95 | ||
@@ -98,6 +98,8 @@ extern void efi_set_executable(efi_memory_desc_t *md, bool executable); | |||
98 | extern int efi_memblock_x86_reserve_range(void); | 98 | extern int efi_memblock_x86_reserve_range(void); |
99 | extern void efi_call_phys_prelog(void); | 99 | extern void efi_call_phys_prelog(void); |
100 | extern void efi_call_phys_epilog(void); | 100 | extern void efi_call_phys_epilog(void); |
101 | extern void efi_unmap_memmap(void); | ||
102 | extern void efi_memory_uc(u64 addr, unsigned long size); | ||
101 | 103 | ||
102 | #ifndef CONFIG_EFI | 104 | #ifndef CONFIG_EFI |
103 | /* | 105 | /* |
diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h index 66d0fff1ee84..125f344f06a9 100644 --- a/arch/x86/include/asm/xen/hypervisor.h +++ b/arch/x86/include/asm/xen/hypervisor.h | |||
@@ -33,7 +33,6 @@ | |||
33 | #ifndef _ASM_X86_XEN_HYPERVISOR_H | 33 | #ifndef _ASM_X86_XEN_HYPERVISOR_H |
34 | #define _ASM_X86_XEN_HYPERVISOR_H | 34 | #define _ASM_X86_XEN_HYPERVISOR_H |
35 | 35 | ||
36 | /* arch/i386/kernel/setup.c */ | ||
37 | extern struct shared_info *HYPERVISOR_shared_info; | 36 | extern struct shared_info *HYPERVISOR_shared_info; |
38 | extern struct start_info *xen_start_info; | 37 | extern struct start_info *xen_start_info; |
39 | 38 | ||
diff --git a/arch/x86/include/asm/xen/interface.h b/arch/x86/include/asm/xen/interface.h index 6d2f75a82a14..54d52ff1304a 100644 --- a/arch/x86/include/asm/xen/interface.h +++ b/arch/x86/include/asm/xen/interface.h | |||
@@ -51,14 +51,14 @@ | |||
51 | * with Xen so that on ARM we can have one ABI that works for 32 and 64 | 51 | * with Xen so that on ARM we can have one ABI that works for 32 and 64 |
52 | * bit guests. */ | 52 | * bit guests. */ |
53 | typedef unsigned long xen_pfn_t; | 53 | typedef unsigned long xen_pfn_t; |
54 | #define PRI_xen_pfn "lx" | ||
54 | typedef unsigned long xen_ulong_t; | 55 | typedef unsigned long xen_ulong_t; |
56 | #define PRI_xen_ulong "lx" | ||
55 | /* Guest handles for primitive C types. */ | 57 | /* Guest handles for primitive C types. */ |
56 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); | 58 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); |
57 | __DEFINE_GUEST_HANDLE(uint, unsigned int); | 59 | __DEFINE_GUEST_HANDLE(uint, unsigned int); |
58 | __DEFINE_GUEST_HANDLE(ulong, unsigned long); | ||
59 | DEFINE_GUEST_HANDLE(char); | 60 | DEFINE_GUEST_HANDLE(char); |
60 | DEFINE_GUEST_HANDLE(int); | 61 | DEFINE_GUEST_HANDLE(int); |
61 | DEFINE_GUEST_HANDLE(long); | ||
62 | DEFINE_GUEST_HANDLE(void); | 62 | DEFINE_GUEST_HANDLE(void); |
63 | DEFINE_GUEST_HANDLE(uint64_t); | 63 | DEFINE_GUEST_HANDLE(uint64_t); |
64 | DEFINE_GUEST_HANDLE(uint32_t); | 64 | DEFINE_GUEST_HANDLE(uint32_t); |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index c265593ec2cd..1817fa911024 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -2257,6 +2257,9 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void) | |||
2257 | continue; | 2257 | continue; |
2258 | 2258 | ||
2259 | cfg = irq_cfg(irq); | 2259 | cfg = irq_cfg(irq); |
2260 | if (!cfg) | ||
2261 | continue; | ||
2262 | |||
2260 | raw_spin_lock(&desc->lock); | 2263 | raw_spin_lock(&desc->lock); |
2261 | 2264 | ||
2262 | /* | 2265 | /* |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 9a7c90d80bc4..93c5451bdd52 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -991,7 +991,7 @@ static struct attribute ** __cpuinit amd_l3_attrs(void) | |||
991 | if (attrs) | 991 | if (attrs) |
992 | return attrs; | 992 | return attrs; |
993 | 993 | ||
994 | n = sizeof (default_attrs) / sizeof (struct attribute *); | 994 | n = ARRAY_SIZE(default_attrs); |
995 | 995 | ||
996 | if (amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE)) | 996 | if (amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE)) |
997 | n += 2; | 997 | n += 2; |
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 29e87d3b2843..46cbf8689692 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -2209,11 +2209,6 @@ static struct dev_ext_attribute dev_attr_cmci_disabled = { | |||
2209 | &mce_cmci_disabled | 2209 | &mce_cmci_disabled |
2210 | }; | 2210 | }; |
2211 | 2211 | ||
2212 | static struct dev_ext_attribute dev_attr_bios_cmci_threshold = { | ||
2213 | __ATTR(bios_cmci_threshold, 0444, device_show_int, NULL), | ||
2214 | &mce_bios_cmci_threshold | ||
2215 | }; | ||
2216 | |||
2217 | static struct device_attribute *mce_device_attrs[] = { | 2212 | static struct device_attribute *mce_device_attrs[] = { |
2218 | &dev_attr_tolerant.attr, | 2213 | &dev_attr_tolerant.attr, |
2219 | &dev_attr_check_interval.attr, | 2214 | &dev_attr_check_interval.attr, |
@@ -2222,7 +2217,6 @@ static struct device_attribute *mce_device_attrs[] = { | |||
2222 | &dev_attr_dont_log_ce.attr, | 2217 | &dev_attr_dont_log_ce.attr, |
2223 | &dev_attr_ignore_ce.attr, | 2218 | &dev_attr_ignore_ce.attr, |
2224 | &dev_attr_cmci_disabled.attr, | 2219 | &dev_attr_cmci_disabled.attr, |
2225 | &dev_attr_bios_cmci_threshold.attr, | ||
2226 | NULL | 2220 | NULL |
2227 | }; | 2221 | }; |
2228 | 2222 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index c4e916d77378..698b6ec12e0f 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
@@ -576,12 +576,10 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
576 | int err = 0; | 576 | int err = 0; |
577 | 577 | ||
578 | if (shared_bank[bank]) { | 578 | if (shared_bank[bank]) { |
579 | |||
580 | nb = node_to_amd_nb(amd_get_nb_id(cpu)); | 579 | nb = node_to_amd_nb(amd_get_nb_id(cpu)); |
581 | WARN_ON(!nb); | ||
582 | 580 | ||
583 | /* threshold descriptor already initialized on this node? */ | 581 | /* threshold descriptor already initialized on this node? */ |
584 | if (nb->bank4) { | 582 | if (nb && nb->bank4) { |
585 | /* yes, use it */ | 583 | /* yes, use it */ |
586 | b = nb->bank4; | 584 | b = nb->bank4; |
587 | err = kobject_add(b->kobj, &dev->kobj, name); | 585 | err = kobject_add(b->kobj, &dev->kobj, name); |
@@ -615,8 +613,10 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
615 | atomic_set(&b->cpus, 1); | 613 | atomic_set(&b->cpus, 1); |
616 | 614 | ||
617 | /* nb is already initialized, see above */ | 615 | /* nb is already initialized, see above */ |
618 | WARN_ON(nb->bank4); | 616 | if (nb) { |
619 | nb->bank4 = b; | 617 | WARN_ON(nb->bank4); |
618 | nb->bank4 = b; | ||
619 | } | ||
620 | } | 620 | } |
621 | 621 | ||
622 | err = allocate_threshold_blocks(cpu, bank, 0, | 622 | err = allocate_threshold_blocks(cpu, bank, 0, |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 915b876edd1e..4a3374e61a93 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -208,12 +208,14 @@ static bool check_hw_exists(void) | |||
208 | } | 208 | } |
209 | 209 | ||
210 | /* | 210 | /* |
211 | * Now write a value and read it back to see if it matches, | 211 | * Read the current value, change it and read it back to see if it |
212 | * this is needed to detect certain hardware emulators (qemu/kvm) | 212 | * matches, this is needed to detect certain hardware emulators |
213 | * that don't trap on the MSR access and always return 0s. | 213 | * (qemu/kvm) that don't trap on the MSR access and always return 0s. |
214 | */ | 214 | */ |
215 | val = 0xabcdUL; | ||
216 | reg = x86_pmu_event_addr(0); | 215 | reg = x86_pmu_event_addr(0); |
216 | if (rdmsrl_safe(reg, &val)) | ||
217 | goto msr_fail; | ||
218 | val ^= 0xffffUL; | ||
217 | ret = wrmsrl_safe(reg, val); | 219 | ret = wrmsrl_safe(reg, val); |
218 | ret |= rdmsrl_safe(reg, &val_new); | 220 | ret |= rdmsrl_safe(reg, &val_new); |
219 | if (ret || val != val_new) | 221 | if (ret || val != val_new) |
@@ -338,6 +340,9 @@ int x86_setup_perfctr(struct perf_event *event) | |||
338 | /* BTS is currently only allowed for user-mode. */ | 340 | /* BTS is currently only allowed for user-mode. */ |
339 | if (!attr->exclude_kernel) | 341 | if (!attr->exclude_kernel) |
340 | return -EOPNOTSUPP; | 342 | return -EOPNOTSUPP; |
343 | |||
344 | if (!attr->exclude_guest) | ||
345 | return -EOPNOTSUPP; | ||
341 | } | 346 | } |
342 | 347 | ||
343 | hwc->config |= config; | 348 | hwc->config |= config; |
@@ -380,6 +385,9 @@ int x86_pmu_hw_config(struct perf_event *event) | |||
380 | if (event->attr.precise_ip) { | 385 | if (event->attr.precise_ip) { |
381 | int precise = 0; | 386 | int precise = 0; |
382 | 387 | ||
388 | if (!event->attr.exclude_guest) | ||
389 | return -EOPNOTSUPP; | ||
390 | |||
383 | /* Support for constant skid */ | 391 | /* Support for constant skid */ |
384 | if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) { | 392 | if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) { |
385 | precise++; | 393 | precise++; |
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 99d96a4978b5..3cf3d97cce3a 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c | |||
@@ -118,22 +118,24 @@ static void snbep_uncore_pci_disable_box(struct intel_uncore_box *box) | |||
118 | { | 118 | { |
119 | struct pci_dev *pdev = box->pci_dev; | 119 | struct pci_dev *pdev = box->pci_dev; |
120 | int box_ctl = uncore_pci_box_ctl(box); | 120 | int box_ctl = uncore_pci_box_ctl(box); |
121 | u32 config; | 121 | u32 config = 0; |
122 | 122 | ||
123 | pci_read_config_dword(pdev, box_ctl, &config); | 123 | if (!pci_read_config_dword(pdev, box_ctl, &config)) { |
124 | config |= SNBEP_PMON_BOX_CTL_FRZ; | 124 | config |= SNBEP_PMON_BOX_CTL_FRZ; |
125 | pci_write_config_dword(pdev, box_ctl, config); | 125 | pci_write_config_dword(pdev, box_ctl, config); |
126 | } | ||
126 | } | 127 | } |
127 | 128 | ||
128 | static void snbep_uncore_pci_enable_box(struct intel_uncore_box *box) | 129 | static void snbep_uncore_pci_enable_box(struct intel_uncore_box *box) |
129 | { | 130 | { |
130 | struct pci_dev *pdev = box->pci_dev; | 131 | struct pci_dev *pdev = box->pci_dev; |
131 | int box_ctl = uncore_pci_box_ctl(box); | 132 | int box_ctl = uncore_pci_box_ctl(box); |
132 | u32 config; | 133 | u32 config = 0; |
133 | 134 | ||
134 | pci_read_config_dword(pdev, box_ctl, &config); | 135 | if (!pci_read_config_dword(pdev, box_ctl, &config)) { |
135 | config &= ~SNBEP_PMON_BOX_CTL_FRZ; | 136 | config &= ~SNBEP_PMON_BOX_CTL_FRZ; |
136 | pci_write_config_dword(pdev, box_ctl, config); | 137 | pci_write_config_dword(pdev, box_ctl, config); |
138 | } | ||
137 | } | 139 | } |
138 | 140 | ||
139 | static void snbep_uncore_pci_enable_event(struct intel_uncore_box *box, struct perf_event *event) | 141 | static void snbep_uncore_pci_enable_event(struct intel_uncore_box *box, struct perf_event *event) |
@@ -156,7 +158,7 @@ static u64 snbep_uncore_pci_read_counter(struct intel_uncore_box *box, struct pe | |||
156 | { | 158 | { |
157 | struct pci_dev *pdev = box->pci_dev; | 159 | struct pci_dev *pdev = box->pci_dev; |
158 | struct hw_perf_event *hwc = &event->hw; | 160 | struct hw_perf_event *hwc = &event->hw; |
159 | u64 count; | 161 | u64 count = 0; |
160 | 162 | ||
161 | pci_read_config_dword(pdev, hwc->event_base, (u32 *)&count); | 163 | pci_read_config_dword(pdev, hwc->event_base, (u32 *)&count); |
162 | pci_read_config_dword(pdev, hwc->event_base + 4, (u32 *)&count + 1); | 164 | pci_read_config_dword(pdev, hwc->event_base + 4, (u32 *)&count + 1); |
@@ -603,11 +605,12 @@ static struct pci_driver snbep_uncore_pci_driver = { | |||
603 | /* | 605 | /* |
604 | * build pci bus to socket mapping | 606 | * build pci bus to socket mapping |
605 | */ | 607 | */ |
606 | static void snbep_pci2phy_map_init(void) | 608 | static int snbep_pci2phy_map_init(void) |
607 | { | 609 | { |
608 | struct pci_dev *ubox_dev = NULL; | 610 | struct pci_dev *ubox_dev = NULL; |
609 | int i, bus, nodeid; | 611 | int i, bus, nodeid; |
610 | u32 config; | 612 | int err = 0; |
613 | u32 config = 0; | ||
611 | 614 | ||
612 | while (1) { | 615 | while (1) { |
613 | /* find the UBOX device */ | 616 | /* find the UBOX device */ |
@@ -618,10 +621,14 @@ static void snbep_pci2phy_map_init(void) | |||
618 | break; | 621 | break; |
619 | bus = ubox_dev->bus->number; | 622 | bus = ubox_dev->bus->number; |
620 | /* get the Node ID of the local register */ | 623 | /* get the Node ID of the local register */ |
621 | pci_read_config_dword(ubox_dev, 0x40, &config); | 624 | err = pci_read_config_dword(ubox_dev, 0x40, &config); |
625 | if (err) | ||
626 | break; | ||
622 | nodeid = config; | 627 | nodeid = config; |
623 | /* get the Node ID mapping */ | 628 | /* get the Node ID mapping */ |
624 | pci_read_config_dword(ubox_dev, 0x54, &config); | 629 | err = pci_read_config_dword(ubox_dev, 0x54, &config); |
630 | if (err) | ||
631 | break; | ||
625 | /* | 632 | /* |
626 | * every three bits in the Node ID mapping register maps | 633 | * every three bits in the Node ID mapping register maps |
627 | * to a particular node. | 634 | * to a particular node. |
@@ -633,7 +640,11 @@ static void snbep_pci2phy_map_init(void) | |||
633 | } | 640 | } |
634 | } | 641 | } |
635 | }; | 642 | }; |
636 | return; | 643 | |
644 | if (ubox_dev) | ||
645 | pci_dev_put(ubox_dev); | ||
646 | |||
647 | return err ? pcibios_err_to_errno(err) : 0; | ||
637 | } | 648 | } |
638 | /* end of Sandy Bridge-EP uncore support */ | 649 | /* end of Sandy Bridge-EP uncore support */ |
639 | 650 | ||
@@ -1547,7 +1558,6 @@ void nhmex_rbox_alter_er(struct intel_uncore_box *box, struct perf_event *event) | |||
1547 | { | 1558 | { |
1548 | struct hw_perf_event *hwc = &event->hw; | 1559 | struct hw_perf_event *hwc = &event->hw; |
1549 | struct hw_perf_event_extra *reg1 = &hwc->extra_reg; | 1560 | struct hw_perf_event_extra *reg1 = &hwc->extra_reg; |
1550 | int port; | ||
1551 | 1561 | ||
1552 | /* adjust the main event selector and extra register index */ | 1562 | /* adjust the main event selector and extra register index */ |
1553 | if (reg1->idx % 2) { | 1563 | if (reg1->idx % 2) { |
@@ -1559,7 +1569,6 @@ void nhmex_rbox_alter_er(struct intel_uncore_box *box, struct perf_event *event) | |||
1559 | } | 1569 | } |
1560 | 1570 | ||
1561 | /* adjust extra register config */ | 1571 | /* adjust extra register config */ |
1562 | port = reg1->idx / 6 + box->pmu->pmu_idx * 4; | ||
1563 | switch (reg1->idx % 6) { | 1572 | switch (reg1->idx % 6) { |
1564 | case 2: | 1573 | case 2: |
1565 | /* shift the 8~15 bits to the 0~7 bits */ | 1574 | /* shift the 8~15 bits to the 0~7 bits */ |
@@ -2578,9 +2587,11 @@ static int __init uncore_pci_init(void) | |||
2578 | 2587 | ||
2579 | switch (boot_cpu_data.x86_model) { | 2588 | switch (boot_cpu_data.x86_model) { |
2580 | case 45: /* Sandy Bridge-EP */ | 2589 | case 45: /* Sandy Bridge-EP */ |
2590 | ret = snbep_pci2phy_map_init(); | ||
2591 | if (ret) | ||
2592 | return ret; | ||
2581 | pci_uncores = snbep_pci_uncores; | 2593 | pci_uncores = snbep_pci_uncores; |
2582 | uncore_pci_driver = &snbep_uncore_pci_driver; | 2594 | uncore_pci_driver = &snbep_uncore_pci_driver; |
2583 | snbep_pci2phy_map_init(); | ||
2584 | break; | 2595 | break; |
2585 | default: | 2596 | default: |
2586 | return 0; | 2597 | return 0; |
@@ -2926,6 +2937,9 @@ static int __init intel_uncore_init(void) | |||
2926 | if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) | 2937 | if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) |
2927 | return -ENODEV; | 2938 | return -ENODEV; |
2928 | 2939 | ||
2940 | if (cpu_has_hypervisor) | ||
2941 | return -ENODEV; | ||
2942 | |||
2929 | ret = uncore_pci_init(); | 2943 | ret = uncore_pci_init(); |
2930 | if (ret) | 2944 | if (ret) |
2931 | goto fail; | 2945 | goto fail; |
diff --git a/arch/x86/kernel/cpu/perf_event_knc.c b/arch/x86/kernel/cpu/perf_event_knc.c index 7c46bfdbc373..4b7731bf23a8 100644 --- a/arch/x86/kernel/cpu/perf_event_knc.c +++ b/arch/x86/kernel/cpu/perf_event_knc.c | |||
@@ -3,6 +3,8 @@ | |||
3 | #include <linux/perf_event.h> | 3 | #include <linux/perf_event.h> |
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | #include <asm/hardirq.h> | ||
7 | |||
6 | #include "perf_event.h" | 8 | #include "perf_event.h" |
7 | 9 | ||
8 | static const u64 knc_perfmon_event_map[] = | 10 | static const u64 knc_perfmon_event_map[] = |
@@ -173,30 +175,100 @@ static void knc_pmu_enable_all(int added) | |||
173 | static inline void | 175 | static inline void |
174 | knc_pmu_disable_event(struct perf_event *event) | 176 | knc_pmu_disable_event(struct perf_event *event) |
175 | { | 177 | { |
176 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | ||
177 | struct hw_perf_event *hwc = &event->hw; | 178 | struct hw_perf_event *hwc = &event->hw; |
178 | u64 val; | 179 | u64 val; |
179 | 180 | ||
180 | val = hwc->config; | 181 | val = hwc->config; |
181 | if (cpuc->enabled) | 182 | val &= ~ARCH_PERFMON_EVENTSEL_ENABLE; |
182 | val &= ~ARCH_PERFMON_EVENTSEL_ENABLE; | ||
183 | 183 | ||
184 | (void)wrmsrl_safe(hwc->config_base + hwc->idx, val); | 184 | (void)wrmsrl_safe(hwc->config_base + hwc->idx, val); |
185 | } | 185 | } |
186 | 186 | ||
187 | static void knc_pmu_enable_event(struct perf_event *event) | 187 | static void knc_pmu_enable_event(struct perf_event *event) |
188 | { | 188 | { |
189 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | ||
190 | struct hw_perf_event *hwc = &event->hw; | 189 | struct hw_perf_event *hwc = &event->hw; |
191 | u64 val; | 190 | u64 val; |
192 | 191 | ||
193 | val = hwc->config; | 192 | val = hwc->config; |
194 | if (cpuc->enabled) | 193 | val |= ARCH_PERFMON_EVENTSEL_ENABLE; |
195 | val |= ARCH_PERFMON_EVENTSEL_ENABLE; | ||
196 | 194 | ||
197 | (void)wrmsrl_safe(hwc->config_base + hwc->idx, val); | 195 | (void)wrmsrl_safe(hwc->config_base + hwc->idx, val); |
198 | } | 196 | } |
199 | 197 | ||
198 | static inline u64 knc_pmu_get_status(void) | ||
199 | { | ||
200 | u64 status; | ||
201 | |||
202 | rdmsrl(MSR_KNC_IA32_PERF_GLOBAL_STATUS, status); | ||
203 | |||
204 | return status; | ||
205 | } | ||
206 | |||
207 | static inline void knc_pmu_ack_status(u64 ack) | ||
208 | { | ||
209 | wrmsrl(MSR_KNC_IA32_PERF_GLOBAL_OVF_CONTROL, ack); | ||
210 | } | ||
211 | |||
212 | static int knc_pmu_handle_irq(struct pt_regs *regs) | ||
213 | { | ||
214 | struct perf_sample_data data; | ||
215 | struct cpu_hw_events *cpuc; | ||
216 | int handled = 0; | ||
217 | int bit, loops; | ||
218 | u64 status; | ||
219 | |||
220 | cpuc = &__get_cpu_var(cpu_hw_events); | ||
221 | |||
222 | knc_pmu_disable_all(); | ||
223 | |||
224 | status = knc_pmu_get_status(); | ||
225 | if (!status) { | ||
226 | knc_pmu_enable_all(0); | ||
227 | return handled; | ||
228 | } | ||
229 | |||
230 | loops = 0; | ||
231 | again: | ||
232 | knc_pmu_ack_status(status); | ||
233 | if (++loops > 100) { | ||
234 | WARN_ONCE(1, "perf: irq loop stuck!\n"); | ||
235 | perf_event_print_debug(); | ||
236 | goto done; | ||
237 | } | ||
238 | |||
239 | inc_irq_stat(apic_perf_irqs); | ||
240 | |||
241 | for_each_set_bit(bit, (unsigned long *)&status, X86_PMC_IDX_MAX) { | ||
242 | struct perf_event *event = cpuc->events[bit]; | ||
243 | |||
244 | handled++; | ||
245 | |||
246 | if (!test_bit(bit, cpuc->active_mask)) | ||
247 | continue; | ||
248 | |||
249 | if (!intel_pmu_save_and_restart(event)) | ||
250 | continue; | ||
251 | |||
252 | perf_sample_data_init(&data, 0, event->hw.last_period); | ||
253 | |||
254 | if (perf_event_overflow(event, &data, regs)) | ||
255 | x86_pmu_stop(event, 0); | ||
256 | } | ||
257 | |||
258 | /* | ||
259 | * Repeat if there is more work to be done: | ||
260 | */ | ||
261 | status = knc_pmu_get_status(); | ||
262 | if (status) | ||
263 | goto again; | ||
264 | |||
265 | done: | ||
266 | knc_pmu_enable_all(0); | ||
267 | |||
268 | return handled; | ||
269 | } | ||
270 | |||
271 | |||
200 | PMU_FORMAT_ATTR(event, "config:0-7" ); | 272 | PMU_FORMAT_ATTR(event, "config:0-7" ); |
201 | PMU_FORMAT_ATTR(umask, "config:8-15" ); | 273 | PMU_FORMAT_ATTR(umask, "config:8-15" ); |
202 | PMU_FORMAT_ATTR(edge, "config:18" ); | 274 | PMU_FORMAT_ATTR(edge, "config:18" ); |
@@ -214,7 +286,7 @@ static struct attribute *intel_knc_formats_attr[] = { | |||
214 | 286 | ||
215 | static __initconst struct x86_pmu knc_pmu = { | 287 | static __initconst struct x86_pmu knc_pmu = { |
216 | .name = "knc", | 288 | .name = "knc", |
217 | .handle_irq = x86_pmu_handle_irq, | 289 | .handle_irq = knc_pmu_handle_irq, |
218 | .disable_all = knc_pmu_disable_all, | 290 | .disable_all = knc_pmu_disable_all, |
219 | .enable_all = knc_pmu_enable_all, | 291 | .enable_all = knc_pmu_enable_all, |
220 | .enable = knc_pmu_enable_event, | 292 | .enable = knc_pmu_enable_event, |
@@ -226,12 +298,11 @@ static __initconst struct x86_pmu knc_pmu = { | |||
226 | .event_map = knc_pmu_event_map, | 298 | .event_map = knc_pmu_event_map, |
227 | .max_events = ARRAY_SIZE(knc_perfmon_event_map), | 299 | .max_events = ARRAY_SIZE(knc_perfmon_event_map), |
228 | .apic = 1, | 300 | .apic = 1, |
229 | .max_period = (1ULL << 31) - 1, | 301 | .max_period = (1ULL << 39) - 1, |
230 | .version = 0, | 302 | .version = 0, |
231 | .num_counters = 2, | 303 | .num_counters = 2, |
232 | /* in theory 40 bits, early silicon is buggy though */ | 304 | .cntval_bits = 40, |
233 | .cntval_bits = 32, | 305 | .cntval_mask = (1ULL << 40) - 1, |
234 | .cntval_mask = (1ULL << 32) - 1, | ||
235 | .get_event_constraints = x86_get_event_constraints, | 306 | .get_event_constraints = x86_get_event_constraints, |
236 | .event_constraints = knc_event_constraints, | 307 | .event_constraints = knc_event_constraints, |
237 | .format_attrs = intel_knc_formats_attr, | 308 | .format_attrs = intel_knc_formats_attr, |
diff --git a/arch/x86/kernel/cpu/perf_event_p6.c b/arch/x86/kernel/cpu/perf_event_p6.c index e4dd0f7a0453..7d0270bd793e 100644 --- a/arch/x86/kernel/cpu/perf_event_p6.c +++ b/arch/x86/kernel/cpu/perf_event_p6.c | |||
@@ -8,13 +8,106 @@ | |||
8 | */ | 8 | */ |
9 | static const u64 p6_perfmon_event_map[] = | 9 | static const u64 p6_perfmon_event_map[] = |
10 | { | 10 | { |
11 | [PERF_COUNT_HW_CPU_CYCLES] = 0x0079, | 11 | [PERF_COUNT_HW_CPU_CYCLES] = 0x0079, /* CPU_CLK_UNHALTED */ |
12 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, | 12 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, /* INST_RETIRED */ |
13 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0f2e, | 13 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0f2e, /* L2_RQSTS:M:E:S:I */ |
14 | [PERF_COUNT_HW_CACHE_MISSES] = 0x012e, | 14 | [PERF_COUNT_HW_CACHE_MISSES] = 0x012e, /* L2_RQSTS:I */ |
15 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c4, | 15 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c4, /* BR_INST_RETIRED */ |
16 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5, | 16 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5, /* BR_MISS_PRED_RETIRED */ |
17 | [PERF_COUNT_HW_BUS_CYCLES] = 0x0062, | 17 | [PERF_COUNT_HW_BUS_CYCLES] = 0x0062, /* BUS_DRDY_CLOCKS */ |
18 | [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = 0x00a2, /* RESOURCE_STALLS */ | ||
19 | |||
20 | }; | ||
21 | |||
22 | static __initconst u64 p6_hw_cache_event_ids | ||
23 | [PERF_COUNT_HW_CACHE_MAX] | ||
24 | [PERF_COUNT_HW_CACHE_OP_MAX] | ||
25 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | ||
26 | { | ||
27 | [ C(L1D) ] = { | ||
28 | [ C(OP_READ) ] = { | ||
29 | [ C(RESULT_ACCESS) ] = 0x0043, /* DATA_MEM_REFS */ | ||
30 | [ C(RESULT_MISS) ] = 0x0045, /* DCU_LINES_IN */ | ||
31 | }, | ||
32 | [ C(OP_WRITE) ] = { | ||
33 | [ C(RESULT_ACCESS) ] = 0, | ||
34 | [ C(RESULT_MISS) ] = 0x0f29, /* L2_LD:M:E:S:I */ | ||
35 | }, | ||
36 | [ C(OP_PREFETCH) ] = { | ||
37 | [ C(RESULT_ACCESS) ] = 0, | ||
38 | [ C(RESULT_MISS) ] = 0, | ||
39 | }, | ||
40 | }, | ||
41 | [ C(L1I ) ] = { | ||
42 | [ C(OP_READ) ] = { | ||
43 | [ C(RESULT_ACCESS) ] = 0x0080, /* IFU_IFETCH */ | ||
44 | [ C(RESULT_MISS) ] = 0x0f28, /* L2_IFETCH:M:E:S:I */ | ||
45 | }, | ||
46 | [ C(OP_WRITE) ] = { | ||
47 | [ C(RESULT_ACCESS) ] = -1, | ||
48 | [ C(RESULT_MISS) ] = -1, | ||
49 | }, | ||
50 | [ C(OP_PREFETCH) ] = { | ||
51 | [ C(RESULT_ACCESS) ] = 0, | ||
52 | [ C(RESULT_MISS) ] = 0, | ||
53 | }, | ||
54 | }, | ||
55 | [ C(LL ) ] = { | ||
56 | [ C(OP_READ) ] = { | ||
57 | [ C(RESULT_ACCESS) ] = 0, | ||
58 | [ C(RESULT_MISS) ] = 0, | ||
59 | }, | ||
60 | [ C(OP_WRITE) ] = { | ||
61 | [ C(RESULT_ACCESS) ] = 0, | ||
62 | [ C(RESULT_MISS) ] = 0x0025, /* L2_M_LINES_INM */ | ||
63 | }, | ||
64 | [ C(OP_PREFETCH) ] = { | ||
65 | [ C(RESULT_ACCESS) ] = 0, | ||
66 | [ C(RESULT_MISS) ] = 0, | ||
67 | }, | ||
68 | }, | ||
69 | [ C(DTLB) ] = { | ||
70 | [ C(OP_READ) ] = { | ||
71 | [ C(RESULT_ACCESS) ] = 0x0043, /* DATA_MEM_REFS */ | ||
72 | [ C(RESULT_MISS) ] = 0, | ||
73 | }, | ||
74 | [ C(OP_WRITE) ] = { | ||
75 | [ C(RESULT_ACCESS) ] = 0, | ||
76 | [ C(RESULT_MISS) ] = 0, | ||
77 | }, | ||
78 | [ C(OP_PREFETCH) ] = { | ||
79 | [ C(RESULT_ACCESS) ] = 0, | ||
80 | [ C(RESULT_MISS) ] = 0, | ||
81 | }, | ||
82 | }, | ||
83 | [ C(ITLB) ] = { | ||
84 | [ C(OP_READ) ] = { | ||
85 | [ C(RESULT_ACCESS) ] = 0x0080, /* IFU_IFETCH */ | ||
86 | [ C(RESULT_MISS) ] = 0x0085, /* ITLB_MISS */ | ||
87 | }, | ||
88 | [ C(OP_WRITE) ] = { | ||
89 | [ C(RESULT_ACCESS) ] = -1, | ||
90 | [ C(RESULT_MISS) ] = -1, | ||
91 | }, | ||
92 | [ C(OP_PREFETCH) ] = { | ||
93 | [ C(RESULT_ACCESS) ] = -1, | ||
94 | [ C(RESULT_MISS) ] = -1, | ||
95 | }, | ||
96 | }, | ||
97 | [ C(BPU ) ] = { | ||
98 | [ C(OP_READ) ] = { | ||
99 | [ C(RESULT_ACCESS) ] = 0x00c4, /* BR_INST_RETIRED */ | ||
100 | [ C(RESULT_MISS) ] = 0x00c5, /* BR_MISS_PRED_RETIRED */ | ||
101 | }, | ||
102 | [ C(OP_WRITE) ] = { | ||
103 | [ C(RESULT_ACCESS) ] = -1, | ||
104 | [ C(RESULT_MISS) ] = -1, | ||
105 | }, | ||
106 | [ C(OP_PREFETCH) ] = { | ||
107 | [ C(RESULT_ACCESS) ] = -1, | ||
108 | [ C(RESULT_MISS) ] = -1, | ||
109 | }, | ||
110 | }, | ||
18 | }; | 111 | }; |
19 | 112 | ||
20 | static u64 p6_pmu_event_map(int hw_event) | 113 | static u64 p6_pmu_event_map(int hw_event) |
@@ -34,7 +127,7 @@ static struct event_constraint p6_event_constraints[] = | |||
34 | { | 127 | { |
35 | INTEL_EVENT_CONSTRAINT(0xc1, 0x1), /* FLOPS */ | 128 | INTEL_EVENT_CONSTRAINT(0xc1, 0x1), /* FLOPS */ |
36 | INTEL_EVENT_CONSTRAINT(0x10, 0x1), /* FP_COMP_OPS_EXE */ | 129 | INTEL_EVENT_CONSTRAINT(0x10, 0x1), /* FP_COMP_OPS_EXE */ |
37 | INTEL_EVENT_CONSTRAINT(0x11, 0x1), /* FP_ASSIST */ | 130 | INTEL_EVENT_CONSTRAINT(0x11, 0x2), /* FP_ASSIST */ |
38 | INTEL_EVENT_CONSTRAINT(0x12, 0x2), /* MUL */ | 131 | INTEL_EVENT_CONSTRAINT(0x12, 0x2), /* MUL */ |
39 | INTEL_EVENT_CONSTRAINT(0x13, 0x2), /* DIV */ | 132 | INTEL_EVENT_CONSTRAINT(0x13, 0x2), /* DIV */ |
40 | INTEL_EVENT_CONSTRAINT(0x14, 0x1), /* CYCLES_DIV_BUSY */ | 133 | INTEL_EVENT_CONSTRAINT(0x14, 0x1), /* CYCLES_DIV_BUSY */ |
@@ -64,25 +157,25 @@ static void p6_pmu_enable_all(int added) | |||
64 | static inline void | 157 | static inline void |
65 | p6_pmu_disable_event(struct perf_event *event) | 158 | p6_pmu_disable_event(struct perf_event *event) |
66 | { | 159 | { |
67 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | ||
68 | struct hw_perf_event *hwc = &event->hw; | 160 | struct hw_perf_event *hwc = &event->hw; |
69 | u64 val = P6_NOP_EVENT; | 161 | u64 val = P6_NOP_EVENT; |
70 | 162 | ||
71 | if (cpuc->enabled) | ||
72 | val |= ARCH_PERFMON_EVENTSEL_ENABLE; | ||
73 | |||
74 | (void)wrmsrl_safe(hwc->config_base, val); | 163 | (void)wrmsrl_safe(hwc->config_base, val); |
75 | } | 164 | } |
76 | 165 | ||
77 | static void p6_pmu_enable_event(struct perf_event *event) | 166 | static void p6_pmu_enable_event(struct perf_event *event) |
78 | { | 167 | { |
79 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | ||
80 | struct hw_perf_event *hwc = &event->hw; | 168 | struct hw_perf_event *hwc = &event->hw; |
81 | u64 val; | 169 | u64 val; |
82 | 170 | ||
83 | val = hwc->config; | 171 | val = hwc->config; |
84 | if (cpuc->enabled) | 172 | |
85 | val |= ARCH_PERFMON_EVENTSEL_ENABLE; | 173 | /* |
174 | * p6 only has a global event enable, set on PerfEvtSel0 | ||
175 | * We "disable" events by programming P6_NOP_EVENT | ||
176 | * and we rely on p6_pmu_enable_all() being called | ||
177 | * to actually enable the events. | ||
178 | */ | ||
86 | 179 | ||
87 | (void)wrmsrl_safe(hwc->config_base, val); | 180 | (void)wrmsrl_safe(hwc->config_base, val); |
88 | } | 181 | } |
@@ -158,5 +251,9 @@ __init int p6_pmu_init(void) | |||
158 | 251 | ||
159 | x86_pmu = p6_pmu; | 252 | x86_pmu = p6_pmu; |
160 | 253 | ||
254 | memcpy(hw_cache_event_ids, p6_hw_cache_event_ids, | ||
255 | sizeof(hw_cache_event_ids)); | ||
256 | |||
257 | |||
161 | return 0; | 258 | return 0; |
162 | } | 259 | } |
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index ed858e9e9a74..df06ade26bef 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -1077,6 +1077,9 @@ void __init memblock_x86_fill(void) | |||
1077 | memblock_add(ei->addr, ei->size); | 1077 | memblock_add(ei->addr, ei->size); |
1078 | } | 1078 | } |
1079 | 1079 | ||
1080 | /* throw away partial pages */ | ||
1081 | memblock_trim_memory(PAGE_SIZE); | ||
1082 | |||
1080 | memblock_dump_all(); | 1083 | memblock_dump_all(); |
1081 | } | 1084 | } |
1082 | 1085 | ||
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index a1193aef6d7d..88b725aa1d52 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -1035,7 +1035,7 @@ ENTRY(xen_sysenter_target) | |||
1035 | 1035 | ||
1036 | ENTRY(xen_hypervisor_callback) | 1036 | ENTRY(xen_hypervisor_callback) |
1037 | CFI_STARTPROC | 1037 | CFI_STARTPROC |
1038 | pushl_cfi $0 | 1038 | pushl_cfi $-1 /* orig_ax = -1 => not a system call */ |
1039 | SAVE_ALL | 1039 | SAVE_ALL |
1040 | TRACE_IRQS_OFF | 1040 | TRACE_IRQS_OFF |
1041 | 1041 | ||
@@ -1077,14 +1077,16 @@ ENTRY(xen_failsafe_callback) | |||
1077 | 2: mov 8(%esp),%es | 1077 | 2: mov 8(%esp),%es |
1078 | 3: mov 12(%esp),%fs | 1078 | 3: mov 12(%esp),%fs |
1079 | 4: mov 16(%esp),%gs | 1079 | 4: mov 16(%esp),%gs |
1080 | /* EAX == 0 => Category 1 (Bad segment) | ||
1081 | EAX != 0 => Category 2 (Bad IRET) */ | ||
1080 | testl %eax,%eax | 1082 | testl %eax,%eax |
1081 | popl_cfi %eax | 1083 | popl_cfi %eax |
1082 | lea 16(%esp),%esp | 1084 | lea 16(%esp),%esp |
1083 | CFI_ADJUST_CFA_OFFSET -16 | 1085 | CFI_ADJUST_CFA_OFFSET -16 |
1084 | jz 5f | 1086 | jz 5f |
1085 | addl $16,%esp | 1087 | addl $16,%esp |
1086 | jmp iret_exc # EAX != 0 => Category 2 (Bad IRET) | 1088 | jmp iret_exc |
1087 | 5: pushl_cfi $0 # EAX == 0 => Category 1 (Bad segment) | 1089 | 5: pushl_cfi $-1 /* orig_ax = -1 => not a system call */ |
1088 | SAVE_ALL | 1090 | SAVE_ALL |
1089 | jmp ret_from_exception | 1091 | jmp ret_from_exception |
1090 | CFI_ENDPROC | 1092 | CFI_ENDPROC |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 0c58952d64e8..b51b2c7ee51f 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -1435,7 +1435,7 @@ ENTRY(xen_failsafe_callback) | |||
1435 | CFI_RESTORE r11 | 1435 | CFI_RESTORE r11 |
1436 | addq $0x30,%rsp | 1436 | addq $0x30,%rsp |
1437 | CFI_ADJUST_CFA_OFFSET -0x30 | 1437 | CFI_ADJUST_CFA_OFFSET -0x30 |
1438 | pushq_cfi $0 | 1438 | pushq_cfi $-1 /* orig_ax = -1 => not a system call */ |
1439 | SAVE_ALL | 1439 | SAVE_ALL |
1440 | jmp error_exit | 1440 | jmp error_exit |
1441 | CFI_ENDPROC | 1441 | CFI_ENDPROC |
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index b3e5e51bc907..4180a874c764 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c | |||
@@ -247,7 +247,10 @@ do_async_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
247 | break; | 247 | break; |
248 | case KVM_PV_REASON_PAGE_NOT_PRESENT: | 248 | case KVM_PV_REASON_PAGE_NOT_PRESENT: |
249 | /* page is swapped out by the host. */ | 249 | /* page is swapped out by the host. */ |
250 | rcu_irq_enter(); | ||
251 | exit_idle(); | ||
250 | kvm_async_pf_task_wait((u32)read_cr2()); | 252 | kvm_async_pf_task_wait((u32)read_cr2()); |
253 | rcu_irq_exit(); | ||
251 | break; | 254 | break; |
252 | case KVM_PV_REASON_PAGE_READY: | 255 | case KVM_PV_REASON_PAGE_READY: |
253 | rcu_irq_enter(); | 256 | rcu_irq_enter(); |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 52190a938b4a..4e8ba39eaf0f 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -358,14 +358,6 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
358 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"), | 358 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"), |
359 | }, | 359 | }, |
360 | }, | 360 | }, |
361 | { /* Handle problems with rebooting on CompuLab SBC-FITPC2 */ | ||
362 | .callback = set_bios_reboot, | ||
363 | .ident = "CompuLab SBC-FITPC2", | ||
364 | .matches = { | ||
365 | DMI_MATCH(DMI_SYS_VENDOR, "CompuLab"), | ||
366 | DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"), | ||
367 | }, | ||
368 | }, | ||
369 | { /* Handle problems with rebooting on ASUS P4S800 */ | 361 | { /* Handle problems with rebooting on ASUS P4S800 */ |
370 | .callback = set_bios_reboot, | 362 | .callback = set_bios_reboot, |
371 | .ident = "ASUS P4S800", | 363 | .ident = "ASUS P4S800", |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index a2bb18e02839..ca45696f30fb 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -920,8 +920,22 @@ void __init setup_arch(char **cmdline_p) | |||
920 | 920 | ||
921 | #ifdef CONFIG_X86_64 | 921 | #ifdef CONFIG_X86_64 |
922 | if (max_pfn > max_low_pfn) { | 922 | if (max_pfn > max_low_pfn) { |
923 | max_pfn_mapped = init_memory_mapping(1UL<<32, | 923 | int i; |
924 | max_pfn<<PAGE_SHIFT); | 924 | unsigned long start, end; |
925 | unsigned long start_pfn, end_pfn; | ||
926 | |||
927 | for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, | ||
928 | NULL) { | ||
929 | |||
930 | end = PFN_PHYS(end_pfn); | ||
931 | if (end <= (1UL<<32)) | ||
932 | continue; | ||
933 | |||
934 | start = PFN_PHYS(start_pfn); | ||
935 | max_pfn_mapped = init_memory_mapping( | ||
936 | max((1UL<<32), start), end); | ||
937 | } | ||
938 | |||
925 | /* can we preseve max_low_pfn ?*/ | 939 | /* can we preseve max_low_pfn ?*/ |
926 | max_low_pfn = max_pfn; | 940 | max_low_pfn = max_pfn; |
927 | } | 941 | } |
@@ -1035,6 +1049,18 @@ void __init setup_arch(char **cmdline_p) | |||
1035 | arch_init_ideal_nops(); | 1049 | arch_init_ideal_nops(); |
1036 | 1050 | ||
1037 | register_refined_jiffies(CLOCK_TICK_RATE); | 1051 | register_refined_jiffies(CLOCK_TICK_RATE); |
1052 | |||
1053 | #ifdef CONFIG_EFI | ||
1054 | /* Once setup is done above, disable efi_enabled on mismatched | ||
1055 | * firmware/kernel archtectures since there is no support for | ||
1056 | * runtime services. | ||
1057 | */ | ||
1058 | if (efi_enabled && IS_ENABLED(CONFIG_X86_64) != efi_64bit) { | ||
1059 | pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n"); | ||
1060 | efi_unmap_memmap(); | ||
1061 | efi_enabled = 0; | ||
1062 | } | ||
1063 | #endif | ||
1038 | } | 1064 | } |
1039 | 1065 | ||
1040 | #ifdef CONFIG_X86_32 | 1066 | #ifdef CONFIG_X86_32 |
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 29ad351804e9..70b27ee6118e 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c | |||
@@ -824,10 +824,8 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | |||
824 | mce_notify_process(); | 824 | mce_notify_process(); |
825 | #endif /* CONFIG_X86_64 && CONFIG_X86_MCE */ | 825 | #endif /* CONFIG_X86_64 && CONFIG_X86_MCE */ |
826 | 826 | ||
827 | if (thread_info_flags & _TIF_UPROBE) { | 827 | if (thread_info_flags & _TIF_UPROBE) |
828 | clear_thread_flag(TIF_UPROBE); | ||
829 | uprobe_notify_resume(regs); | 828 | uprobe_notify_resume(regs); |
830 | } | ||
831 | 829 | ||
832 | /* deal with pending signal delivery */ | 830 | /* deal with pending signal delivery */ |
833 | if (thread_info_flags & _TIF_SIGPENDING) | 831 | if (thread_info_flags & _TIF_SIGPENDING) |
diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c index 9538f00827a9..aafa5557b396 100644 --- a/arch/x86/kernel/uprobes.c +++ b/arch/x86/kernel/uprobes.c | |||
@@ -651,31 +651,19 @@ void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) | |||
651 | 651 | ||
652 | /* | 652 | /* |
653 | * Skip these instructions as per the currently known x86 ISA. | 653 | * Skip these instructions as per the currently known x86 ISA. |
654 | * 0x66* { 0x90 | 0x0f 0x1f | 0x0f 0x19 | 0x87 0xc0 } | 654 | * rep=0x66*; nop=0x90 |
655 | */ | 655 | */ |
656 | static bool __skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) | 656 | static bool __skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) |
657 | { | 657 | { |
658 | int i; | 658 | int i; |
659 | 659 | ||
660 | for (i = 0; i < MAX_UINSN_BYTES; i++) { | 660 | for (i = 0; i < MAX_UINSN_BYTES; i++) { |
661 | if ((auprobe->insn[i] == 0x66)) | 661 | if (auprobe->insn[i] == 0x66) |
662 | continue; | 662 | continue; |
663 | 663 | ||
664 | if (auprobe->insn[i] == 0x90) | 664 | if (auprobe->insn[i] == 0x90) |
665 | return true; | 665 | return true; |
666 | 666 | ||
667 | if (i == (MAX_UINSN_BYTES - 1)) | ||
668 | break; | ||
669 | |||
670 | if ((auprobe->insn[i] == 0x0f) && (auprobe->insn[i+1] == 0x1f)) | ||
671 | return true; | ||
672 | |||
673 | if ((auprobe->insn[i] == 0x0f) && (auprobe->insn[i+1] == 0x19)) | ||
674 | return true; | ||
675 | |||
676 | if ((auprobe->insn[i] == 0x87) && (auprobe->insn[i+1] == 0xc0)) | ||
677 | return true; | ||
678 | |||
679 | break; | 667 | break; |
680 | } | 668 | } |
681 | return false; | 669 | return false; |
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index c6e6b721b6ee..43e9fadca5d0 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -1311,7 +1311,7 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value) | |||
1311 | vcpu->arch.apic_base = value; | 1311 | vcpu->arch.apic_base = value; |
1312 | if (apic_x2apic_mode(apic)) { | 1312 | if (apic_x2apic_mode(apic)) { |
1313 | u32 id = kvm_apic_id(apic); | 1313 | u32 id = kvm_apic_id(apic); |
1314 | u32 ldr = ((id & ~0xf) << 16) | (1 << (id & 0xf)); | 1314 | u32 ldr = ((id >> 4) << 16) | (1 << (id & 0xf)); |
1315 | kvm_apic_set_ldr(apic, ldr); | 1315 | kvm_apic_set_ldr(apic, ldr); |
1316 | } | 1316 | } |
1317 | apic->base_address = apic->vcpu->arch.apic_base & | 1317 | apic->base_address = apic->vcpu->arch.apic_base & |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index d289fee1ffb8..6f85fe0bf958 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -2497,8 +2497,7 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *sptep, | |||
2497 | } | 2497 | } |
2498 | } | 2498 | } |
2499 | 2499 | ||
2500 | if (!is_error_pfn(pfn)) | 2500 | kvm_release_pfn_clean(pfn); |
2501 | kvm_release_pfn_clean(pfn); | ||
2502 | } | 2501 | } |
2503 | 2502 | ||
2504 | static void nonpaging_new_cr3(struct kvm_vcpu *vcpu) | 2503 | static void nonpaging_new_cr3(struct kvm_vcpu *vcpu) |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 1eefebe5d727..224a7e78cb6c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -3779,7 +3779,7 @@ static int write_exit_mmio(struct kvm_vcpu *vcpu, gpa_t gpa, | |||
3779 | { | 3779 | { |
3780 | struct kvm_mmio_fragment *frag = &vcpu->mmio_fragments[0]; | 3780 | struct kvm_mmio_fragment *frag = &vcpu->mmio_fragments[0]; |
3781 | 3781 | ||
3782 | memcpy(vcpu->run->mmio.data, frag->data, frag->len); | 3782 | memcpy(vcpu->run->mmio.data, frag->data, min(8u, frag->len)); |
3783 | return X86EMUL_CONTINUE; | 3783 | return X86EMUL_CONTINUE; |
3784 | } | 3784 | } |
3785 | 3785 | ||
@@ -3832,18 +3832,11 @@ mmio: | |||
3832 | bytes -= handled; | 3832 | bytes -= handled; |
3833 | val += handled; | 3833 | val += handled; |
3834 | 3834 | ||
3835 | while (bytes) { | 3835 | WARN_ON(vcpu->mmio_nr_fragments >= KVM_MAX_MMIO_FRAGMENTS); |
3836 | unsigned now = min(bytes, 8U); | 3836 | frag = &vcpu->mmio_fragments[vcpu->mmio_nr_fragments++]; |
3837 | 3837 | frag->gpa = gpa; | |
3838 | frag = &vcpu->mmio_fragments[vcpu->mmio_nr_fragments++]; | 3838 | frag->data = val; |
3839 | frag->gpa = gpa; | 3839 | frag->len = bytes; |
3840 | frag->data = val; | ||
3841 | frag->len = now; | ||
3842 | |||
3843 | gpa += now; | ||
3844 | val += now; | ||
3845 | bytes -= now; | ||
3846 | } | ||
3847 | return X86EMUL_CONTINUE; | 3840 | return X86EMUL_CONTINUE; |
3848 | } | 3841 | } |
3849 | 3842 | ||
@@ -3890,7 +3883,7 @@ int emulator_read_write(struct x86_emulate_ctxt *ctxt, unsigned long addr, | |||
3890 | vcpu->mmio_needed = 1; | 3883 | vcpu->mmio_needed = 1; |
3891 | vcpu->mmio_cur_fragment = 0; | 3884 | vcpu->mmio_cur_fragment = 0; |
3892 | 3885 | ||
3893 | vcpu->run->mmio.len = vcpu->mmio_fragments[0].len; | 3886 | vcpu->run->mmio.len = min(8u, vcpu->mmio_fragments[0].len); |
3894 | vcpu->run->mmio.is_write = vcpu->mmio_is_write = ops->write; | 3887 | vcpu->run->mmio.is_write = vcpu->mmio_is_write = ops->write; |
3895 | vcpu->run->exit_reason = KVM_EXIT_MMIO; | 3888 | vcpu->run->exit_reason = KVM_EXIT_MMIO; |
3896 | vcpu->run->mmio.phys_addr = gpa; | 3889 | vcpu->run->mmio.phys_addr = gpa; |
@@ -5522,28 +5515,44 @@ static int complete_emulated_pio(struct kvm_vcpu *vcpu) | |||
5522 | * | 5515 | * |
5523 | * read: | 5516 | * read: |
5524 | * for each fragment | 5517 | * for each fragment |
5525 | * write gpa, len | 5518 | * for each mmio piece in the fragment |
5526 | * exit | 5519 | * write gpa, len |
5527 | * copy data | 5520 | * exit |
5521 | * copy data | ||
5528 | * execute insn | 5522 | * execute insn |
5529 | * | 5523 | * |
5530 | * write: | 5524 | * write: |
5531 | * for each fragment | 5525 | * for each fragment |
5532 | * write gpa, len | 5526 | * for each mmio piece in the fragment |
5533 | * copy data | 5527 | * write gpa, len |
5534 | * exit | 5528 | * copy data |
5529 | * exit | ||
5535 | */ | 5530 | */ |
5536 | static int complete_emulated_mmio(struct kvm_vcpu *vcpu) | 5531 | static int complete_emulated_mmio(struct kvm_vcpu *vcpu) |
5537 | { | 5532 | { |
5538 | struct kvm_run *run = vcpu->run; | 5533 | struct kvm_run *run = vcpu->run; |
5539 | struct kvm_mmio_fragment *frag; | 5534 | struct kvm_mmio_fragment *frag; |
5535 | unsigned len; | ||
5540 | 5536 | ||
5541 | BUG_ON(!vcpu->mmio_needed); | 5537 | BUG_ON(!vcpu->mmio_needed); |
5542 | 5538 | ||
5543 | /* Complete previous fragment */ | 5539 | /* Complete previous fragment */ |
5544 | frag = &vcpu->mmio_fragments[vcpu->mmio_cur_fragment++]; | 5540 | frag = &vcpu->mmio_fragments[vcpu->mmio_cur_fragment]; |
5541 | len = min(8u, frag->len); | ||
5545 | if (!vcpu->mmio_is_write) | 5542 | if (!vcpu->mmio_is_write) |
5546 | memcpy(frag->data, run->mmio.data, frag->len); | 5543 | memcpy(frag->data, run->mmio.data, len); |
5544 | |||
5545 | if (frag->len <= 8) { | ||
5546 | /* Switch to the next fragment. */ | ||
5547 | frag++; | ||
5548 | vcpu->mmio_cur_fragment++; | ||
5549 | } else { | ||
5550 | /* Go forward to the next mmio piece. */ | ||
5551 | frag->data += len; | ||
5552 | frag->gpa += len; | ||
5553 | frag->len -= len; | ||
5554 | } | ||
5555 | |||
5547 | if (vcpu->mmio_cur_fragment == vcpu->mmio_nr_fragments) { | 5556 | if (vcpu->mmio_cur_fragment == vcpu->mmio_nr_fragments) { |
5548 | vcpu->mmio_needed = 0; | 5557 | vcpu->mmio_needed = 0; |
5549 | if (vcpu->mmio_is_write) | 5558 | if (vcpu->mmio_is_write) |
@@ -5551,13 +5560,12 @@ static int complete_emulated_mmio(struct kvm_vcpu *vcpu) | |||
5551 | vcpu->mmio_read_completed = 1; | 5560 | vcpu->mmio_read_completed = 1; |
5552 | return complete_emulated_io(vcpu); | 5561 | return complete_emulated_io(vcpu); |
5553 | } | 5562 | } |
5554 | /* Initiate next fragment */ | 5563 | |
5555 | ++frag; | ||
5556 | run->exit_reason = KVM_EXIT_MMIO; | 5564 | run->exit_reason = KVM_EXIT_MMIO; |
5557 | run->mmio.phys_addr = frag->gpa; | 5565 | run->mmio.phys_addr = frag->gpa; |
5558 | if (vcpu->mmio_is_write) | 5566 | if (vcpu->mmio_is_write) |
5559 | memcpy(run->mmio.data, frag->data, frag->len); | 5567 | memcpy(run->mmio.data, frag->data, min(8u, frag->len)); |
5560 | run->mmio.len = frag->len; | 5568 | run->mmio.len = min(8u, frag->len); |
5561 | run->mmio.is_write = vcpu->mmio_is_write; | 5569 | run->mmio.is_write = vcpu->mmio_is_write; |
5562 | vcpu->arch.complete_userspace_io = complete_emulated_mmio; | 5570 | vcpu->arch.complete_userspace_io = complete_emulated_mmio; |
5563 | return 0; | 5571 | return 0; |
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index ab1f6a93b527..d7aea41563b3 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -35,40 +35,44 @@ struct map_range { | |||
35 | unsigned page_size_mask; | 35 | unsigned page_size_mask; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | static void __init find_early_table_space(struct map_range *mr, unsigned long end, | 38 | /* |
39 | int use_pse, int use_gbpages) | 39 | * First calculate space needed for kernel direct mapping page tables to cover |
40 | * mr[0].start to mr[nr_range - 1].end, while accounting for possible 2M and 1GB | ||
41 | * pages. Then find enough contiguous space for those page tables. | ||
42 | */ | ||
43 | static void __init find_early_table_space(struct map_range *mr, int nr_range) | ||
40 | { | 44 | { |
41 | unsigned long puds, pmds, ptes, tables, start = 0, good_end = end; | 45 | int i; |
46 | unsigned long puds = 0, pmds = 0, ptes = 0, tables; | ||
47 | unsigned long start = 0, good_end; | ||
42 | phys_addr_t base; | 48 | phys_addr_t base; |
43 | 49 | ||
44 | puds = (end + PUD_SIZE - 1) >> PUD_SHIFT; | 50 | for (i = 0; i < nr_range; i++) { |
45 | tables = roundup(puds * sizeof(pud_t), PAGE_SIZE); | 51 | unsigned long range, extra; |
46 | |||
47 | if (use_gbpages) { | ||
48 | unsigned long extra; | ||
49 | |||
50 | extra = end - ((end>>PUD_SHIFT) << PUD_SHIFT); | ||
51 | pmds = (extra + PMD_SIZE - 1) >> PMD_SHIFT; | ||
52 | } else | ||
53 | pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT; | ||
54 | 52 | ||
55 | tables += roundup(pmds * sizeof(pmd_t), PAGE_SIZE); | 53 | range = mr[i].end - mr[i].start; |
54 | puds += (range + PUD_SIZE - 1) >> PUD_SHIFT; | ||
56 | 55 | ||
57 | if (use_pse) { | 56 | if (mr[i].page_size_mask & (1 << PG_LEVEL_1G)) { |
58 | unsigned long extra; | 57 | extra = range - ((range >> PUD_SHIFT) << PUD_SHIFT); |
58 | pmds += (extra + PMD_SIZE - 1) >> PMD_SHIFT; | ||
59 | } else { | ||
60 | pmds += (range + PMD_SIZE - 1) >> PMD_SHIFT; | ||
61 | } | ||
59 | 62 | ||
60 | extra = end - ((end>>PMD_SHIFT) << PMD_SHIFT); | 63 | if (mr[i].page_size_mask & (1 << PG_LEVEL_2M)) { |
64 | extra = range - ((range >> PMD_SHIFT) << PMD_SHIFT); | ||
61 | #ifdef CONFIG_X86_32 | 65 | #ifdef CONFIG_X86_32 |
62 | extra += PMD_SIZE; | 66 | extra += PMD_SIZE; |
63 | #endif | 67 | #endif |
64 | /* The first 2/4M doesn't use large pages. */ | 68 | ptes += (extra + PAGE_SIZE - 1) >> PAGE_SHIFT; |
65 | if (mr->start < PMD_SIZE) | 69 | } else { |
66 | extra += mr->end - mr->start; | 70 | ptes += (range + PAGE_SIZE - 1) >> PAGE_SHIFT; |
67 | 71 | } | |
68 | ptes = (extra + PAGE_SIZE - 1) >> PAGE_SHIFT; | 72 | } |
69 | } else | ||
70 | ptes = (end + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
71 | 73 | ||
74 | tables = roundup(puds * sizeof(pud_t), PAGE_SIZE); | ||
75 | tables += roundup(pmds * sizeof(pmd_t), PAGE_SIZE); | ||
72 | tables += roundup(ptes * sizeof(pte_t), PAGE_SIZE); | 76 | tables += roundup(ptes * sizeof(pte_t), PAGE_SIZE); |
73 | 77 | ||
74 | #ifdef CONFIG_X86_32 | 78 | #ifdef CONFIG_X86_32 |
@@ -86,7 +90,7 @@ static void __init find_early_table_space(struct map_range *mr, unsigned long en | |||
86 | pgt_buf_top = pgt_buf_start + (tables >> PAGE_SHIFT); | 90 | pgt_buf_top = pgt_buf_start + (tables >> PAGE_SHIFT); |
87 | 91 | ||
88 | printk(KERN_DEBUG "kernel direct mapping tables up to %#lx @ [mem %#010lx-%#010lx]\n", | 92 | printk(KERN_DEBUG "kernel direct mapping tables up to %#lx @ [mem %#010lx-%#010lx]\n", |
89 | end - 1, pgt_buf_start << PAGE_SHIFT, | 93 | mr[nr_range - 1].end - 1, pgt_buf_start << PAGE_SHIFT, |
90 | (pgt_buf_top << PAGE_SHIFT) - 1); | 94 | (pgt_buf_top << PAGE_SHIFT) - 1); |
91 | } | 95 | } |
92 | 96 | ||
@@ -267,7 +271,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, | |||
267 | * nodes are discovered. | 271 | * nodes are discovered. |
268 | */ | 272 | */ |
269 | if (!after_bootmem) | 273 | if (!after_bootmem) |
270 | find_early_table_space(&mr[0], end, use_pse, use_gbpages); | 274 | find_early_table_space(mr, nr_range); |
271 | 275 | ||
272 | for (i = 0; i < nr_range; i++) | 276 | for (i = 0; i < nr_range; i++) |
273 | ret = kernel_physical_mapping_init(mr[i].start, mr[i].end, | 277 | ret = kernel_physical_mapping_init(mr[i].start, mr[i].end, |
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 2b6b4a3c8beb..3baff255adac 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -386,7 +386,8 @@ phys_pte_init(pte_t *pte_page, unsigned long addr, unsigned long end, | |||
386 | * these mappings are more intelligent. | 386 | * these mappings are more intelligent. |
387 | */ | 387 | */ |
388 | if (pte_val(*pte)) { | 388 | if (pte_val(*pte)) { |
389 | pages++; | 389 | if (!after_bootmem) |
390 | pages++; | ||
390 | continue; | 391 | continue; |
391 | } | 392 | } |
392 | 393 | ||
@@ -451,6 +452,8 @@ phys_pmd_init(pmd_t *pmd_page, unsigned long address, unsigned long end, | |||
451 | * attributes. | 452 | * attributes. |
452 | */ | 453 | */ |
453 | if (page_size_mask & (1 << PG_LEVEL_2M)) { | 454 | if (page_size_mask & (1 << PG_LEVEL_2M)) { |
455 | if (!after_bootmem) | ||
456 | pages++; | ||
454 | last_map_addr = next; | 457 | last_map_addr = next; |
455 | continue; | 458 | continue; |
456 | } | 459 | } |
@@ -526,6 +529,8 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end, | |||
526 | * attributes. | 529 | * attributes. |
527 | */ | 530 | */ |
528 | if (page_size_mask & (1 << PG_LEVEL_1G)) { | 531 | if (page_size_mask & (1 << PG_LEVEL_1G)) { |
532 | if (!after_bootmem) | ||
533 | pages++; | ||
529 | last_map_addr = next; | 534 | last_map_addr = next; |
530 | continue; | 535 | continue; |
531 | } | 536 | } |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 26b8a8514ee5..48768df2471a 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -55,7 +55,7 @@ u64 op_x86_get_ctrl(struct op_x86_model_spec const *model, | |||
55 | val |= counter_config->extra; | 55 | val |= counter_config->extra; |
56 | event &= model->event_mask ? model->event_mask : 0xFF; | 56 | event &= model->event_mask ? model->event_mask : 0xFF; |
57 | val |= event & 0xFF; | 57 | val |= event & 0xFF; |
58 | val |= (event & 0x0F00) << 24; | 58 | val |= (u64)(event & 0x0F00) << 24; |
59 | 59 | ||
60 | return val; | 60 | return val; |
61 | } | 61 | } |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index aded2a91162a..ad4439145f85 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -70,11 +70,15 @@ EXPORT_SYMBOL(efi); | |||
70 | struct efi_memory_map memmap; | 70 | struct efi_memory_map memmap; |
71 | 71 | ||
72 | bool efi_64bit; | 72 | bool efi_64bit; |
73 | static bool efi_native; | ||
74 | 73 | ||
75 | static struct efi efi_phys __initdata; | 74 | static struct efi efi_phys __initdata; |
76 | static efi_system_table_t efi_systab __initdata; | 75 | static efi_system_table_t efi_systab __initdata; |
77 | 76 | ||
77 | static inline bool efi_is_native(void) | ||
78 | { | ||
79 | return IS_ENABLED(CONFIG_X86_64) == efi_64bit; | ||
80 | } | ||
81 | |||
78 | static int __init setup_noefi(char *arg) | 82 | static int __init setup_noefi(char *arg) |
79 | { | 83 | { |
80 | efi_enabled = 0; | 84 | efi_enabled = 0; |
@@ -420,7 +424,7 @@ void __init efi_reserve_boot_services(void) | |||
420 | } | 424 | } |
421 | } | 425 | } |
422 | 426 | ||
423 | static void __init efi_unmap_memmap(void) | 427 | void __init efi_unmap_memmap(void) |
424 | { | 428 | { |
425 | if (memmap.map) { | 429 | if (memmap.map) { |
426 | early_iounmap(memmap.map, memmap.nr_map * memmap.desc_size); | 430 | early_iounmap(memmap.map, memmap.nr_map * memmap.desc_size); |
@@ -432,7 +436,7 @@ void __init efi_free_boot_services(void) | |||
432 | { | 436 | { |
433 | void *p; | 437 | void *p; |
434 | 438 | ||
435 | if (!efi_native) | 439 | if (!efi_is_native()) |
436 | return; | 440 | return; |
437 | 441 | ||
438 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { | 442 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { |
@@ -684,12 +688,10 @@ void __init efi_init(void) | |||
684 | return; | 688 | return; |
685 | } | 689 | } |
686 | efi_phys.systab = (efi_system_table_t *)boot_params.efi_info.efi_systab; | 690 | efi_phys.systab = (efi_system_table_t *)boot_params.efi_info.efi_systab; |
687 | efi_native = !efi_64bit; | ||
688 | #else | 691 | #else |
689 | efi_phys.systab = (efi_system_table_t *) | 692 | efi_phys.systab = (efi_system_table_t *) |
690 | (boot_params.efi_info.efi_systab | | 693 | (boot_params.efi_info.efi_systab | |
691 | ((__u64)boot_params.efi_info.efi_systab_hi<<32)); | 694 | ((__u64)boot_params.efi_info.efi_systab_hi<<32)); |
692 | efi_native = efi_64bit; | ||
693 | #endif | 695 | #endif |
694 | 696 | ||
695 | if (efi_systab_init(efi_phys.systab)) { | 697 | if (efi_systab_init(efi_phys.systab)) { |
@@ -723,7 +725,7 @@ void __init efi_init(void) | |||
723 | * that doesn't match the kernel 32/64-bit mode. | 725 | * that doesn't match the kernel 32/64-bit mode. |
724 | */ | 726 | */ |
725 | 727 | ||
726 | if (!efi_native) | 728 | if (!efi_is_native()) |
727 | pr_info("No EFI runtime due to 32/64-bit mismatch with kernel\n"); | 729 | pr_info("No EFI runtime due to 32/64-bit mismatch with kernel\n"); |
728 | else if (efi_runtime_init()) { | 730 | else if (efi_runtime_init()) { |
729 | efi_enabled = 0; | 731 | efi_enabled = 0; |
@@ -735,7 +737,7 @@ void __init efi_init(void) | |||
735 | return; | 737 | return; |
736 | } | 738 | } |
737 | #ifdef CONFIG_X86_32 | 739 | #ifdef CONFIG_X86_32 |
738 | if (efi_native) { | 740 | if (efi_is_native()) { |
739 | x86_platform.get_wallclock = efi_get_time; | 741 | x86_platform.get_wallclock = efi_get_time; |
740 | x86_platform.set_wallclock = efi_set_rtc_mmss; | 742 | x86_platform.set_wallclock = efi_set_rtc_mmss; |
741 | } | 743 | } |
@@ -810,6 +812,16 @@ void __iomem *efi_lookup_mapped_addr(u64 phys_addr) | |||
810 | return NULL; | 812 | return NULL; |
811 | } | 813 | } |
812 | 814 | ||
815 | void efi_memory_uc(u64 addr, unsigned long size) | ||
816 | { | ||
817 | unsigned long page_shift = 1UL << EFI_PAGE_SHIFT; | ||
818 | u64 npages; | ||
819 | |||
820 | npages = round_up(size, page_shift) / page_shift; | ||
821 | memrange_efi_to_native(&addr, &npages); | ||
822 | set_memory_uc(addr, npages); | ||
823 | } | ||
824 | |||
813 | /* | 825 | /* |
814 | * This function will switch the EFI runtime services to virtual mode. | 826 | * This function will switch the EFI runtime services to virtual mode. |
815 | * Essentially, look through the EFI memmap and map every region that | 827 | * Essentially, look through the EFI memmap and map every region that |
@@ -823,7 +835,7 @@ void __init efi_enter_virtual_mode(void) | |||
823 | efi_memory_desc_t *md, *prev_md = NULL; | 835 | efi_memory_desc_t *md, *prev_md = NULL; |
824 | efi_status_t status; | 836 | efi_status_t status; |
825 | unsigned long size; | 837 | unsigned long size; |
826 | u64 end, systab, addr, npages, end_pfn; | 838 | u64 end, systab, end_pfn; |
827 | void *p, *va, *new_memmap = NULL; | 839 | void *p, *va, *new_memmap = NULL; |
828 | int count = 0; | 840 | int count = 0; |
829 | 841 | ||
@@ -834,7 +846,7 @@ void __init efi_enter_virtual_mode(void) | |||
834 | * non-native EFI | 846 | * non-native EFI |
835 | */ | 847 | */ |
836 | 848 | ||
837 | if (!efi_native) { | 849 | if (!efi_is_native()) { |
838 | efi_unmap_memmap(); | 850 | efi_unmap_memmap(); |
839 | return; | 851 | return; |
840 | } | 852 | } |
@@ -879,10 +891,14 @@ void __init efi_enter_virtual_mode(void) | |||
879 | end_pfn = PFN_UP(end); | 891 | end_pfn = PFN_UP(end); |
880 | if (end_pfn <= max_low_pfn_mapped | 892 | if (end_pfn <= max_low_pfn_mapped |
881 | || (end_pfn > (1UL << (32 - PAGE_SHIFT)) | 893 | || (end_pfn > (1UL << (32 - PAGE_SHIFT)) |
882 | && end_pfn <= max_pfn_mapped)) | 894 | && end_pfn <= max_pfn_mapped)) { |
883 | va = __va(md->phys_addr); | 895 | va = __va(md->phys_addr); |
884 | else | 896 | |
885 | va = efi_ioremap(md->phys_addr, size, md->type); | 897 | if (!(md->attribute & EFI_MEMORY_WB)) |
898 | efi_memory_uc((u64)(unsigned long)va, size); | ||
899 | } else | ||
900 | va = efi_ioremap(md->phys_addr, size, | ||
901 | md->type, md->attribute); | ||
886 | 902 | ||
887 | md->virt_addr = (u64) (unsigned long) va; | 903 | md->virt_addr = (u64) (unsigned long) va; |
888 | 904 | ||
@@ -892,13 +908,6 @@ void __init efi_enter_virtual_mode(void) | |||
892 | continue; | 908 | continue; |
893 | } | 909 | } |
894 | 910 | ||
895 | if (!(md->attribute & EFI_MEMORY_WB)) { | ||
896 | addr = md->virt_addr; | ||
897 | npages = md->num_pages; | ||
898 | memrange_efi_to_native(&addr, &npages); | ||
899 | set_memory_uc(addr, npages); | ||
900 | } | ||
901 | |||
902 | systab = (u64) (unsigned long) efi_phys.systab; | 911 | systab = (u64) (unsigned long) efi_phys.systab; |
903 | if (md->phys_addr <= systab && systab < end) { | 912 | if (md->phys_addr <= systab && systab < end) { |
904 | systab += md->virt_addr - md->phys_addr; | 913 | systab += md->virt_addr - md->phys_addr; |
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c index ac3aa54e2654..95fd505dfeb6 100644 --- a/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c | |||
@@ -82,7 +82,7 @@ void __init efi_call_phys_epilog(void) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size, | 84 | void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size, |
85 | u32 type) | 85 | u32 type, u64 attribute) |
86 | { | 86 | { |
87 | unsigned long last_map_pfn; | 87 | unsigned long last_map_pfn; |
88 | 88 | ||
@@ -92,8 +92,11 @@ void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size, | |||
92 | last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size); | 92 | last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size); |
93 | if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size) { | 93 | if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size) { |
94 | unsigned long top = last_map_pfn << PAGE_SHIFT; | 94 | unsigned long top = last_map_pfn << PAGE_SHIFT; |
95 | efi_ioremap(top, size - (top - phys_addr), type); | 95 | efi_ioremap(top, size - (top - phys_addr), type, attribute); |
96 | } | 96 | } |
97 | 97 | ||
98 | if (!(attribute & EFI_MEMORY_WB)) | ||
99 | efi_memory_uc((u64)(unsigned long)__va(phys_addr), size); | ||
100 | |||
98 | return (void __iomem *)__va(phys_addr); | 101 | return (void __iomem *)__va(phys_addr); |
99 | } | 102 | } |
diff --git a/arch/x86/realmode/rm/wakeup_asm.S b/arch/x86/realmode/rm/wakeup_asm.S index e56479e58053..9e7e14797a72 100644 --- a/arch/x86/realmode/rm/wakeup_asm.S +++ b/arch/x86/realmode/rm/wakeup_asm.S | |||
@@ -74,18 +74,9 @@ ENTRY(wakeup_start) | |||
74 | 74 | ||
75 | lidtl wakeup_idt | 75 | lidtl wakeup_idt |
76 | 76 | ||
77 | /* Clear the EFLAGS but remember if we have EFLAGS.ID */ | 77 | /* Clear the EFLAGS */ |
78 | movl $X86_EFLAGS_ID, %ecx | ||
79 | pushl %ecx | ||
80 | popfl | ||
81 | pushfl | ||
82 | popl %edi | ||
83 | pushl $0 | 78 | pushl $0 |
84 | popfl | 79 | popfl |
85 | pushfl | ||
86 | popl %edx | ||
87 | xorl %edx, %edi | ||
88 | andl %ecx, %edi /* %edi is zero iff CPUID & %cr4 are missing */ | ||
89 | 80 | ||
90 | /* Check header signature... */ | 81 | /* Check header signature... */ |
91 | movl signature, %eax | 82 | movl signature, %eax |
@@ -120,12 +111,12 @@ ENTRY(wakeup_start) | |||
120 | movl %eax, %cr3 | 111 | movl %eax, %cr3 |
121 | 112 | ||
122 | btl $WAKEUP_BEHAVIOR_RESTORE_CR4, %edi | 113 | btl $WAKEUP_BEHAVIOR_RESTORE_CR4, %edi |
123 | jz 1f | 114 | jnc 1f |
124 | movl pmode_cr4, %eax | 115 | movl pmode_cr4, %eax |
125 | movl %eax, %cr4 | 116 | movl %eax, %cr4 |
126 | 1: | 117 | 1: |
127 | btl $WAKEUP_BEHAVIOR_RESTORE_EFER, %edi | 118 | btl $WAKEUP_BEHAVIOR_RESTORE_EFER, %edi |
128 | jz 1f | 119 | jnc 1f |
129 | movl pmode_efer, %eax | 120 | movl pmode_efer, %eax |
130 | movl pmode_efer + 4, %edx | 121 | movl pmode_efer + 4, %edx |
131 | movl $MSR_EFER, %ecx | 122 | movl $MSR_EFER, %ecx |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index e3497f240eab..586d83812b67 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -81,8 +81,6 @@ | |||
81 | #include "smp.h" | 81 | #include "smp.h" |
82 | #include "multicalls.h" | 82 | #include "multicalls.h" |
83 | 83 | ||
84 | #include <xen/events.h> | ||
85 | |||
86 | EXPORT_SYMBOL_GPL(hypercall_page); | 84 | EXPORT_SYMBOL_GPL(hypercall_page); |
87 | 85 | ||
88 | DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); | 86 | DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 6226c99729b9..dcf5f2dd91ec 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1288,6 +1288,25 @@ unsigned long xen_read_cr2_direct(void) | |||
1288 | return this_cpu_read(xen_vcpu_info.arch.cr2); | 1288 | return this_cpu_read(xen_vcpu_info.arch.cr2); |
1289 | } | 1289 | } |
1290 | 1290 | ||
1291 | void xen_flush_tlb_all(void) | ||
1292 | { | ||
1293 | struct mmuext_op *op; | ||
1294 | struct multicall_space mcs; | ||
1295 | |||
1296 | trace_xen_mmu_flush_tlb_all(0); | ||
1297 | |||
1298 | preempt_disable(); | ||
1299 | |||
1300 | mcs = xen_mc_entry(sizeof(*op)); | ||
1301 | |||
1302 | op = mcs.args; | ||
1303 | op->cmd = MMUEXT_TLB_FLUSH_ALL; | ||
1304 | MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF); | ||
1305 | |||
1306 | xen_mc_issue(PARAVIRT_LAZY_MMU); | ||
1307 | |||
1308 | preempt_enable(); | ||
1309 | } | ||
1291 | static void xen_flush_tlb(void) | 1310 | static void xen_flush_tlb(void) |
1292 | { | 1311 | { |
1293 | struct mmuext_op *op; | 1312 | struct mmuext_op *op; |
@@ -2518,7 +2537,7 @@ int xen_remap_domain_mfn_range(struct vm_area_struct *vma, | |||
2518 | err = 0; | 2537 | err = 0; |
2519 | out: | 2538 | out: |
2520 | 2539 | ||
2521 | flush_tlb_all(); | 2540 | xen_flush_tlb_all(); |
2522 | 2541 | ||
2523 | return err; | 2542 | return err; |
2524 | } | 2543 | } |
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index cdcb48adee4c..0d1f36a22c98 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -13,6 +13,8 @@ config XTENSA | |||
13 | select GENERIC_CPU_DEVICES | 13 | select GENERIC_CPU_DEVICES |
14 | select MODULES_USE_ELF_RELA | 14 | select MODULES_USE_ELF_RELA |
15 | select GENERIC_PCI_IOMAP | 15 | select GENERIC_PCI_IOMAP |
16 | select GENERIC_KERNEL_THREAD | ||
17 | select GENERIC_KERNEL_EXECVE | ||
16 | select ARCH_WANT_OPTIONAL_GPIOLIB | 18 | select ARCH_WANT_OPTIONAL_GPIOLIB |
17 | help | 19 | help |
18 | Xtensa processors are 32-bit RISC machines designed by Tensilica | 20 | Xtensa processors are 32-bit RISC machines designed by Tensilica |
diff --git a/arch/xtensa/boot/boot-redboot/bootstrap.S b/arch/xtensa/boot/boot-redboot/bootstrap.S index 4c316cd28a54..86c34dbc9cd0 100644 --- a/arch/xtensa/boot/boot-redboot/bootstrap.S +++ b/arch/xtensa/boot/boot-redboot/bootstrap.S | |||
@@ -51,17 +51,17 @@ _start: | |||
51 | /* 'reset' window registers */ | 51 | /* 'reset' window registers */ |
52 | 52 | ||
53 | movi a4, 1 | 53 | movi a4, 1 |
54 | wsr a4, PS | 54 | wsr a4, ps |
55 | rsync | 55 | rsync |
56 | 56 | ||
57 | rsr a5, WINDOWBASE | 57 | rsr a5, windowbase |
58 | ssl a5 | 58 | ssl a5 |
59 | sll a4, a4 | 59 | sll a4, a4 |
60 | wsr a4, WINDOWSTART | 60 | wsr a4, windowstart |
61 | rsync | 61 | rsync |
62 | 62 | ||
63 | movi a4, 0x00040000 | 63 | movi a4, 0x00040000 |
64 | wsr a4, PS | 64 | wsr a4, ps |
65 | rsync | 65 | rsync |
66 | 66 | ||
67 | /* copy the loader to its address | 67 | /* copy the loader to its address |
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild index fccd81eddff1..6d1302789995 100644 --- a/arch/xtensa/include/asm/Kbuild +++ b/arch/xtensa/include/asm/Kbuild | |||
@@ -1,4 +1,28 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | generic-y += bitsperlong.h |
2 | 2 | generic-y += bug.h | |
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += cputime.h | ||
5 | generic-y += device.h | ||
6 | generic-y += div64.h | ||
7 | generic-y += emergency-restart.h | ||
8 | generic-y += errno.h | ||
4 | generic-y += exec.h | 9 | generic-y += exec.h |
10 | generic-y += fcntl.h | ||
11 | generic-y += futex.h | ||
12 | generic-y += hardirq.h | ||
13 | generic-y += ioctl.h | ||
14 | generic-y += irq_regs.h | ||
15 | generic-y += kdebug.h | ||
16 | generic-y += kmap_types.h | ||
17 | generic-y += kvm_para.h | ||
18 | generic-y += local.h | ||
19 | generic-y += local64.h | ||
20 | generic-y += percpu.h | ||
21 | generic-y += resource.h | ||
22 | generic-y += scatterlist.h | ||
23 | generic-y += sections.h | ||
24 | generic-y += siginfo.h | ||
25 | generic-y += statfs.h | ||
26 | generic-y += termios.h | ||
27 | generic-y += topology.h | ||
28 | generic-y += xor.h | ||
diff --git a/arch/xtensa/include/asm/atomic.h b/arch/xtensa/include/asm/atomic.h index b40989308775..24f50cada70c 100644 --- a/arch/xtensa/include/asm/atomic.h +++ b/arch/xtensa/include/asm/atomic.h | |||
@@ -73,7 +73,7 @@ static inline void atomic_add(int i, atomic_t * v) | |||
73 | "l32i %0, %2, 0 \n\t" | 73 | "l32i %0, %2, 0 \n\t" |
74 | "add %0, %0, %1 \n\t" | 74 | "add %0, %0, %1 \n\t" |
75 | "s32i %0, %2, 0 \n\t" | 75 | "s32i %0, %2, 0 \n\t" |
76 | "wsr a15, "__stringify(PS)" \n\t" | 76 | "wsr a15, ps \n\t" |
77 | "rsync \n" | 77 | "rsync \n" |
78 | : "=&a" (vval) | 78 | : "=&a" (vval) |
79 | : "a" (i), "a" (v) | 79 | : "a" (i), "a" (v) |
@@ -97,7 +97,7 @@ static inline void atomic_sub(int i, atomic_t *v) | |||
97 | "l32i %0, %2, 0 \n\t" | 97 | "l32i %0, %2, 0 \n\t" |
98 | "sub %0, %0, %1 \n\t" | 98 | "sub %0, %0, %1 \n\t" |
99 | "s32i %0, %2, 0 \n\t" | 99 | "s32i %0, %2, 0 \n\t" |
100 | "wsr a15, "__stringify(PS)" \n\t" | 100 | "wsr a15, ps \n\t" |
101 | "rsync \n" | 101 | "rsync \n" |
102 | : "=&a" (vval) | 102 | : "=&a" (vval) |
103 | : "a" (i), "a" (v) | 103 | : "a" (i), "a" (v) |
@@ -118,7 +118,7 @@ static inline int atomic_add_return(int i, atomic_t * v) | |||
118 | "l32i %0, %2, 0 \n\t" | 118 | "l32i %0, %2, 0 \n\t" |
119 | "add %0, %0, %1 \n\t" | 119 | "add %0, %0, %1 \n\t" |
120 | "s32i %0, %2, 0 \n\t" | 120 | "s32i %0, %2, 0 \n\t" |
121 | "wsr a15, "__stringify(PS)" \n\t" | 121 | "wsr a15, ps \n\t" |
122 | "rsync \n" | 122 | "rsync \n" |
123 | : "=&a" (vval) | 123 | : "=&a" (vval) |
124 | : "a" (i), "a" (v) | 124 | : "a" (i), "a" (v) |
@@ -137,7 +137,7 @@ static inline int atomic_sub_return(int i, atomic_t * v) | |||
137 | "l32i %0, %2, 0 \n\t" | 137 | "l32i %0, %2, 0 \n\t" |
138 | "sub %0, %0, %1 \n\t" | 138 | "sub %0, %0, %1 \n\t" |
139 | "s32i %0, %2, 0 \n\t" | 139 | "s32i %0, %2, 0 \n\t" |
140 | "wsr a15, "__stringify(PS)" \n\t" | 140 | "wsr a15, ps \n\t" |
141 | "rsync \n" | 141 | "rsync \n" |
142 | : "=&a" (vval) | 142 | : "=&a" (vval) |
143 | : "a" (i), "a" (v) | 143 | : "a" (i), "a" (v) |
@@ -260,7 +260,7 @@ static inline void atomic_clear_mask(unsigned int mask, atomic_t *v) | |||
260 | "xor %1, %4, %3 \n\t" | 260 | "xor %1, %4, %3 \n\t" |
261 | "and %0, %0, %4 \n\t" | 261 | "and %0, %0, %4 \n\t" |
262 | "s32i %0, %2, 0 \n\t" | 262 | "s32i %0, %2, 0 \n\t" |
263 | "wsr a15, "__stringify(PS)" \n\t" | 263 | "wsr a15, ps \n\t" |
264 | "rsync \n" | 264 | "rsync \n" |
265 | : "=&a" (vval), "=a" (mask) | 265 | : "=&a" (vval), "=a" (mask) |
266 | : "a" (v), "a" (all_f), "1" (mask) | 266 | : "a" (v), "a" (all_f), "1" (mask) |
@@ -277,7 +277,7 @@ static inline void atomic_set_mask(unsigned int mask, atomic_t *v) | |||
277 | "l32i %0, %2, 0 \n\t" | 277 | "l32i %0, %2, 0 \n\t" |
278 | "or %0, %0, %1 \n\t" | 278 | "or %0, %0, %1 \n\t" |
279 | "s32i %0, %2, 0 \n\t" | 279 | "s32i %0, %2, 0 \n\t" |
280 | "wsr a15, "__stringify(PS)" \n\t" | 280 | "wsr a15, ps \n\t" |
281 | "rsync \n" | 281 | "rsync \n" |
282 | : "=&a" (vval) | 282 | : "=&a" (vval) |
283 | : "a" (mask), "a" (v) | 283 | : "a" (mask), "a" (v) |
diff --git a/arch/xtensa/include/asm/bitsperlong.h b/arch/xtensa/include/asm/bitsperlong.h deleted file mode 100644 index 6dc0bb0c13b2..000000000000 --- a/arch/xtensa/include/asm/bitsperlong.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/bitsperlong.h> | ||
diff --git a/arch/xtensa/include/asm/bug.h b/arch/xtensa/include/asm/bug.h deleted file mode 100644 index 3e52d72712f1..000000000000 --- a/arch/xtensa/include/asm/bug.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/bug.h | ||
3 | * | ||
4 | * Macros to cause a 'bug' message. | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | * | ||
10 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
11 | */ | ||
12 | |||
13 | #ifndef _XTENSA_BUG_H | ||
14 | #define _XTENSA_BUG_H | ||
15 | |||
16 | #include <asm-generic/bug.h> | ||
17 | |||
18 | #endif /* _XTENSA_BUG_H */ | ||
diff --git a/arch/xtensa/include/asm/cacheflush.h b/arch/xtensa/include/asm/cacheflush.h index 376cd9d5f455..569fec4f9a20 100644 --- a/arch/xtensa/include/asm/cacheflush.h +++ b/arch/xtensa/include/asm/cacheflush.h | |||
@@ -165,7 +165,7 @@ extern void copy_from_user_page(struct vm_area_struct*, struct page*, | |||
165 | static inline u32 xtensa_get_cacheattr(void) | 165 | static inline u32 xtensa_get_cacheattr(void) |
166 | { | 166 | { |
167 | u32 r; | 167 | u32 r; |
168 | asm volatile(" rsr %0, CACHEATTR" : "=a"(r)); | 168 | asm volatile(" rsr %0, cacheattr" : "=a"(r)); |
169 | return r; | 169 | return r; |
170 | } | 170 | } |
171 | 171 | ||
diff --git a/arch/xtensa/include/asm/cmpxchg.h b/arch/xtensa/include/asm/cmpxchg.h index e32149063d83..64dad04a9d27 100644 --- a/arch/xtensa/include/asm/cmpxchg.h +++ b/arch/xtensa/include/asm/cmpxchg.h | |||
@@ -27,7 +27,7 @@ __cmpxchg_u32(volatile int *p, int old, int new) | |||
27 | "bne %0, %2, 1f \n\t" | 27 | "bne %0, %2, 1f \n\t" |
28 | "s32i %3, %1, 0 \n\t" | 28 | "s32i %3, %1, 0 \n\t" |
29 | "1: \n\t" | 29 | "1: \n\t" |
30 | "wsr a15, "__stringify(PS)" \n\t" | 30 | "wsr a15, ps \n\t" |
31 | "rsync \n\t" | 31 | "rsync \n\t" |
32 | : "=&a" (old) | 32 | : "=&a" (old) |
33 | : "a" (p), "a" (old), "r" (new) | 33 | : "a" (p), "a" (old), "r" (new) |
@@ -97,7 +97,7 @@ static inline unsigned long xchg_u32(volatile int * m, unsigned long val) | |||
97 | __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" | 97 | __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" |
98 | "l32i %0, %1, 0 \n\t" | 98 | "l32i %0, %1, 0 \n\t" |
99 | "s32i %2, %1, 0 \n\t" | 99 | "s32i %2, %1, 0 \n\t" |
100 | "wsr a15, "__stringify(PS)" \n\t" | 100 | "wsr a15, ps \n\t" |
101 | "rsync \n\t" | 101 | "rsync \n\t" |
102 | : "=&a" (tmp) | 102 | : "=&a" (tmp) |
103 | : "a" (m), "a" (val) | 103 | : "a" (m), "a" (val) |
diff --git a/arch/xtensa/include/asm/coprocessor.h b/arch/xtensa/include/asm/coprocessor.h index 75c94a1658b0..677501b32dfc 100644 --- a/arch/xtensa/include/asm/coprocessor.h +++ b/arch/xtensa/include/asm/coprocessor.h | |||
@@ -94,11 +94,10 @@ | |||
94 | #if XCHAL_HAVE_CP | 94 | #if XCHAL_HAVE_CP |
95 | 95 | ||
96 | #define RSR_CPENABLE(x) do { \ | 96 | #define RSR_CPENABLE(x) do { \ |
97 | __asm__ __volatile__("rsr %0," __stringify(CPENABLE) : "=a" (x)); \ | 97 | __asm__ __volatile__("rsr %0, cpenable" : "=a" (x)); \ |
98 | } while(0); | 98 | } while(0); |
99 | #define WSR_CPENABLE(x) do { \ | 99 | #define WSR_CPENABLE(x) do { \ |
100 | __asm__ __volatile__("wsr %0," __stringify(CPENABLE) "; rsync" \ | 100 | __asm__ __volatile__("wsr %0, cpenable; rsync" :: "a" (x)); \ |
101 | :: "a" (x)); \ | ||
102 | } while(0); | 101 | } while(0); |
103 | 102 | ||
104 | #endif /* XCHAL_HAVE_CP */ | 103 | #endif /* XCHAL_HAVE_CP */ |
diff --git a/arch/xtensa/include/asm/cputime.h b/arch/xtensa/include/asm/cputime.h deleted file mode 100644 index a7fb864a50ae..000000000000 --- a/arch/xtensa/include/asm/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _XTENSA_CPUTIME_H | ||
2 | #define _XTENSA_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* _XTENSA_CPUTIME_H */ | ||
diff --git a/arch/xtensa/include/asm/delay.h b/arch/xtensa/include/asm/delay.h index e1d8c9e010c1..58c0a4fd4003 100644 --- a/arch/xtensa/include/asm/delay.h +++ b/arch/xtensa/include/asm/delay.h | |||
@@ -27,7 +27,7 @@ static inline void __delay(unsigned long loops) | |||
27 | static __inline__ u32 xtensa_get_ccount(void) | 27 | static __inline__ u32 xtensa_get_ccount(void) |
28 | { | 28 | { |
29 | u32 ccount; | 29 | u32 ccount; |
30 | asm volatile ("rsr %0, 234; # CCOUNT\n" : "=r" (ccount)); | 30 | asm volatile ("rsr %0, ccount\n" : "=r" (ccount)); |
31 | return ccount; | 31 | return ccount; |
32 | } | 32 | } |
33 | 33 | ||
diff --git a/arch/xtensa/include/asm/device.h b/arch/xtensa/include/asm/device.h deleted file mode 100644 index d8f9872b0e2d..000000000000 --- a/arch/xtensa/include/asm/device.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | /* | ||
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | #include <asm-generic/device.h> | ||
7 | |||
diff --git a/arch/xtensa/include/asm/div64.h b/arch/xtensa/include/asm/div64.h deleted file mode 100644 index f35678cb0a9b..000000000000 --- a/arch/xtensa/include/asm/div64.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/div64.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2007 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_DIV64_H | ||
12 | #define _XTENSA_DIV64_H | ||
13 | |||
14 | #include <asm-generic/div64.h> | ||
15 | |||
16 | #endif /* _XTENSA_DIV64_H */ | ||
diff --git a/arch/xtensa/include/asm/emergency-restart.h b/arch/xtensa/include/asm/emergency-restart.h deleted file mode 100644 index 108d8c48e42e..000000000000 --- a/arch/xtensa/include/asm/emergency-restart.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | ||
2 | #define _ASM_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | ||
5 | |||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/arch/xtensa/include/asm/errno.h b/arch/xtensa/include/asm/errno.h deleted file mode 100644 index a0f3b96b79b4..000000000000 --- a/arch/xtensa/include/asm/errno.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/errno.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General | ||
5 | * Public License. See the file "COPYING" in the main directory of | ||
6 | * this archive for more details. | ||
7 | * | ||
8 | * Copyright (C) 2002 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_ERRNO_H | ||
12 | #define _XTENSA_ERRNO_H | ||
13 | |||
14 | #include <asm-generic/errno.h> | ||
15 | |||
16 | #endif /* _XTENSA_ERRNO_H */ | ||
diff --git a/arch/xtensa/include/asm/fcntl.h b/arch/xtensa/include/asm/fcntl.h deleted file mode 100644 index 46ab12db5739..000000000000 --- a/arch/xtensa/include/asm/fcntl.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/fcntl.h> | ||
diff --git a/arch/xtensa/include/asm/futex.h b/arch/xtensa/include/asm/futex.h deleted file mode 100644 index 0b745828f42b..000000000000 --- a/arch/xtensa/include/asm/futex.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/futex.h> | ||
diff --git a/arch/xtensa/include/asm/hardirq.h b/arch/xtensa/include/asm/hardirq.h deleted file mode 100644 index 91695a135498..000000000000 --- a/arch/xtensa/include/asm/hardirq.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/hardirq.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General | ||
5 | * Public License. See the file "COPYING" in the main directory of | ||
6 | * this archive for more details. | ||
7 | * | ||
8 | * Copyright (C) 2002 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_HARDIRQ_H | ||
12 | #define _XTENSA_HARDIRQ_H | ||
13 | |||
14 | #include <asm-generic/hardirq.h> | ||
15 | |||
16 | #endif /* _XTENSA_HARDIRQ_H */ | ||
diff --git a/arch/xtensa/include/asm/io.h b/arch/xtensa/include/asm/io.h index e6be5b9091c2..700c2e6f2d25 100644 --- a/arch/xtensa/include/asm/io.h +++ b/arch/xtensa/include/asm/io.h | |||
@@ -62,6 +62,10 @@ static inline void __iomem *ioremap(unsigned long offset, unsigned long size) | |||
62 | static inline void iounmap(volatile void __iomem *addr) | 62 | static inline void iounmap(volatile void __iomem *addr) |
63 | { | 63 | { |
64 | } | 64 | } |
65 | |||
66 | #define virt_to_bus virt_to_phys | ||
67 | #define bus_to_virt phys_to_virt | ||
68 | |||
65 | #endif /* CONFIG_MMU */ | 69 | #endif /* CONFIG_MMU */ |
66 | 70 | ||
67 | /* | 71 | /* |
diff --git a/arch/xtensa/include/asm/ioctl.h b/arch/xtensa/include/asm/ioctl.h deleted file mode 100644 index b279fe06dfe5..000000000000 --- a/arch/xtensa/include/asm/ioctl.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ioctl.h> | ||
diff --git a/arch/xtensa/include/asm/irq_regs.h b/arch/xtensa/include/asm/irq_regs.h deleted file mode 100644 index 3dd9c0b70270..000000000000 --- a/arch/xtensa/include/asm/irq_regs.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/irq_regs.h> | ||
diff --git a/arch/xtensa/include/asm/irqflags.h b/arch/xtensa/include/asm/irqflags.h index dae9a8bdcb17..f865b1c1eae4 100644 --- a/arch/xtensa/include/asm/irqflags.h +++ b/arch/xtensa/include/asm/irqflags.h | |||
@@ -16,7 +16,7 @@ | |||
16 | static inline unsigned long arch_local_save_flags(void) | 16 | static inline unsigned long arch_local_save_flags(void) |
17 | { | 17 | { |
18 | unsigned long flags; | 18 | unsigned long flags; |
19 | asm volatile("rsr %0,"__stringify(PS) : "=a" (flags)); | 19 | asm volatile("rsr %0, ps" : "=a" (flags)); |
20 | return flags; | 20 | return flags; |
21 | } | 21 | } |
22 | 22 | ||
@@ -41,7 +41,7 @@ static inline void arch_local_irq_enable(void) | |||
41 | 41 | ||
42 | static inline void arch_local_irq_restore(unsigned long flags) | 42 | static inline void arch_local_irq_restore(unsigned long flags) |
43 | { | 43 | { |
44 | asm volatile("wsr %0, "__stringify(PS)" ; rsync" | 44 | asm volatile("wsr %0, ps; rsync" |
45 | :: "a" (flags) : "memory"); | 45 | :: "a" (flags) : "memory"); |
46 | } | 46 | } |
47 | 47 | ||
diff --git a/arch/xtensa/include/asm/kdebug.h b/arch/xtensa/include/asm/kdebug.h deleted file mode 100644 index 6ece1b037665..000000000000 --- a/arch/xtensa/include/asm/kdebug.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kdebug.h> | ||
diff --git a/arch/xtensa/include/asm/kmap_types.h b/arch/xtensa/include/asm/kmap_types.h deleted file mode 100644 index 11c687e527f1..000000000000 --- a/arch/xtensa/include/asm/kmap_types.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _XTENSA_KMAP_TYPES_H | ||
2 | #define _XTENSA_KMAP_TYPES_H | ||
3 | |||
4 | #include <asm-generic/kmap_types.h> | ||
5 | |||
6 | #endif /* _XTENSA_KMAP_TYPES_H */ | ||
diff --git a/arch/xtensa/include/asm/kvm_para.h b/arch/xtensa/include/asm/kvm_para.h deleted file mode 100644 index 14fab8f0b957..000000000000 --- a/arch/xtensa/include/asm/kvm_para.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kvm_para.h> | ||
diff --git a/arch/xtensa/include/asm/local.h b/arch/xtensa/include/asm/local.h deleted file mode 100644 index 48723e550d14..000000000000 --- a/arch/xtensa/include/asm/local.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/local.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_LOCAL_H | ||
12 | #define _XTENSA_LOCAL_H | ||
13 | |||
14 | #include <asm-generic/local.h> | ||
15 | |||
16 | #endif /* _XTENSA_LOCAL_H */ | ||
diff --git a/arch/xtensa/include/asm/local64.h b/arch/xtensa/include/asm/local64.h deleted file mode 100644 index 36c93b5cc239..000000000000 --- a/arch/xtensa/include/asm/local64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/local64.h> | ||
diff --git a/arch/xtensa/include/asm/mmu_context.h b/arch/xtensa/include/asm/mmu_context.h index dbd8731a876a..feb10af96519 100644 --- a/arch/xtensa/include/asm/mmu_context.h +++ b/arch/xtensa/include/asm/mmu_context.h | |||
@@ -51,14 +51,14 @@ extern unsigned long asid_cache; | |||
51 | 51 | ||
52 | static inline void set_rasid_register (unsigned long val) | 52 | static inline void set_rasid_register (unsigned long val) |
53 | { | 53 | { |
54 | __asm__ __volatile__ (" wsr %0, "__stringify(RASID)"\n\t" | 54 | __asm__ __volatile__ (" wsr %0, rasid\n\t" |
55 | " isync\n" : : "a" (val)); | 55 | " isync\n" : : "a" (val)); |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline unsigned long get_rasid_register (void) | 58 | static inline unsigned long get_rasid_register (void) |
59 | { | 59 | { |
60 | unsigned long tmp; | 60 | unsigned long tmp; |
61 | __asm__ __volatile__ (" rsr %0,"__stringify(RASID)"\n\t" : "=a" (tmp)); | 61 | __asm__ __volatile__ (" rsr %0, rasid\n\t" : "=a" (tmp)); |
62 | return tmp; | 62 | return tmp; |
63 | } | 63 | } |
64 | 64 | ||
diff --git a/arch/xtensa/include/asm/param.h b/arch/xtensa/include/asm/param.h index ba03d5aeab6b..0a70e780ef2a 100644 --- a/arch/xtensa/include/asm/param.h +++ b/arch/xtensa/include/asm/param.h | |||
@@ -7,28 +7,12 @@ | |||
7 | * | 7 | * |
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | 8 | * Copyright (C) 2001 - 2005 Tensilica Inc. |
9 | */ | 9 | */ |
10 | |||
11 | #ifndef _XTENSA_PARAM_H | 10 | #ifndef _XTENSA_PARAM_H |
12 | #define _XTENSA_PARAM_H | 11 | #define _XTENSA_PARAM_H |
13 | 12 | ||
14 | #ifdef __KERNEL__ | 13 | #include <uapi/asm/param.h> |
14 | |||
15 | # define HZ CONFIG_HZ /* internal timer frequency */ | 15 | # define HZ CONFIG_HZ /* internal timer frequency */ |
16 | # define USER_HZ 100 /* for user interfaces in "ticks" */ | 16 | # define USER_HZ 100 /* for user interfaces in "ticks" */ |
17 | # define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */ | 17 | # define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */ |
18 | #else | ||
19 | # define HZ 100 | ||
20 | #endif | ||
21 | |||
22 | #define EXEC_PAGESIZE 4096 | ||
23 | |||
24 | #ifndef NGROUPS | ||
25 | #define NGROUPS 32 | ||
26 | #endif | ||
27 | |||
28 | #ifndef NOGROUP | ||
29 | #define NOGROUP (-1) | ||
30 | #endif | ||
31 | |||
32 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
33 | |||
34 | #endif /* _XTENSA_PARAM_H */ | 18 | #endif /* _XTENSA_PARAM_H */ |
diff --git a/arch/xtensa/include/asm/percpu.h b/arch/xtensa/include/asm/percpu.h deleted file mode 100644 index 6d2bc2ada9d1..000000000000 --- a/arch/xtensa/include/asm/percpu.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-xtensa/percpu.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_PERCPU__ | ||
12 | #define _XTENSA_PERCPU__ | ||
13 | |||
14 | #include <asm-generic/percpu.h> | ||
15 | |||
16 | #endif /* _XTENSA_PERCPU__ */ | ||
diff --git a/arch/xtensa/include/asm/processor.h b/arch/xtensa/include/asm/processor.h index 5c371d8d4528..2d630e7399ca 100644 --- a/arch/xtensa/include/asm/processor.h +++ b/arch/xtensa/include/asm/processor.h | |||
@@ -152,6 +152,7 @@ struct thread_struct { | |||
152 | 152 | ||
153 | /* Clearing a0 terminates the backtrace. */ | 153 | /* Clearing a0 terminates the backtrace. */ |
154 | #define start_thread(regs, new_pc, new_sp) \ | 154 | #define start_thread(regs, new_pc, new_sp) \ |
155 | memset(regs, 0, sizeof(*regs)); \ | ||
155 | regs->pc = new_pc; \ | 156 | regs->pc = new_pc; \ |
156 | regs->ps = USER_PS_VALUE; \ | 157 | regs->ps = USER_PS_VALUE; \ |
157 | regs->areg[1] = new_sp; \ | 158 | regs->areg[1] = new_sp; \ |
@@ -168,9 +169,6 @@ struct mm_struct; | |||
168 | /* Free all resources held by a thread. */ | 169 | /* Free all resources held by a thread. */ |
169 | #define release_thread(thread) do { } while(0) | 170 | #define release_thread(thread) do { } while(0) |
170 | 171 | ||
171 | /* Create a kernel thread without removing it from tasklists */ | ||
172 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | ||
173 | |||
174 | /* Copy and release all segment info associated with a VM */ | 172 | /* Copy and release all segment info associated with a VM */ |
175 | #define copy_segments(p, mm) do { } while(0) | 173 | #define copy_segments(p, mm) do { } while(0) |
176 | #define release_segments(mm) do { } while(0) | 174 | #define release_segments(mm) do { } while(0) |
diff --git a/arch/xtensa/include/asm/ptrace.h b/arch/xtensa/include/asm/ptrace.h index d85d38da8eec..da21c17f23aa 100644 --- a/arch/xtensa/include/asm/ptrace.h +++ b/arch/xtensa/include/asm/ptrace.h | |||
@@ -7,73 +7,11 @@ | |||
7 | * | 7 | * |
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | 8 | * Copyright (C) 2001 - 2005 Tensilica Inc. |
9 | */ | 9 | */ |
10 | |||
11 | #ifndef _XTENSA_PTRACE_H | 10 | #ifndef _XTENSA_PTRACE_H |
12 | #define _XTENSA_PTRACE_H | 11 | #define _XTENSA_PTRACE_H |
13 | 12 | ||
14 | /* | 13 | #include <uapi/asm/ptrace.h> |
15 | * Kernel stack | ||
16 | * | ||
17 | * +-----------------------+ -------- STACK_SIZE | ||
18 | * | register file | | | ||
19 | * +-----------------------+ | | ||
20 | * | struct pt_regs | | | ||
21 | * +-----------------------+ | ------ PT_REGS_OFFSET | ||
22 | * double : 16 bytes spill area : | ^ | ||
23 | * excetion :- - - - - - - - - - - -: | | | ||
24 | * frame : struct pt_regs : | | | ||
25 | * :- - - - - - - - - - - -: | | | ||
26 | * | | | | | ||
27 | * | memory stack | | | | ||
28 | * | | | | | ||
29 | * ~ ~ ~ ~ | ||
30 | * ~ ~ ~ ~ | ||
31 | * | | | | | ||
32 | * | | | | | ||
33 | * +-----------------------+ | | --- STACK_BIAS | ||
34 | * | struct task_struct | | | ^ | ||
35 | * current --> +-----------------------+ | | | | ||
36 | * | struct thread_info | | | | | ||
37 | * +-----------------------+ -------- | ||
38 | */ | ||
39 | |||
40 | #define KERNEL_STACK_SIZE (2 * PAGE_SIZE) | ||
41 | |||
42 | /* Offsets for exception_handlers[] (3 x 64-entries x 4-byte tables). */ | ||
43 | |||
44 | #define EXC_TABLE_KSTK 0x004 /* Kernel Stack */ | ||
45 | #define EXC_TABLE_DOUBLE_SAVE 0x008 /* Double exception save area for a0 */ | ||
46 | #define EXC_TABLE_FIXUP 0x00c /* Fixup handler */ | ||
47 | #define EXC_TABLE_PARAM 0x010 /* For passing a parameter to fixup */ | ||
48 | #define EXC_TABLE_SYSCALL_SAVE 0x014 /* For fast syscall handler */ | ||
49 | #define EXC_TABLE_FAST_USER 0x100 /* Fast user exception handler */ | ||
50 | #define EXC_TABLE_FAST_KERNEL 0x200 /* Fast kernel exception handler */ | ||
51 | #define EXC_TABLE_DEFAULT 0x300 /* Default C-Handler */ | ||
52 | #define EXC_TABLE_SIZE 0x400 | ||
53 | 14 | ||
54 | /* Registers used by strace */ | ||
55 | |||
56 | #define REG_A_BASE 0x0000 | ||
57 | #define REG_AR_BASE 0x0100 | ||
58 | #define REG_PC 0x0020 | ||
59 | #define REG_PS 0x02e6 | ||
60 | #define REG_WB 0x0248 | ||
61 | #define REG_WS 0x0249 | ||
62 | #define REG_LBEG 0x0200 | ||
63 | #define REG_LEND 0x0201 | ||
64 | #define REG_LCOUNT 0x0202 | ||
65 | #define REG_SAR 0x0203 | ||
66 | |||
67 | #define SYSCALL_NR 0x00ff | ||
68 | |||
69 | /* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */ | ||
70 | |||
71 | #define PTRACE_GETREGS 12 | ||
72 | #define PTRACE_SETREGS 13 | ||
73 | #define PTRACE_GETXTREGS 18 | ||
74 | #define PTRACE_SETXTREGS 19 | ||
75 | |||
76 | #ifdef __KERNEL__ | ||
77 | 15 | ||
78 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
79 | 17 | ||
@@ -132,6 +70,4 @@ struct pt_regs { | |||
132 | 70 | ||
133 | #endif /* !__ASSEMBLY__ */ | 71 | #endif /* !__ASSEMBLY__ */ |
134 | 72 | ||
135 | #endif /* __KERNEL__ */ | ||
136 | |||
137 | #endif /* _XTENSA_PTRACE_H */ | 73 | #endif /* _XTENSA_PTRACE_H */ |
diff --git a/arch/xtensa/include/asm/regs.h b/arch/xtensa/include/asm/regs.h index a3075b12aff1..8a8aa61ccc8d 100644 --- a/arch/xtensa/include/asm/regs.h +++ b/arch/xtensa/include/asm/regs.h | |||
@@ -27,52 +27,15 @@ | |||
27 | 27 | ||
28 | /* Special registers. */ | 28 | /* Special registers. */ |
29 | 29 | ||
30 | #define LBEG 0 | 30 | #define SREG_MR 32 |
31 | #define LEND 1 | 31 | #define SREG_IBREAKA 128 |
32 | #define LCOUNT 2 | 32 | #define SREG_DBREAKA 144 |
33 | #define SAR 3 | 33 | #define SREG_DBREAKC 160 |
34 | #define BR 4 | 34 | #define SREG_EPC 176 |
35 | #define SCOMPARE1 12 | 35 | #define SREG_EPS 192 |
36 | #define ACCHI 16 | 36 | #define SREG_EXCSAVE 208 |
37 | #define ACCLO 17 | 37 | #define SREG_CCOMPARE 240 |
38 | #define MR 32 | 38 | #define SREG_MISC 244 |
39 | #define WINDOWBASE 72 | ||
40 | #define WINDOWSTART 73 | ||
41 | #define PTEVADDR 83 | ||
42 | #define RASID 90 | ||
43 | #define ITLBCFG 91 | ||
44 | #define DTLBCFG 92 | ||
45 | #define IBREAKENABLE 96 | ||
46 | #define DDR 104 | ||
47 | #define IBREAKA 128 | ||
48 | #define DBREAKA 144 | ||
49 | #define DBREAKC 160 | ||
50 | #define EPC 176 | ||
51 | #define EPC_1 177 | ||
52 | #define DEPC 192 | ||
53 | #define EPS 192 | ||
54 | #define EPS_1 193 | ||
55 | #define EXCSAVE 208 | ||
56 | #define EXCSAVE_1 209 | ||
57 | #define INTERRUPT 226 | ||
58 | #define INTENABLE 228 | ||
59 | #define PS 230 | ||
60 | #define THREADPTR 231 | ||
61 | #define EXCCAUSE 232 | ||
62 | #define DEBUGCAUSE 233 | ||
63 | #define CCOUNT 234 | ||
64 | #define PRID 235 | ||
65 | #define ICOUNT 236 | ||
66 | #define ICOUNTLEVEL 237 | ||
67 | #define EXCVADDR 238 | ||
68 | #define CCOMPARE 240 | ||
69 | #define MISC_SR 244 | ||
70 | |||
71 | /* Special names for read-only and write-only interrupt registers. */ | ||
72 | |||
73 | #define INTREAD 226 | ||
74 | #define INTSET 226 | ||
75 | #define INTCLEAR 227 | ||
76 | 39 | ||
77 | /* EXCCAUSE register fields */ | 40 | /* EXCCAUSE register fields */ |
78 | 41 | ||
diff --git a/arch/xtensa/include/asm/resource.h b/arch/xtensa/include/asm/resource.h deleted file mode 100644 index 17b5ab311771..000000000000 --- a/arch/xtensa/include/asm/resource.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/resource.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_RESOURCE_H | ||
12 | #define _XTENSA_RESOURCE_H | ||
13 | |||
14 | #include <asm-generic/resource.h> | ||
15 | |||
16 | #endif /* _XTENSA_RESOURCE_H */ | ||
diff --git a/arch/xtensa/include/asm/scatterlist.h b/arch/xtensa/include/asm/scatterlist.h deleted file mode 100644 index a0421a61d9e1..000000000000 --- a/arch/xtensa/include/asm/scatterlist.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/scatterlist.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_SCATTERLIST_H | ||
12 | #define _XTENSA_SCATTERLIST_H | ||
13 | |||
14 | #include <asm-generic/scatterlist.h> | ||
15 | |||
16 | #endif /* _XTENSA_SCATTERLIST_H */ | ||
diff --git a/arch/xtensa/include/asm/sections.h b/arch/xtensa/include/asm/sections.h deleted file mode 100644 index 40b5191b55a2..000000000000 --- a/arch/xtensa/include/asm/sections.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/sections.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_SECTIONS_H | ||
12 | #define _XTENSA_SECTIONS_H | ||
13 | |||
14 | #include <asm-generic/sections.h> | ||
15 | |||
16 | #endif /* _XTENSA_SECTIONS_H */ | ||
diff --git a/arch/xtensa/include/asm/siginfo.h b/arch/xtensa/include/asm/siginfo.h deleted file mode 100644 index 6916248295df..000000000000 --- a/arch/xtensa/include/asm/siginfo.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/siginfo.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_SIGINFO_H | ||
12 | #define _XTENSA_SIGINFO_H | ||
13 | |||
14 | #include <asm-generic/siginfo.h> | ||
15 | |||
16 | #endif /* _XTENSA_SIGINFO_H */ | ||
diff --git a/arch/xtensa/include/asm/signal.h b/arch/xtensa/include/asm/signal.h index 7f201b9d4195..72fd44c85b70 100644 --- a/arch/xtensa/include/asm/signal.h +++ b/arch/xtensa/include/asm/signal.h | |||
@@ -9,117 +9,12 @@ | |||
9 | * | 9 | * |
10 | * Copyright (C) 2001 - 2005 Tensilica Inc. | 10 | * Copyright (C) 2001 - 2005 Tensilica Inc. |
11 | */ | 11 | */ |
12 | |||
13 | #ifndef _XTENSA_SIGNAL_H | 12 | #ifndef _XTENSA_SIGNAL_H |
14 | #define _XTENSA_SIGNAL_H | 13 | #define _XTENSA_SIGNAL_H |
15 | 14 | ||
16 | 15 | #include <uapi/asm/signal.h> | |
17 | #define _NSIG 64 | ||
18 | #define _NSIG_BPW 32 | ||
19 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | ||
20 | |||
21 | #ifndef __ASSEMBLY__ | ||
22 | |||
23 | #include <linux/types.h> | ||
24 | |||
25 | /* Avoid too many header ordering problems. */ | ||
26 | struct siginfo; | ||
27 | typedef unsigned long old_sigset_t; /* at least 32 bits */ | ||
28 | typedef struct { | ||
29 | unsigned long sig[_NSIG_WORDS]; | ||
30 | } sigset_t; | ||
31 | |||
32 | #endif | ||
33 | |||
34 | #define SIGHUP 1 | ||
35 | #define SIGINT 2 | ||
36 | #define SIGQUIT 3 | ||
37 | #define SIGILL 4 | ||
38 | #define SIGTRAP 5 | ||
39 | #define SIGABRT 6 | ||
40 | #define SIGIOT 6 | ||
41 | #define SIGBUS 7 | ||
42 | #define SIGFPE 8 | ||
43 | #define SIGKILL 9 | ||
44 | #define SIGUSR1 10 | ||
45 | #define SIGSEGV 11 | ||
46 | #define SIGUSR2 12 | ||
47 | #define SIGPIPE 13 | ||
48 | #define SIGALRM 14 | ||
49 | #define SIGTERM 15 | ||
50 | #define SIGSTKFLT 16 | ||
51 | #define SIGCHLD 17 | ||
52 | #define SIGCONT 18 | ||
53 | #define SIGSTOP 19 | ||
54 | #define SIGTSTP 20 | ||
55 | #define SIGTTIN 21 | ||
56 | #define SIGTTOU 22 | ||
57 | #define SIGURG 23 | ||
58 | #define SIGXCPU 24 | ||
59 | #define SIGXFSZ 25 | ||
60 | #define SIGVTALRM 26 | ||
61 | #define SIGPROF 27 | ||
62 | #define SIGWINCH 28 | ||
63 | #define SIGIO 29 | ||
64 | #define SIGPOLL SIGIO | ||
65 | /* #define SIGLOST 29 */ | ||
66 | #define SIGPWR 30 | ||
67 | #define SIGSYS 31 | ||
68 | #define SIGUNUSED 31 | ||
69 | |||
70 | /* These should not be considered constants from userland. */ | ||
71 | #define SIGRTMIN 32 | ||
72 | #define SIGRTMAX (_NSIG-1) | ||
73 | |||
74 | /* | ||
75 | * SA_FLAGS values: | ||
76 | * | ||
77 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
78 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
79 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
80 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
81 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
82 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
83 | * | ||
84 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
85 | * Unix names RESETHAND and NODEFER respectively. | ||
86 | */ | ||
87 | #define SA_NOCLDSTOP 0x00000001 | ||
88 | #define SA_NOCLDWAIT 0x00000002 /* not supported yet */ | ||
89 | #define SA_SIGINFO 0x00000004 | ||
90 | #define SA_ONSTACK 0x08000000 | ||
91 | #define SA_RESTART 0x10000000 | ||
92 | #define SA_NODEFER 0x40000000 | ||
93 | #define SA_RESETHAND 0x80000000 | ||
94 | |||
95 | #define SA_NOMASK SA_NODEFER | ||
96 | #define SA_ONESHOT SA_RESETHAND | ||
97 | |||
98 | #define SA_RESTORER 0x04000000 | ||
99 | |||
100 | /* | ||
101 | * sigaltstack controls | ||
102 | */ | ||
103 | #define SS_ONSTACK 1 | ||
104 | #define SS_DISABLE 2 | ||
105 | |||
106 | #define MINSIGSTKSZ 2048 | ||
107 | #define SIGSTKSZ 8192 | ||
108 | 16 | ||
109 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLY__ |
110 | |||
111 | #define SIG_BLOCK 0 /* for blocking signals */ | ||
112 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
113 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
114 | |||
115 | /* Type of a signal handler. */ | ||
116 | typedef void (*__sighandler_t)(int); | ||
117 | |||
118 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
119 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
120 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
121 | |||
122 | #ifdef __KERNEL__ | ||
123 | struct sigaction { | 18 | struct sigaction { |
124 | __sighandler_t sa_handler; | 19 | __sighandler_t sa_handler; |
125 | unsigned long sa_flags; | 20 | unsigned long sa_flags; |
@@ -131,35 +26,8 @@ struct k_sigaction { | |||
131 | struct sigaction sa; | 26 | struct sigaction sa; |
132 | }; | 27 | }; |
133 | 28 | ||
134 | #else | ||
135 | |||
136 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
137 | |||
138 | struct sigaction { | ||
139 | union { | ||
140 | __sighandler_t _sa_handler; | ||
141 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
142 | } _u; | ||
143 | sigset_t sa_mask; | ||
144 | unsigned long sa_flags; | ||
145 | void (*sa_restorer)(void); | ||
146 | }; | ||
147 | |||
148 | #define sa_handler _u._sa_handler | ||
149 | #define sa_sigaction _u._sa_sigaction | ||
150 | |||
151 | #endif /* __KERNEL__ */ | ||
152 | |||
153 | typedef struct sigaltstack { | ||
154 | void *ss_sp; | ||
155 | int ss_flags; | ||
156 | size_t ss_size; | ||
157 | } stack_t; | ||
158 | |||
159 | #ifdef __KERNEL__ | ||
160 | #include <asm/sigcontext.h> | 29 | #include <asm/sigcontext.h> |
161 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | 30 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
162 | 31 | ||
163 | #endif /* __KERNEL__ */ | ||
164 | #endif /* __ASSEMBLY__ */ | 32 | #endif /* __ASSEMBLY__ */ |
165 | #endif /* _XTENSA_SIGNAL_H */ | 33 | #endif /* _XTENSA_SIGNAL_H */ |
diff --git a/arch/xtensa/include/asm/statfs.h b/arch/xtensa/include/asm/statfs.h deleted file mode 100644 index 9c3d1a213136..000000000000 --- a/arch/xtensa/include/asm/statfs.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/statfs.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_STATFS_H | ||
12 | #define _XTENSA_STATFS_H | ||
13 | |||
14 | #include <asm-generic/statfs.h> | ||
15 | |||
16 | #endif /* _XTENSA_STATFS_H */ | ||
17 | |||
diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h index c1dacca312f3..124aeee0d381 100644 --- a/arch/xtensa/include/asm/syscall.h +++ b/arch/xtensa/include/asm/syscall.h | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | struct pt_regs; | 11 | struct pt_regs; |
12 | struct sigaction; | 12 | struct sigaction; |
13 | asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*); | 13 | asmlinkage long sys_execve(char*, char**, char**, struct pt_regs*); |
14 | asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*); | 14 | asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*); |
15 | asmlinkage long xtensa_ptrace(long, long, long, long); | 15 | asmlinkage long xtensa_ptrace(long, long, long, long); |
16 | asmlinkage long xtensa_sigreturn(struct pt_regs*); | 16 | asmlinkage long xtensa_sigreturn(struct pt_regs*); |
diff --git a/arch/xtensa/include/asm/termios.h b/arch/xtensa/include/asm/termios.h deleted file mode 100644 index 4673f42f88a7..000000000000 --- a/arch/xtensa/include/asm/termios.h +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/termios.h | ||
3 | * | ||
4 | * Copied from SH. | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | * | ||
10 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
11 | */ | ||
12 | |||
13 | #ifndef _XTENSA_TERMIOS_H | ||
14 | #define _XTENSA_TERMIOS_H | ||
15 | |||
16 | #include <asm/termbits.h> | ||
17 | #include <asm/ioctls.h> | ||
18 | |||
19 | struct winsize { | ||
20 | unsigned short ws_row; | ||
21 | unsigned short ws_col; | ||
22 | unsigned short ws_xpixel; | ||
23 | unsigned short ws_ypixel; | ||
24 | }; | ||
25 | |||
26 | #define NCC 8 | ||
27 | struct termio { | ||
28 | unsigned short c_iflag; /* input mode flags */ | ||
29 | unsigned short c_oflag; /* output mode flags */ | ||
30 | unsigned short c_cflag; /* control mode flags */ | ||
31 | unsigned short c_lflag; /* local mode flags */ | ||
32 | unsigned char c_line; /* line discipline */ | ||
33 | unsigned char c_cc[NCC]; /* control characters */ | ||
34 | }; | ||
35 | |||
36 | /* Modem lines */ | ||
37 | |||
38 | #define TIOCM_LE 0x001 | ||
39 | #define TIOCM_DTR 0x002 | ||
40 | #define TIOCM_RTS 0x004 | ||
41 | #define TIOCM_ST 0x008 | ||
42 | #define TIOCM_SR 0x010 | ||
43 | #define TIOCM_CTS 0x020 | ||
44 | #define TIOCM_CAR 0x040 | ||
45 | #define TIOCM_RNG 0x080 | ||
46 | #define TIOCM_DSR 0x100 | ||
47 | #define TIOCM_CD TIOCM_CAR | ||
48 | #define TIOCM_RI TIOCM_RNG | ||
49 | #define TIOCM_OUT1 0x2000 | ||
50 | #define TIOCM_OUT2 0x4000 | ||
51 | #define TIOCM_LOOP 0x8000 | ||
52 | |||
53 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
54 | |||
55 | #ifdef __KERNEL__ | ||
56 | |||
57 | /* intr=^C quit=^\ erase=del kill=^U | ||
58 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | ||
59 | start=^Q stop=^S susp=^Z eol=\0 | ||
60 | reprint=^R discard=^U werase=^W lnext=^V | ||
61 | eol2=\0 | ||
62 | */ | ||
63 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" | ||
64 | |||
65 | /* | ||
66 | * Translate a "termio" structure into a "termios". Ugh. | ||
67 | */ | ||
68 | |||
69 | #define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ | ||
70 | unsigned short __tmp; \ | ||
71 | get_user(__tmp,&(termio)->x); \ | ||
72 | *(unsigned short *) &(termios)->x = __tmp; \ | ||
73 | } | ||
74 | |||
75 | #define user_termio_to_kernel_termios(termios, termio) \ | ||
76 | ({ \ | ||
77 | SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ | ||
78 | SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ | ||
79 | SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ | ||
80 | SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ | ||
81 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | ||
82 | }) | ||
83 | |||
84 | /* | ||
85 | * Translate a "termios" structure into a "termio". Ugh. | ||
86 | */ | ||
87 | |||
88 | #define kernel_termios_to_user_termio(termio, termios) \ | ||
89 | ({ \ | ||
90 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | ||
91 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | ||
92 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | ||
93 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | ||
94 | put_user((termios)->c_line, &(termio)->c_line); \ | ||
95 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | ||
96 | }) | ||
97 | |||
98 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) | ||
99 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) | ||
100 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
101 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
102 | |||
103 | #endif /* __KERNEL__ */ | ||
104 | |||
105 | #endif /* _XTENSA_TERMIOS_H */ | ||
diff --git a/arch/xtensa/include/asm/timex.h b/arch/xtensa/include/asm/timex.h index 053bc4272106..175b3d5e1b01 100644 --- a/arch/xtensa/include/asm/timex.h +++ b/arch/xtensa/include/asm/timex.h | |||
@@ -63,10 +63,10 @@ extern cycles_t cacheflush_time; | |||
63 | * Register access. | 63 | * Register access. |
64 | */ | 64 | */ |
65 | 65 | ||
66 | #define WSR_CCOUNT(r) asm volatile ("wsr %0,"__stringify(CCOUNT) :: "a" (r)) | 66 | #define WSR_CCOUNT(r) asm volatile ("wsr %0, ccount" :: "a" (r)) |
67 | #define RSR_CCOUNT(r) asm volatile ("rsr %0,"__stringify(CCOUNT) : "=a" (r)) | 67 | #define RSR_CCOUNT(r) asm volatile ("rsr %0, ccount" : "=a" (r)) |
68 | #define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(CCOMPARE)"+"__stringify(x) :: "a"(r)) | 68 | #define WSR_CCOMPARE(x,r) asm volatile ("wsr %0,"__stringify(SREG_CCOMPARE)"+"__stringify(x) :: "a"(r)) |
69 | #define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(CCOMPARE)"+"__stringify(x) : "=a"(r)) | 69 | #define RSR_CCOMPARE(x,r) asm volatile ("rsr %0,"__stringify(SREG_CCOMPARE)"+"__stringify(x) : "=a"(r)) |
70 | 70 | ||
71 | static inline unsigned long get_ccount (void) | 71 | static inline unsigned long get_ccount (void) |
72 | { | 72 | { |
diff --git a/arch/xtensa/include/asm/tlbflush.h b/arch/xtensa/include/asm/tlbflush.h index 46d240074f74..43dd348a5a47 100644 --- a/arch/xtensa/include/asm/tlbflush.h +++ b/arch/xtensa/include/asm/tlbflush.h | |||
@@ -86,26 +86,26 @@ static inline void invalidate_dtlb_entry_no_isync (unsigned entry) | |||
86 | 86 | ||
87 | static inline void set_itlbcfg_register (unsigned long val) | 87 | static inline void set_itlbcfg_register (unsigned long val) |
88 | { | 88 | { |
89 | __asm__ __volatile__("wsr %0, "__stringify(ITLBCFG)"\n\t" "isync\n\t" | 89 | __asm__ __volatile__("wsr %0, itlbcfg\n\t" "isync\n\t" |
90 | : : "a" (val)); | 90 | : : "a" (val)); |
91 | } | 91 | } |
92 | 92 | ||
93 | static inline void set_dtlbcfg_register (unsigned long val) | 93 | static inline void set_dtlbcfg_register (unsigned long val) |
94 | { | 94 | { |
95 | __asm__ __volatile__("wsr %0, "__stringify(DTLBCFG)"; dsync\n\t" | 95 | __asm__ __volatile__("wsr %0, dtlbcfg; dsync\n\t" |
96 | : : "a" (val)); | 96 | : : "a" (val)); |
97 | } | 97 | } |
98 | 98 | ||
99 | static inline void set_ptevaddr_register (unsigned long val) | 99 | static inline void set_ptevaddr_register (unsigned long val) |
100 | { | 100 | { |
101 | __asm__ __volatile__(" wsr %0, "__stringify(PTEVADDR)"; isync\n" | 101 | __asm__ __volatile__(" wsr %0, ptevaddr; isync\n" |
102 | : : "a" (val)); | 102 | : : "a" (val)); |
103 | } | 103 | } |
104 | 104 | ||
105 | static inline unsigned long read_ptevaddr_register (void) | 105 | static inline unsigned long read_ptevaddr_register (void) |
106 | { | 106 | { |
107 | unsigned long tmp; | 107 | unsigned long tmp; |
108 | __asm__ __volatile__("rsr %0, "__stringify(PTEVADDR)"\n\t" : "=a" (tmp)); | 108 | __asm__ __volatile__("rsr %0, ptevaddr\n\t" : "=a" (tmp)); |
109 | return tmp; | 109 | return tmp; |
110 | } | 110 | } |
111 | 111 | ||
diff --git a/arch/xtensa/include/asm/topology.h b/arch/xtensa/include/asm/topology.h deleted file mode 100644 index 7309e38a0ccb..000000000000 --- a/arch/xtensa/include/asm/topology.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/topology.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_TOPOLOGY_H | ||
12 | #define _XTENSA_TOPOLOGY_H | ||
13 | |||
14 | #include <asm-generic/topology.h> | ||
15 | |||
16 | #endif /* _XTENSA_TOPOLOGY_H */ | ||
diff --git a/arch/xtensa/include/asm/types.h b/arch/xtensa/include/asm/types.h index 6d4db7e8ffac..2b410b8c7f79 100644 --- a/arch/xtensa/include/asm/types.h +++ b/arch/xtensa/include/asm/types.h | |||
@@ -7,30 +7,17 @@ | |||
7 | * | 7 | * |
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | 8 | * Copyright (C) 2001 - 2005 Tensilica Inc. |
9 | */ | 9 | */ |
10 | |||
11 | #ifndef _XTENSA_TYPES_H | 10 | #ifndef _XTENSA_TYPES_H |
12 | #define _XTENSA_TYPES_H | 11 | #define _XTENSA_TYPES_H |
13 | 12 | ||
14 | #include <asm-generic/int-ll64.h> | 13 | #include <uapi/asm/types.h> |
15 | |||
16 | #ifdef __ASSEMBLY__ | ||
17 | # define __XTENSA_UL(x) (x) | ||
18 | # define __XTENSA_UL_CONST(x) x | ||
19 | #else | ||
20 | # define __XTENSA_UL(x) ((unsigned long)(x)) | ||
21 | # define __XTENSA_UL_CONST(x) x##UL | ||
22 | #endif | ||
23 | 14 | ||
24 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLY__ |
25 | |||
26 | /* | 16 | /* |
27 | * These aren't exported outside the kernel to avoid name space clashes | 17 | * These aren't exported outside the kernel to avoid name space clashes |
28 | */ | 18 | */ |
29 | #ifdef __KERNEL__ | ||
30 | 19 | ||
31 | #define BITS_PER_LONG 32 | 20 | #define BITS_PER_LONG 32 |
32 | 21 | ||
33 | #endif /* __KERNEL__ */ | ||
34 | #endif | 22 | #endif |
35 | |||
36 | #endif /* _XTENSA_TYPES_H */ | 23 | #endif /* _XTENSA_TYPES_H */ |
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h index bc7e005faa60..f4e6eaa40d1c 100644 --- a/arch/xtensa/include/asm/unistd.h +++ b/arch/xtensa/include/asm/unistd.h | |||
@@ -1,712 +1,8 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/unistd.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_UNISTD_H | 1 | #ifndef _XTENSA_UNISTD_H |
12 | #define _XTENSA_UNISTD_H | 2 | #define _XTENSA_UNISTD_H |
13 | 3 | ||
14 | #ifndef __SYSCALL | 4 | #define __ARCH_WANT_SYS_EXECVE |
15 | # define __SYSCALL(nr,func,nargs) | 5 | #include <uapi/asm/unistd.h> |
16 | #endif | ||
17 | |||
18 | #define __NR_spill 0 | ||
19 | __SYSCALL( 0, sys_ni_syscall, 0) | ||
20 | #define __NR_xtensa 1 | ||
21 | __SYSCALL( 1, sys_ni_syscall, 0) | ||
22 | #define __NR_available4 2 | ||
23 | __SYSCALL( 2, sys_ni_syscall, 0) | ||
24 | #define __NR_available5 3 | ||
25 | __SYSCALL( 3, sys_ni_syscall, 0) | ||
26 | #define __NR_available6 4 | ||
27 | __SYSCALL( 4, sys_ni_syscall, 0) | ||
28 | #define __NR_available7 5 | ||
29 | __SYSCALL( 5, sys_ni_syscall, 0) | ||
30 | #define __NR_available8 6 | ||
31 | __SYSCALL( 6, sys_ni_syscall, 0) | ||
32 | #define __NR_available9 7 | ||
33 | __SYSCALL( 7, sys_ni_syscall, 0) | ||
34 | |||
35 | /* File Operations */ | ||
36 | |||
37 | #define __NR_open 8 | ||
38 | __SYSCALL( 8, sys_open, 3) | ||
39 | #define __NR_close 9 | ||
40 | __SYSCALL( 9, sys_close, 1) | ||
41 | #define __NR_dup 10 | ||
42 | __SYSCALL( 10, sys_dup, 1) | ||
43 | #define __NR_dup2 11 | ||
44 | __SYSCALL( 11, sys_dup2, 2) | ||
45 | #define __NR_read 12 | ||
46 | __SYSCALL( 12, sys_read, 3) | ||
47 | #define __NR_write 13 | ||
48 | __SYSCALL( 13, sys_write, 3) | ||
49 | #define __NR_select 14 | ||
50 | __SYSCALL( 14, sys_select, 5) | ||
51 | #define __NR_lseek 15 | ||
52 | __SYSCALL( 15, sys_lseek, 3) | ||
53 | #define __NR_poll 16 | ||
54 | __SYSCALL( 16, sys_poll, 3) | ||
55 | #define __NR__llseek 17 | ||
56 | __SYSCALL( 17, sys_llseek, 5) | ||
57 | #define __NR_epoll_wait 18 | ||
58 | __SYSCALL( 18, sys_epoll_wait, 4) | ||
59 | #define __NR_epoll_ctl 19 | ||
60 | __SYSCALL( 19, sys_epoll_ctl, 4) | ||
61 | #define __NR_epoll_create 20 | ||
62 | __SYSCALL( 20, sys_epoll_create, 1) | ||
63 | #define __NR_creat 21 | ||
64 | __SYSCALL( 21, sys_creat, 2) | ||
65 | #define __NR_truncate 22 | ||
66 | __SYSCALL( 22, sys_truncate, 2) | ||
67 | #define __NR_ftruncate 23 | ||
68 | __SYSCALL( 23, sys_ftruncate, 2) | ||
69 | #define __NR_readv 24 | ||
70 | __SYSCALL( 24, sys_readv, 3) | ||
71 | #define __NR_writev 25 | ||
72 | __SYSCALL( 25, sys_writev, 3) | ||
73 | #define __NR_fsync 26 | ||
74 | __SYSCALL( 26, sys_fsync, 1) | ||
75 | #define __NR_fdatasync 27 | ||
76 | __SYSCALL( 27, sys_fdatasync, 1) | ||
77 | #define __NR_truncate64 28 | ||
78 | __SYSCALL( 28, sys_truncate64, 2) | ||
79 | #define __NR_ftruncate64 29 | ||
80 | __SYSCALL( 29, sys_ftruncate64, 2) | ||
81 | #define __NR_pread64 30 | ||
82 | __SYSCALL( 30, sys_pread64, 6) | ||
83 | #define __NR_pwrite64 31 | ||
84 | __SYSCALL( 31, sys_pwrite64, 6) | ||
85 | |||
86 | #define __NR_link 32 | ||
87 | __SYSCALL( 32, sys_link, 2) | ||
88 | #define __NR_rename 33 | ||
89 | __SYSCALL( 33, sys_rename, 2) | ||
90 | #define __NR_symlink 34 | ||
91 | __SYSCALL( 34, sys_symlink, 2) | ||
92 | #define __NR_readlink 35 | ||
93 | __SYSCALL( 35, sys_readlink, 3) | ||
94 | #define __NR_mknod 36 | ||
95 | __SYSCALL( 36, sys_mknod, 3) | ||
96 | #define __NR_pipe 37 | ||
97 | __SYSCALL( 37, sys_pipe, 1) | ||
98 | #define __NR_unlink 38 | ||
99 | __SYSCALL( 38, sys_unlink, 1) | ||
100 | #define __NR_rmdir 39 | ||
101 | __SYSCALL( 39, sys_rmdir, 1) | ||
102 | |||
103 | #define __NR_mkdir 40 | ||
104 | __SYSCALL( 40, sys_mkdir, 2) | ||
105 | #define __NR_chdir 41 | ||
106 | __SYSCALL( 41, sys_chdir, 1) | ||
107 | #define __NR_fchdir 42 | ||
108 | __SYSCALL( 42, sys_fchdir, 1) | ||
109 | #define __NR_getcwd 43 | ||
110 | __SYSCALL( 43, sys_getcwd, 2) | ||
111 | |||
112 | #define __NR_chmod 44 | ||
113 | __SYSCALL( 44, sys_chmod, 2) | ||
114 | #define __NR_chown 45 | ||
115 | __SYSCALL( 45, sys_chown, 3) | ||
116 | #define __NR_stat 46 | ||
117 | __SYSCALL( 46, sys_newstat, 2) | ||
118 | #define __NR_stat64 47 | ||
119 | __SYSCALL( 47, sys_stat64, 2) | ||
120 | |||
121 | #define __NR_lchown 48 | ||
122 | __SYSCALL( 48, sys_lchown, 3) | ||
123 | #define __NR_lstat 49 | ||
124 | __SYSCALL( 49, sys_newlstat, 2) | ||
125 | #define __NR_lstat64 50 | ||
126 | __SYSCALL( 50, sys_lstat64, 2) | ||
127 | #define __NR_available51 51 | ||
128 | __SYSCALL( 51, sys_ni_syscall, 0) | ||
129 | |||
130 | #define __NR_fchmod 52 | ||
131 | __SYSCALL( 52, sys_fchmod, 2) | ||
132 | #define __NR_fchown 53 | ||
133 | __SYSCALL( 53, sys_fchown, 3) | ||
134 | #define __NR_fstat 54 | ||
135 | __SYSCALL( 54, sys_newfstat, 2) | ||
136 | #define __NR_fstat64 55 | ||
137 | __SYSCALL( 55, sys_fstat64, 2) | ||
138 | |||
139 | #define __NR_flock 56 | ||
140 | __SYSCALL( 56, sys_flock, 2) | ||
141 | #define __NR_access 57 | ||
142 | __SYSCALL( 57, sys_access, 2) | ||
143 | #define __NR_umask 58 | ||
144 | __SYSCALL( 58, sys_umask, 1) | ||
145 | #define __NR_getdents 59 | ||
146 | __SYSCALL( 59, sys_getdents, 3) | ||
147 | #define __NR_getdents64 60 | ||
148 | __SYSCALL( 60, sys_getdents64, 3) | ||
149 | #define __NR_fcntl64 61 | ||
150 | __SYSCALL( 61, sys_fcntl64, 3) | ||
151 | #define __NR_available62 62 | ||
152 | __SYSCALL( 62, sys_ni_syscall, 0) | ||
153 | #define __NR_fadvise64_64 63 | ||
154 | __SYSCALL( 63, xtensa_fadvise64_64, 6) | ||
155 | #define __NR_utime 64 /* glibc 2.3.3 ?? */ | ||
156 | __SYSCALL( 64, sys_utime, 2) | ||
157 | #define __NR_utimes 65 | ||
158 | __SYSCALL( 65, sys_utimes, 2) | ||
159 | #define __NR_ioctl 66 | ||
160 | __SYSCALL( 66, sys_ioctl, 3) | ||
161 | #define __NR_fcntl 67 | ||
162 | __SYSCALL( 67, sys_fcntl, 3) | ||
163 | |||
164 | #define __NR_setxattr 68 | ||
165 | __SYSCALL( 68, sys_setxattr, 5) | ||
166 | #define __NR_getxattr 69 | ||
167 | __SYSCALL( 69, sys_getxattr, 4) | ||
168 | #define __NR_listxattr 70 | ||
169 | __SYSCALL( 70, sys_listxattr, 3) | ||
170 | #define __NR_removexattr 71 | ||
171 | __SYSCALL( 71, sys_removexattr, 2) | ||
172 | #define __NR_lsetxattr 72 | ||
173 | __SYSCALL( 72, sys_lsetxattr, 5) | ||
174 | #define __NR_lgetxattr 73 | ||
175 | __SYSCALL( 73, sys_lgetxattr, 4) | ||
176 | #define __NR_llistxattr 74 | ||
177 | __SYSCALL( 74, sys_llistxattr, 3) | ||
178 | #define __NR_lremovexattr 75 | ||
179 | __SYSCALL( 75, sys_lremovexattr, 2) | ||
180 | #define __NR_fsetxattr 76 | ||
181 | __SYSCALL( 76, sys_fsetxattr, 5) | ||
182 | #define __NR_fgetxattr 77 | ||
183 | __SYSCALL( 77, sys_fgetxattr, 4) | ||
184 | #define __NR_flistxattr 78 | ||
185 | __SYSCALL( 78, sys_flistxattr, 3) | ||
186 | #define __NR_fremovexattr 79 | ||
187 | __SYSCALL( 79, sys_fremovexattr, 2) | ||
188 | |||
189 | /* File Map / Shared Memory Operations */ | ||
190 | |||
191 | #define __NR_mmap2 80 | ||
192 | __SYSCALL( 80, sys_mmap_pgoff, 6) | ||
193 | #define __NR_munmap 81 | ||
194 | __SYSCALL( 81, sys_munmap, 2) | ||
195 | #define __NR_mprotect 82 | ||
196 | __SYSCALL( 82, sys_mprotect, 3) | ||
197 | #define __NR_brk 83 | ||
198 | __SYSCALL( 83, sys_brk, 1) | ||
199 | #define __NR_mlock 84 | ||
200 | __SYSCALL( 84, sys_mlock, 2) | ||
201 | #define __NR_munlock 85 | ||
202 | __SYSCALL( 85, sys_munlock, 2) | ||
203 | #define __NR_mlockall 86 | ||
204 | __SYSCALL( 86, sys_mlockall, 1) | ||
205 | #define __NR_munlockall 87 | ||
206 | __SYSCALL( 87, sys_munlockall, 0) | ||
207 | #define __NR_mremap 88 | ||
208 | __SYSCALL( 88, sys_mremap, 4) | ||
209 | #define __NR_msync 89 | ||
210 | __SYSCALL( 89, sys_msync, 3) | ||
211 | #define __NR_mincore 90 | ||
212 | __SYSCALL( 90, sys_mincore, 3) | ||
213 | #define __NR_madvise 91 | ||
214 | __SYSCALL( 91, sys_madvise, 3) | ||
215 | #define __NR_shmget 92 | ||
216 | __SYSCALL( 92, sys_shmget, 4) | ||
217 | #define __NR_shmat 93 | ||
218 | __SYSCALL( 93, xtensa_shmat, 4) | ||
219 | #define __NR_shmctl 94 | ||
220 | __SYSCALL( 94, sys_shmctl, 4) | ||
221 | #define __NR_shmdt 95 | ||
222 | __SYSCALL( 95, sys_shmdt, 4) | ||
223 | |||
224 | /* Socket Operations */ | ||
225 | |||
226 | #define __NR_socket 96 | ||
227 | __SYSCALL( 96, sys_socket, 3) | ||
228 | #define __NR_setsockopt 97 | ||
229 | __SYSCALL( 97, sys_setsockopt, 5) | ||
230 | #define __NR_getsockopt 98 | ||
231 | __SYSCALL( 98, sys_getsockopt, 5) | ||
232 | #define __NR_shutdown 99 | ||
233 | __SYSCALL( 99, sys_shutdown, 2) | ||
234 | |||
235 | #define __NR_bind 100 | ||
236 | __SYSCALL(100, sys_bind, 3) | ||
237 | #define __NR_connect 101 | ||
238 | __SYSCALL(101, sys_connect, 3) | ||
239 | #define __NR_listen 102 | ||
240 | __SYSCALL(102, sys_listen, 2) | ||
241 | #define __NR_accept 103 | ||
242 | __SYSCALL(103, sys_accept, 3) | ||
243 | |||
244 | #define __NR_getsockname 104 | ||
245 | __SYSCALL(104, sys_getsockname, 3) | ||
246 | #define __NR_getpeername 105 | ||
247 | __SYSCALL(105, sys_getpeername, 3) | ||
248 | #define __NR_sendmsg 106 | ||
249 | __SYSCALL(106, sys_sendmsg, 3) | ||
250 | #define __NR_recvmsg 107 | ||
251 | __SYSCALL(107, sys_recvmsg, 3) | ||
252 | #define __NR_send 108 | ||
253 | __SYSCALL(108, sys_send, 4) | ||
254 | #define __NR_recv 109 | ||
255 | __SYSCALL(109, sys_recv, 4) | ||
256 | #define __NR_sendto 110 | ||
257 | __SYSCALL(110, sys_sendto, 6) | ||
258 | #define __NR_recvfrom 111 | ||
259 | __SYSCALL(111, sys_recvfrom, 6) | ||
260 | |||
261 | #define __NR_socketpair 112 | ||
262 | __SYSCALL(112, sys_socketpair, 4) | ||
263 | #define __NR_sendfile 113 | ||
264 | __SYSCALL(113, sys_sendfile, 4) | ||
265 | #define __NR_sendfile64 114 | ||
266 | __SYSCALL(114, sys_sendfile64, 4) | ||
267 | #define __NR_available115 115 | ||
268 | __SYSCALL(115, sys_ni_syscall, 0) | ||
269 | |||
270 | /* Process Operations */ | ||
271 | |||
272 | #define __NR_clone 116 | ||
273 | __SYSCALL(116, xtensa_clone, 5) | ||
274 | #define __NR_execve 117 | ||
275 | __SYSCALL(117, xtensa_execve, 3) | ||
276 | #define __NR_exit 118 | ||
277 | __SYSCALL(118, sys_exit, 1) | ||
278 | #define __NR_exit_group 119 | ||
279 | __SYSCALL(119, sys_exit_group, 1) | ||
280 | #define __NR_getpid 120 | ||
281 | __SYSCALL(120, sys_getpid, 0) | ||
282 | #define __NR_wait4 121 | ||
283 | __SYSCALL(121, sys_wait4, 4) | ||
284 | #define __NR_waitid 122 | ||
285 | __SYSCALL(122, sys_waitid, 5) | ||
286 | #define __NR_kill 123 | ||
287 | __SYSCALL(123, sys_kill, 2) | ||
288 | #define __NR_tkill 124 | ||
289 | __SYSCALL(124, sys_tkill, 2) | ||
290 | #define __NR_tgkill 125 | ||
291 | __SYSCALL(125, sys_tgkill, 3) | ||
292 | #define __NR_set_tid_address 126 | ||
293 | __SYSCALL(126, sys_set_tid_address, 1) | ||
294 | #define __NR_gettid 127 | ||
295 | __SYSCALL(127, sys_gettid, 0) | ||
296 | #define __NR_setsid 128 | ||
297 | __SYSCALL(128, sys_setsid, 0) | ||
298 | #define __NR_getsid 129 | ||
299 | __SYSCALL(129, sys_getsid, 1) | ||
300 | #define __NR_prctl 130 | ||
301 | __SYSCALL(130, sys_prctl, 5) | ||
302 | #define __NR_personality 131 | ||
303 | __SYSCALL(131, sys_personality, 1) | ||
304 | #define __NR_getpriority 132 | ||
305 | __SYSCALL(132, sys_getpriority, 2) | ||
306 | #define __NR_setpriority 133 | ||
307 | __SYSCALL(133, sys_setpriority, 3) | ||
308 | #define __NR_setitimer 134 | ||
309 | __SYSCALL(134, sys_setitimer, 3) | ||
310 | #define __NR_getitimer 135 | ||
311 | __SYSCALL(135, sys_getitimer, 2) | ||
312 | #define __NR_setuid 136 | ||
313 | __SYSCALL(136, sys_setuid, 1) | ||
314 | #define __NR_getuid 137 | ||
315 | __SYSCALL(137, sys_getuid, 0) | ||
316 | #define __NR_setgid 138 | ||
317 | __SYSCALL(138, sys_setgid, 1) | ||
318 | #define __NR_getgid 139 | ||
319 | __SYSCALL(139, sys_getgid, 0) | ||
320 | #define __NR_geteuid 140 | ||
321 | __SYSCALL(140, sys_geteuid, 0) | ||
322 | #define __NR_getegid 141 | ||
323 | __SYSCALL(141, sys_getegid, 0) | ||
324 | #define __NR_setreuid 142 | ||
325 | __SYSCALL(142, sys_setreuid, 2) | ||
326 | #define __NR_setregid 143 | ||
327 | __SYSCALL(143, sys_setregid, 2) | ||
328 | #define __NR_setresuid 144 | ||
329 | __SYSCALL(144, sys_setresuid, 3) | ||
330 | #define __NR_getresuid 145 | ||
331 | __SYSCALL(145, sys_getresuid, 3) | ||
332 | #define __NR_setresgid 146 | ||
333 | __SYSCALL(146, sys_setresgid, 3) | ||
334 | #define __NR_getresgid 147 | ||
335 | __SYSCALL(147, sys_getresgid, 3) | ||
336 | #define __NR_setpgid 148 | ||
337 | __SYSCALL(148, sys_setpgid, 2) | ||
338 | #define __NR_getpgid 149 | ||
339 | __SYSCALL(149, sys_getpgid, 1) | ||
340 | #define __NR_getppid 150 | ||
341 | __SYSCALL(150, sys_getppid, 0) | ||
342 | #define __NR_getpgrp 151 | ||
343 | __SYSCALL(151, sys_getpgrp, 0) | ||
344 | |||
345 | #define __NR_reserved152 152 /* set_thread_area */ | ||
346 | __SYSCALL(152, sys_ni_syscall, 0) | ||
347 | #define __NR_reserved153 153 /* get_thread_area */ | ||
348 | __SYSCALL(153, sys_ni_syscall, 0) | ||
349 | #define __NR_times 154 | ||
350 | __SYSCALL(154, sys_times, 1) | ||
351 | #define __NR_acct 155 | ||
352 | __SYSCALL(155, sys_acct, 1) | ||
353 | #define __NR_sched_setaffinity 156 | ||
354 | __SYSCALL(156, sys_sched_setaffinity, 3) | ||
355 | #define __NR_sched_getaffinity 157 | ||
356 | __SYSCALL(157, sys_sched_getaffinity, 3) | ||
357 | #define __NR_capget 158 | ||
358 | __SYSCALL(158, sys_capget, 2) | ||
359 | #define __NR_capset 159 | ||
360 | __SYSCALL(159, sys_capset, 2) | ||
361 | #define __NR_ptrace 160 | ||
362 | __SYSCALL(160, sys_ptrace, 4) | ||
363 | #define __NR_semtimedop 161 | ||
364 | __SYSCALL(161, sys_semtimedop, 5) | ||
365 | #define __NR_semget 162 | ||
366 | __SYSCALL(162, sys_semget, 4) | ||
367 | #define __NR_semop 163 | ||
368 | __SYSCALL(163, sys_semop, 4) | ||
369 | #define __NR_semctl 164 | ||
370 | __SYSCALL(164, sys_semctl, 4) | ||
371 | #define __NR_available165 165 | ||
372 | __SYSCALL(165, sys_ni_syscall, 0) | ||
373 | #define __NR_msgget 166 | ||
374 | __SYSCALL(166, sys_msgget, 4) | ||
375 | #define __NR_msgsnd 167 | ||
376 | __SYSCALL(167, sys_msgsnd, 4) | ||
377 | #define __NR_msgrcv 168 | ||
378 | __SYSCALL(168, sys_msgrcv, 4) | ||
379 | #define __NR_msgctl 169 | ||
380 | __SYSCALL(169, sys_msgctl, 4) | ||
381 | #define __NR_available170 170 | ||
382 | __SYSCALL(170, sys_ni_syscall, 0) | ||
383 | #define __NR_available171 171 | ||
384 | __SYSCALL(171, sys_ni_syscall, 0) | ||
385 | |||
386 | /* File System */ | ||
387 | |||
388 | #define __NR_mount 172 | ||
389 | __SYSCALL(172, sys_mount, 5) | ||
390 | #define __NR_swapon 173 | ||
391 | __SYSCALL(173, sys_swapon, 2) | ||
392 | #define __NR_chroot 174 | ||
393 | __SYSCALL(174, sys_chroot, 1) | ||
394 | #define __NR_pivot_root 175 | ||
395 | __SYSCALL(175, sys_pivot_root, 2) | ||
396 | #define __NR_umount 176 | ||
397 | __SYSCALL(176, sys_umount, 2) | ||
398 | #define __NR_swapoff 177 | ||
399 | __SYSCALL(177, sys_swapoff, 1) | ||
400 | #define __NR_sync 178 | ||
401 | __SYSCALL(178, sys_sync, 0) | ||
402 | #define __NR_available179 179 | ||
403 | __SYSCALL(179, sys_ni_syscall, 0) | ||
404 | #define __NR_setfsuid 180 | ||
405 | __SYSCALL(180, sys_setfsuid, 1) | ||
406 | #define __NR_setfsgid 181 | ||
407 | __SYSCALL(181, sys_setfsgid, 1) | ||
408 | #define __NR_sysfs 182 | ||
409 | __SYSCALL(182, sys_sysfs, 3) | ||
410 | #define __NR_ustat 183 | ||
411 | __SYSCALL(183, sys_ustat, 2) | ||
412 | #define __NR_statfs 184 | ||
413 | __SYSCALL(184, sys_statfs, 2) | ||
414 | #define __NR_fstatfs 185 | ||
415 | __SYSCALL(185, sys_fstatfs, 2) | ||
416 | #define __NR_statfs64 186 | ||
417 | __SYSCALL(186, sys_statfs64, 3) | ||
418 | #define __NR_fstatfs64 187 | ||
419 | __SYSCALL(187, sys_fstatfs64, 3) | ||
420 | |||
421 | /* System */ | ||
422 | |||
423 | #define __NR_setrlimit 188 | ||
424 | __SYSCALL(188, sys_setrlimit, 2) | ||
425 | #define __NR_getrlimit 189 | ||
426 | __SYSCALL(189, sys_getrlimit, 2) | ||
427 | #define __NR_getrusage 190 | ||
428 | __SYSCALL(190, sys_getrusage, 2) | ||
429 | #define __NR_futex 191 | ||
430 | __SYSCALL(191, sys_futex, 5) | ||
431 | #define __NR_gettimeofday 192 | ||
432 | __SYSCALL(192, sys_gettimeofday, 2) | ||
433 | #define __NR_settimeofday 193 | ||
434 | __SYSCALL(193, sys_settimeofday, 2) | ||
435 | #define __NR_adjtimex 194 | ||
436 | __SYSCALL(194, sys_adjtimex, 1) | ||
437 | #define __NR_nanosleep 195 | ||
438 | __SYSCALL(195, sys_nanosleep, 2) | ||
439 | #define __NR_getgroups 196 | ||
440 | __SYSCALL(196, sys_getgroups, 2) | ||
441 | #define __NR_setgroups 197 | ||
442 | __SYSCALL(197, sys_setgroups, 2) | ||
443 | #define __NR_sethostname 198 | ||
444 | __SYSCALL(198, sys_sethostname, 2) | ||
445 | #define __NR_setdomainname 199 | ||
446 | __SYSCALL(199, sys_setdomainname, 2) | ||
447 | #define __NR_syslog 200 | ||
448 | __SYSCALL(200, sys_syslog, 3) | ||
449 | #define __NR_vhangup 201 | ||
450 | __SYSCALL(201, sys_vhangup, 0) | ||
451 | #define __NR_uselib 202 | ||
452 | __SYSCALL(202, sys_uselib, 1) | ||
453 | #define __NR_reboot 203 | ||
454 | __SYSCALL(203, sys_reboot, 3) | ||
455 | #define __NR_quotactl 204 | ||
456 | __SYSCALL(204, sys_quotactl, 4) | ||
457 | #define __NR_nfsservctl 205 | ||
458 | __SYSCALL(205, sys_ni_syscall, 0) | ||
459 | #define __NR__sysctl 206 | ||
460 | __SYSCALL(206, sys_sysctl, 1) | ||
461 | #define __NR_bdflush 207 | ||
462 | __SYSCALL(207, sys_bdflush, 2) | ||
463 | #define __NR_uname 208 | ||
464 | __SYSCALL(208, sys_newuname, 1) | ||
465 | #define __NR_sysinfo 209 | ||
466 | __SYSCALL(209, sys_sysinfo, 1) | ||
467 | #define __NR_init_module 210 | ||
468 | __SYSCALL(210, sys_init_module, 2) | ||
469 | #define __NR_delete_module 211 | ||
470 | __SYSCALL(211, sys_delete_module, 1) | ||
471 | |||
472 | #define __NR_sched_setparam 212 | ||
473 | __SYSCALL(212, sys_sched_setparam, 2) | ||
474 | #define __NR_sched_getparam 213 | ||
475 | __SYSCALL(213, sys_sched_getparam, 2) | ||
476 | #define __NR_sched_setscheduler 214 | ||
477 | __SYSCALL(214, sys_sched_setscheduler, 3) | ||
478 | #define __NR_sched_getscheduler 215 | ||
479 | __SYSCALL(215, sys_sched_getscheduler, 1) | ||
480 | #define __NR_sched_get_priority_max 216 | ||
481 | __SYSCALL(216, sys_sched_get_priority_max, 1) | ||
482 | #define __NR_sched_get_priority_min 217 | ||
483 | __SYSCALL(217, sys_sched_get_priority_min, 1) | ||
484 | #define __NR_sched_rr_get_interval 218 | ||
485 | __SYSCALL(218, sys_sched_rr_get_interval, 2) | ||
486 | #define __NR_sched_yield 219 | ||
487 | __SYSCALL(219, sys_sched_yield, 0) | ||
488 | #define __NR_available222 222 | ||
489 | __SYSCALL(222, sys_ni_syscall, 0) | ||
490 | |||
491 | /* Signal Handling */ | ||
492 | |||
493 | #define __NR_restart_syscall 223 | ||
494 | __SYSCALL(223, sys_restart_syscall, 0) | ||
495 | #define __NR_sigaltstack 224 | ||
496 | __SYSCALL(224, xtensa_sigaltstack, 2) | ||
497 | #define __NR_rt_sigreturn 225 | ||
498 | __SYSCALL(225, xtensa_rt_sigreturn, 1) | ||
499 | #define __NR_rt_sigaction 226 | ||
500 | __SYSCALL(226, sys_rt_sigaction, 4) | ||
501 | #define __NR_rt_sigprocmask 227 | ||
502 | __SYSCALL(227, sys_rt_sigprocmask, 4) | ||
503 | #define __NR_rt_sigpending 228 | ||
504 | __SYSCALL(228, sys_rt_sigpending, 2) | ||
505 | #define __NR_rt_sigtimedwait 229 | ||
506 | __SYSCALL(229, sys_rt_sigtimedwait, 4) | ||
507 | #define __NR_rt_sigqueueinfo 230 | ||
508 | __SYSCALL(230, sys_rt_sigqueueinfo, 3) | ||
509 | #define __NR_rt_sigsuspend 231 | ||
510 | __SYSCALL(231, sys_rt_sigsuspend, 2) | ||
511 | |||
512 | /* Message */ | ||
513 | |||
514 | #define __NR_mq_open 232 | ||
515 | __SYSCALL(232, sys_mq_open, 4) | ||
516 | #define __NR_mq_unlink 233 | ||
517 | __SYSCALL(233, sys_mq_unlink, 1) | ||
518 | #define __NR_mq_timedsend 234 | ||
519 | __SYSCALL(234, sys_mq_timedsend, 5) | ||
520 | #define __NR_mq_timedreceive 235 | ||
521 | __SYSCALL(235, sys_mq_timedreceive, 5) | ||
522 | #define __NR_mq_notify 236 | ||
523 | __SYSCALL(236, sys_mq_notify, 2) | ||
524 | #define __NR_mq_getsetattr 237 | ||
525 | __SYSCALL(237, sys_mq_getsetattr, 3) | ||
526 | #define __NR_available238 238 | ||
527 | __SYSCALL(238, sys_ni_syscall, 0) | ||
528 | |||
529 | /* IO */ | ||
530 | |||
531 | #define __NR_io_setup 239 | ||
532 | __SYSCALL(239, sys_io_setup, 2) | ||
533 | #define __NR_io_destroy 240 | ||
534 | __SYSCALL(240, sys_io_destroy, 1) | ||
535 | #define __NR_io_submit 241 | ||
536 | __SYSCALL(241, sys_io_submit, 3) | ||
537 | #define __NR_io_getevents 242 | ||
538 | __SYSCALL(242, sys_io_getevents, 5) | ||
539 | #define __NR_io_cancel 243 | ||
540 | __SYSCALL(243, sys_io_cancel, 3) | ||
541 | #define __NR_clock_settime 244 | ||
542 | __SYSCALL(244, sys_clock_settime, 2) | ||
543 | #define __NR_clock_gettime 245 | ||
544 | __SYSCALL(245, sys_clock_gettime, 2) | ||
545 | #define __NR_clock_getres 246 | ||
546 | __SYSCALL(246, sys_clock_getres, 2) | ||
547 | #define __NR_clock_nanosleep 247 | ||
548 | __SYSCALL(247, sys_clock_nanosleep, 4) | ||
549 | |||
550 | /* Timer */ | ||
551 | |||
552 | #define __NR_timer_create 248 | ||
553 | __SYSCALL(248, sys_timer_create, 3) | ||
554 | #define __NR_timer_delete 249 | ||
555 | __SYSCALL(249, sys_timer_delete, 1) | ||
556 | #define __NR_timer_settime 250 | ||
557 | __SYSCALL(250, sys_timer_settime, 4) | ||
558 | #define __NR_timer_gettime 251 | ||
559 | __SYSCALL(251, sys_timer_gettime, 2) | ||
560 | #define __NR_timer_getoverrun 252 | ||
561 | __SYSCALL(252, sys_timer_getoverrun, 1) | ||
562 | |||
563 | /* System */ | ||
564 | |||
565 | #define __NR_reserved244 253 | ||
566 | __SYSCALL(253, sys_ni_syscall, 0) | ||
567 | #define __NR_lookup_dcookie 254 | ||
568 | __SYSCALL(254, sys_lookup_dcookie, 4) | ||
569 | #define __NR_available255 255 | ||
570 | __SYSCALL(255, sys_ni_syscall, 0) | ||
571 | #define __NR_add_key 256 | ||
572 | __SYSCALL(256, sys_add_key, 5) | ||
573 | #define __NR_request_key 257 | ||
574 | __SYSCALL(257, sys_request_key, 5) | ||
575 | #define __NR_keyctl 258 | ||
576 | __SYSCALL(258, sys_keyctl, 5) | ||
577 | #define __NR_available259 259 | ||
578 | __SYSCALL(259, sys_ni_syscall, 0) | ||
579 | |||
580 | |||
581 | #define __NR_readahead 260 | ||
582 | __SYSCALL(260, sys_readahead, 5) | ||
583 | #define __NR_remap_file_pages 261 | ||
584 | __SYSCALL(261, sys_remap_file_pages, 5) | ||
585 | #define __NR_migrate_pages 262 | ||
586 | __SYSCALL(262, sys_migrate_pages, 0) | ||
587 | #define __NR_mbind 263 | ||
588 | __SYSCALL(263, sys_mbind, 6) | ||
589 | #define __NR_get_mempolicy 264 | ||
590 | __SYSCALL(264, sys_get_mempolicy, 5) | ||
591 | #define __NR_set_mempolicy 265 | ||
592 | __SYSCALL(265, sys_set_mempolicy, 3) | ||
593 | #define __NR_unshare 266 | ||
594 | __SYSCALL(266, sys_unshare, 1) | ||
595 | #define __NR_move_pages 267 | ||
596 | __SYSCALL(267, sys_move_pages, 0) | ||
597 | #define __NR_splice 268 | ||
598 | __SYSCALL(268, sys_splice, 0) | ||
599 | #define __NR_tee 269 | ||
600 | __SYSCALL(269, sys_tee, 0) | ||
601 | #define __NR_vmsplice 270 | ||
602 | __SYSCALL(270, sys_vmsplice, 0) | ||
603 | #define __NR_available271 271 | ||
604 | __SYSCALL(271, sys_ni_syscall, 0) | ||
605 | |||
606 | #define __NR_pselect6 272 | ||
607 | __SYSCALL(272, sys_pselect6, 0) | ||
608 | #define __NR_ppoll 273 | ||
609 | __SYSCALL(273, sys_ppoll, 0) | ||
610 | #define __NR_epoll_pwait 274 | ||
611 | __SYSCALL(274, sys_epoll_pwait, 0) | ||
612 | #define __NR_available275 275 | ||
613 | __SYSCALL(275, sys_ni_syscall, 0) | ||
614 | |||
615 | #define __NR_inotify_init 276 | ||
616 | __SYSCALL(276, sys_inotify_init, 0) | ||
617 | #define __NR_inotify_add_watch 277 | ||
618 | __SYSCALL(277, sys_inotify_add_watch, 3) | ||
619 | #define __NR_inotify_rm_watch 278 | ||
620 | __SYSCALL(278, sys_inotify_rm_watch, 2) | ||
621 | #define __NR_available279 279 | ||
622 | __SYSCALL(279, sys_ni_syscall, 0) | ||
623 | |||
624 | #define __NR_getcpu 280 | ||
625 | __SYSCALL(280, sys_getcpu, 0) | ||
626 | #define __NR_kexec_load 281 | ||
627 | __SYSCALL(281, sys_ni_syscall, 0) | ||
628 | |||
629 | #define __NR_ioprio_set 282 | ||
630 | __SYSCALL(282, sys_ioprio_set, 2) | ||
631 | #define __NR_ioprio_get 283 | ||
632 | __SYSCALL(283, sys_ioprio_get, 3) | ||
633 | |||
634 | #define __NR_set_robust_list 284 | ||
635 | __SYSCALL(284, sys_set_robust_list, 3) | ||
636 | #define __NR_get_robust_list 285 | ||
637 | __SYSCALL(285, sys_get_robust_list, 3) | ||
638 | #define __NR_reserved286 286 /* sync_file_rangeX */ | ||
639 | __SYSCALL(286, sys_ni_syscall, 3) | ||
640 | #define __NR_available287 287 | ||
641 | __SYSCALL(287, sys_faccessat, 0) | ||
642 | |||
643 | /* Relative File Operations */ | ||
644 | |||
645 | #define __NR_openat 288 | ||
646 | __SYSCALL(288, sys_openat, 4) | ||
647 | #define __NR_mkdirat 289 | ||
648 | __SYSCALL(289, sys_mkdirat, 3) | ||
649 | #define __NR_mknodat 290 | ||
650 | __SYSCALL(290, sys_mknodat, 4) | ||
651 | #define __NR_unlinkat 291 | ||
652 | __SYSCALL(291, sys_unlinkat, 3) | ||
653 | #define __NR_renameat 292 | ||
654 | __SYSCALL(292, sys_renameat, 4) | ||
655 | #define __NR_linkat 293 | ||
656 | __SYSCALL(293, sys_linkat, 5) | ||
657 | #define __NR_symlinkat 294 | ||
658 | __SYSCALL(294, sys_symlinkat, 3) | ||
659 | #define __NR_readlinkat 295 | ||
660 | __SYSCALL(295, sys_readlinkat, 4) | ||
661 | #define __NR_utimensat 296 | ||
662 | __SYSCALL(296, sys_utimensat, 0) | ||
663 | #define __NR_fchownat 297 | ||
664 | __SYSCALL(297, sys_fchownat, 5) | ||
665 | #define __NR_futimesat 298 | ||
666 | __SYSCALL(298, sys_futimesat, 4) | ||
667 | #define __NR_fstatat64 299 | ||
668 | __SYSCALL(299, sys_fstatat64, 0) | ||
669 | #define __NR_fchmodat 300 | ||
670 | __SYSCALL(300, sys_fchmodat, 4) | ||
671 | #define __NR_faccessat 301 | ||
672 | __SYSCALL(301, sys_faccessat, 4) | ||
673 | #define __NR_available302 302 | ||
674 | __SYSCALL(302, sys_ni_syscall, 0) | ||
675 | #define __NR_available303 303 | ||
676 | __SYSCALL(303, sys_ni_syscall, 0) | ||
677 | |||
678 | #define __NR_signalfd 304 | ||
679 | __SYSCALL(304, sys_signalfd, 3) | ||
680 | /* 305 was __NR_timerfd */ | ||
681 | __SYSCALL(305, sys_ni_syscall, 0) | ||
682 | #define __NR_eventfd 306 | ||
683 | __SYSCALL(306, sys_eventfd, 1) | ||
684 | #define __NR_recvmmsg 307 | ||
685 | __SYSCALL(307, sys_recvmmsg, 5) | ||
686 | #define __NR_setns 308 | ||
687 | __SYSCALL(308, sys_setns, 2) | ||
688 | |||
689 | #define __NR_syscall_count 309 | ||
690 | |||
691 | /* | ||
692 | * sysxtensa syscall handler | ||
693 | * | ||
694 | * int sysxtensa (SYS_XTENSA_ATOMIC_SET, ptr, val, unused); | ||
695 | * int sysxtensa (SYS_XTENSA_ATOMIC_ADD, ptr, val, unused); | ||
696 | * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val, unused); | ||
697 | * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval); | ||
698 | * a2 a6 a3 a4 a5 | ||
699 | */ | ||
700 | |||
701 | #define SYS_XTENSA_RESERVED 0 /* don't use this */ | ||
702 | #define SYS_XTENSA_ATOMIC_SET 1 /* set variable */ | ||
703 | #define SYS_XTENSA_ATOMIC_EXG_ADD 2 /* exchange memory and add */ | ||
704 | #define SYS_XTENSA_ATOMIC_ADD 3 /* add to memory */ | ||
705 | #define SYS_XTENSA_ATOMIC_CMP_SWP 4 /* compare and swap */ | ||
706 | |||
707 | #define SYS_XTENSA_COUNT 5 /* count */ | ||
708 | |||
709 | #ifdef __KERNEL__ | ||
710 | 6 | ||
711 | /* | 7 | /* |
712 | * "Conditional" syscalls | 8 | * "Conditional" syscalls |
@@ -735,5 +31,4 @@ __SYSCALL(308, sys_setns, 2) | |||
735 | #define __IGNORE_vfork /* use clone */ | 31 | #define __IGNORE_vfork /* use clone */ |
736 | #define __IGNORE_fadvise64 /* use fadvise64_64 */ | 32 | #define __IGNORE_fadvise64 /* use fadvise64_64 */ |
737 | 33 | ||
738 | #endif /* __KERNEL__ */ | 34 | #endif /* _XTENSA_UNISTD_H */ |
739 | #endif /* _XTENSA_UNISTD_H */ | ||
diff --git a/arch/xtensa/include/asm/xor.h b/arch/xtensa/include/asm/xor.h deleted file mode 100644 index e7b1f083991d..000000000000 --- a/arch/xtensa/include/asm/xor.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/xor.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_XOR_H | ||
12 | #define _XTENSA_XOR_H | ||
13 | |||
14 | #include <asm-generic/xor.h> | ||
15 | |||
16 | #endif | ||
diff --git a/arch/xtensa/include/uapi/asm/Kbuild b/arch/xtensa/include/uapi/asm/Kbuild index baebb3da1d44..56aad54e7fb7 100644 --- a/arch/xtensa/include/uapi/asm/Kbuild +++ b/arch/xtensa/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,25 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += auxvec.h | ||
5 | header-y += byteorder.h | ||
6 | header-y += ioctls.h | ||
7 | header-y += ipcbuf.h | ||
8 | header-y += mman.h | ||
9 | header-y += msgbuf.h | ||
10 | header-y += param.h | ||
11 | header-y += poll.h | ||
12 | header-y += posix_types.h | ||
13 | header-y += ptrace.h | ||
14 | header-y += sembuf.h | ||
15 | header-y += setup.h | ||
16 | header-y += shmbuf.h | ||
17 | header-y += sigcontext.h | ||
18 | header-y += signal.h | ||
19 | header-y += socket.h | ||
20 | header-y += sockios.h | ||
21 | header-y += stat.h | ||
22 | header-y += swab.h | ||
23 | header-y += termbits.h | ||
24 | header-y += types.h | ||
25 | header-y += unistd.h | ||
diff --git a/arch/xtensa/include/asm/auxvec.h b/arch/xtensa/include/uapi/asm/auxvec.h index 257dec75c5af..257dec75c5af 100644 --- a/arch/xtensa/include/asm/auxvec.h +++ b/arch/xtensa/include/uapi/asm/auxvec.h | |||
diff --git a/arch/xtensa/include/asm/byteorder.h b/arch/xtensa/include/uapi/asm/byteorder.h index 54eb6315349c..54eb6315349c 100644 --- a/arch/xtensa/include/asm/byteorder.h +++ b/arch/xtensa/include/uapi/asm/byteorder.h | |||
diff --git a/arch/xtensa/include/asm/ioctls.h b/arch/xtensa/include/uapi/asm/ioctls.h index 2aa4cd9f0cec..2aa4cd9f0cec 100644 --- a/arch/xtensa/include/asm/ioctls.h +++ b/arch/xtensa/include/uapi/asm/ioctls.h | |||
diff --git a/arch/xtensa/include/asm/ipcbuf.h b/arch/xtensa/include/uapi/asm/ipcbuf.h index c33aa6a42145..c33aa6a42145 100644 --- a/arch/xtensa/include/asm/ipcbuf.h +++ b/arch/xtensa/include/uapi/asm/ipcbuf.h | |||
diff --git a/arch/xtensa/include/asm/mman.h b/arch/xtensa/include/uapi/asm/mman.h index 25bc6c1309c3..25bc6c1309c3 100644 --- a/arch/xtensa/include/asm/mman.h +++ b/arch/xtensa/include/uapi/asm/mman.h | |||
diff --git a/arch/xtensa/include/asm/msgbuf.h b/arch/xtensa/include/uapi/asm/msgbuf.h index 693c96755280..693c96755280 100644 --- a/arch/xtensa/include/asm/msgbuf.h +++ b/arch/xtensa/include/uapi/asm/msgbuf.h | |||
diff --git a/arch/xtensa/include/uapi/asm/param.h b/arch/xtensa/include/uapi/asm/param.h new file mode 100644 index 000000000000..87bc2eae630e --- /dev/null +++ b/arch/xtensa/include/uapi/asm/param.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/param.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _UAPI_XTENSA_PARAM_H | ||
12 | #define _UAPI_XTENSA_PARAM_H | ||
13 | |||
14 | #ifndef __KERNEL__ | ||
15 | # define HZ 100 | ||
16 | #endif | ||
17 | |||
18 | #define EXEC_PAGESIZE 4096 | ||
19 | |||
20 | #ifndef NGROUPS | ||
21 | #define NGROUPS 32 | ||
22 | #endif | ||
23 | |||
24 | #ifndef NOGROUP | ||
25 | #define NOGROUP (-1) | ||
26 | #endif | ||
27 | |||
28 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
29 | |||
30 | #endif /* _UAPI_XTENSA_PARAM_H */ | ||
diff --git a/arch/xtensa/include/asm/poll.h b/arch/xtensa/include/uapi/asm/poll.h index 9d2d5993f068..9d2d5993f068 100644 --- a/arch/xtensa/include/asm/poll.h +++ b/arch/xtensa/include/uapi/asm/poll.h | |||
diff --git a/arch/xtensa/include/asm/posix_types.h b/arch/xtensa/include/uapi/asm/posix_types.h index 6e96be0d02d3..6e96be0d02d3 100644 --- a/arch/xtensa/include/asm/posix_types.h +++ b/arch/xtensa/include/uapi/asm/posix_types.h | |||
diff --git a/arch/xtensa/include/uapi/asm/ptrace.h b/arch/xtensa/include/uapi/asm/ptrace.h new file mode 100644 index 000000000000..ee17aa842fdf --- /dev/null +++ b/arch/xtensa/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/ptrace.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _UAPI_XTENSA_PTRACE_H | ||
12 | #define _UAPI_XTENSA_PTRACE_H | ||
13 | |||
14 | /* | ||
15 | * Kernel stack | ||
16 | * | ||
17 | * +-----------------------+ -------- STACK_SIZE | ||
18 | * | register file | | | ||
19 | * +-----------------------+ | | ||
20 | * | struct pt_regs | | | ||
21 | * +-----------------------+ | ------ PT_REGS_OFFSET | ||
22 | * double : 16 bytes spill area : | ^ | ||
23 | * excetion :- - - - - - - - - - - -: | | | ||
24 | * frame : struct pt_regs : | | | ||
25 | * :- - - - - - - - - - - -: | | | ||
26 | * | | | | | ||
27 | * | memory stack | | | | ||
28 | * | | | | | ||
29 | * ~ ~ ~ ~ | ||
30 | * ~ ~ ~ ~ | ||
31 | * | | | | | ||
32 | * | | | | | ||
33 | * +-----------------------+ | | --- STACK_BIAS | ||
34 | * | struct task_struct | | | ^ | ||
35 | * current --> +-----------------------+ | | | | ||
36 | * | struct thread_info | | | | | ||
37 | * +-----------------------+ -------- | ||
38 | */ | ||
39 | |||
40 | #define KERNEL_STACK_SIZE (2 * PAGE_SIZE) | ||
41 | |||
42 | /* Offsets for exception_handlers[] (3 x 64-entries x 4-byte tables). */ | ||
43 | |||
44 | #define EXC_TABLE_KSTK 0x004 /* Kernel Stack */ | ||
45 | #define EXC_TABLE_DOUBLE_SAVE 0x008 /* Double exception save area for a0 */ | ||
46 | #define EXC_TABLE_FIXUP 0x00c /* Fixup handler */ | ||
47 | #define EXC_TABLE_PARAM 0x010 /* For passing a parameter to fixup */ | ||
48 | #define EXC_TABLE_SYSCALL_SAVE 0x014 /* For fast syscall handler */ | ||
49 | #define EXC_TABLE_FAST_USER 0x100 /* Fast user exception handler */ | ||
50 | #define EXC_TABLE_FAST_KERNEL 0x200 /* Fast kernel exception handler */ | ||
51 | #define EXC_TABLE_DEFAULT 0x300 /* Default C-Handler */ | ||
52 | #define EXC_TABLE_SIZE 0x400 | ||
53 | |||
54 | /* Registers used by strace */ | ||
55 | |||
56 | #define REG_A_BASE 0x0000 | ||
57 | #define REG_AR_BASE 0x0100 | ||
58 | #define REG_PC 0x0020 | ||
59 | #define REG_PS 0x02e6 | ||
60 | #define REG_WB 0x0248 | ||
61 | #define REG_WS 0x0249 | ||
62 | #define REG_LBEG 0x0200 | ||
63 | #define REG_LEND 0x0201 | ||
64 | #define REG_LCOUNT 0x0202 | ||
65 | #define REG_SAR 0x0203 | ||
66 | |||
67 | #define SYSCALL_NR 0x00ff | ||
68 | |||
69 | /* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */ | ||
70 | |||
71 | #define PTRACE_GETREGS 12 | ||
72 | #define PTRACE_SETREGS 13 | ||
73 | #define PTRACE_GETXTREGS 18 | ||
74 | #define PTRACE_SETXTREGS 19 | ||
75 | |||
76 | |||
77 | #endif /* _UAPI_XTENSA_PTRACE_H */ | ||
diff --git a/arch/xtensa/include/asm/sembuf.h b/arch/xtensa/include/uapi/asm/sembuf.h index c15870493b33..c15870493b33 100644 --- a/arch/xtensa/include/asm/sembuf.h +++ b/arch/xtensa/include/uapi/asm/sembuf.h | |||
diff --git a/arch/xtensa/include/asm/setup.h b/arch/xtensa/include/uapi/asm/setup.h index 9fa8ad979361..9fa8ad979361 100644 --- a/arch/xtensa/include/asm/setup.h +++ b/arch/xtensa/include/uapi/asm/setup.h | |||
diff --git a/arch/xtensa/include/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h index ad4b0121782c..ad4b0121782c 100644 --- a/arch/xtensa/include/asm/shmbuf.h +++ b/arch/xtensa/include/uapi/asm/shmbuf.h | |||
diff --git a/arch/xtensa/include/asm/sigcontext.h b/arch/xtensa/include/uapi/asm/sigcontext.h index 03383af8c3b7..03383af8c3b7 100644 --- a/arch/xtensa/include/asm/sigcontext.h +++ b/arch/xtensa/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/xtensa/include/uapi/asm/signal.h b/arch/xtensa/include/uapi/asm/signal.h new file mode 100644 index 000000000000..b88ce96f2af9 --- /dev/null +++ b/arch/xtensa/include/uapi/asm/signal.h | |||
@@ -0,0 +1,148 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/signal.h | ||
3 | * | ||
4 | * Swiped from SH. | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | * | ||
10 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
11 | */ | ||
12 | |||
13 | #ifndef _UAPI_XTENSA_SIGNAL_H | ||
14 | #define _UAPI_XTENSA_SIGNAL_H | ||
15 | |||
16 | |||
17 | #define _NSIG 64 | ||
18 | #define _NSIG_BPW 32 | ||
19 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | ||
20 | |||
21 | #ifndef __ASSEMBLY__ | ||
22 | |||
23 | #include <linux/types.h> | ||
24 | |||
25 | /* Avoid too many header ordering problems. */ | ||
26 | struct siginfo; | ||
27 | typedef unsigned long old_sigset_t; /* at least 32 bits */ | ||
28 | typedef struct { | ||
29 | unsigned long sig[_NSIG_WORDS]; | ||
30 | } sigset_t; | ||
31 | |||
32 | #endif | ||
33 | |||
34 | #define SIGHUP 1 | ||
35 | #define SIGINT 2 | ||
36 | #define SIGQUIT 3 | ||
37 | #define SIGILL 4 | ||
38 | #define SIGTRAP 5 | ||
39 | #define SIGABRT 6 | ||
40 | #define SIGIOT 6 | ||
41 | #define SIGBUS 7 | ||
42 | #define SIGFPE 8 | ||
43 | #define SIGKILL 9 | ||
44 | #define SIGUSR1 10 | ||
45 | #define SIGSEGV 11 | ||
46 | #define SIGUSR2 12 | ||
47 | #define SIGPIPE 13 | ||
48 | #define SIGALRM 14 | ||
49 | #define SIGTERM 15 | ||
50 | #define SIGSTKFLT 16 | ||
51 | #define SIGCHLD 17 | ||
52 | #define SIGCONT 18 | ||
53 | #define SIGSTOP 19 | ||
54 | #define SIGTSTP 20 | ||
55 | #define SIGTTIN 21 | ||
56 | #define SIGTTOU 22 | ||
57 | #define SIGURG 23 | ||
58 | #define SIGXCPU 24 | ||
59 | #define SIGXFSZ 25 | ||
60 | #define SIGVTALRM 26 | ||
61 | #define SIGPROF 27 | ||
62 | #define SIGWINCH 28 | ||
63 | #define SIGIO 29 | ||
64 | #define SIGPOLL SIGIO | ||
65 | /* #define SIGLOST 29 */ | ||
66 | #define SIGPWR 30 | ||
67 | #define SIGSYS 31 | ||
68 | #define SIGUNUSED 31 | ||
69 | |||
70 | /* These should not be considered constants from userland. */ | ||
71 | #define SIGRTMIN 32 | ||
72 | #define SIGRTMAX (_NSIG-1) | ||
73 | |||
74 | /* | ||
75 | * SA_FLAGS values: | ||
76 | * | ||
77 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
78 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
79 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
80 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
81 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
82 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
83 | * | ||
84 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
85 | * Unix names RESETHAND and NODEFER respectively. | ||
86 | */ | ||
87 | #define SA_NOCLDSTOP 0x00000001 | ||
88 | #define SA_NOCLDWAIT 0x00000002 /* not supported yet */ | ||
89 | #define SA_SIGINFO 0x00000004 | ||
90 | #define SA_ONSTACK 0x08000000 | ||
91 | #define SA_RESTART 0x10000000 | ||
92 | #define SA_NODEFER 0x40000000 | ||
93 | #define SA_RESETHAND 0x80000000 | ||
94 | |||
95 | #define SA_NOMASK SA_NODEFER | ||
96 | #define SA_ONESHOT SA_RESETHAND | ||
97 | |||
98 | #define SA_RESTORER 0x04000000 | ||
99 | |||
100 | /* | ||
101 | * sigaltstack controls | ||
102 | */ | ||
103 | #define SS_ONSTACK 1 | ||
104 | #define SS_DISABLE 2 | ||
105 | |||
106 | #define MINSIGSTKSZ 2048 | ||
107 | #define SIGSTKSZ 8192 | ||
108 | |||
109 | #ifndef __ASSEMBLY__ | ||
110 | |||
111 | #define SIG_BLOCK 0 /* for blocking signals */ | ||
112 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
113 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
114 | |||
115 | /* Type of a signal handler. */ | ||
116 | typedef void (*__sighandler_t)(int); | ||
117 | |||
118 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
119 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
120 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
121 | |||
122 | #ifndef __KERNEL__ | ||
123 | |||
124 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
125 | |||
126 | struct sigaction { | ||
127 | union { | ||
128 | __sighandler_t _sa_handler; | ||
129 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
130 | } _u; | ||
131 | sigset_t sa_mask; | ||
132 | unsigned long sa_flags; | ||
133 | void (*sa_restorer)(void); | ||
134 | }; | ||
135 | |||
136 | #define sa_handler _u._sa_handler | ||
137 | #define sa_sigaction _u._sa_sigaction | ||
138 | |||
139 | #endif /* __KERNEL__ */ | ||
140 | |||
141 | typedef struct sigaltstack { | ||
142 | void *ss_sp; | ||
143 | int ss_flags; | ||
144 | size_t ss_size; | ||
145 | } stack_t; | ||
146 | |||
147 | #endif /* __ASSEMBLY__ */ | ||
148 | #endif /* _UAPI_XTENSA_SIGNAL_H */ | ||
diff --git a/arch/xtensa/include/asm/socket.h b/arch/xtensa/include/uapi/asm/socket.h index e36c68184920..e36c68184920 100644 --- a/arch/xtensa/include/asm/socket.h +++ b/arch/xtensa/include/uapi/asm/socket.h | |||
diff --git a/arch/xtensa/include/asm/sockios.h b/arch/xtensa/include/uapi/asm/sockios.h index efe0af379f01..efe0af379f01 100644 --- a/arch/xtensa/include/asm/sockios.h +++ b/arch/xtensa/include/uapi/asm/sockios.h | |||
diff --git a/arch/xtensa/include/asm/stat.h b/arch/xtensa/include/uapi/asm/stat.h index c4992038cee0..c4992038cee0 100644 --- a/arch/xtensa/include/asm/stat.h +++ b/arch/xtensa/include/uapi/asm/stat.h | |||
diff --git a/arch/xtensa/include/asm/swab.h b/arch/xtensa/include/uapi/asm/swab.h index 226a39162310..226a39162310 100644 --- a/arch/xtensa/include/asm/swab.h +++ b/arch/xtensa/include/uapi/asm/swab.h | |||
diff --git a/arch/xtensa/include/asm/termbits.h b/arch/xtensa/include/uapi/asm/termbits.h index 0d6c8715b24f..0d6c8715b24f 100644 --- a/arch/xtensa/include/asm/termbits.h +++ b/arch/xtensa/include/uapi/asm/termbits.h | |||
diff --git a/arch/xtensa/include/uapi/asm/types.h b/arch/xtensa/include/uapi/asm/types.h new file mode 100644 index 000000000000..87ec7ae73cb1 --- /dev/null +++ b/arch/xtensa/include/uapi/asm/types.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/types.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _UAPI_XTENSA_TYPES_H | ||
12 | #define _UAPI_XTENSA_TYPES_H | ||
13 | |||
14 | #include <asm-generic/int-ll64.h> | ||
15 | |||
16 | #ifdef __ASSEMBLY__ | ||
17 | # define __XTENSA_UL(x) (x) | ||
18 | # define __XTENSA_UL_CONST(x) x | ||
19 | #else | ||
20 | # define __XTENSA_UL(x) ((unsigned long)(x)) | ||
21 | # define __XTENSA_UL_CONST(x) x##UL | ||
22 | #endif | ||
23 | |||
24 | #ifndef __ASSEMBLY__ | ||
25 | |||
26 | #endif | ||
27 | |||
28 | #endif /* _UAPI_XTENSA_TYPES_H */ | ||
diff --git a/arch/xtensa/include/uapi/asm/unistd.h b/arch/xtensa/include/uapi/asm/unistd.h new file mode 100644 index 000000000000..9f36d0e3e0ac --- /dev/null +++ b/arch/xtensa/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,754 @@ | |||
1 | #if !defined(_UAPI_XTENSA_UNISTD_H) || defined(__SYSCALL) | ||
2 | #define _UAPI_XTENSA_UNISTD_H | ||
3 | |||
4 | #ifndef __SYSCALL | ||
5 | # define __SYSCALL(nr,func,nargs) | ||
6 | #endif | ||
7 | |||
8 | #define __NR_spill 0 | ||
9 | __SYSCALL( 0, sys_ni_syscall, 0) | ||
10 | #define __NR_xtensa 1 | ||
11 | __SYSCALL( 1, sys_ni_syscall, 0) | ||
12 | #define __NR_available4 2 | ||
13 | __SYSCALL( 2, sys_ni_syscall, 0) | ||
14 | #define __NR_available5 3 | ||
15 | __SYSCALL( 3, sys_ni_syscall, 0) | ||
16 | #define __NR_available6 4 | ||
17 | __SYSCALL( 4, sys_ni_syscall, 0) | ||
18 | #define __NR_available7 5 | ||
19 | __SYSCALL( 5, sys_ni_syscall, 0) | ||
20 | #define __NR_available8 6 | ||
21 | __SYSCALL( 6, sys_ni_syscall, 0) | ||
22 | #define __NR_available9 7 | ||
23 | __SYSCALL( 7, sys_ni_syscall, 0) | ||
24 | |||
25 | /* File Operations */ | ||
26 | |||
27 | #define __NR_open 8 | ||
28 | __SYSCALL( 8, sys_open, 3) | ||
29 | #define __NR_close 9 | ||
30 | __SYSCALL( 9, sys_close, 1) | ||
31 | #define __NR_dup 10 | ||
32 | __SYSCALL( 10, sys_dup, 1) | ||
33 | #define __NR_dup2 11 | ||
34 | __SYSCALL( 11, sys_dup2, 2) | ||
35 | #define __NR_read 12 | ||
36 | __SYSCALL( 12, sys_read, 3) | ||
37 | #define __NR_write 13 | ||
38 | __SYSCALL( 13, sys_write, 3) | ||
39 | #define __NR_select 14 | ||
40 | __SYSCALL( 14, sys_select, 5) | ||
41 | #define __NR_lseek 15 | ||
42 | __SYSCALL( 15, sys_lseek, 3) | ||
43 | #define __NR_poll 16 | ||
44 | __SYSCALL( 16, sys_poll, 3) | ||
45 | #define __NR__llseek 17 | ||
46 | __SYSCALL( 17, sys_llseek, 5) | ||
47 | #define __NR_epoll_wait 18 | ||
48 | __SYSCALL( 18, sys_epoll_wait, 4) | ||
49 | #define __NR_epoll_ctl 19 | ||
50 | __SYSCALL( 19, sys_epoll_ctl, 4) | ||
51 | #define __NR_epoll_create 20 | ||
52 | __SYSCALL( 20, sys_epoll_create, 1) | ||
53 | #define __NR_creat 21 | ||
54 | __SYSCALL( 21, sys_creat, 2) | ||
55 | #define __NR_truncate 22 | ||
56 | __SYSCALL( 22, sys_truncate, 2) | ||
57 | #define __NR_ftruncate 23 | ||
58 | __SYSCALL( 23, sys_ftruncate, 2) | ||
59 | #define __NR_readv 24 | ||
60 | __SYSCALL( 24, sys_readv, 3) | ||
61 | #define __NR_writev 25 | ||
62 | __SYSCALL( 25, sys_writev, 3) | ||
63 | #define __NR_fsync 26 | ||
64 | __SYSCALL( 26, sys_fsync, 1) | ||
65 | #define __NR_fdatasync 27 | ||
66 | __SYSCALL( 27, sys_fdatasync, 1) | ||
67 | #define __NR_truncate64 28 | ||
68 | __SYSCALL( 28, sys_truncate64, 2) | ||
69 | #define __NR_ftruncate64 29 | ||
70 | __SYSCALL( 29, sys_ftruncate64, 2) | ||
71 | #define __NR_pread64 30 | ||
72 | __SYSCALL( 30, sys_pread64, 6) | ||
73 | #define __NR_pwrite64 31 | ||
74 | __SYSCALL( 31, sys_pwrite64, 6) | ||
75 | |||
76 | #define __NR_link 32 | ||
77 | __SYSCALL( 32, sys_link, 2) | ||
78 | #define __NR_rename 33 | ||
79 | __SYSCALL( 33, sys_rename, 2) | ||
80 | #define __NR_symlink 34 | ||
81 | __SYSCALL( 34, sys_symlink, 2) | ||
82 | #define __NR_readlink 35 | ||
83 | __SYSCALL( 35, sys_readlink, 3) | ||
84 | #define __NR_mknod 36 | ||
85 | __SYSCALL( 36, sys_mknod, 3) | ||
86 | #define __NR_pipe 37 | ||
87 | __SYSCALL( 37, sys_pipe, 1) | ||
88 | #define __NR_unlink 38 | ||
89 | __SYSCALL( 38, sys_unlink, 1) | ||
90 | #define __NR_rmdir 39 | ||
91 | __SYSCALL( 39, sys_rmdir, 1) | ||
92 | |||
93 | #define __NR_mkdir 40 | ||
94 | __SYSCALL( 40, sys_mkdir, 2) | ||
95 | #define __NR_chdir 41 | ||
96 | __SYSCALL( 41, sys_chdir, 1) | ||
97 | #define __NR_fchdir 42 | ||
98 | __SYSCALL( 42, sys_fchdir, 1) | ||
99 | #define __NR_getcwd 43 | ||
100 | __SYSCALL( 43, sys_getcwd, 2) | ||
101 | |||
102 | #define __NR_chmod 44 | ||
103 | __SYSCALL( 44, sys_chmod, 2) | ||
104 | #define __NR_chown 45 | ||
105 | __SYSCALL( 45, sys_chown, 3) | ||
106 | #define __NR_stat 46 | ||
107 | __SYSCALL( 46, sys_newstat, 2) | ||
108 | #define __NR_stat64 47 | ||
109 | __SYSCALL( 47, sys_stat64, 2) | ||
110 | |||
111 | #define __NR_lchown 48 | ||
112 | __SYSCALL( 48, sys_lchown, 3) | ||
113 | #define __NR_lstat 49 | ||
114 | __SYSCALL( 49, sys_newlstat, 2) | ||
115 | #define __NR_lstat64 50 | ||
116 | __SYSCALL( 50, sys_lstat64, 2) | ||
117 | #define __NR_available51 51 | ||
118 | __SYSCALL( 51, sys_ni_syscall, 0) | ||
119 | |||
120 | #define __NR_fchmod 52 | ||
121 | __SYSCALL( 52, sys_fchmod, 2) | ||
122 | #define __NR_fchown 53 | ||
123 | __SYSCALL( 53, sys_fchown, 3) | ||
124 | #define __NR_fstat 54 | ||
125 | __SYSCALL( 54, sys_newfstat, 2) | ||
126 | #define __NR_fstat64 55 | ||
127 | __SYSCALL( 55, sys_fstat64, 2) | ||
128 | |||
129 | #define __NR_flock 56 | ||
130 | __SYSCALL( 56, sys_flock, 2) | ||
131 | #define __NR_access 57 | ||
132 | __SYSCALL( 57, sys_access, 2) | ||
133 | #define __NR_umask 58 | ||
134 | __SYSCALL( 58, sys_umask, 1) | ||
135 | #define __NR_getdents 59 | ||
136 | __SYSCALL( 59, sys_getdents, 3) | ||
137 | #define __NR_getdents64 60 | ||
138 | __SYSCALL( 60, sys_getdents64, 3) | ||
139 | #define __NR_fcntl64 61 | ||
140 | __SYSCALL( 61, sys_fcntl64, 3) | ||
141 | #define __NR_fallocate 62 | ||
142 | __SYSCALL( 62, sys_fallocate, 6) | ||
143 | #define __NR_fadvise64_64 63 | ||
144 | __SYSCALL( 63, xtensa_fadvise64_64, 6) | ||
145 | #define __NR_utime 64 /* glibc 2.3.3 ?? */ | ||
146 | __SYSCALL( 64, sys_utime, 2) | ||
147 | #define __NR_utimes 65 | ||
148 | __SYSCALL( 65, sys_utimes, 2) | ||
149 | #define __NR_ioctl 66 | ||
150 | __SYSCALL( 66, sys_ioctl, 3) | ||
151 | #define __NR_fcntl 67 | ||
152 | __SYSCALL( 67, sys_fcntl, 3) | ||
153 | |||
154 | #define __NR_setxattr 68 | ||
155 | __SYSCALL( 68, sys_setxattr, 5) | ||
156 | #define __NR_getxattr 69 | ||
157 | __SYSCALL( 69, sys_getxattr, 4) | ||
158 | #define __NR_listxattr 70 | ||
159 | __SYSCALL( 70, sys_listxattr, 3) | ||
160 | #define __NR_removexattr 71 | ||
161 | __SYSCALL( 71, sys_removexattr, 2) | ||
162 | #define __NR_lsetxattr 72 | ||
163 | __SYSCALL( 72, sys_lsetxattr, 5) | ||
164 | #define __NR_lgetxattr 73 | ||
165 | __SYSCALL( 73, sys_lgetxattr, 4) | ||
166 | #define __NR_llistxattr 74 | ||
167 | __SYSCALL( 74, sys_llistxattr, 3) | ||
168 | #define __NR_lremovexattr 75 | ||
169 | __SYSCALL( 75, sys_lremovexattr, 2) | ||
170 | #define __NR_fsetxattr 76 | ||
171 | __SYSCALL( 76, sys_fsetxattr, 5) | ||
172 | #define __NR_fgetxattr 77 | ||
173 | __SYSCALL( 77, sys_fgetxattr, 4) | ||
174 | #define __NR_flistxattr 78 | ||
175 | __SYSCALL( 78, sys_flistxattr, 3) | ||
176 | #define __NR_fremovexattr 79 | ||
177 | __SYSCALL( 79, sys_fremovexattr, 2) | ||
178 | |||
179 | /* File Map / Shared Memory Operations */ | ||
180 | |||
181 | #define __NR_mmap2 80 | ||
182 | __SYSCALL( 80, sys_mmap_pgoff, 6) | ||
183 | #define __NR_munmap 81 | ||
184 | __SYSCALL( 81, sys_munmap, 2) | ||
185 | #define __NR_mprotect 82 | ||
186 | __SYSCALL( 82, sys_mprotect, 3) | ||
187 | #define __NR_brk 83 | ||
188 | __SYSCALL( 83, sys_brk, 1) | ||
189 | #define __NR_mlock 84 | ||
190 | __SYSCALL( 84, sys_mlock, 2) | ||
191 | #define __NR_munlock 85 | ||
192 | __SYSCALL( 85, sys_munlock, 2) | ||
193 | #define __NR_mlockall 86 | ||
194 | __SYSCALL( 86, sys_mlockall, 1) | ||
195 | #define __NR_munlockall 87 | ||
196 | __SYSCALL( 87, sys_munlockall, 0) | ||
197 | #define __NR_mremap 88 | ||
198 | __SYSCALL( 88, sys_mremap, 4) | ||
199 | #define __NR_msync 89 | ||
200 | __SYSCALL( 89, sys_msync, 3) | ||
201 | #define __NR_mincore 90 | ||
202 | __SYSCALL( 90, sys_mincore, 3) | ||
203 | #define __NR_madvise 91 | ||
204 | __SYSCALL( 91, sys_madvise, 3) | ||
205 | #define __NR_shmget 92 | ||
206 | __SYSCALL( 92, sys_shmget, 4) | ||
207 | #define __NR_shmat 93 | ||
208 | __SYSCALL( 93, xtensa_shmat, 4) | ||
209 | #define __NR_shmctl 94 | ||
210 | __SYSCALL( 94, sys_shmctl, 4) | ||
211 | #define __NR_shmdt 95 | ||
212 | __SYSCALL( 95, sys_shmdt, 4) | ||
213 | |||
214 | /* Socket Operations */ | ||
215 | |||
216 | #define __NR_socket 96 | ||
217 | __SYSCALL( 96, sys_socket, 3) | ||
218 | #define __NR_setsockopt 97 | ||
219 | __SYSCALL( 97, sys_setsockopt, 5) | ||
220 | #define __NR_getsockopt 98 | ||
221 | __SYSCALL( 98, sys_getsockopt, 5) | ||
222 | #define __NR_shutdown 99 | ||
223 | __SYSCALL( 99, sys_shutdown, 2) | ||
224 | |||
225 | #define __NR_bind 100 | ||
226 | __SYSCALL(100, sys_bind, 3) | ||
227 | #define __NR_connect 101 | ||
228 | __SYSCALL(101, sys_connect, 3) | ||
229 | #define __NR_listen 102 | ||
230 | __SYSCALL(102, sys_listen, 2) | ||
231 | #define __NR_accept 103 | ||
232 | __SYSCALL(103, sys_accept, 3) | ||
233 | |||
234 | #define __NR_getsockname 104 | ||
235 | __SYSCALL(104, sys_getsockname, 3) | ||
236 | #define __NR_getpeername 105 | ||
237 | __SYSCALL(105, sys_getpeername, 3) | ||
238 | #define __NR_sendmsg 106 | ||
239 | __SYSCALL(106, sys_sendmsg, 3) | ||
240 | #define __NR_recvmsg 107 | ||
241 | __SYSCALL(107, sys_recvmsg, 3) | ||
242 | #define __NR_send 108 | ||
243 | __SYSCALL(108, sys_send, 4) | ||
244 | #define __NR_recv 109 | ||
245 | __SYSCALL(109, sys_recv, 4) | ||
246 | #define __NR_sendto 110 | ||
247 | __SYSCALL(110, sys_sendto, 6) | ||
248 | #define __NR_recvfrom 111 | ||
249 | __SYSCALL(111, sys_recvfrom, 6) | ||
250 | |||
251 | #define __NR_socketpair 112 | ||
252 | __SYSCALL(112, sys_socketpair, 4) | ||
253 | #define __NR_sendfile 113 | ||
254 | __SYSCALL(113, sys_sendfile, 4) | ||
255 | #define __NR_sendfile64 114 | ||
256 | __SYSCALL(114, sys_sendfile64, 4) | ||
257 | #define __NR_sendmmsg 115 | ||
258 | __SYSCALL(115, sys_sendmmsg, 4) | ||
259 | |||
260 | /* Process Operations */ | ||
261 | |||
262 | #define __NR_clone 116 | ||
263 | __SYSCALL(116, xtensa_clone, 5) | ||
264 | #define __NR_execve 117 | ||
265 | __SYSCALL(117, sys_execve, 3) | ||
266 | #define __NR_exit 118 | ||
267 | __SYSCALL(118, sys_exit, 1) | ||
268 | #define __NR_exit_group 119 | ||
269 | __SYSCALL(119, sys_exit_group, 1) | ||
270 | #define __NR_getpid 120 | ||
271 | __SYSCALL(120, sys_getpid, 0) | ||
272 | #define __NR_wait4 121 | ||
273 | __SYSCALL(121, sys_wait4, 4) | ||
274 | #define __NR_waitid 122 | ||
275 | __SYSCALL(122, sys_waitid, 5) | ||
276 | #define __NR_kill 123 | ||
277 | __SYSCALL(123, sys_kill, 2) | ||
278 | #define __NR_tkill 124 | ||
279 | __SYSCALL(124, sys_tkill, 2) | ||
280 | #define __NR_tgkill 125 | ||
281 | __SYSCALL(125, sys_tgkill, 3) | ||
282 | #define __NR_set_tid_address 126 | ||
283 | __SYSCALL(126, sys_set_tid_address, 1) | ||
284 | #define __NR_gettid 127 | ||
285 | __SYSCALL(127, sys_gettid, 0) | ||
286 | #define __NR_setsid 128 | ||
287 | __SYSCALL(128, sys_setsid, 0) | ||
288 | #define __NR_getsid 129 | ||
289 | __SYSCALL(129, sys_getsid, 1) | ||
290 | #define __NR_prctl 130 | ||
291 | __SYSCALL(130, sys_prctl, 5) | ||
292 | #define __NR_personality 131 | ||
293 | __SYSCALL(131, sys_personality, 1) | ||
294 | #define __NR_getpriority 132 | ||
295 | __SYSCALL(132, sys_getpriority, 2) | ||
296 | #define __NR_setpriority 133 | ||
297 | __SYSCALL(133, sys_setpriority, 3) | ||
298 | #define __NR_setitimer 134 | ||
299 | __SYSCALL(134, sys_setitimer, 3) | ||
300 | #define __NR_getitimer 135 | ||
301 | __SYSCALL(135, sys_getitimer, 2) | ||
302 | #define __NR_setuid 136 | ||
303 | __SYSCALL(136, sys_setuid, 1) | ||
304 | #define __NR_getuid 137 | ||
305 | __SYSCALL(137, sys_getuid, 0) | ||
306 | #define __NR_setgid 138 | ||
307 | __SYSCALL(138, sys_setgid, 1) | ||
308 | #define __NR_getgid 139 | ||
309 | __SYSCALL(139, sys_getgid, 0) | ||
310 | #define __NR_geteuid 140 | ||
311 | __SYSCALL(140, sys_geteuid, 0) | ||
312 | #define __NR_getegid 141 | ||
313 | __SYSCALL(141, sys_getegid, 0) | ||
314 | #define __NR_setreuid 142 | ||
315 | __SYSCALL(142, sys_setreuid, 2) | ||
316 | #define __NR_setregid 143 | ||
317 | __SYSCALL(143, sys_setregid, 2) | ||
318 | #define __NR_setresuid 144 | ||
319 | __SYSCALL(144, sys_setresuid, 3) | ||
320 | #define __NR_getresuid 145 | ||
321 | __SYSCALL(145, sys_getresuid, 3) | ||
322 | #define __NR_setresgid 146 | ||
323 | __SYSCALL(146, sys_setresgid, 3) | ||
324 | #define __NR_getresgid 147 | ||
325 | __SYSCALL(147, sys_getresgid, 3) | ||
326 | #define __NR_setpgid 148 | ||
327 | __SYSCALL(148, sys_setpgid, 2) | ||
328 | #define __NR_getpgid 149 | ||
329 | __SYSCALL(149, sys_getpgid, 1) | ||
330 | #define __NR_getppid 150 | ||
331 | __SYSCALL(150, sys_getppid, 0) | ||
332 | #define __NR_getpgrp 151 | ||
333 | __SYSCALL(151, sys_getpgrp, 0) | ||
334 | |||
335 | #define __NR_reserved152 152 /* set_thread_area */ | ||
336 | __SYSCALL(152, sys_ni_syscall, 0) | ||
337 | #define __NR_reserved153 153 /* get_thread_area */ | ||
338 | __SYSCALL(153, sys_ni_syscall, 0) | ||
339 | #define __NR_times 154 | ||
340 | __SYSCALL(154, sys_times, 1) | ||
341 | #define __NR_acct 155 | ||
342 | __SYSCALL(155, sys_acct, 1) | ||
343 | #define __NR_sched_setaffinity 156 | ||
344 | __SYSCALL(156, sys_sched_setaffinity, 3) | ||
345 | #define __NR_sched_getaffinity 157 | ||
346 | __SYSCALL(157, sys_sched_getaffinity, 3) | ||
347 | #define __NR_capget 158 | ||
348 | __SYSCALL(158, sys_capget, 2) | ||
349 | #define __NR_capset 159 | ||
350 | __SYSCALL(159, sys_capset, 2) | ||
351 | #define __NR_ptrace 160 | ||
352 | __SYSCALL(160, sys_ptrace, 4) | ||
353 | #define __NR_semtimedop 161 | ||
354 | __SYSCALL(161, sys_semtimedop, 5) | ||
355 | #define __NR_semget 162 | ||
356 | __SYSCALL(162, sys_semget, 4) | ||
357 | #define __NR_semop 163 | ||
358 | __SYSCALL(163, sys_semop, 4) | ||
359 | #define __NR_semctl 164 | ||
360 | __SYSCALL(164, sys_semctl, 4) | ||
361 | #define __NR_available165 165 | ||
362 | __SYSCALL(165, sys_ni_syscall, 0) | ||
363 | #define __NR_msgget 166 | ||
364 | __SYSCALL(166, sys_msgget, 4) | ||
365 | #define __NR_msgsnd 167 | ||
366 | __SYSCALL(167, sys_msgsnd, 4) | ||
367 | #define __NR_msgrcv 168 | ||
368 | __SYSCALL(168, sys_msgrcv, 4) | ||
369 | #define __NR_msgctl 169 | ||
370 | __SYSCALL(169, sys_msgctl, 4) | ||
371 | #define __NR_available170 170 | ||
372 | __SYSCALL(170, sys_ni_syscall, 0) | ||
373 | |||
374 | /* File System */ | ||
375 | |||
376 | #define __NR_umount2 171 | ||
377 | __SYSCALL(171, sys_umount, 2) | ||
378 | #define __NR_mount 172 | ||
379 | __SYSCALL(172, sys_mount, 5) | ||
380 | #define __NR_swapon 173 | ||
381 | __SYSCALL(173, sys_swapon, 2) | ||
382 | #define __NR_chroot 174 | ||
383 | __SYSCALL(174, sys_chroot, 1) | ||
384 | #define __NR_pivot_root 175 | ||
385 | __SYSCALL(175, sys_pivot_root, 2) | ||
386 | #define __NR_umount 176 | ||
387 | __SYSCALL(176, sys_umount, 2) | ||
388 | #define __NR_swapoff 177 | ||
389 | __SYSCALL(177, sys_swapoff, 1) | ||
390 | #define __NR_sync 178 | ||
391 | __SYSCALL(178, sys_sync, 0) | ||
392 | #define __NR_syncfs 179 | ||
393 | __SYSCALL(179, sys_syncfs, 1) | ||
394 | #define __NR_setfsuid 180 | ||
395 | __SYSCALL(180, sys_setfsuid, 1) | ||
396 | #define __NR_setfsgid 181 | ||
397 | __SYSCALL(181, sys_setfsgid, 1) | ||
398 | #define __NR_sysfs 182 | ||
399 | __SYSCALL(182, sys_sysfs, 3) | ||
400 | #define __NR_ustat 183 | ||
401 | __SYSCALL(183, sys_ustat, 2) | ||
402 | #define __NR_statfs 184 | ||
403 | __SYSCALL(184, sys_statfs, 2) | ||
404 | #define __NR_fstatfs 185 | ||
405 | __SYSCALL(185, sys_fstatfs, 2) | ||
406 | #define __NR_statfs64 186 | ||
407 | __SYSCALL(186, sys_statfs64, 3) | ||
408 | #define __NR_fstatfs64 187 | ||
409 | __SYSCALL(187, sys_fstatfs64, 3) | ||
410 | |||
411 | /* System */ | ||
412 | |||
413 | #define __NR_setrlimit 188 | ||
414 | __SYSCALL(188, sys_setrlimit, 2) | ||
415 | #define __NR_getrlimit 189 | ||
416 | __SYSCALL(189, sys_getrlimit, 2) | ||
417 | #define __NR_getrusage 190 | ||
418 | __SYSCALL(190, sys_getrusage, 2) | ||
419 | #define __NR_futex 191 | ||
420 | __SYSCALL(191, sys_futex, 5) | ||
421 | #define __NR_gettimeofday 192 | ||
422 | __SYSCALL(192, sys_gettimeofday, 2) | ||
423 | #define __NR_settimeofday 193 | ||
424 | __SYSCALL(193, sys_settimeofday, 2) | ||
425 | #define __NR_adjtimex 194 | ||
426 | __SYSCALL(194, sys_adjtimex, 1) | ||
427 | #define __NR_nanosleep 195 | ||
428 | __SYSCALL(195, sys_nanosleep, 2) | ||
429 | #define __NR_getgroups 196 | ||
430 | __SYSCALL(196, sys_getgroups, 2) | ||
431 | #define __NR_setgroups 197 | ||
432 | __SYSCALL(197, sys_setgroups, 2) | ||
433 | #define __NR_sethostname 198 | ||
434 | __SYSCALL(198, sys_sethostname, 2) | ||
435 | #define __NR_setdomainname 199 | ||
436 | __SYSCALL(199, sys_setdomainname, 2) | ||
437 | #define __NR_syslog 200 | ||
438 | __SYSCALL(200, sys_syslog, 3) | ||
439 | #define __NR_vhangup 201 | ||
440 | __SYSCALL(201, sys_vhangup, 0) | ||
441 | #define __NR_uselib 202 | ||
442 | __SYSCALL(202, sys_uselib, 1) | ||
443 | #define __NR_reboot 203 | ||
444 | __SYSCALL(203, sys_reboot, 3) | ||
445 | #define __NR_quotactl 204 | ||
446 | __SYSCALL(204, sys_quotactl, 4) | ||
447 | #define __NR_nfsservctl 205 | ||
448 | __SYSCALL(205, sys_ni_syscall, 0) /* old nfsservctl */ | ||
449 | #define __NR__sysctl 206 | ||
450 | __SYSCALL(206, sys_sysctl, 1) | ||
451 | #define __NR_bdflush 207 | ||
452 | __SYSCALL(207, sys_bdflush, 2) | ||
453 | #define __NR_uname 208 | ||
454 | __SYSCALL(208, sys_newuname, 1) | ||
455 | #define __NR_sysinfo 209 | ||
456 | __SYSCALL(209, sys_sysinfo, 1) | ||
457 | #define __NR_init_module 210 | ||
458 | __SYSCALL(210, sys_init_module, 2) | ||
459 | #define __NR_delete_module 211 | ||
460 | __SYSCALL(211, sys_delete_module, 1) | ||
461 | |||
462 | #define __NR_sched_setparam 212 | ||
463 | __SYSCALL(212, sys_sched_setparam, 2) | ||
464 | #define __NR_sched_getparam 213 | ||
465 | __SYSCALL(213, sys_sched_getparam, 2) | ||
466 | #define __NR_sched_setscheduler 214 | ||
467 | __SYSCALL(214, sys_sched_setscheduler, 3) | ||
468 | #define __NR_sched_getscheduler 215 | ||
469 | __SYSCALL(215, sys_sched_getscheduler, 1) | ||
470 | #define __NR_sched_get_priority_max 216 | ||
471 | __SYSCALL(216, sys_sched_get_priority_max, 1) | ||
472 | #define __NR_sched_get_priority_min 217 | ||
473 | __SYSCALL(217, sys_sched_get_priority_min, 1) | ||
474 | #define __NR_sched_rr_get_interval 218 | ||
475 | __SYSCALL(218, sys_sched_rr_get_interval, 2) | ||
476 | #define __NR_sched_yield 219 | ||
477 | __SYSCALL(219, sys_sched_yield, 0) | ||
478 | #define __NR_available222 222 | ||
479 | __SYSCALL(222, sys_ni_syscall, 0) | ||
480 | |||
481 | /* Signal Handling */ | ||
482 | |||
483 | #define __NR_restart_syscall 223 | ||
484 | __SYSCALL(223, sys_restart_syscall, 0) | ||
485 | #define __NR_sigaltstack 224 | ||
486 | __SYSCALL(224, xtensa_sigaltstack, 2) | ||
487 | #define __NR_rt_sigreturn 225 | ||
488 | __SYSCALL(225, xtensa_rt_sigreturn, 1) | ||
489 | #define __NR_rt_sigaction 226 | ||
490 | __SYSCALL(226, sys_rt_sigaction, 4) | ||
491 | #define __NR_rt_sigprocmask 227 | ||
492 | __SYSCALL(227, sys_rt_sigprocmask, 4) | ||
493 | #define __NR_rt_sigpending 228 | ||
494 | __SYSCALL(228, sys_rt_sigpending, 2) | ||
495 | #define __NR_rt_sigtimedwait 229 | ||
496 | __SYSCALL(229, sys_rt_sigtimedwait, 4) | ||
497 | #define __NR_rt_sigqueueinfo 230 | ||
498 | __SYSCALL(230, sys_rt_sigqueueinfo, 3) | ||
499 | #define __NR_rt_sigsuspend 231 | ||
500 | __SYSCALL(231, sys_rt_sigsuspend, 2) | ||
501 | |||
502 | /* Message */ | ||
503 | |||
504 | #define __NR_mq_open 232 | ||
505 | __SYSCALL(232, sys_mq_open, 4) | ||
506 | #define __NR_mq_unlink 233 | ||
507 | __SYSCALL(233, sys_mq_unlink, 1) | ||
508 | #define __NR_mq_timedsend 234 | ||
509 | __SYSCALL(234, sys_mq_timedsend, 5) | ||
510 | #define __NR_mq_timedreceive 235 | ||
511 | __SYSCALL(235, sys_mq_timedreceive, 5) | ||
512 | #define __NR_mq_notify 236 | ||
513 | __SYSCALL(236, sys_mq_notify, 2) | ||
514 | #define __NR_mq_getsetattr 237 | ||
515 | __SYSCALL(237, sys_mq_getsetattr, 3) | ||
516 | #define __NR_available238 238 | ||
517 | __SYSCALL(238, sys_ni_syscall, 0) | ||
518 | |||
519 | /* IO */ | ||
520 | |||
521 | #define __NR_io_setup 239 | ||
522 | __SYSCALL(239, sys_io_setup, 2) | ||
523 | #define __NR_io_destroy 240 | ||
524 | __SYSCALL(240, sys_io_destroy, 1) | ||
525 | #define __NR_io_submit 241 | ||
526 | __SYSCALL(241, sys_io_submit, 3) | ||
527 | #define __NR_io_getevents 242 | ||
528 | __SYSCALL(242, sys_io_getevents, 5) | ||
529 | #define __NR_io_cancel 243 | ||
530 | __SYSCALL(243, sys_io_cancel, 3) | ||
531 | #define __NR_clock_settime 244 | ||
532 | __SYSCALL(244, sys_clock_settime, 2) | ||
533 | #define __NR_clock_gettime 245 | ||
534 | __SYSCALL(245, sys_clock_gettime, 2) | ||
535 | #define __NR_clock_getres 246 | ||
536 | __SYSCALL(246, sys_clock_getres, 2) | ||
537 | #define __NR_clock_nanosleep 247 | ||
538 | __SYSCALL(247, sys_clock_nanosleep, 4) | ||
539 | |||
540 | /* Timer */ | ||
541 | |||
542 | #define __NR_timer_create 248 | ||
543 | __SYSCALL(248, sys_timer_create, 3) | ||
544 | #define __NR_timer_delete 249 | ||
545 | __SYSCALL(249, sys_timer_delete, 1) | ||
546 | #define __NR_timer_settime 250 | ||
547 | __SYSCALL(250, sys_timer_settime, 4) | ||
548 | #define __NR_timer_gettime 251 | ||
549 | __SYSCALL(251, sys_timer_gettime, 2) | ||
550 | #define __NR_timer_getoverrun 252 | ||
551 | __SYSCALL(252, sys_timer_getoverrun, 1) | ||
552 | |||
553 | /* System */ | ||
554 | |||
555 | #define __NR_reserved253 253 | ||
556 | __SYSCALL(253, sys_ni_syscall, 0) | ||
557 | #define __NR_lookup_dcookie 254 | ||
558 | __SYSCALL(254, sys_lookup_dcookie, 4) | ||
559 | #define __NR_available255 255 | ||
560 | __SYSCALL(255, sys_ni_syscall, 0) | ||
561 | #define __NR_add_key 256 | ||
562 | __SYSCALL(256, sys_add_key, 5) | ||
563 | #define __NR_request_key 257 | ||
564 | __SYSCALL(257, sys_request_key, 5) | ||
565 | #define __NR_keyctl 258 | ||
566 | __SYSCALL(258, sys_keyctl, 5) | ||
567 | #define __NR_available259 259 | ||
568 | __SYSCALL(259, sys_ni_syscall, 0) | ||
569 | |||
570 | |||
571 | #define __NR_readahead 260 | ||
572 | __SYSCALL(260, sys_readahead, 5) | ||
573 | #define __NR_remap_file_pages 261 | ||
574 | __SYSCALL(261, sys_remap_file_pages, 5) | ||
575 | #define __NR_migrate_pages 262 | ||
576 | __SYSCALL(262, sys_migrate_pages, 0) | ||
577 | #define __NR_mbind 263 | ||
578 | __SYSCALL(263, sys_mbind, 6) | ||
579 | #define __NR_get_mempolicy 264 | ||
580 | __SYSCALL(264, sys_get_mempolicy, 5) | ||
581 | #define __NR_set_mempolicy 265 | ||
582 | __SYSCALL(265, sys_set_mempolicy, 3) | ||
583 | #define __NR_unshare 266 | ||
584 | __SYSCALL(266, sys_unshare, 1) | ||
585 | #define __NR_move_pages 267 | ||
586 | __SYSCALL(267, sys_move_pages, 0) | ||
587 | #define __NR_splice 268 | ||
588 | __SYSCALL(268, sys_splice, 0) | ||
589 | #define __NR_tee 269 | ||
590 | __SYSCALL(269, sys_tee, 0) | ||
591 | #define __NR_vmsplice 270 | ||
592 | __SYSCALL(270, sys_vmsplice, 0) | ||
593 | #define __NR_available271 271 | ||
594 | __SYSCALL(271, sys_ni_syscall, 0) | ||
595 | |||
596 | #define __NR_pselect6 272 | ||
597 | __SYSCALL(272, sys_pselect6, 0) | ||
598 | #define __NR_ppoll 273 | ||
599 | __SYSCALL(273, sys_ppoll, 0) | ||
600 | #define __NR_epoll_pwait 274 | ||
601 | __SYSCALL(274, sys_epoll_pwait, 0) | ||
602 | #define __NR_epoll_create1 275 | ||
603 | __SYSCALL(275, sys_epoll_create1, 1) | ||
604 | |||
605 | #define __NR_inotify_init 276 | ||
606 | __SYSCALL(276, sys_inotify_init, 0) | ||
607 | #define __NR_inotify_add_watch 277 | ||
608 | __SYSCALL(277, sys_inotify_add_watch, 3) | ||
609 | #define __NR_inotify_rm_watch 278 | ||
610 | __SYSCALL(278, sys_inotify_rm_watch, 2) | ||
611 | #define __NR_inotify_init1 279 | ||
612 | __SYSCALL(279, sys_inotify_init1, 1) | ||
613 | |||
614 | #define __NR_getcpu 280 | ||
615 | __SYSCALL(280, sys_getcpu, 0) | ||
616 | #define __NR_kexec_load 281 | ||
617 | __SYSCALL(281, sys_ni_syscall, 0) | ||
618 | |||
619 | #define __NR_ioprio_set 282 | ||
620 | __SYSCALL(282, sys_ioprio_set, 2) | ||
621 | #define __NR_ioprio_get 283 | ||
622 | __SYSCALL(283, sys_ioprio_get, 3) | ||
623 | |||
624 | #define __NR_set_robust_list 284 | ||
625 | __SYSCALL(284, sys_set_robust_list, 3) | ||
626 | #define __NR_get_robust_list 285 | ||
627 | __SYSCALL(285, sys_get_robust_list, 3) | ||
628 | #define __NR_available286 286 | ||
629 | __SYSCALL(286, sys_ni_syscall, 0) | ||
630 | #define __NR_available287 287 | ||
631 | __SYSCALL(287, sys_ni_syscall, 0) | ||
632 | |||
633 | /* Relative File Operations */ | ||
634 | |||
635 | #define __NR_openat 288 | ||
636 | __SYSCALL(288, sys_openat, 4) | ||
637 | #define __NR_mkdirat 289 | ||
638 | __SYSCALL(289, sys_mkdirat, 3) | ||
639 | #define __NR_mknodat 290 | ||
640 | __SYSCALL(290, sys_mknodat, 4) | ||
641 | #define __NR_unlinkat 291 | ||
642 | __SYSCALL(291, sys_unlinkat, 3) | ||
643 | #define __NR_renameat 292 | ||
644 | __SYSCALL(292, sys_renameat, 4) | ||
645 | #define __NR_linkat 293 | ||
646 | __SYSCALL(293, sys_linkat, 5) | ||
647 | #define __NR_symlinkat 294 | ||
648 | __SYSCALL(294, sys_symlinkat, 3) | ||
649 | #define __NR_readlinkat 295 | ||
650 | __SYSCALL(295, sys_readlinkat, 4) | ||
651 | #define __NR_utimensat 296 | ||
652 | __SYSCALL(296, sys_utimensat, 0) | ||
653 | #define __NR_fchownat 297 | ||
654 | __SYSCALL(297, sys_fchownat, 5) | ||
655 | #define __NR_futimesat 298 | ||
656 | __SYSCALL(298, sys_futimesat, 4) | ||
657 | #define __NR_fstatat64 299 | ||
658 | __SYSCALL(299, sys_fstatat64, 0) | ||
659 | #define __NR_fchmodat 300 | ||
660 | __SYSCALL(300, sys_fchmodat, 4) | ||
661 | #define __NR_faccessat 301 | ||
662 | __SYSCALL(301, sys_faccessat, 4) | ||
663 | #define __NR_available302 302 | ||
664 | __SYSCALL(302, sys_ni_syscall, 0) | ||
665 | #define __NR_available303 303 | ||
666 | __SYSCALL(303, sys_ni_syscall, 0) | ||
667 | |||
668 | #define __NR_signalfd 304 | ||
669 | __SYSCALL(304, sys_signalfd, 3) | ||
670 | /* 305 was __NR_timerfd */ | ||
671 | __SYSCALL(305, sys_ni_syscall, 0) | ||
672 | #define __NR_eventfd 306 | ||
673 | __SYSCALL(306, sys_eventfd, 1) | ||
674 | #define __NR_recvmmsg 307 | ||
675 | __SYSCALL(307, sys_recvmmsg, 5) | ||
676 | |||
677 | #define __NR_setns 308 | ||
678 | __SYSCALL(308, sys_setns, 2) | ||
679 | #define __NR_signalfd4 309 | ||
680 | __SYSCALL(309, sys_signalfd4, 4) | ||
681 | #define __NR_dup3 310 | ||
682 | __SYSCALL(310, sys_dup3, 3) | ||
683 | #define __NR_pipe2 311 | ||
684 | __SYSCALL(311, sys_pipe2, 2) | ||
685 | |||
686 | #define __NR_timerfd_create 312 | ||
687 | __SYSCALL(312, sys_timerfd_create, 2) | ||
688 | #define __NR_timerfd_settime 313 | ||
689 | __SYSCALL(313, sys_timerfd_settime, 4) | ||
690 | #define __NR_timerfd_gettime 314 | ||
691 | __SYSCALL(314, sys_timerfd_gettime, 2) | ||
692 | #define __NR_available315 315 | ||
693 | __SYSCALL(315, sys_ni_syscall, 0) | ||
694 | |||
695 | #define __NR_eventfd2 316 | ||
696 | __SYSCALL(316, sys_eventfd2, 2) | ||
697 | #define __NR_preadv 317 | ||
698 | __SYSCALL(317, sys_preadv, 5) | ||
699 | #define __NR_pwritev 318 | ||
700 | __SYSCALL(318, sys_pwritev, 5) | ||
701 | #define __NR_available319 319 | ||
702 | __SYSCALL(319, sys_ni_syscall, 0) | ||
703 | |||
704 | #define __NR_fanotify_init 320 | ||
705 | __SYSCALL(320, sys_fanotify_init, 2) | ||
706 | #define __NR_fanotify_mark 321 | ||
707 | __SYSCALL(321, sys_fanotify_mark, 6) | ||
708 | #define __NR_process_vm_readv 322 | ||
709 | __SYSCALL(322, sys_process_vm_readv, 6) | ||
710 | #define __NR_process_vm_writev 323 | ||
711 | __SYSCALL(323, sys_process_vm_writev, 6) | ||
712 | |||
713 | #define __NR_name_to_handle_at 324 | ||
714 | __SYSCALL(324, sys_name_to_handle_at, 5) | ||
715 | #define __NR_open_by_handle_at 325 | ||
716 | __SYSCALL(325, sys_open_by_handle_at, 3) | ||
717 | #define __NR_sync_file_range 326 | ||
718 | __SYSCALL(326, sys_sync_file_range2, 6) | ||
719 | #define __NR_perf_event_open 327 | ||
720 | __SYSCALL(327, sys_perf_event_open, 5) | ||
721 | |||
722 | #define __NR_rt_tgsigqueueinfo 328 | ||
723 | __SYSCALL(328, sys_rt_tgsigqueueinfo, 4) | ||
724 | #define __NR_clock_adjtime 329 | ||
725 | __SYSCALL(329, sys_clock_adjtime, 2) | ||
726 | #define __NR_prlimit64 330 | ||
727 | __SYSCALL(330, sys_prlimit64, 4) | ||
728 | #define __NR_kcmp 331 | ||
729 | __SYSCALL(331, sys_kcmp, 5) | ||
730 | |||
731 | |||
732 | #define __NR_syscall_count 332 | ||
733 | |||
734 | /* | ||
735 | * sysxtensa syscall handler | ||
736 | * | ||
737 | * int sysxtensa (SYS_XTENSA_ATOMIC_SET, ptr, val, unused); | ||
738 | * int sysxtensa (SYS_XTENSA_ATOMIC_ADD, ptr, val, unused); | ||
739 | * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val, unused); | ||
740 | * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval); | ||
741 | * a2 a6 a3 a4 a5 | ||
742 | */ | ||
743 | |||
744 | #define SYS_XTENSA_RESERVED 0 /* don't use this */ | ||
745 | #define SYS_XTENSA_ATOMIC_SET 1 /* set variable */ | ||
746 | #define SYS_XTENSA_ATOMIC_EXG_ADD 2 /* exchange memory and add */ | ||
747 | #define SYS_XTENSA_ATOMIC_ADD 3 /* add to memory */ | ||
748 | #define SYS_XTENSA_ATOMIC_CMP_SWP 4 /* compare and swap */ | ||
749 | |||
750 | #define SYS_XTENSA_COUNT 5 /* count */ | ||
751 | |||
752 | #undef __SYSCALL | ||
753 | |||
754 | #endif /* _UAPI_XTENSA_UNISTD_H */ | ||
diff --git a/arch/xtensa/kernel/align.S b/arch/xtensa/kernel/align.S index 33d6e9d2e83c..934ae58e2c79 100644 --- a/arch/xtensa/kernel/align.S +++ b/arch/xtensa/kernel/align.S | |||
@@ -170,15 +170,15 @@ ENTRY(fast_unaligned) | |||
170 | s32i a7, a2, PT_AREG7 | 170 | s32i a7, a2, PT_AREG7 |
171 | s32i a8, a2, PT_AREG8 | 171 | s32i a8, a2, PT_AREG8 |
172 | 172 | ||
173 | rsr a0, DEPC | 173 | rsr a0, depc |
174 | xsr a3, EXCSAVE_1 | 174 | xsr a3, excsave1 |
175 | s32i a0, a2, PT_AREG2 | 175 | s32i a0, a2, PT_AREG2 |
176 | s32i a3, a2, PT_AREG3 | 176 | s32i a3, a2, PT_AREG3 |
177 | 177 | ||
178 | /* Keep value of SAR in a0 */ | 178 | /* Keep value of SAR in a0 */ |
179 | 179 | ||
180 | rsr a0, SAR | 180 | rsr a0, sar |
181 | rsr a8, EXCVADDR # load unaligned memory address | 181 | rsr a8, excvaddr # load unaligned memory address |
182 | 182 | ||
183 | /* Now, identify one of the following load/store instructions. | 183 | /* Now, identify one of the following load/store instructions. |
184 | * | 184 | * |
@@ -197,7 +197,7 @@ ENTRY(fast_unaligned) | |||
197 | 197 | ||
198 | /* Extract the instruction that caused the unaligned access. */ | 198 | /* Extract the instruction that caused the unaligned access. */ |
199 | 199 | ||
200 | rsr a7, EPC_1 # load exception address | 200 | rsr a7, epc1 # load exception address |
201 | movi a3, ~3 | 201 | movi a3, ~3 |
202 | and a3, a3, a7 # mask lower bits | 202 | and a3, a3, a7 # mask lower bits |
203 | 203 | ||
@@ -275,16 +275,16 @@ ENTRY(fast_unaligned) | |||
275 | 1: | 275 | 1: |
276 | 276 | ||
277 | #if XCHAL_HAVE_LOOPS | 277 | #if XCHAL_HAVE_LOOPS |
278 | rsr a5, LEND # check if we reached LEND | 278 | rsr a5, lend # check if we reached LEND |
279 | bne a7, a5, 1f | 279 | bne a7, a5, 1f |
280 | rsr a5, LCOUNT # and LCOUNT != 0 | 280 | rsr a5, lcount # and LCOUNT != 0 |
281 | beqz a5, 1f | 281 | beqz a5, 1f |
282 | addi a5, a5, -1 # decrement LCOUNT and set | 282 | addi a5, a5, -1 # decrement LCOUNT and set |
283 | rsr a7, LBEG # set PC to LBEGIN | 283 | rsr a7, lbeg # set PC to LBEGIN |
284 | wsr a5, LCOUNT | 284 | wsr a5, lcount |
285 | #endif | 285 | #endif |
286 | 286 | ||
287 | 1: wsr a7, EPC_1 # skip load instruction | 287 | 1: wsr a7, epc1 # skip load instruction |
288 | extui a4, a4, INSN_T, 4 # extract target register | 288 | extui a4, a4, INSN_T, 4 # extract target register |
289 | movi a5, .Lload_table | 289 | movi a5, .Lload_table |
290 | addx8 a4, a4, a5 | 290 | addx8 a4, a4, a5 |
@@ -355,16 +355,16 @@ ENTRY(fast_unaligned) | |||
355 | 355 | ||
356 | 1: | 356 | 1: |
357 | #if XCHAL_HAVE_LOOPS | 357 | #if XCHAL_HAVE_LOOPS |
358 | rsr a4, LEND # check if we reached LEND | 358 | rsr a4, lend # check if we reached LEND |
359 | bne a7, a4, 1f | 359 | bne a7, a4, 1f |
360 | rsr a4, LCOUNT # and LCOUNT != 0 | 360 | rsr a4, lcount # and LCOUNT != 0 |
361 | beqz a4, 1f | 361 | beqz a4, 1f |
362 | addi a4, a4, -1 # decrement LCOUNT and set | 362 | addi a4, a4, -1 # decrement LCOUNT and set |
363 | rsr a7, LBEG # set PC to LBEGIN | 363 | rsr a7, lbeg # set PC to LBEGIN |
364 | wsr a4, LCOUNT | 364 | wsr a4, lcount |
365 | #endif | 365 | #endif |
366 | 366 | ||
367 | 1: wsr a7, EPC_1 # skip store instruction | 367 | 1: wsr a7, epc1 # skip store instruction |
368 | movi a4, ~3 | 368 | movi a4, ~3 |
369 | and a4, a4, a8 # align memory address | 369 | and a4, a4, a8 # align memory address |
370 | 370 | ||
@@ -406,7 +406,7 @@ ENTRY(fast_unaligned) | |||
406 | 406 | ||
407 | .Lexit: | 407 | .Lexit: |
408 | movi a4, 0 | 408 | movi a4, 0 |
409 | rsr a3, EXCSAVE_1 | 409 | rsr a3, excsave1 |
410 | s32i a4, a3, EXC_TABLE_FIXUP | 410 | s32i a4, a3, EXC_TABLE_FIXUP |
411 | 411 | ||
412 | /* Restore working register */ | 412 | /* Restore working register */ |
@@ -420,7 +420,7 @@ ENTRY(fast_unaligned) | |||
420 | 420 | ||
421 | /* restore SAR and return */ | 421 | /* restore SAR and return */ |
422 | 422 | ||
423 | wsr a0, SAR | 423 | wsr a0, sar |
424 | l32i a0, a2, PT_AREG0 | 424 | l32i a0, a2, PT_AREG0 |
425 | l32i a2, a2, PT_AREG2 | 425 | l32i a2, a2, PT_AREG2 |
426 | rfe | 426 | rfe |
@@ -438,10 +438,10 @@ ENTRY(fast_unaligned) | |||
438 | l32i a6, a2, PT_AREG6 | 438 | l32i a6, a2, PT_AREG6 |
439 | l32i a5, a2, PT_AREG5 | 439 | l32i a5, a2, PT_AREG5 |
440 | l32i a4, a2, PT_AREG4 | 440 | l32i a4, a2, PT_AREG4 |
441 | wsr a0, SAR | 441 | wsr a0, sar |
442 | mov a1, a2 | 442 | mov a1, a2 |
443 | 443 | ||
444 | rsr a0, PS | 444 | rsr a0, ps |
445 | bbsi.l a2, PS_UM_BIT, 1f # jump if user mode | 445 | bbsi.l a2, PS_UM_BIT, 1f # jump if user mode |
446 | 446 | ||
447 | movi a0, _kernel_exception | 447 | movi a0, _kernel_exception |
diff --git a/arch/xtensa/kernel/coprocessor.S b/arch/xtensa/kernel/coprocessor.S index 2bc1e145c0a4..54c3be313bfa 100644 --- a/arch/xtensa/kernel/coprocessor.S +++ b/arch/xtensa/kernel/coprocessor.S | |||
@@ -43,7 +43,7 @@ | |||
43 | /* IO protection is currently unsupported. */ | 43 | /* IO protection is currently unsupported. */ |
44 | 44 | ||
45 | ENTRY(fast_io_protect) | 45 | ENTRY(fast_io_protect) |
46 | wsr a0, EXCSAVE_1 | 46 | wsr a0, excsave1 |
47 | movi a0, unrecoverable_exception | 47 | movi a0, unrecoverable_exception |
48 | callx0 a0 | 48 | callx0 a0 |
49 | 49 | ||
@@ -220,7 +220,7 @@ ENTRY(coprocessor_restore) | |||
220 | */ | 220 | */ |
221 | 221 | ||
222 | ENTRY(fast_coprocessor_double) | 222 | ENTRY(fast_coprocessor_double) |
223 | wsr a0, EXCSAVE_1 | 223 | wsr a0, excsave1 |
224 | movi a0, unrecoverable_exception | 224 | movi a0, unrecoverable_exception |
225 | callx0 a0 | 225 | callx0 a0 |
226 | 226 | ||
@@ -229,13 +229,13 @@ ENTRY(fast_coprocessor) | |||
229 | 229 | ||
230 | /* Save remaining registers a1-a3 and SAR */ | 230 | /* Save remaining registers a1-a3 and SAR */ |
231 | 231 | ||
232 | xsr a3, EXCSAVE_1 | 232 | xsr a3, excsave1 |
233 | s32i a3, a2, PT_AREG3 | 233 | s32i a3, a2, PT_AREG3 |
234 | rsr a3, SAR | 234 | rsr a3, sar |
235 | s32i a1, a2, PT_AREG1 | 235 | s32i a1, a2, PT_AREG1 |
236 | s32i a3, a2, PT_SAR | 236 | s32i a3, a2, PT_SAR |
237 | mov a1, a2 | 237 | mov a1, a2 |
238 | rsr a2, DEPC | 238 | rsr a2, depc |
239 | s32i a2, a1, PT_AREG2 | 239 | s32i a2, a1, PT_AREG2 |
240 | 240 | ||
241 | /* | 241 | /* |
@@ -248,17 +248,17 @@ ENTRY(fast_coprocessor) | |||
248 | 248 | ||
249 | /* Find coprocessor number. Subtract first CP EXCCAUSE from EXCCAUSE */ | 249 | /* Find coprocessor number. Subtract first CP EXCCAUSE from EXCCAUSE */ |
250 | 250 | ||
251 | rsr a3, EXCCAUSE | 251 | rsr a3, exccause |
252 | addi a3, a3, -EXCCAUSE_COPROCESSOR0_DISABLED | 252 | addi a3, a3, -EXCCAUSE_COPROCESSOR0_DISABLED |
253 | 253 | ||
254 | /* Set corresponding CPENABLE bit -> (sar:cp-index, a3: 1<<cp-index)*/ | 254 | /* Set corresponding CPENABLE bit -> (sar:cp-index, a3: 1<<cp-index)*/ |
255 | 255 | ||
256 | ssl a3 # SAR: 32 - coprocessor_number | 256 | ssl a3 # SAR: 32 - coprocessor_number |
257 | movi a2, 1 | 257 | movi a2, 1 |
258 | rsr a0, CPENABLE | 258 | rsr a0, cpenable |
259 | sll a2, a2 | 259 | sll a2, a2 |
260 | or a0, a0, a2 | 260 | or a0, a0, a2 |
261 | wsr a0, CPENABLE | 261 | wsr a0, cpenable |
262 | rsync | 262 | rsync |
263 | 263 | ||
264 | /* Retrieve previous owner. (a3 still holds CP number) */ | 264 | /* Retrieve previous owner. (a3 still holds CP number) */ |
@@ -291,7 +291,7 @@ ENTRY(fast_coprocessor) | |||
291 | 291 | ||
292 | /* Note that only a0 and a1 were preserved. */ | 292 | /* Note that only a0 and a1 were preserved. */ |
293 | 293 | ||
294 | 2: rsr a3, EXCCAUSE | 294 | 2: rsr a3, exccause |
295 | addi a3, a3, -EXCCAUSE_COPROCESSOR0_DISABLED | 295 | addi a3, a3, -EXCCAUSE_COPROCESSOR0_DISABLED |
296 | movi a0, coprocessor_owner | 296 | movi a0, coprocessor_owner |
297 | addx4 a0, a3, a0 | 297 | addx4 a0, a3, a0 |
@@ -321,7 +321,7 @@ ENTRY(fast_coprocessor) | |||
321 | l32i a0, a1, PT_SAR | 321 | l32i a0, a1, PT_SAR |
322 | l32i a3, a1, PT_AREG3 | 322 | l32i a3, a1, PT_AREG3 |
323 | l32i a2, a1, PT_AREG2 | 323 | l32i a2, a1, PT_AREG2 |
324 | wsr a0, SAR | 324 | wsr a0, sar |
325 | l32i a0, a1, PT_AREG0 | 325 | l32i a0, a1, PT_AREG0 |
326 | l32i a1, a1, PT_AREG1 | 326 | l32i a1, a1, PT_AREG1 |
327 | 327 | ||
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index 7e6236073397..90bfc1dbc13d 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S | |||
@@ -112,8 +112,8 @@ ENTRY(user_exception) | |||
112 | 112 | ||
113 | /* Save a2, a3, and depc, restore excsave_1 and set SP. */ | 113 | /* Save a2, a3, and depc, restore excsave_1 and set SP. */ |
114 | 114 | ||
115 | xsr a3, EXCSAVE_1 | 115 | xsr a3, excsave1 |
116 | rsr a0, DEPC | 116 | rsr a0, depc |
117 | s32i a1, a2, PT_AREG1 | 117 | s32i a1, a2, PT_AREG1 |
118 | s32i a0, a2, PT_AREG2 | 118 | s32i a0, a2, PT_AREG2 |
119 | s32i a3, a2, PT_AREG3 | 119 | s32i a3, a2, PT_AREG3 |
@@ -125,16 +125,16 @@ _user_exception: | |||
125 | /* Save SAR and turn off single stepping */ | 125 | /* Save SAR and turn off single stepping */ |
126 | 126 | ||
127 | movi a2, 0 | 127 | movi a2, 0 |
128 | rsr a3, SAR | 128 | rsr a3, sar |
129 | xsr a2, ICOUNTLEVEL | 129 | xsr a2, icountlevel |
130 | s32i a3, a1, PT_SAR | 130 | s32i a3, a1, PT_SAR |
131 | s32i a2, a1, PT_ICOUNTLEVEL | 131 | s32i a2, a1, PT_ICOUNTLEVEL |
132 | 132 | ||
133 | /* Rotate ws so that the current windowbase is at bit0. */ | 133 | /* Rotate ws so that the current windowbase is at bit0. */ |
134 | /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */ | 134 | /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */ |
135 | 135 | ||
136 | rsr a2, WINDOWBASE | 136 | rsr a2, windowbase |
137 | rsr a3, WINDOWSTART | 137 | rsr a3, windowstart |
138 | ssr a2 | 138 | ssr a2 |
139 | s32i a2, a1, PT_WINDOWBASE | 139 | s32i a2, a1, PT_WINDOWBASE |
140 | s32i a3, a1, PT_WINDOWSTART | 140 | s32i a3, a1, PT_WINDOWSTART |
@@ -205,12 +205,12 @@ _user_exception: | |||
205 | 205 | ||
206 | /* WINDOWBASE still in SAR! */ | 206 | /* WINDOWBASE still in SAR! */ |
207 | 207 | ||
208 | rsr a2, SAR # original WINDOWBASE | 208 | rsr a2, sar # original WINDOWBASE |
209 | movi a3, 1 | 209 | movi a3, 1 |
210 | ssl a2 | 210 | ssl a2 |
211 | sll a3, a3 | 211 | sll a3, a3 |
212 | wsr a3, WINDOWSTART # set corresponding WINDOWSTART bit | 212 | wsr a3, windowstart # set corresponding WINDOWSTART bit |
213 | wsr a2, WINDOWBASE # and WINDOWSTART | 213 | wsr a2, windowbase # and WINDOWSTART |
214 | rsync | 214 | rsync |
215 | 215 | ||
216 | /* We are back to the original stack pointer (a1) */ | 216 | /* We are back to the original stack pointer (a1) */ |
@@ -252,8 +252,8 @@ ENTRY(kernel_exception) | |||
252 | 252 | ||
253 | /* Save a0, a2, a3, DEPC and set SP. */ | 253 | /* Save a0, a2, a3, DEPC and set SP. */ |
254 | 254 | ||
255 | xsr a3, EXCSAVE_1 # restore a3, excsave_1 | 255 | xsr a3, excsave1 # restore a3, excsave_1 |
256 | rsr a0, DEPC # get a2 | 256 | rsr a0, depc # get a2 |
257 | s32i a1, a2, PT_AREG1 | 257 | s32i a1, a2, PT_AREG1 |
258 | s32i a0, a2, PT_AREG2 | 258 | s32i a0, a2, PT_AREG2 |
259 | s32i a3, a2, PT_AREG3 | 259 | s32i a3, a2, PT_AREG3 |
@@ -265,16 +265,16 @@ _kernel_exception: | |||
265 | /* Save SAR and turn off single stepping */ | 265 | /* Save SAR and turn off single stepping */ |
266 | 266 | ||
267 | movi a2, 0 | 267 | movi a2, 0 |
268 | rsr a3, SAR | 268 | rsr a3, sar |
269 | xsr a2, ICOUNTLEVEL | 269 | xsr a2, icountlevel |
270 | s32i a3, a1, PT_SAR | 270 | s32i a3, a1, PT_SAR |
271 | s32i a2, a1, PT_ICOUNTLEVEL | 271 | s32i a2, a1, PT_ICOUNTLEVEL |
272 | 272 | ||
273 | /* Rotate ws so that the current windowbase is at bit0. */ | 273 | /* Rotate ws so that the current windowbase is at bit0. */ |
274 | /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */ | 274 | /* Assume ws = xxwww1yyyy. Rotate ws right, so that a2 = yyyyxxwww1 */ |
275 | 275 | ||
276 | rsr a2, WINDOWBASE # don't need to save these, we only | 276 | rsr a2, windowbase # don't need to save these, we only |
277 | rsr a3, WINDOWSTART # need shifted windowstart: windowmask | 277 | rsr a3, windowstart # need shifted windowstart: windowmask |
278 | ssr a2 | 278 | ssr a2 |
279 | slli a2, a3, 32-WSBITS | 279 | slli a2, a3, 32-WSBITS |
280 | src a2, a3, a2 | 280 | src a2, a3, a2 |
@@ -323,24 +323,24 @@ common_exception: | |||
323 | 323 | ||
324 | /* Save some registers, disable loops and clear the syscall flag. */ | 324 | /* Save some registers, disable loops and clear the syscall flag. */ |
325 | 325 | ||
326 | rsr a2, DEBUGCAUSE | 326 | rsr a2, debugcause |
327 | rsr a3, EPC_1 | 327 | rsr a3, epc1 |
328 | s32i a2, a1, PT_DEBUGCAUSE | 328 | s32i a2, a1, PT_DEBUGCAUSE |
329 | s32i a3, a1, PT_PC | 329 | s32i a3, a1, PT_PC |
330 | 330 | ||
331 | movi a2, -1 | 331 | movi a2, -1 |
332 | rsr a3, EXCVADDR | 332 | rsr a3, excvaddr |
333 | s32i a2, a1, PT_SYSCALL | 333 | s32i a2, a1, PT_SYSCALL |
334 | movi a2, 0 | 334 | movi a2, 0 |
335 | s32i a3, a1, PT_EXCVADDR | 335 | s32i a3, a1, PT_EXCVADDR |
336 | xsr a2, LCOUNT | 336 | xsr a2, lcount |
337 | s32i a2, a1, PT_LCOUNT | 337 | s32i a2, a1, PT_LCOUNT |
338 | 338 | ||
339 | /* It is now save to restore the EXC_TABLE_FIXUP variable. */ | 339 | /* It is now save to restore the EXC_TABLE_FIXUP variable. */ |
340 | 340 | ||
341 | rsr a0, EXCCAUSE | 341 | rsr a0, exccause |
342 | movi a3, 0 | 342 | movi a3, 0 |
343 | rsr a2, EXCSAVE_1 | 343 | rsr a2, excsave1 |
344 | s32i a0, a1, PT_EXCCAUSE | 344 | s32i a0, a1, PT_EXCCAUSE |
345 | s32i a3, a2, EXC_TABLE_FIXUP | 345 | s32i a3, a2, EXC_TABLE_FIXUP |
346 | 346 | ||
@@ -352,22 +352,22 @@ common_exception: | |||
352 | * (interrupts disabled) and if this exception is not an interrupt. | 352 | * (interrupts disabled) and if this exception is not an interrupt. |
353 | */ | 353 | */ |
354 | 354 | ||
355 | rsr a3, PS | 355 | rsr a3, ps |
356 | addi a0, a0, -4 | 356 | addi a0, a0, -4 |
357 | movi a2, 1 | 357 | movi a2, 1 |
358 | extui a3, a3, 0, 1 # a3 = PS.INTLEVEL[0] | 358 | extui a3, a3, 0, 1 # a3 = PS.INTLEVEL[0] |
359 | moveqz a3, a2, a0 # a3 = 1 iff interrupt exception | 359 | moveqz a3, a2, a0 # a3 = 1 iff interrupt exception |
360 | movi a2, 1 << PS_WOE_BIT | 360 | movi a2, 1 << PS_WOE_BIT |
361 | or a3, a3, a2 | 361 | or a3, a3, a2 |
362 | rsr a0, EXCCAUSE | 362 | rsr a0, exccause |
363 | xsr a3, PS | 363 | xsr a3, ps |
364 | 364 | ||
365 | s32i a3, a1, PT_PS # save ps | 365 | s32i a3, a1, PT_PS # save ps |
366 | 366 | ||
367 | /* Save LBEG, LEND */ | 367 | /* Save lbeg, lend */ |
368 | 368 | ||
369 | rsr a2, LBEG | 369 | rsr a2, lbeg |
370 | rsr a3, LEND | 370 | rsr a3, lend |
371 | s32i a2, a1, PT_LBEG | 371 | s32i a2, a1, PT_LBEG |
372 | s32i a3, a1, PT_LEND | 372 | s32i a3, a1, PT_LEND |
373 | 373 | ||
@@ -432,7 +432,7 @@ common_exception_return: | |||
432 | 432 | ||
433 | load_xtregs_opt a1 a2 a4 a5 a6 a7 PT_XTREGS_OPT | 433 | load_xtregs_opt a1 a2 a4 a5 a6 a7 PT_XTREGS_OPT |
434 | 434 | ||
435 | wsr a3, PS /* disable interrupts */ | 435 | wsr a3, ps /* disable interrupts */ |
436 | 436 | ||
437 | _bbci.l a3, PS_UM_BIT, kernel_exception_exit | 437 | _bbci.l a3, PS_UM_BIT, kernel_exception_exit |
438 | 438 | ||
@@ -444,12 +444,12 @@ user_exception_exit: | |||
444 | 444 | ||
445 | l32i a2, a1, PT_WINDOWBASE | 445 | l32i a2, a1, PT_WINDOWBASE |
446 | l32i a3, a1, PT_WINDOWSTART | 446 | l32i a3, a1, PT_WINDOWSTART |
447 | wsr a1, DEPC # use DEPC as temp storage | 447 | wsr a1, depc # use DEPC as temp storage |
448 | wsr a3, WINDOWSTART # restore WINDOWSTART | 448 | wsr a3, windowstart # restore WINDOWSTART |
449 | ssr a2 # preserve user's WB in the SAR | 449 | ssr a2 # preserve user's WB in the SAR |
450 | wsr a2, WINDOWBASE # switch to user's saved WB | 450 | wsr a2, windowbase # switch to user's saved WB |
451 | rsync | 451 | rsync |
452 | rsr a1, DEPC # restore stack pointer | 452 | rsr a1, depc # restore stack pointer |
453 | l32i a2, a1, PT_WMASK # register frames saved (in bits 4...9) | 453 | l32i a2, a1, PT_WMASK # register frames saved (in bits 4...9) |
454 | rotw -1 # we restore a4..a7 | 454 | rotw -1 # we restore a4..a7 |
455 | _bltui a6, 16, 1f # only have to restore current window? | 455 | _bltui a6, 16, 1f # only have to restore current window? |
@@ -475,8 +475,8 @@ user_exception_exit: | |||
475 | 475 | ||
476 | /* Clear unrestored registers (don't leak anything to user-land */ | 476 | /* Clear unrestored registers (don't leak anything to user-land */ |
477 | 477 | ||
478 | 1: rsr a0, WINDOWBASE | 478 | 1: rsr a0, windowbase |
479 | rsr a3, SAR | 479 | rsr a3, sar |
480 | sub a3, a0, a3 | 480 | sub a3, a0, a3 |
481 | beqz a3, 2f | 481 | beqz a3, 2f |
482 | extui a3, a3, 0, WBBITS | 482 | extui a3, a3, 0, WBBITS |
@@ -556,7 +556,7 @@ kernel_exception_exit: | |||
556 | 556 | ||
557 | /* Test WINDOWSTART now. If spilled, do the movsp */ | 557 | /* Test WINDOWSTART now. If spilled, do the movsp */ |
558 | 558 | ||
559 | rsr a3, WINDOWSTART | 559 | rsr a3, windowstart |
560 | addi a0, a3, -1 | 560 | addi a0, a3, -1 |
561 | and a3, a3, a0 | 561 | and a3, a3, a0 |
562 | _bnez a3, common_exception_exit | 562 | _bnez a3, common_exception_exit |
@@ -604,24 +604,24 @@ common_exception_exit: | |||
604 | 604 | ||
605 | 1: l32i a2, a1, PT_PC | 605 | 1: l32i a2, a1, PT_PC |
606 | l32i a3, a1, PT_SAR | 606 | l32i a3, a1, PT_SAR |
607 | wsr a2, EPC_1 | 607 | wsr a2, epc1 |
608 | wsr a3, SAR | 608 | wsr a3, sar |
609 | 609 | ||
610 | /* Restore LBEG, LEND, LCOUNT */ | 610 | /* Restore LBEG, LEND, LCOUNT */ |
611 | 611 | ||
612 | l32i a2, a1, PT_LBEG | 612 | l32i a2, a1, PT_LBEG |
613 | l32i a3, a1, PT_LEND | 613 | l32i a3, a1, PT_LEND |
614 | wsr a2, LBEG | 614 | wsr a2, lbeg |
615 | l32i a2, a1, PT_LCOUNT | 615 | l32i a2, a1, PT_LCOUNT |
616 | wsr a3, LEND | 616 | wsr a3, lend |
617 | wsr a2, LCOUNT | 617 | wsr a2, lcount |
618 | 618 | ||
619 | /* We control single stepping through the ICOUNTLEVEL register. */ | 619 | /* We control single stepping through the ICOUNTLEVEL register. */ |
620 | 620 | ||
621 | l32i a2, a1, PT_ICOUNTLEVEL | 621 | l32i a2, a1, PT_ICOUNTLEVEL |
622 | movi a3, -2 | 622 | movi a3, -2 |
623 | wsr a2, ICOUNTLEVEL | 623 | wsr a2, icountlevel |
624 | wsr a3, ICOUNT | 624 | wsr a3, icount |
625 | 625 | ||
626 | /* Check if it was double exception. */ | 626 | /* Check if it was double exception. */ |
627 | 627 | ||
@@ -636,7 +636,7 @@ common_exception_exit: | |||
636 | l32i a1, a1, PT_AREG1 | 636 | l32i a1, a1, PT_AREG1 |
637 | rfe | 637 | rfe |
638 | 638 | ||
639 | 1: wsr a0, DEPC | 639 | 1: wsr a0, depc |
640 | l32i a0, a1, PT_AREG0 | 640 | l32i a0, a1, PT_AREG0 |
641 | l32i a1, a1, PT_AREG1 | 641 | l32i a1, a1, PT_AREG1 |
642 | rfde | 642 | rfde |
@@ -651,25 +651,25 @@ common_exception_exit: | |||
651 | 651 | ||
652 | ENTRY(debug_exception) | 652 | ENTRY(debug_exception) |
653 | 653 | ||
654 | rsr a0, EPS + XCHAL_DEBUGLEVEL | 654 | rsr a0, SREG_EPS + XCHAL_DEBUGLEVEL |
655 | bbsi.l a0, PS_EXCM_BIT, 1f # exception mode | 655 | bbsi.l a0, PS_EXCM_BIT, 1f # exception mode |
656 | 656 | ||
657 | /* Set EPC_1 and EXCCAUSE */ | 657 | /* Set EPC1 and EXCCAUSE */ |
658 | 658 | ||
659 | wsr a2, DEPC # save a2 temporarily | 659 | wsr a2, depc # save a2 temporarily |
660 | rsr a2, EPC + XCHAL_DEBUGLEVEL | 660 | rsr a2, SREG_EPC + XCHAL_DEBUGLEVEL |
661 | wsr a2, EPC_1 | 661 | wsr a2, epc1 |
662 | 662 | ||
663 | movi a2, EXCCAUSE_MAPPED_DEBUG | 663 | movi a2, EXCCAUSE_MAPPED_DEBUG |
664 | wsr a2, EXCCAUSE | 664 | wsr a2, exccause |
665 | 665 | ||
666 | /* Restore PS to the value before the debug exc but with PS.EXCM set.*/ | 666 | /* Restore PS to the value before the debug exc but with PS.EXCM set.*/ |
667 | 667 | ||
668 | movi a2, 1 << PS_EXCM_BIT | 668 | movi a2, 1 << PS_EXCM_BIT |
669 | or a2, a0, a2 | 669 | or a2, a0, a2 |
670 | movi a0, debug_exception # restore a3, debug jump vector | 670 | movi a0, debug_exception # restore a3, debug jump vector |
671 | wsr a2, PS | 671 | wsr a2, ps |
672 | xsr a0, EXCSAVE + XCHAL_DEBUGLEVEL | 672 | xsr a0, SREG_EXCSAVE + XCHAL_DEBUGLEVEL |
673 | 673 | ||
674 | /* Switch to kernel/user stack, restore jump vector, and save a0 */ | 674 | /* Switch to kernel/user stack, restore jump vector, and save a0 */ |
675 | 675 | ||
@@ -680,19 +680,19 @@ ENTRY(debug_exception) | |||
680 | movi a0, 0 | 680 | movi a0, 0 |
681 | s32i a1, a2, PT_AREG1 | 681 | s32i a1, a2, PT_AREG1 |
682 | s32i a0, a2, PT_DEPC # mark it as a regular exception | 682 | s32i a0, a2, PT_DEPC # mark it as a regular exception |
683 | xsr a0, DEPC | 683 | xsr a0, depc |
684 | s32i a3, a2, PT_AREG3 | 684 | s32i a3, a2, PT_AREG3 |
685 | s32i a0, a2, PT_AREG2 | 685 | s32i a0, a2, PT_AREG2 |
686 | mov a1, a2 | 686 | mov a1, a2 |
687 | j _kernel_exception | 687 | j _kernel_exception |
688 | 688 | ||
689 | 2: rsr a2, EXCSAVE_1 | 689 | 2: rsr a2, excsave1 |
690 | l32i a2, a2, EXC_TABLE_KSTK # load kernel stack pointer | 690 | l32i a2, a2, EXC_TABLE_KSTK # load kernel stack pointer |
691 | s32i a0, a2, PT_AREG0 | 691 | s32i a0, a2, PT_AREG0 |
692 | movi a0, 0 | 692 | movi a0, 0 |
693 | s32i a1, a2, PT_AREG1 | 693 | s32i a1, a2, PT_AREG1 |
694 | s32i a0, a2, PT_DEPC | 694 | s32i a0, a2, PT_DEPC |
695 | xsr a0, DEPC | 695 | xsr a0, depc |
696 | s32i a3, a2, PT_AREG3 | 696 | s32i a3, a2, PT_AREG3 |
697 | s32i a0, a2, PT_AREG2 | 697 | s32i a0, a2, PT_AREG2 |
698 | mov a1, a2 | 698 | mov a1, a2 |
@@ -732,12 +732,12 @@ ENTRY(unrecoverable_exception) | |||
732 | movi a0, 1 | 732 | movi a0, 1 |
733 | movi a1, 0 | 733 | movi a1, 0 |
734 | 734 | ||
735 | wsr a0, WINDOWSTART | 735 | wsr a0, windowstart |
736 | wsr a1, WINDOWBASE | 736 | wsr a1, windowbase |
737 | rsync | 737 | rsync |
738 | 738 | ||
739 | movi a1, (1 << PS_WOE_BIT) | 1 | 739 | movi a1, (1 << PS_WOE_BIT) | 1 |
740 | wsr a1, PS | 740 | wsr a1, ps |
741 | rsync | 741 | rsync |
742 | 742 | ||
743 | movi a1, init_task | 743 | movi a1, init_task |
@@ -793,7 +793,7 @@ ENTRY(fast_alloca) | |||
793 | l32i a0, a2, PT_DEPC | 793 | l32i a0, a2, PT_DEPC |
794 | _bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, .Lunhandled_double | 794 | _bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, .Lunhandled_double |
795 | 795 | ||
796 | rsr a0, DEPC # get a2 | 796 | rsr a0, depc # get a2 |
797 | s32i a4, a2, PT_AREG4 # save a4 and | 797 | s32i a4, a2, PT_AREG4 # save a4 and |
798 | s32i a0, a2, PT_AREG2 # a2 to stack | 798 | s32i a0, a2, PT_AREG2 # a2 to stack |
799 | 799 | ||
@@ -804,8 +804,8 @@ ENTRY(fast_alloca) | |||
804 | 804 | ||
805 | /* Restore a3, excsave_1 */ | 805 | /* Restore a3, excsave_1 */ |
806 | 806 | ||
807 | xsr a3, EXCSAVE_1 # make sure excsave_1 is valid for dbl. | 807 | xsr a3, excsave1 # make sure excsave_1 is valid for dbl. |
808 | rsr a4, EPC_1 # get exception address | 808 | rsr a4, epc1 # get exception address |
809 | s32i a3, a2, PT_AREG3 # save a3 to stack | 809 | s32i a3, a2, PT_AREG3 # save a3 to stack |
810 | 810 | ||
811 | #ifdef ALLOCA_EXCEPTION_IN_IRAM | 811 | #ifdef ALLOCA_EXCEPTION_IN_IRAM |
@@ -820,7 +820,7 @@ ENTRY(fast_alloca) | |||
820 | jx a3 | 820 | jx a3 |
821 | 821 | ||
822 | .Lunhandled_double: | 822 | .Lunhandled_double: |
823 | wsr a0, EXCSAVE_1 | 823 | wsr a0, excsave1 |
824 | movi a0, unrecoverable_exception | 824 | movi a0, unrecoverable_exception |
825 | callx0 a0 | 825 | callx0 a0 |
826 | 826 | ||
@@ -852,7 +852,7 @@ ENTRY(fast_alloca) | |||
852 | #endif | 852 | #endif |
853 | addi a4, a4, 3 # step over movsp | 853 | addi a4, a4, 3 # step over movsp |
854 | _EXTUI_MOVSP_DST(a0) # extract destination register | 854 | _EXTUI_MOVSP_DST(a0) # extract destination register |
855 | wsr a4, EPC_1 # save new epc_1 | 855 | wsr a4, epc1 # save new epc_1 |
856 | 856 | ||
857 | _bnei a0, 1, 1f # no 'movsp a1, ax': jump | 857 | _bnei a0, 1, 1f # no 'movsp a1, ax': jump |
858 | 858 | ||
@@ -953,14 +953,14 @@ ENTRY(fast_syscall_kernel) | |||
953 | 953 | ||
954 | /* Skip syscall. */ | 954 | /* Skip syscall. */ |
955 | 955 | ||
956 | rsr a0, EPC_1 | 956 | rsr a0, epc1 |
957 | addi a0, a0, 3 | 957 | addi a0, a0, 3 |
958 | wsr a0, EPC_1 | 958 | wsr a0, epc1 |
959 | 959 | ||
960 | l32i a0, a2, PT_DEPC | 960 | l32i a0, a2, PT_DEPC |
961 | bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable | 961 | bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable |
962 | 962 | ||
963 | rsr a0, DEPC # get syscall-nr | 963 | rsr a0, depc # get syscall-nr |
964 | _beqz a0, fast_syscall_spill_registers | 964 | _beqz a0, fast_syscall_spill_registers |
965 | _beqi a0, __NR_xtensa, fast_syscall_xtensa | 965 | _beqi a0, __NR_xtensa, fast_syscall_xtensa |
966 | 966 | ||
@@ -970,14 +970,14 @@ ENTRY(fast_syscall_user) | |||
970 | 970 | ||
971 | /* Skip syscall. */ | 971 | /* Skip syscall. */ |
972 | 972 | ||
973 | rsr a0, EPC_1 | 973 | rsr a0, epc1 |
974 | addi a0, a0, 3 | 974 | addi a0, a0, 3 |
975 | wsr a0, EPC_1 | 975 | wsr a0, epc1 |
976 | 976 | ||
977 | l32i a0, a2, PT_DEPC | 977 | l32i a0, a2, PT_DEPC |
978 | bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable | 978 | bgeui a0, VALID_DOUBLE_EXCEPTION_ADDRESS, fast_syscall_unrecoverable |
979 | 979 | ||
980 | rsr a0, DEPC # get syscall-nr | 980 | rsr a0, depc # get syscall-nr |
981 | _beqz a0, fast_syscall_spill_registers | 981 | _beqz a0, fast_syscall_spill_registers |
982 | _beqi a0, __NR_xtensa, fast_syscall_xtensa | 982 | _beqi a0, __NR_xtensa, fast_syscall_xtensa |
983 | 983 | ||
@@ -988,10 +988,10 @@ ENTRY(fast_syscall_unrecoverable) | |||
988 | /* Restore all states. */ | 988 | /* Restore all states. */ |
989 | 989 | ||
990 | l32i a0, a2, PT_AREG0 # restore a0 | 990 | l32i a0, a2, PT_AREG0 # restore a0 |
991 | xsr a2, DEPC # restore a2, depc | 991 | xsr a2, depc # restore a2, depc |
992 | rsr a3, EXCSAVE_1 | 992 | rsr a3, excsave1 |
993 | 993 | ||
994 | wsr a0, EXCSAVE_1 | 994 | wsr a0, excsave1 |
995 | movi a0, unrecoverable_exception | 995 | movi a0, unrecoverable_exception |
996 | callx0 a0 | 996 | callx0 a0 |
997 | 997 | ||
@@ -1047,7 +1047,7 @@ ENTRY(fast_syscall_unrecoverable) | |||
1047 | 1047 | ||
1048 | ENTRY(fast_syscall_xtensa) | 1048 | ENTRY(fast_syscall_xtensa) |
1049 | 1049 | ||
1050 | xsr a3, EXCSAVE_1 # restore a3, excsave1 | 1050 | xsr a3, excsave1 # restore a3, excsave1 |
1051 | 1051 | ||
1052 | s32i a7, a2, PT_AREG7 # we need an additional register | 1052 | s32i a7, a2, PT_AREG7 # we need an additional register |
1053 | movi a7, 4 # sizeof(unsigned int) | 1053 | movi a7, 4 # sizeof(unsigned int) |
@@ -1124,13 +1124,13 @@ ENTRY(fast_syscall_spill_registers) | |||
1124 | 1124 | ||
1125 | movi a0, fast_syscall_spill_registers_fixup | 1125 | movi a0, fast_syscall_spill_registers_fixup |
1126 | s32i a0, a3, EXC_TABLE_FIXUP | 1126 | s32i a0, a3, EXC_TABLE_FIXUP |
1127 | rsr a0, WINDOWBASE | 1127 | rsr a0, windowbase |
1128 | s32i a0, a3, EXC_TABLE_PARAM | 1128 | s32i a0, a3, EXC_TABLE_PARAM |
1129 | 1129 | ||
1130 | /* Save a3 and SAR on stack. */ | 1130 | /* Save a3 and SAR on stack. */ |
1131 | 1131 | ||
1132 | rsr a0, SAR | 1132 | rsr a0, sar |
1133 | xsr a3, EXCSAVE_1 # restore a3 and excsave_1 | 1133 | xsr a3, excsave1 # restore a3 and excsave_1 |
1134 | s32i a3, a2, PT_AREG3 | 1134 | s32i a3, a2, PT_AREG3 |
1135 | s32i a4, a2, PT_AREG4 | 1135 | s32i a4, a2, PT_AREG4 |
1136 | s32i a0, a2, PT_AREG5 # store SAR to PT_AREG5 | 1136 | s32i a0, a2, PT_AREG5 # store SAR to PT_AREG5 |
@@ -1148,7 +1148,7 @@ ENTRY(fast_syscall_spill_registers) | |||
1148 | l32i a3, a2, PT_AREG5 | 1148 | l32i a3, a2, PT_AREG5 |
1149 | l32i a4, a2, PT_AREG4 | 1149 | l32i a4, a2, PT_AREG4 |
1150 | l32i a0, a2, PT_AREG0 | 1150 | l32i a0, a2, PT_AREG0 |
1151 | wsr a3, SAR | 1151 | wsr a3, sar |
1152 | l32i a3, a2, PT_AREG3 | 1152 | l32i a3, a2, PT_AREG3 |
1153 | 1153 | ||
1154 | /* Restore clobbered registers. */ | 1154 | /* Restore clobbered registers. */ |
@@ -1173,8 +1173,8 @@ ENTRY(fast_syscall_spill_registers) | |||
1173 | 1173 | ||
1174 | fast_syscall_spill_registers_fixup: | 1174 | fast_syscall_spill_registers_fixup: |
1175 | 1175 | ||
1176 | rsr a2, WINDOWBASE # get current windowbase (a2 is saved) | 1176 | rsr a2, windowbase # get current windowbase (a2 is saved) |
1177 | xsr a0, DEPC # restore depc and a0 | 1177 | xsr a0, depc # restore depc and a0 |
1178 | ssl a2 # set shift (32 - WB) | 1178 | ssl a2 # set shift (32 - WB) |
1179 | 1179 | ||
1180 | /* We need to make sure the current registers (a0-a3) are preserved. | 1180 | /* We need to make sure the current registers (a0-a3) are preserved. |
@@ -1182,12 +1182,12 @@ fast_syscall_spill_registers_fixup: | |||
1182 | * in WS, so that the exception handlers save them to the task stack. | 1182 | * in WS, so that the exception handlers save them to the task stack. |
1183 | */ | 1183 | */ |
1184 | 1184 | ||
1185 | rsr a3, EXCSAVE_1 # get spill-mask | 1185 | rsr a3, excsave1 # get spill-mask |
1186 | slli a2, a3, 1 # shift left by one | 1186 | slli a2, a3, 1 # shift left by one |
1187 | 1187 | ||
1188 | slli a3, a2, 32-WSBITS | 1188 | slli a3, a2, 32-WSBITS |
1189 | src a2, a2, a3 # a1 = xxwww1yyxxxwww1yy...... | 1189 | src a2, a2, a3 # a1 = xxwww1yyxxxwww1yy...... |
1190 | wsr a2, WINDOWSTART # set corrected windowstart | 1190 | wsr a2, windowstart # set corrected windowstart |
1191 | 1191 | ||
1192 | movi a3, exc_table | 1192 | movi a3, exc_table |
1193 | l32i a2, a3, EXC_TABLE_DOUBLE_SAVE # restore a2 | 1193 | l32i a2, a3, EXC_TABLE_DOUBLE_SAVE # restore a2 |
@@ -1201,7 +1201,7 @@ fast_syscall_spill_registers_fixup: | |||
1201 | * excsave_1: a3 | 1201 | * excsave_1: a3 |
1202 | */ | 1202 | */ |
1203 | 1203 | ||
1204 | wsr a3, WINDOWBASE | 1204 | wsr a3, windowbase |
1205 | rsync | 1205 | rsync |
1206 | 1206 | ||
1207 | /* We are now in the original frame when we entered _spill_registers: | 1207 | /* We are now in the original frame when we entered _spill_registers: |
@@ -1227,7 +1227,7 @@ fast_syscall_spill_registers_fixup: | |||
1227 | /* Jump to the exception handler. */ | 1227 | /* Jump to the exception handler. */ |
1228 | 1228 | ||
1229 | movi a3, exc_table | 1229 | movi a3, exc_table |
1230 | rsr a0, EXCCAUSE | 1230 | rsr a0, exccause |
1231 | addx4 a0, a0, a3 # find entry in table | 1231 | addx4 a0, a0, a3 # find entry in table |
1232 | l32i a0, a0, EXC_TABLE_FAST_USER # load handler | 1232 | l32i a0, a0, EXC_TABLE_FAST_USER # load handler |
1233 | jx a0 | 1233 | jx a0 |
@@ -1236,28 +1236,28 @@ fast_syscall_spill_registers_fixup_return: | |||
1236 | 1236 | ||
1237 | /* When we return here, all registers have been restored (a2: DEPC) */ | 1237 | /* When we return here, all registers have been restored (a2: DEPC) */ |
1238 | 1238 | ||
1239 | wsr a2, DEPC # exception address | 1239 | wsr a2, depc # exception address |
1240 | 1240 | ||
1241 | /* Restore fixup handler. */ | 1241 | /* Restore fixup handler. */ |
1242 | 1242 | ||
1243 | xsr a3, EXCSAVE_1 | 1243 | xsr a3, excsave1 |
1244 | movi a2, fast_syscall_spill_registers_fixup | 1244 | movi a2, fast_syscall_spill_registers_fixup |
1245 | s32i a2, a3, EXC_TABLE_FIXUP | 1245 | s32i a2, a3, EXC_TABLE_FIXUP |
1246 | rsr a2, WINDOWBASE | 1246 | rsr a2, windowbase |
1247 | s32i a2, a3, EXC_TABLE_PARAM | 1247 | s32i a2, a3, EXC_TABLE_PARAM |
1248 | l32i a2, a3, EXC_TABLE_KSTK | 1248 | l32i a2, a3, EXC_TABLE_KSTK |
1249 | 1249 | ||
1250 | /* Load WB at the time the exception occurred. */ | 1250 | /* Load WB at the time the exception occurred. */ |
1251 | 1251 | ||
1252 | rsr a3, SAR # WB is still in SAR | 1252 | rsr a3, sar # WB is still in SAR |
1253 | neg a3, a3 | 1253 | neg a3, a3 |
1254 | wsr a3, WINDOWBASE | 1254 | wsr a3, windowbase |
1255 | rsync | 1255 | rsync |
1256 | 1256 | ||
1257 | /* Restore a3 and return. */ | 1257 | /* Restore a3 and return. */ |
1258 | 1258 | ||
1259 | movi a3, exc_table | 1259 | movi a3, exc_table |
1260 | xsr a3, EXCSAVE_1 | 1260 | xsr a3, excsave1 |
1261 | 1261 | ||
1262 | rfde | 1262 | rfde |
1263 | 1263 | ||
@@ -1283,8 +1283,8 @@ ENTRY(_spill_registers) | |||
1283 | * Rotate ws right so that a4 = yyxxxwww1. | 1283 | * Rotate ws right so that a4 = yyxxxwww1. |
1284 | */ | 1284 | */ |
1285 | 1285 | ||
1286 | rsr a4, WINDOWBASE | 1286 | rsr a4, windowbase |
1287 | rsr a3, WINDOWSTART # a3 = xxxwww1yy | 1287 | rsr a3, windowstart # a3 = xxxwww1yy |
1288 | ssr a4 # holds WB | 1288 | ssr a4 # holds WB |
1289 | slli a4, a3, WSBITS | 1289 | slli a4, a3, WSBITS |
1290 | or a3, a3, a4 # a3 = xxxwww1yyxxxwww1yy | 1290 | or a3, a3, a4 # a3 = xxxwww1yyxxxwww1yy |
@@ -1302,7 +1302,7 @@ ENTRY(_spill_registers) | |||
1302 | 1302 | ||
1303 | /* Skip empty frames - get 'oldest' WINDOWSTART-bit. */ | 1303 | /* Skip empty frames - get 'oldest' WINDOWSTART-bit. */ |
1304 | 1304 | ||
1305 | wsr a3, WINDOWSTART # save shifted windowstart | 1305 | wsr a3, windowstart # save shifted windowstart |
1306 | neg a4, a3 | 1306 | neg a4, a3 |
1307 | and a3, a4, a3 # first bit set from right: 000010000 | 1307 | and a3, a4, a3 # first bit set from right: 000010000 |
1308 | 1308 | ||
@@ -1311,12 +1311,12 @@ ENTRY(_spill_registers) | |||
1311 | sub a4, a3, a4 # WSBITS-a4:number of 0-bits from right | 1311 | sub a4, a3, a4 # WSBITS-a4:number of 0-bits from right |
1312 | ssr a4 # save in SAR for later. | 1312 | ssr a4 # save in SAR for later. |
1313 | 1313 | ||
1314 | rsr a3, WINDOWBASE | 1314 | rsr a3, windowbase |
1315 | add a3, a3, a4 | 1315 | add a3, a3, a4 |
1316 | wsr a3, WINDOWBASE | 1316 | wsr a3, windowbase |
1317 | rsync | 1317 | rsync |
1318 | 1318 | ||
1319 | rsr a3, WINDOWSTART | 1319 | rsr a3, windowstart |
1320 | srl a3, a3 # shift windowstart | 1320 | srl a3, a3 # shift windowstart |
1321 | 1321 | ||
1322 | /* WB is now just one frame below the oldest frame in the register | 1322 | /* WB is now just one frame below the oldest frame in the register |
@@ -1364,11 +1364,11 @@ ENTRY(_spill_registers) | |||
1364 | .Lexit: /* Done. Do the final rotation, set WS, and return. */ | 1364 | .Lexit: /* Done. Do the final rotation, set WS, and return. */ |
1365 | 1365 | ||
1366 | rotw 1 | 1366 | rotw 1 |
1367 | rsr a3, WINDOWBASE | 1367 | rsr a3, windowbase |
1368 | ssl a3 | 1368 | ssl a3 |
1369 | movi a3, 1 | 1369 | movi a3, 1 |
1370 | sll a3, a3 | 1370 | sll a3, a3 |
1371 | wsr a3, WINDOWSTART | 1371 | wsr a3, windowstart |
1372 | ret | 1372 | ret |
1373 | 1373 | ||
1374 | .Lc4: s32e a4, a9, -16 | 1374 | .Lc4: s32e a4, a9, -16 |
@@ -1429,7 +1429,7 @@ ENTRY(_spill_registers) | |||
1429 | * however, this condition is unrecoverable in kernel space. | 1429 | * however, this condition is unrecoverable in kernel space. |
1430 | */ | 1430 | */ |
1431 | 1431 | ||
1432 | rsr a0, PS | 1432 | rsr a0, ps |
1433 | _bbci.l a0, PS_UM_BIT, 1f | 1433 | _bbci.l a0, PS_UM_BIT, 1f |
1434 | 1434 | ||
1435 | /* User space: Setup a dummy frame and kill application. | 1435 | /* User space: Setup a dummy frame and kill application. |
@@ -1439,18 +1439,18 @@ ENTRY(_spill_registers) | |||
1439 | movi a0, 1 | 1439 | movi a0, 1 |
1440 | movi a1, 0 | 1440 | movi a1, 0 |
1441 | 1441 | ||
1442 | wsr a0, WINDOWSTART | 1442 | wsr a0, windowstart |
1443 | wsr a1, WINDOWBASE | 1443 | wsr a1, windowbase |
1444 | rsync | 1444 | rsync |
1445 | 1445 | ||
1446 | movi a0, 0 | 1446 | movi a0, 0 |
1447 | 1447 | ||
1448 | movi a3, exc_table | 1448 | movi a3, exc_table |
1449 | l32i a1, a3, EXC_TABLE_KSTK | 1449 | l32i a1, a3, EXC_TABLE_KSTK |
1450 | wsr a3, EXCSAVE_1 | 1450 | wsr a3, excsave1 |
1451 | 1451 | ||
1452 | movi a4, (1 << PS_WOE_BIT) | 1 | 1452 | movi a4, (1 << PS_WOE_BIT) | 1 |
1453 | wsr a4, PS | 1453 | wsr a4, ps |
1454 | rsync | 1454 | rsync |
1455 | 1455 | ||
1456 | movi a6, SIGSEGV | 1456 | movi a6, SIGSEGV |
@@ -1459,7 +1459,7 @@ ENTRY(_spill_registers) | |||
1459 | 1459 | ||
1460 | 1: /* Kernel space: PANIC! */ | 1460 | 1: /* Kernel space: PANIC! */ |
1461 | 1461 | ||
1462 | wsr a0, EXCSAVE_1 | 1462 | wsr a0, excsave1 |
1463 | movi a0, unrecoverable_exception | 1463 | movi a0, unrecoverable_exception |
1464 | callx0 a0 # should not return | 1464 | callx0 a0 # should not return |
1465 | 1: j 1b | 1465 | 1: j 1b |
@@ -1524,7 +1524,7 @@ ENTRY(fast_second_level_miss) | |||
1524 | 1524 | ||
1525 | /* We deliberately destroy a3 that holds the exception table. */ | 1525 | /* We deliberately destroy a3 that holds the exception table. */ |
1526 | 1526 | ||
1527 | 8: rsr a3, EXCVADDR # fault address | 1527 | 8: rsr a3, excvaddr # fault address |
1528 | _PGD_OFFSET(a0, a3, a1) | 1528 | _PGD_OFFSET(a0, a3, a1) |
1529 | l32i a0, a0, 0 # read pmdval | 1529 | l32i a0, a0, 0 # read pmdval |
1530 | beqz a0, 2f | 1530 | beqz a0, 2f |
@@ -1542,7 +1542,7 @@ ENTRY(fast_second_level_miss) | |||
1542 | * pteval = ((pmdval - PAGE_OFFSET) & PAGE_MASK) | PAGE_DIRECTORY | 1542 | * pteval = ((pmdval - PAGE_OFFSET) & PAGE_MASK) | PAGE_DIRECTORY |
1543 | */ | 1543 | */ |
1544 | 1544 | ||
1545 | movi a1, -PAGE_OFFSET | 1545 | movi a1, (-PAGE_OFFSET) & 0xffffffff |
1546 | add a0, a0, a1 # pmdval - PAGE_OFFSET | 1546 | add a0, a0, a1 # pmdval - PAGE_OFFSET |
1547 | extui a1, a0, 0, PAGE_SHIFT # ... & PAGE_MASK | 1547 | extui a1, a0, 0, PAGE_SHIFT # ... & PAGE_MASK |
1548 | xor a0, a0, a1 | 1548 | xor a0, a0, a1 |
@@ -1561,7 +1561,7 @@ ENTRY(fast_second_level_miss) | |||
1561 | */ | 1561 | */ |
1562 | 1562 | ||
1563 | extui a3, a3, 28, 2 # addr. bit 28 and 29 0,1,2,3 | 1563 | extui a3, a3, 28, 2 # addr. bit 28 and 29 0,1,2,3 |
1564 | rsr a1, PTEVADDR | 1564 | rsr a1, ptevaddr |
1565 | addx2 a3, a3, a3 # -> 0,3,6,9 | 1565 | addx2 a3, a3, a3 # -> 0,3,6,9 |
1566 | srli a1, a1, PAGE_SHIFT | 1566 | srli a1, a1, PAGE_SHIFT |
1567 | extui a3, a3, 2, 2 # -> 0,0,1,2 | 1567 | extui a3, a3, 2, 2 # -> 0,0,1,2 |
@@ -1583,18 +1583,18 @@ ENTRY(fast_second_level_miss) | |||
1583 | l32i a0, a2, PT_AREG0 | 1583 | l32i a0, a2, PT_AREG0 |
1584 | l32i a1, a2, PT_AREG1 | 1584 | l32i a1, a2, PT_AREG1 |
1585 | l32i a2, a2, PT_DEPC | 1585 | l32i a2, a2, PT_DEPC |
1586 | xsr a3, EXCSAVE_1 | 1586 | xsr a3, excsave1 |
1587 | 1587 | ||
1588 | bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f | 1588 | bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f |
1589 | 1589 | ||
1590 | /* Restore excsave1 and return. */ | 1590 | /* Restore excsave1 and return. */ |
1591 | 1591 | ||
1592 | rsr a2, DEPC | 1592 | rsr a2, depc |
1593 | rfe | 1593 | rfe |
1594 | 1594 | ||
1595 | /* Return from double exception. */ | 1595 | /* Return from double exception. */ |
1596 | 1596 | ||
1597 | 1: xsr a2, DEPC | 1597 | 1: xsr a2, depc |
1598 | esync | 1598 | esync |
1599 | rfde | 1599 | rfde |
1600 | 1600 | ||
@@ -1618,7 +1618,7 @@ ENTRY(fast_second_level_miss) | |||
1618 | /* Make sure the exception originated in the special functions */ | 1618 | /* Make sure the exception originated in the special functions */ |
1619 | 1619 | ||
1620 | movi a0, __tlbtemp_mapping_start | 1620 | movi a0, __tlbtemp_mapping_start |
1621 | rsr a3, EPC_1 | 1621 | rsr a3, epc1 |
1622 | bltu a3, a0, 2f | 1622 | bltu a3, a0, 2f |
1623 | movi a0, __tlbtemp_mapping_end | 1623 | movi a0, __tlbtemp_mapping_end |
1624 | bgeu a3, a0, 2f | 1624 | bgeu a3, a0, 2f |
@@ -1626,7 +1626,7 @@ ENTRY(fast_second_level_miss) | |||
1626 | /* Check if excvaddr was in one of the TLBTEMP_BASE areas. */ | 1626 | /* Check if excvaddr was in one of the TLBTEMP_BASE areas. */ |
1627 | 1627 | ||
1628 | movi a3, TLBTEMP_BASE_1 | 1628 | movi a3, TLBTEMP_BASE_1 |
1629 | rsr a0, EXCVADDR | 1629 | rsr a0, excvaddr |
1630 | bltu a0, a3, 2f | 1630 | bltu a0, a3, 2f |
1631 | 1631 | ||
1632 | addi a1, a0, -(2 << (DCACHE_ALIAS_ORDER + PAGE_SHIFT)) | 1632 | addi a1, a0, -(2 << (DCACHE_ALIAS_ORDER + PAGE_SHIFT)) |
@@ -1635,7 +1635,7 @@ ENTRY(fast_second_level_miss) | |||
1635 | /* Check if we have to restore an ITLB mapping. */ | 1635 | /* Check if we have to restore an ITLB mapping. */ |
1636 | 1636 | ||
1637 | movi a1, __tlbtemp_mapping_itlb | 1637 | movi a1, __tlbtemp_mapping_itlb |
1638 | rsr a3, EPC_1 | 1638 | rsr a3, epc1 |
1639 | sub a3, a3, a1 | 1639 | sub a3, a3, a1 |
1640 | 1640 | ||
1641 | /* Calculate VPN */ | 1641 | /* Calculate VPN */ |
@@ -1671,13 +1671,13 @@ ENTRY(fast_second_level_miss) | |||
1671 | 2: /* Invalid PGD, default exception handling */ | 1671 | 2: /* Invalid PGD, default exception handling */ |
1672 | 1672 | ||
1673 | movi a3, exc_table | 1673 | movi a3, exc_table |
1674 | rsr a1, DEPC | 1674 | rsr a1, depc |
1675 | xsr a3, EXCSAVE_1 | 1675 | xsr a3, excsave1 |
1676 | s32i a1, a2, PT_AREG2 | 1676 | s32i a1, a2, PT_AREG2 |
1677 | s32i a3, a2, PT_AREG3 | 1677 | s32i a3, a2, PT_AREG3 |
1678 | mov a1, a2 | 1678 | mov a1, a2 |
1679 | 1679 | ||
1680 | rsr a2, PS | 1680 | rsr a2, ps |
1681 | bbsi.l a2, PS_UM_BIT, 1f | 1681 | bbsi.l a2, PS_UM_BIT, 1f |
1682 | j _kernel_exception | 1682 | j _kernel_exception |
1683 | 1: j _user_exception | 1683 | 1: j _user_exception |
@@ -1712,7 +1712,7 @@ ENTRY(fast_store_prohibited) | |||
1712 | l32i a0, a1, TASK_MM # tsk->mm | 1712 | l32i a0, a1, TASK_MM # tsk->mm |
1713 | beqz a0, 9f | 1713 | beqz a0, 9f |
1714 | 1714 | ||
1715 | 8: rsr a1, EXCVADDR # fault address | 1715 | 8: rsr a1, excvaddr # fault address |
1716 | _PGD_OFFSET(a0, a1, a4) | 1716 | _PGD_OFFSET(a0, a1, a4) |
1717 | l32i a0, a0, 0 | 1717 | l32i a0, a0, 0 |
1718 | beqz a0, 2f | 1718 | beqz a0, 2f |
@@ -1725,7 +1725,7 @@ ENTRY(fast_store_prohibited) | |||
1725 | 1725 | ||
1726 | movi a1, _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_HW_WRITE | 1726 | movi a1, _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_HW_WRITE |
1727 | or a4, a4, a1 | 1727 | or a4, a4, a1 |
1728 | rsr a1, EXCVADDR | 1728 | rsr a1, excvaddr |
1729 | s32i a4, a0, 0 | 1729 | s32i a4, a0, 0 |
1730 | 1730 | ||
1731 | /* We need to flush the cache if we have page coloring. */ | 1731 | /* We need to flush the cache if we have page coloring. */ |
@@ -1749,15 +1749,15 @@ ENTRY(fast_store_prohibited) | |||
1749 | 1749 | ||
1750 | /* Restore excsave1 and a3. */ | 1750 | /* Restore excsave1 and a3. */ |
1751 | 1751 | ||
1752 | xsr a3, EXCSAVE_1 | 1752 | xsr a3, excsave1 |
1753 | bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f | 1753 | bgeui a2, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f |
1754 | 1754 | ||
1755 | rsr a2, DEPC | 1755 | rsr a2, depc |
1756 | rfe | 1756 | rfe |
1757 | 1757 | ||
1758 | /* Double exception. Restore FIXUP handler and return. */ | 1758 | /* Double exception. Restore FIXUP handler and return. */ |
1759 | 1759 | ||
1760 | 1: xsr a2, DEPC | 1760 | 1: xsr a2, depc |
1761 | esync | 1761 | esync |
1762 | rfde | 1762 | rfde |
1763 | 1763 | ||
@@ -1766,14 +1766,14 @@ ENTRY(fast_store_prohibited) | |||
1766 | 1766 | ||
1767 | 2: /* If there was a problem, handle fault in C */ | 1767 | 2: /* If there was a problem, handle fault in C */ |
1768 | 1768 | ||
1769 | rsr a4, DEPC # still holds a2 | 1769 | rsr a4, depc # still holds a2 |
1770 | xsr a3, EXCSAVE_1 | 1770 | xsr a3, excsave1 |
1771 | s32i a4, a2, PT_AREG2 | 1771 | s32i a4, a2, PT_AREG2 |
1772 | s32i a3, a2, PT_AREG3 | 1772 | s32i a3, a2, PT_AREG3 |
1773 | l32i a4, a2, PT_AREG4 | 1773 | l32i a4, a2, PT_AREG4 |
1774 | mov a1, a2 | 1774 | mov a1, a2 |
1775 | 1775 | ||
1776 | rsr a2, PS | 1776 | rsr a2, ps |
1777 | bbsi.l a2, PS_UM_BIT, 1f | 1777 | bbsi.l a2, PS_UM_BIT, 1f |
1778 | j _kernel_exception | 1778 | j _kernel_exception |
1779 | 1: j _user_exception | 1779 | 1: j _user_exception |
@@ -1833,50 +1833,6 @@ ENTRY(system_call) | |||
1833 | 1833 | ||
1834 | 1834 | ||
1835 | /* | 1835 | /* |
1836 | * Create a kernel thread | ||
1837 | * | ||
1838 | * int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | ||
1839 | * a2 a2 a3 a4 | ||
1840 | */ | ||
1841 | |||
1842 | ENTRY(kernel_thread) | ||
1843 | entry a1, 16 | ||
1844 | |||
1845 | mov a5, a2 # preserve fn over syscall | ||
1846 | mov a7, a3 # preserve args over syscall | ||
1847 | |||
1848 | movi a3, _CLONE_VM | _CLONE_UNTRACED | ||
1849 | movi a2, __NR_clone | ||
1850 | or a6, a4, a3 # arg0: flags | ||
1851 | mov a3, a1 # arg1: sp | ||
1852 | syscall | ||
1853 | |||
1854 | beq a3, a1, 1f # branch if parent | ||
1855 | mov a6, a7 # args | ||
1856 | callx4 a5 # fn(args) | ||
1857 | |||
1858 | movi a2, __NR_exit | ||
1859 | syscall # return value of fn(args) still in a6 | ||
1860 | |||
1861 | 1: retw | ||
1862 | |||
1863 | /* | ||
1864 | * Do a system call from kernel instead of calling sys_execve, so we end up | ||
1865 | * with proper pt_regs. | ||
1866 | * | ||
1867 | * int kernel_execve(const char *fname, char *const argv[], charg *const envp[]) | ||
1868 | * a2 a2 a3 a4 | ||
1869 | */ | ||
1870 | |||
1871 | ENTRY(kernel_execve) | ||
1872 | entry a1, 16 | ||
1873 | mov a6, a2 # arg0 is in a6 | ||
1874 | movi a2, __NR_execve | ||
1875 | syscall | ||
1876 | |||
1877 | retw | ||
1878 | |||
1879 | /* | ||
1880 | * Task switch. | 1836 | * Task switch. |
1881 | * | 1837 | * |
1882 | * struct task* _switch_to (struct task* prev, struct task* next) | 1838 | * struct task* _switch_to (struct task* prev, struct task* next) |
@@ -1901,8 +1857,8 @@ ENTRY(_switch_to) | |||
1901 | /* Disable ints while we manipulate the stack pointer. */ | 1857 | /* Disable ints while we manipulate the stack pointer. */ |
1902 | 1858 | ||
1903 | movi a14, (1 << PS_EXCM_BIT) | LOCKLEVEL | 1859 | movi a14, (1 << PS_EXCM_BIT) | LOCKLEVEL |
1904 | xsr a14, PS | 1860 | xsr a14, ps |
1905 | rsr a3, EXCSAVE_1 | 1861 | rsr a3, excsave1 |
1906 | rsync | 1862 | rsync |
1907 | s32i a3, a3, EXC_TABLE_FIXUP /* enter critical section */ | 1863 | s32i a3, a3, EXC_TABLE_FIXUP /* enter critical section */ |
1908 | 1864 | ||
@@ -1910,7 +1866,7 @@ ENTRY(_switch_to) | |||
1910 | 1866 | ||
1911 | #if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS) | 1867 | #if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS) |
1912 | l32i a3, a5, THREAD_CPENABLE | 1868 | l32i a3, a5, THREAD_CPENABLE |
1913 | xsr a3, CPENABLE | 1869 | xsr a3, cpenable |
1914 | s32i a3, a4, THREAD_CPENABLE | 1870 | s32i a3, a4, THREAD_CPENABLE |
1915 | #endif | 1871 | #endif |
1916 | 1872 | ||
@@ -1924,7 +1880,7 @@ ENTRY(_switch_to) | |||
1924 | * we return from kernel space. | 1880 | * we return from kernel space. |
1925 | */ | 1881 | */ |
1926 | 1882 | ||
1927 | rsr a3, EXCSAVE_1 # exc_table | 1883 | rsr a3, excsave1 # exc_table |
1928 | movi a6, 0 | 1884 | movi a6, 0 |
1929 | addi a7, a5, PT_REGS_OFFSET | 1885 | addi a7, a5, PT_REGS_OFFSET |
1930 | s32i a6, a3, EXC_TABLE_FIXUP | 1886 | s32i a6, a3, EXC_TABLE_FIXUP |
@@ -1937,7 +1893,7 @@ ENTRY(_switch_to) | |||
1937 | 1893 | ||
1938 | load_xtregs_user a5 a6 a8 a9 a10 a11 THREAD_XTREGS_USER | 1894 | load_xtregs_user a5 a6 a8 a9 a10 a11 THREAD_XTREGS_USER |
1939 | 1895 | ||
1940 | wsr a14, PS | 1896 | wsr a14, ps |
1941 | mov a2, a12 # return 'prev' | 1897 | mov a2, a12 # return 'prev' |
1942 | rsync | 1898 | rsync |
1943 | 1899 | ||
@@ -1958,3 +1914,16 @@ ENTRY(ret_from_fork) | |||
1958 | 1914 | ||
1959 | j common_exception_return | 1915 | j common_exception_return |
1960 | 1916 | ||
1917 | /* | ||
1918 | * Kernel thread creation helper | ||
1919 | * On entry, set up by copy_thread: a2 = thread_fn, a3 = thread_fn arg | ||
1920 | * left from _switch_to: a6 = prev | ||
1921 | */ | ||
1922 | ENTRY(ret_from_kernel_thread) | ||
1923 | |||
1924 | call4 schedule_tail | ||
1925 | mov a6, a3 | ||
1926 | callx4 a2 | ||
1927 | j common_exception_return | ||
1928 | |||
1929 | ENDPROC(ret_from_kernel_thread) | ||
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S index 3ef91a73652d..bdc50788f35e 100644 --- a/arch/xtensa/kernel/head.S +++ b/arch/xtensa/kernel/head.S | |||
@@ -61,18 +61,18 @@ _startup: | |||
61 | /* Disable interrupts and exceptions. */ | 61 | /* Disable interrupts and exceptions. */ |
62 | 62 | ||
63 | movi a0, LOCKLEVEL | 63 | movi a0, LOCKLEVEL |
64 | wsr a0, PS | 64 | wsr a0, ps |
65 | 65 | ||
66 | /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */ | 66 | /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */ |
67 | 67 | ||
68 | wsr a2, EXCSAVE_1 | 68 | wsr a2, excsave1 |
69 | 69 | ||
70 | /* Start with a fresh windowbase and windowstart. */ | 70 | /* Start with a fresh windowbase and windowstart. */ |
71 | 71 | ||
72 | movi a1, 1 | 72 | movi a1, 1 |
73 | movi a0, 0 | 73 | movi a0, 0 |
74 | wsr a1, WINDOWSTART | 74 | wsr a1, windowstart |
75 | wsr a0, WINDOWBASE | 75 | wsr a0, windowbase |
76 | rsync | 76 | rsync |
77 | 77 | ||
78 | /* Set a0 to 0 for the remaining initialization. */ | 78 | /* Set a0 to 0 for the remaining initialization. */ |
@@ -82,46 +82,46 @@ _startup: | |||
82 | /* Clear debugging registers. */ | 82 | /* Clear debugging registers. */ |
83 | 83 | ||
84 | #if XCHAL_HAVE_DEBUG | 84 | #if XCHAL_HAVE_DEBUG |
85 | wsr a0, IBREAKENABLE | 85 | wsr a0, ibreakenable |
86 | wsr a0, ICOUNT | 86 | wsr a0, icount |
87 | movi a1, 15 | 87 | movi a1, 15 |
88 | wsr a0, ICOUNTLEVEL | 88 | wsr a0, icountlevel |
89 | 89 | ||
90 | .set _index, 0 | 90 | .set _index, 0 |
91 | .rept XCHAL_NUM_DBREAK - 1 | 91 | .rept XCHAL_NUM_DBREAK - 1 |
92 | wsr a0, DBREAKC + _index | 92 | wsr a0, SREG_DBREAKC + _index |
93 | .set _index, _index + 1 | 93 | .set _index, _index + 1 |
94 | .endr | 94 | .endr |
95 | #endif | 95 | #endif |
96 | 96 | ||
97 | /* Clear CCOUNT (not really necessary, but nice) */ | 97 | /* Clear CCOUNT (not really necessary, but nice) */ |
98 | 98 | ||
99 | wsr a0, CCOUNT # not really necessary, but nice | 99 | wsr a0, ccount # not really necessary, but nice |
100 | 100 | ||
101 | /* Disable zero-loops. */ | 101 | /* Disable zero-loops. */ |
102 | 102 | ||
103 | #if XCHAL_HAVE_LOOPS | 103 | #if XCHAL_HAVE_LOOPS |
104 | wsr a0, LCOUNT | 104 | wsr a0, lcount |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | /* Disable all timers. */ | 107 | /* Disable all timers. */ |
108 | 108 | ||
109 | .set _index, 0 | 109 | .set _index, 0 |
110 | .rept XCHAL_NUM_TIMERS - 1 | 110 | .rept XCHAL_NUM_TIMERS - 1 |
111 | wsr a0, CCOMPARE + _index | 111 | wsr a0, SREG_CCOMPARE + _index |
112 | .set _index, _index + 1 | 112 | .set _index, _index + 1 |
113 | .endr | 113 | .endr |
114 | 114 | ||
115 | /* Interrupt initialization. */ | 115 | /* Interrupt initialization. */ |
116 | 116 | ||
117 | movi a2, XCHAL_INTTYPE_MASK_SOFTWARE | XCHAL_INTTYPE_MASK_EXTERN_EDGE | 117 | movi a2, XCHAL_INTTYPE_MASK_SOFTWARE | XCHAL_INTTYPE_MASK_EXTERN_EDGE |
118 | wsr a0, INTENABLE | 118 | wsr a0, intenable |
119 | wsr a2, INTCLEAR | 119 | wsr a2, intclear |
120 | 120 | ||
121 | /* Disable coprocessors. */ | 121 | /* Disable coprocessors. */ |
122 | 122 | ||
123 | #if XCHAL_CP_NUM > 0 | 123 | #if XCHAL_CP_NUM > 0 |
124 | wsr a0, CPENABLE | 124 | wsr a0, cpenable |
125 | #endif | 125 | #endif |
126 | 126 | ||
127 | /* Set PS.INTLEVEL=1, PS.WOE=0, kernel stack, PS.EXCM=0 | 127 | /* Set PS.INTLEVEL=1, PS.WOE=0, kernel stack, PS.EXCM=0 |
@@ -132,7 +132,7 @@ _startup: | |||
132 | */ | 132 | */ |
133 | 133 | ||
134 | movi a1, 1 | 134 | movi a1, 1 |
135 | wsr a1, PS | 135 | wsr a1, ps |
136 | rsync | 136 | rsync |
137 | 137 | ||
138 | /* Initialize the caches. | 138 | /* Initialize the caches. |
@@ -206,18 +206,18 @@ _startup: | |||
206 | addi a1, a1, KERNEL_STACK_SIZE | 206 | addi a1, a1, KERNEL_STACK_SIZE |
207 | 207 | ||
208 | movi a2, 0x00040001 # WOE=1, INTLEVEL=1, UM=0 | 208 | movi a2, 0x00040001 # WOE=1, INTLEVEL=1, UM=0 |
209 | wsr a2, PS # (enable reg-windows; progmode stack) | 209 | wsr a2, ps # (enable reg-windows; progmode stack) |
210 | rsync | 210 | rsync |
211 | 211 | ||
212 | /* Set up EXCSAVE[DEBUGLEVEL] to point to the Debug Exception Handler.*/ | 212 | /* Set up EXCSAVE[DEBUGLEVEL] to point to the Debug Exception Handler.*/ |
213 | 213 | ||
214 | movi a2, debug_exception | 214 | movi a2, debug_exception |
215 | wsr a2, EXCSAVE + XCHAL_DEBUGLEVEL | 215 | wsr a2, SREG_EXCSAVE + XCHAL_DEBUGLEVEL |
216 | 216 | ||
217 | /* Set up EXCSAVE[1] to point to the exc_table. */ | 217 | /* Set up EXCSAVE[1] to point to the exc_table. */ |
218 | 218 | ||
219 | movi a6, exc_table | 219 | movi a6, exc_table |
220 | xsr a6, EXCSAVE_1 | 220 | xsr a6, excsave1 |
221 | 221 | ||
222 | /* init_arch kick-starts the linux kernel */ | 222 | /* init_arch kick-starts the linux kernel */ |
223 | 223 | ||
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index 98e77c3ef1c3..a6ce3e563739 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -72,13 +72,13 @@ int arch_show_interrupts(struct seq_file *p, int prec) | |||
72 | static void xtensa_irq_mask(struct irq_data *d) | 72 | static void xtensa_irq_mask(struct irq_data *d) |
73 | { | 73 | { |
74 | cached_irq_mask &= ~(1 << d->irq); | 74 | cached_irq_mask &= ~(1 << d->irq); |
75 | set_sr (cached_irq_mask, INTENABLE); | 75 | set_sr (cached_irq_mask, intenable); |
76 | } | 76 | } |
77 | 77 | ||
78 | static void xtensa_irq_unmask(struct irq_data *d) | 78 | static void xtensa_irq_unmask(struct irq_data *d) |
79 | { | 79 | { |
80 | cached_irq_mask |= 1 << d->irq; | 80 | cached_irq_mask |= 1 << d->irq; |
81 | set_sr (cached_irq_mask, INTENABLE); | 81 | set_sr (cached_irq_mask, intenable); |
82 | } | 82 | } |
83 | 83 | ||
84 | static void xtensa_irq_enable(struct irq_data *d) | 84 | static void xtensa_irq_enable(struct irq_data *d) |
@@ -95,7 +95,7 @@ static void xtensa_irq_disable(struct irq_data *d) | |||
95 | 95 | ||
96 | static void xtensa_irq_ack(struct irq_data *d) | 96 | static void xtensa_irq_ack(struct irq_data *d) |
97 | { | 97 | { |
98 | set_sr(1 << d->irq, INTCLEAR); | 98 | set_sr(1 << d->irq, intclear); |
99 | } | 99 | } |
100 | 100 | ||
101 | static int xtensa_irq_retrigger(struct irq_data *d) | 101 | static int xtensa_irq_retrigger(struct irq_data *d) |
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index bc020825cce5..09ae7bfab9a7 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <asm/regs.h> | 45 | #include <asm/regs.h> |
46 | 46 | ||
47 | extern void ret_from_fork(void); | 47 | extern void ret_from_fork(void); |
48 | extern void ret_from_kernel_thread(void); | ||
48 | 49 | ||
49 | struct task_struct *current_set[NR_CPUS] = {&init_task, }; | 50 | struct task_struct *current_set[NR_CPUS] = {&init_task, }; |
50 | 51 | ||
@@ -158,64 +159,123 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) | |||
158 | /* | 159 | /* |
159 | * Copy thread. | 160 | * Copy thread. |
160 | * | 161 | * |
162 | * There are two modes in which this function is called: | ||
163 | * 1) Userspace thread creation, | ||
164 | * regs != NULL, usp_thread_fn is userspace stack pointer. | ||
165 | * It is expected to copy parent regs (in case CLONE_VM is not set | ||
166 | * in the clone_flags) and set up passed usp in the childregs. | ||
167 | * 2) Kernel thread creation, | ||
168 | * regs == NULL, usp_thread_fn is the function to run in the new thread | ||
169 | * and thread_fn_arg is its parameter. | ||
170 | * childregs are not used for the kernel threads. | ||
171 | * | ||
161 | * The stack layout for the new thread looks like this: | 172 | * The stack layout for the new thread looks like this: |
162 | * | 173 | * |
163 | * +------------------------+ <- sp in childregs (= tos) | 174 | * +------------------------+ |
164 | * | childregs | | 175 | * | childregs | |
165 | * +------------------------+ <- thread.sp = sp in dummy-frame | 176 | * +------------------------+ <- thread.sp = sp in dummy-frame |
166 | * | dummy-frame | (saved in dummy-frame spill-area) | 177 | * | dummy-frame | (saved in dummy-frame spill-area) |
167 | * +------------------------+ | 178 | * +------------------------+ |
168 | * | 179 | * |
169 | * We create a dummy frame to return to ret_from_fork: | 180 | * We create a dummy frame to return to either ret_from_fork or |
170 | * a0 points to ret_from_fork (simulating a call4) | 181 | * ret_from_kernel_thread: |
182 | * a0 points to ret_from_fork/ret_from_kernel_thread (simulating a call4) | ||
171 | * sp points to itself (thread.sp) | 183 | * sp points to itself (thread.sp) |
172 | * a2, a3 are unused. | 184 | * a2, a3 are unused for userspace threads, |
185 | * a2 points to thread_fn, a3 holds thread_fn arg for kernel threads. | ||
173 | * | 186 | * |
174 | * Note: This is a pristine frame, so we don't need any spill region on top of | 187 | * Note: This is a pristine frame, so we don't need any spill region on top of |
175 | * childregs. | 188 | * childregs. |
189 | * | ||
190 | * The fun part: if we're keeping the same VM (i.e. cloning a thread, | ||
191 | * not an entire process), we're normally given a new usp, and we CANNOT share | ||
192 | * any live address register windows. If we just copy those live frames over, | ||
193 | * the two threads (parent and child) will overflow the same frames onto the | ||
194 | * parent stack at different times, likely corrupting the parent stack (esp. | ||
195 | * if the parent returns from functions that called clone() and calls new | ||
196 | * ones, before the child overflows its now old copies of its parent windows). | ||
197 | * One solution is to spill windows to the parent stack, but that's fairly | ||
198 | * involved. Much simpler to just not copy those live frames across. | ||
176 | */ | 199 | */ |
177 | 200 | ||
178 | int copy_thread(unsigned long clone_flags, unsigned long usp, | 201 | int copy_thread(unsigned long clone_flags, unsigned long usp_thread_fn, |
179 | unsigned long unused, | 202 | unsigned long thread_fn_arg, |
180 | struct task_struct * p, struct pt_regs * regs) | 203 | struct task_struct *p, struct pt_regs *unused) |
181 | { | 204 | { |
182 | struct pt_regs *childregs; | 205 | struct pt_regs *childregs = task_pt_regs(p); |
183 | struct thread_info *ti; | ||
184 | unsigned long tos; | ||
185 | int user_mode = user_mode(regs); | ||
186 | |||
187 | /* Set up new TSS. */ | ||
188 | tos = (unsigned long)task_stack_page(p) + THREAD_SIZE; | ||
189 | if (user_mode) | ||
190 | childregs = (struct pt_regs*)(tos - PT_USER_SIZE); | ||
191 | else | ||
192 | childregs = (struct pt_regs*)tos - 1; | ||
193 | 206 | ||
194 | *childregs = *regs; | 207 | #if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS) |
208 | struct thread_info *ti; | ||
209 | #endif | ||
195 | 210 | ||
196 | /* Create a call4 dummy-frame: a0 = 0, a1 = childregs. */ | 211 | /* Create a call4 dummy-frame: a0 = 0, a1 = childregs. */ |
197 | *((int*)childregs - 3) = (unsigned long)childregs; | 212 | *((int*)childregs - 3) = (unsigned long)childregs; |
198 | *((int*)childregs - 4) = 0; | 213 | *((int*)childregs - 4) = 0; |
199 | 214 | ||
200 | childregs->areg[1] = tos; | ||
201 | childregs->areg[2] = 0; | ||
202 | p->set_child_tid = p->clear_child_tid = NULL; | ||
203 | p->thread.ra = MAKE_RA_FOR_CALL((unsigned long)ret_from_fork, 0x1); | ||
204 | p->thread.sp = (unsigned long)childregs; | 215 | p->thread.sp = (unsigned long)childregs; |
205 | 216 | ||
206 | if (user_mode(regs)) { | 217 | if (!(p->flags & PF_KTHREAD)) { |
218 | struct pt_regs *regs = current_pt_regs(); | ||
219 | unsigned long usp = usp_thread_fn ? | ||
220 | usp_thread_fn : regs->areg[1]; | ||
207 | 221 | ||
208 | int len = childregs->wmask & ~0xf; | 222 | p->thread.ra = MAKE_RA_FOR_CALL( |
223 | (unsigned long)ret_from_fork, 0x1); | ||
224 | |||
225 | /* This does not copy all the regs. | ||
226 | * In a bout of brilliance or madness, | ||
227 | * ARs beyond a0-a15 exist past the end of the struct. | ||
228 | */ | ||
229 | *childregs = *regs; | ||
209 | childregs->areg[1] = usp; | 230 | childregs->areg[1] = usp; |
210 | memcpy(&childregs->areg[XCHAL_NUM_AREGS - len/4], | 231 | childregs->areg[2] = 0; |
211 | ®s->areg[XCHAL_NUM_AREGS - len/4], len); | 232 | |
233 | /* When sharing memory with the parent thread, the child | ||
234 | usually starts on a pristine stack, so we have to reset | ||
235 | windowbase, windowstart and wmask. | ||
236 | (Note that such a new thread is required to always create | ||
237 | an initial call4 frame) | ||
238 | The exception is vfork, where the new thread continues to | ||
239 | run on the parent's stack until it calls execve. This could | ||
240 | be a call8 or call12, which requires a legal stack frame | ||
241 | of the previous caller for the overflow handlers to work. | ||
242 | (Note that it's always legal to overflow live registers). | ||
243 | In this case, ensure to spill at least the stack pointer | ||
244 | of that frame. */ | ||
245 | |||
246 | if (clone_flags & CLONE_VM) { | ||
247 | /* check that caller window is live and same stack */ | ||
248 | int len = childregs->wmask & ~0xf; | ||
249 | if (regs->areg[1] == usp && len != 0) { | ||
250 | int callinc = (regs->areg[0] >> 30) & 3; | ||
251 | int caller_ars = XCHAL_NUM_AREGS - callinc * 4; | ||
252 | put_user(regs->areg[caller_ars+1], | ||
253 | (unsigned __user*)(usp - 12)); | ||
254 | } | ||
255 | childregs->wmask = 1; | ||
256 | childregs->windowstart = 1; | ||
257 | childregs->windowbase = 0; | ||
258 | } else { | ||
259 | int len = childregs->wmask & ~0xf; | ||
260 | memcpy(&childregs->areg[XCHAL_NUM_AREGS - len/4], | ||
261 | ®s->areg[XCHAL_NUM_AREGS - len/4], len); | ||
262 | } | ||
212 | // FIXME: we need to set THREADPTR in thread_info... | 263 | // FIXME: we need to set THREADPTR in thread_info... |
213 | if (clone_flags & CLONE_SETTLS) | 264 | if (clone_flags & CLONE_SETTLS) |
214 | childregs->areg[2] = childregs->areg[6]; | 265 | childregs->areg[2] = childregs->areg[6]; |
215 | |||
216 | } else { | 266 | } else { |
217 | /* In kernel space, we start a new thread with a new stack. */ | 267 | p->thread.ra = MAKE_RA_FOR_CALL( |
218 | childregs->wmask = 1; | 268 | (unsigned long)ret_from_kernel_thread, 1); |
269 | |||
270 | /* pass parameters to ret_from_kernel_thread: | ||
271 | * a2 = thread_fn, a3 = thread_fn arg | ||
272 | */ | ||
273 | *((int *)childregs - 1) = thread_fn_arg; | ||
274 | *((int *)childregs - 2) = usp_thread_fn; | ||
275 | |||
276 | /* Childregs are only used when we're going to userspace | ||
277 | * in which case start_thread will set them up. | ||
278 | */ | ||
219 | } | 279 | } |
220 | 280 | ||
221 | #if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS) | 281 | #if (XTENSA_HAVE_COPROCESSORS || XTENSA_HAVE_IO_PORTS) |
@@ -311,32 +371,5 @@ long xtensa_clone(unsigned long clone_flags, unsigned long newsp, | |||
311 | void __user *child_tid, long a5, | 371 | void __user *child_tid, long a5, |
312 | struct pt_regs *regs) | 372 | struct pt_regs *regs) |
313 | { | 373 | { |
314 | if (!newsp) | ||
315 | newsp = regs->areg[1]; | ||
316 | return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); | 374 | return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); |
317 | } | 375 | } |
318 | |||
319 | /* | ||
320 | * xtensa_execve() executes a new program. | ||
321 | */ | ||
322 | |||
323 | asmlinkage | ||
324 | long xtensa_execve(const char __user *name, | ||
325 | const char __user *const __user *argv, | ||
326 | const char __user *const __user *envp, | ||
327 | long a3, long a4, long a5, | ||
328 | struct pt_regs *regs) | ||
329 | { | ||
330 | long error; | ||
331 | struct filename *filename; | ||
332 | |||
333 | filename = getname(name); | ||
334 | error = PTR_ERR(filename); | ||
335 | if (IS_ERR(filename)) | ||
336 | goto out; | ||
337 | error = do_execve(filename->name, argv, envp, regs); | ||
338 | putname(filename); | ||
339 | out: | ||
340 | return error; | ||
341 | } | ||
342 | |||
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 270360d9806c..b237988ba6d7 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
@@ -100,7 +100,7 @@ typedef struct tagtable { | |||
100 | } tagtable_t; | 100 | } tagtable_t; |
101 | 101 | ||
102 | #define __tagtable(tag, fn) static tagtable_t __tagtable_##fn \ | 102 | #define __tagtable(tag, fn) static tagtable_t __tagtable_##fn \ |
103 | __attribute__((unused, __section__(".taglist"))) = { tag, fn } | 103 | __attribute__((used, section(".taglist"))) = { tag, fn } |
104 | 104 | ||
105 | /* parse current tag */ | 105 | /* parse current tag */ |
106 | 106 | ||
@@ -120,7 +120,7 @@ static int __init parse_tag_mem(const bp_tag_t *tag) | |||
120 | } | 120 | } |
121 | sysmem.bank[sysmem.nr_banks].type = mi->type; | 121 | sysmem.bank[sysmem.nr_banks].type = mi->type; |
122 | sysmem.bank[sysmem.nr_banks].start = PAGE_ALIGN(mi->start); | 122 | sysmem.bank[sysmem.nr_banks].start = PAGE_ALIGN(mi->start); |
123 | sysmem.bank[sysmem.nr_banks].end = mi->end & PAGE_SIZE; | 123 | sysmem.bank[sysmem.nr_banks].end = mi->end & PAGE_MASK; |
124 | sysmem.nr_banks++; | 124 | sysmem.nr_banks++; |
125 | 125 | ||
126 | return 0; | 126 | return 0; |
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c index 05b3f093d5d7..5702065f472a 100644 --- a/arch/xtensa/kernel/syscall.c +++ b/arch/xtensa/kernel/syscall.c | |||
@@ -32,11 +32,8 @@ typedef void (*syscall_t)(void); | |||
32 | syscall_t sys_call_table[__NR_syscall_count] /* FIXME __cacheline_aligned */= { | 32 | syscall_t sys_call_table[__NR_syscall_count] /* FIXME __cacheline_aligned */= { |
33 | [0 ... __NR_syscall_count - 1] = (syscall_t)&sys_ni_syscall, | 33 | [0 ... __NR_syscall_count - 1] = (syscall_t)&sys_ni_syscall, |
34 | 34 | ||
35 | #undef __SYSCALL | ||
36 | #define __SYSCALL(nr,symbol,nargs) [ nr ] = (syscall_t)symbol, | 35 | #define __SYSCALL(nr,symbol,nargs) [ nr ] = (syscall_t)symbol, |
37 | #undef _XTENSA_UNISTD_H | 36 | #include <uapi/asm/unistd.h> |
38 | #undef __KERNEL_SYSCALLS__ | ||
39 | #include <asm/unistd.h> | ||
40 | }; | 37 | }; |
41 | 38 | ||
42 | asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) | 39 | asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) |
@@ -50,7 +47,8 @@ asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) | |||
50 | return (long)ret; | 47 | return (long)ret; |
51 | } | 48 | } |
52 | 49 | ||
53 | asmlinkage long xtensa_fadvise64_64(int fd, int advice, unsigned long long offset, unsigned long long len) | 50 | asmlinkage long xtensa_fadvise64_64(int fd, int advice, |
51 | unsigned long long offset, unsigned long long len) | ||
54 | { | 52 | { |
55 | return sys_fadvise64_64(fd, offset, len, advice); | 53 | return sys_fadvise64_64(fd, offset, len, advice); |
56 | } | 54 | } |
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index bc1e14cf9369..5caf2b64d43a 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
@@ -97,7 +97,7 @@ static dispatch_init_table_t __initdata dispatch_init_table[] = { | |||
97 | /* EXCCAUSE_INTEGER_DIVIDE_BY_ZERO unhandled */ | 97 | /* EXCCAUSE_INTEGER_DIVIDE_BY_ZERO unhandled */ |
98 | /* EXCCAUSE_PRIVILEGED unhandled */ | 98 | /* EXCCAUSE_PRIVILEGED unhandled */ |
99 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION | 99 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION |
100 | #ifdef CONFIG_UNALIGNED_USER | 100 | #ifdef CONFIG_XTENSA_UNALIGNED_USER |
101 | { EXCCAUSE_UNALIGNED, USER, fast_unaligned }, | 101 | { EXCCAUSE_UNALIGNED, USER, fast_unaligned }, |
102 | #else | 102 | #else |
103 | { EXCCAUSE_UNALIGNED, 0, do_unaligned_user }, | 103 | { EXCCAUSE_UNALIGNED, 0, do_unaligned_user }, |
@@ -202,8 +202,8 @@ extern void do_IRQ(int, struct pt_regs *); | |||
202 | 202 | ||
203 | void do_interrupt (struct pt_regs *regs) | 203 | void do_interrupt (struct pt_regs *regs) |
204 | { | 204 | { |
205 | unsigned long intread = get_sr (INTREAD); | 205 | unsigned long intread = get_sr (interrupt); |
206 | unsigned long intenable = get_sr (INTENABLE); | 206 | unsigned long intenable = get_sr (intenable); |
207 | int i, mask; | 207 | int i, mask; |
208 | 208 | ||
209 | /* Handle all interrupts (no priorities). | 209 | /* Handle all interrupts (no priorities). |
@@ -213,7 +213,7 @@ void do_interrupt (struct pt_regs *regs) | |||
213 | 213 | ||
214 | for (i=0, mask = 1; i < XCHAL_NUM_INTERRUPTS; i++, mask <<= 1) { | 214 | for (i=0, mask = 1; i < XCHAL_NUM_INTERRUPTS; i++, mask <<= 1) { |
215 | if (mask & (intread & intenable)) { | 215 | if (mask & (intread & intenable)) { |
216 | set_sr (mask, INTCLEAR); | 216 | set_sr (mask, intclear); |
217 | do_IRQ (i,regs); | 217 | do_IRQ (i,regs); |
218 | } | 218 | } |
219 | } | 219 | } |
@@ -244,7 +244,7 @@ do_illegal_instruction(struct pt_regs *regs) | |||
244 | */ | 244 | */ |
245 | 245 | ||
246 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION | 246 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION |
247 | #ifndef CONFIG_UNALIGNED_USER | 247 | #ifndef CONFIG_XTENSA_UNALIGNED_USER |
248 | void | 248 | void |
249 | do_unaligned_user (struct pt_regs *regs) | 249 | do_unaligned_user (struct pt_regs *regs) |
250 | { | 250 | { |
@@ -339,7 +339,7 @@ void __init trap_init(void) | |||
339 | /* Initialize EXCSAVE_1 to hold the address of the exception table. */ | 339 | /* Initialize EXCSAVE_1 to hold the address of the exception table. */ |
340 | 340 | ||
341 | i = (unsigned long)exc_table; | 341 | i = (unsigned long)exc_table; |
342 | __asm__ __volatile__("wsr %0, "__stringify(EXCSAVE_1)"\n" : : "a" (i)); | 342 | __asm__ __volatile__("wsr %0, excsave1\n" : : "a" (i)); |
343 | } | 343 | } |
344 | 344 | ||
345 | /* | 345 | /* |
@@ -386,16 +386,16 @@ static inline void spill_registers(void) | |||
386 | unsigned int a0, ps; | 386 | unsigned int a0, ps; |
387 | 387 | ||
388 | __asm__ __volatile__ ( | 388 | __asm__ __volatile__ ( |
389 | "movi a14," __stringify (PS_EXCM_BIT) " | 1\n\t" | 389 | "movi a14, " __stringify(PS_EXCM_BIT | 1) "\n\t" |
390 | "mov a12, a0\n\t" | 390 | "mov a12, a0\n\t" |
391 | "rsr a13," __stringify(SAR) "\n\t" | 391 | "rsr a13, sar\n\t" |
392 | "xsr a14," __stringify(PS) "\n\t" | 392 | "xsr a14, ps\n\t" |
393 | "movi a0, _spill_registers\n\t" | 393 | "movi a0, _spill_registers\n\t" |
394 | "rsync\n\t" | 394 | "rsync\n\t" |
395 | "callx0 a0\n\t" | 395 | "callx0 a0\n\t" |
396 | "mov a0, a12\n\t" | 396 | "mov a0, a12\n\t" |
397 | "wsr a13," __stringify(SAR) "\n\t" | 397 | "wsr a13, sar\n\t" |
398 | "wsr a14," __stringify(PS) "\n\t" | 398 | "wsr a14, ps\n\t" |
399 | :: "a" (&a0), "a" (&ps) | 399 | :: "a" (&a0), "a" (&ps) |
400 | : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory"); | 400 | : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory"); |
401 | } | 401 | } |
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S index 70066e3582d0..4462c1e595c2 100644 --- a/arch/xtensa/kernel/vectors.S +++ b/arch/xtensa/kernel/vectors.S | |||
@@ -69,11 +69,11 @@ | |||
69 | 69 | ||
70 | ENTRY(_UserExceptionVector) | 70 | ENTRY(_UserExceptionVector) |
71 | 71 | ||
72 | xsr a3, EXCSAVE_1 # save a3 and get dispatch table | 72 | xsr a3, excsave1 # save a3 and get dispatch table |
73 | wsr a2, DEPC # save a2 | 73 | wsr a2, depc # save a2 |
74 | l32i a2, a3, EXC_TABLE_KSTK # load kernel stack to a2 | 74 | l32i a2, a3, EXC_TABLE_KSTK # load kernel stack to a2 |
75 | s32i a0, a2, PT_AREG0 # save a0 to ESF | 75 | s32i a0, a2, PT_AREG0 # save a0 to ESF |
76 | rsr a0, EXCCAUSE # retrieve exception cause | 76 | rsr a0, exccause # retrieve exception cause |
77 | s32i a0, a2, PT_DEPC # mark it as a regular exception | 77 | s32i a0, a2, PT_DEPC # mark it as a regular exception |
78 | addx4 a0, a0, a3 # find entry in table | 78 | addx4 a0, a0, a3 # find entry in table |
79 | l32i a0, a0, EXC_TABLE_FAST_USER # load handler | 79 | l32i a0, a0, EXC_TABLE_FAST_USER # load handler |
@@ -93,11 +93,11 @@ ENTRY(_UserExceptionVector) | |||
93 | 93 | ||
94 | ENTRY(_KernelExceptionVector) | 94 | ENTRY(_KernelExceptionVector) |
95 | 95 | ||
96 | xsr a3, EXCSAVE_1 # save a3, and get dispatch table | 96 | xsr a3, excsave1 # save a3, and get dispatch table |
97 | wsr a2, DEPC # save a2 | 97 | wsr a2, depc # save a2 |
98 | addi a2, a1, -16-PT_SIZE # adjust stack pointer | 98 | addi a2, a1, -16-PT_SIZE # adjust stack pointer |
99 | s32i a0, a2, PT_AREG0 # save a0 to ESF | 99 | s32i a0, a2, PT_AREG0 # save a0 to ESF |
100 | rsr a0, EXCCAUSE # retrieve exception cause | 100 | rsr a0, exccause # retrieve exception cause |
101 | s32i a0, a2, PT_DEPC # mark it as a regular exception | 101 | s32i a0, a2, PT_DEPC # mark it as a regular exception |
102 | addx4 a0, a0, a3 # find entry in table | 102 | addx4 a0, a0, a3 # find entry in table |
103 | l32i a0, a0, EXC_TABLE_FAST_KERNEL # load handler address | 103 | l32i a0, a0, EXC_TABLE_FAST_KERNEL # load handler address |
@@ -205,17 +205,17 @@ ENTRY(_DoubleExceptionVector) | |||
205 | 205 | ||
206 | /* Deliberately destroy excsave (don't assume it's value was valid). */ | 206 | /* Deliberately destroy excsave (don't assume it's value was valid). */ |
207 | 207 | ||
208 | wsr a3, EXCSAVE_1 # save a3 | 208 | wsr a3, excsave1 # save a3 |
209 | 209 | ||
210 | /* Check for kernel double exception (usually fatal). */ | 210 | /* Check for kernel double exception (usually fatal). */ |
211 | 211 | ||
212 | rsr a3, PS | 212 | rsr a3, ps |
213 | _bbci.l a3, PS_UM_BIT, .Lksp | 213 | _bbci.l a3, PS_UM_BIT, .Lksp |
214 | 214 | ||
215 | /* Check if we are currently handling a window exception. */ | 215 | /* Check if we are currently handling a window exception. */ |
216 | /* Note: We don't need to indicate that we enter a critical section. */ | 216 | /* Note: We don't need to indicate that we enter a critical section. */ |
217 | 217 | ||
218 | xsr a0, DEPC # get DEPC, save a0 | 218 | xsr a0, depc # get DEPC, save a0 |
219 | 219 | ||
220 | movi a3, XCHAL_WINDOW_VECTORS_VADDR | 220 | movi a3, XCHAL_WINDOW_VECTORS_VADDR |
221 | _bltu a0, a3, .Lfixup | 221 | _bltu a0, a3, .Lfixup |
@@ -243,21 +243,21 @@ ENTRY(_DoubleExceptionVector) | |||
243 | * Note: We can trash the current window frame (a0...a3) and depc! | 243 | * Note: We can trash the current window frame (a0...a3) and depc! |
244 | */ | 244 | */ |
245 | 245 | ||
246 | wsr a2, DEPC # save stack pointer temporarily | 246 | wsr a2, depc # save stack pointer temporarily |
247 | rsr a0, PS | 247 | rsr a0, ps |
248 | extui a0, a0, PS_OWB_SHIFT, 4 | 248 | extui a0, a0, PS_OWB_SHIFT, 4 |
249 | wsr a0, WINDOWBASE | 249 | wsr a0, windowbase |
250 | rsync | 250 | rsync |
251 | 251 | ||
252 | /* We are now in the previous window frame. Save registers again. */ | 252 | /* We are now in the previous window frame. Save registers again. */ |
253 | 253 | ||
254 | xsr a2, DEPC # save a2 and get stack pointer | 254 | xsr a2, depc # save a2 and get stack pointer |
255 | s32i a0, a2, PT_AREG0 | 255 | s32i a0, a2, PT_AREG0 |
256 | 256 | ||
257 | wsr a3, EXCSAVE_1 # save a3 | 257 | wsr a3, excsave1 # save a3 |
258 | movi a3, exc_table | 258 | movi a3, exc_table |
259 | 259 | ||
260 | rsr a0, EXCCAUSE | 260 | rsr a0, exccause |
261 | s32i a0, a2, PT_DEPC # mark it as a regular exception | 261 | s32i a0, a2, PT_DEPC # mark it as a regular exception |
262 | addx4 a0, a0, a3 | 262 | addx4 a0, a0, a3 |
263 | l32i a0, a0, EXC_TABLE_FAST_USER | 263 | l32i a0, a0, EXC_TABLE_FAST_USER |
@@ -290,14 +290,14 @@ ENTRY(_DoubleExceptionVector) | |||
290 | 290 | ||
291 | /* a0: depc, a1: a1, a2: kstk, a3: a2, depc: a0, excsave: a3 */ | 291 | /* a0: depc, a1: a1, a2: kstk, a3: a2, depc: a0, excsave: a3 */ |
292 | 292 | ||
293 | xsr a3, DEPC | 293 | xsr a3, depc |
294 | s32i a0, a2, PT_DEPC | 294 | s32i a0, a2, PT_DEPC |
295 | s32i a3, a2, PT_AREG0 | 295 | s32i a3, a2, PT_AREG0 |
296 | 296 | ||
297 | /* a0: avail, a1: a1, a2: kstk, a3: avail, depc: a2, excsave: a3 */ | 297 | /* a0: avail, a1: a1, a2: kstk, a3: avail, depc: a2, excsave: a3 */ |
298 | 298 | ||
299 | movi a3, exc_table | 299 | movi a3, exc_table |
300 | rsr a0, EXCCAUSE | 300 | rsr a0, exccause |
301 | addx4 a0, a0, a3 | 301 | addx4 a0, a0, a3 |
302 | l32i a0, a0, EXC_TABLE_FAST_USER | 302 | l32i a0, a0, EXC_TABLE_FAST_USER |
303 | jx a0 | 303 | jx a0 |
@@ -312,7 +312,7 @@ ENTRY(_DoubleExceptionVector) | |||
312 | 312 | ||
313 | .Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */ | 313 | .Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */ |
314 | 314 | ||
315 | rsr a3, EXCCAUSE | 315 | rsr a3, exccause |
316 | beqi a3, EXCCAUSE_ITLB_MISS, 1f | 316 | beqi a3, EXCCAUSE_ITLB_MISS, 1f |
317 | addi a3, a3, -EXCCAUSE_DTLB_MISS | 317 | addi a3, a3, -EXCCAUSE_DTLB_MISS |
318 | bnez a3, .Lunrecoverable | 318 | bnez a3, .Lunrecoverable |
@@ -328,11 +328,11 @@ ENTRY(_DoubleExceptionVector) | |||
328 | 328 | ||
329 | .Lunrecoverable_fixup: | 329 | .Lunrecoverable_fixup: |
330 | l32i a2, a3, EXC_TABLE_DOUBLE_SAVE | 330 | l32i a2, a3, EXC_TABLE_DOUBLE_SAVE |
331 | xsr a0, DEPC | 331 | xsr a0, depc |
332 | 332 | ||
333 | .Lunrecoverable: | 333 | .Lunrecoverable: |
334 | rsr a3, EXCSAVE_1 | 334 | rsr a3, excsave1 |
335 | wsr a0, EXCSAVE_1 | 335 | wsr a0, excsave1 |
336 | movi a0, unrecoverable_exception | 336 | movi a0, unrecoverable_exception |
337 | callx0 a0 | 337 | callx0 a0 |
338 | 338 | ||
@@ -349,7 +349,7 @@ ENTRY(_DoubleExceptionVector) | |||
349 | .section .DebugInterruptVector.text, "ax" | 349 | .section .DebugInterruptVector.text, "ax" |
350 | 350 | ||
351 | ENTRY(_DebugInterruptVector) | 351 | ENTRY(_DebugInterruptVector) |
352 | xsr a0, EXCSAVE + XCHAL_DEBUGLEVEL | 352 | xsr a0, SREG_EXCSAVE + XCHAL_DEBUGLEVEL |
353 | jx a0 | 353 | jx a0 |
354 | 354 | ||
355 | 355 | ||
diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c index a8b9f1fd1e17..afe058b24e6e 100644 --- a/arch/xtensa/kernel/xtensa_ksyms.c +++ b/arch/xtensa/kernel/xtensa_ksyms.c | |||
@@ -43,7 +43,6 @@ EXPORT_SYMBOL(__strncpy_user); | |||
43 | EXPORT_SYMBOL(clear_page); | 43 | EXPORT_SYMBOL(clear_page); |
44 | EXPORT_SYMBOL(copy_page); | 44 | EXPORT_SYMBOL(copy_page); |
45 | 45 | ||
46 | EXPORT_SYMBOL(kernel_thread); | ||
47 | EXPORT_SYMBOL(empty_zero_page); | 46 | EXPORT_SYMBOL(empty_zero_page); |
48 | 47 | ||
49 | /* | 48 | /* |
diff --git a/arch/xtensa/lib/memcopy.S b/arch/xtensa/lib/memcopy.S index ea59dcd03866..c48b80acb5f0 100644 --- a/arch/xtensa/lib/memcopy.S +++ b/arch/xtensa/lib/memcopy.S | |||
@@ -6,7 +6,7 @@ | |||
6 | * License. See the file "COPYING" in the main directory of this archive | 6 | * License. See the file "COPYING" in the main directory of this archive |
7 | * for more details. | 7 | * for more details. |
8 | * | 8 | * |
9 | * Copyright (C) 2002 - 2005 Tensilica Inc. | 9 | * Copyright (C) 2002 - 2012 Tensilica Inc. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <variant/core.h> | 12 | #include <variant/core.h> |
@@ -27,14 +27,11 @@ | |||
27 | #endif | 27 | #endif |
28 | .endm | 28 | .endm |
29 | 29 | ||
30 | |||
31 | /* | 30 | /* |
32 | * void *memcpy(void *dst, const void *src, size_t len); | 31 | * void *memcpy(void *dst, const void *src, size_t len); |
33 | * void *memmove(void *dst, const void *src, size_t len); | ||
34 | * void *bcopy(const void *src, void *dst, size_t len); | ||
35 | * | 32 | * |
36 | * This function is intended to do the same thing as the standard | 33 | * This function is intended to do the same thing as the standard |
37 | * library function memcpy() (or bcopy()) for most cases. | 34 | * library function memcpy() for most cases. |
38 | * However, where the source and/or destination references | 35 | * However, where the source and/or destination references |
39 | * an instruction RAM or ROM or a data RAM or ROM, that | 36 | * an instruction RAM or ROM or a data RAM or ROM, that |
40 | * source and/or destination will always be accessed with | 37 | * source and/or destination will always be accessed with |
@@ -45,9 +42,6 @@ | |||
45 | * !!!!!!! Handling of IRAM/IROM has not yet | 42 | * !!!!!!! Handling of IRAM/IROM has not yet |
46 | * !!!!!!! been implemented. | 43 | * !!!!!!! been implemented. |
47 | * | 44 | * |
48 | * The bcopy version is provided here to avoid the overhead | ||
49 | * of an extra call, for callers that require this convention. | ||
50 | * | ||
51 | * The (general case) algorithm is as follows: | 45 | * The (general case) algorithm is as follows: |
52 | * If destination is unaligned, align it by conditionally | 46 | * If destination is unaligned, align it by conditionally |
53 | * copying 1 and 2 bytes. | 47 | * copying 1 and 2 bytes. |
@@ -76,17 +70,6 @@ | |||
76 | */ | 70 | */ |
77 | 71 | ||
78 | .text | 72 | .text |
79 | .align 4 | ||
80 | .global bcopy | ||
81 | .type bcopy,@function | ||
82 | bcopy: | ||
83 | entry sp, 16 # minimal stack frame | ||
84 | # a2=src, a3=dst, a4=len | ||
85 | mov a5, a3 # copy dst so that a2 is return value | ||
86 | mov a3, a2 | ||
87 | mov a2, a5 | ||
88 | j .Lcommon # go to common code for memcpy+bcopy | ||
89 | |||
90 | 73 | ||
91 | /* | 74 | /* |
92 | * Byte by byte copy | 75 | * Byte by byte copy |
@@ -107,7 +90,7 @@ bcopy: | |||
107 | s8i a6, a5, 0 | 90 | s8i a6, a5, 0 |
108 | addi a5, a5, 1 | 91 | addi a5, a5, 1 |
109 | #if !XCHAL_HAVE_LOOPS | 92 | #if !XCHAL_HAVE_LOOPS |
110 | blt a3, a7, .Lnextbyte | 93 | bne a3, a7, .Lnextbyte # continue loop if $a3:src != $a7:src_end |
111 | #endif /* !XCHAL_HAVE_LOOPS */ | 94 | #endif /* !XCHAL_HAVE_LOOPS */ |
112 | .Lbytecopydone: | 95 | .Lbytecopydone: |
113 | retw | 96 | retw |
@@ -144,9 +127,6 @@ bcopy: | |||
144 | .global memcpy | 127 | .global memcpy |
145 | .type memcpy,@function | 128 | .type memcpy,@function |
146 | memcpy: | 129 | memcpy: |
147 | .global memmove | ||
148 | .type memmove,@function | ||
149 | memmove: | ||
150 | 130 | ||
151 | entry sp, 16 # minimal stack frame | 131 | entry sp, 16 # minimal stack frame |
152 | # a2/ dst, a3/ src, a4/ len | 132 | # a2/ dst, a3/ src, a4/ len |
@@ -182,7 +162,7 @@ memmove: | |||
182 | s32i a7, a5, 12 | 162 | s32i a7, a5, 12 |
183 | addi a5, a5, 16 | 163 | addi a5, a5, 16 |
184 | #if !XCHAL_HAVE_LOOPS | 164 | #if !XCHAL_HAVE_LOOPS |
185 | blt a3, a8, .Loop1 | 165 | bne a3, a8, .Loop1 # continue loop if a3:src != a8:src_end |
186 | #endif /* !XCHAL_HAVE_LOOPS */ | 166 | #endif /* !XCHAL_HAVE_LOOPS */ |
187 | .Loop1done: | 167 | .Loop1done: |
188 | bbci.l a4, 3, .L2 | 168 | bbci.l a4, 3, .L2 |
@@ -260,7 +240,7 @@ memmove: | |||
260 | s32i a9, a5, 12 | 240 | s32i a9, a5, 12 |
261 | addi a5, a5, 16 | 241 | addi a5, a5, 16 |
262 | #if !XCHAL_HAVE_LOOPS | 242 | #if !XCHAL_HAVE_LOOPS |
263 | blt a3, a10, .Loop2 | 243 | bne a3, a10, .Loop2 # continue loop if a3:src != a10:src_end |
264 | #endif /* !XCHAL_HAVE_LOOPS */ | 244 | #endif /* !XCHAL_HAVE_LOOPS */ |
265 | .Loop2done: | 245 | .Loop2done: |
266 | bbci.l a4, 3, .L12 | 246 | bbci.l a4, 3, .L12 |
@@ -305,6 +285,285 @@ memmove: | |||
305 | l8ui a6, a3, 0 | 285 | l8ui a6, a3, 0 |
306 | s8i a6, a5, 0 | 286 | s8i a6, a5, 0 |
307 | retw | 287 | retw |
288 | |||
289 | |||
290 | /* | ||
291 | * void bcopy(const void *src, void *dest, size_t n); | ||
292 | */ | ||
293 | .align 4 | ||
294 | .global bcopy | ||
295 | .type bcopy,@function | ||
296 | bcopy: | ||
297 | entry sp, 16 # minimal stack frame | ||
298 | # a2=src, a3=dst, a4=len | ||
299 | mov a5, a3 | ||
300 | mov a3, a2 | ||
301 | mov a2, a5 | ||
302 | j .Lmovecommon # go to common code for memmove+bcopy | ||
303 | |||
304 | /* | ||
305 | * void *memmove(void *dst, const void *src, size_t len); | ||
306 | * | ||
307 | * This function is intended to do the same thing as the standard | ||
308 | * library function memmove() for most cases. | ||
309 | * However, where the source and/or destination references | ||
310 | * an instruction RAM or ROM or a data RAM or ROM, that | ||
311 | * source and/or destination will always be accessed with | ||
312 | * 32-bit load and store instructions (as required for these | ||
313 | * types of devices). | ||
314 | * | ||
315 | * !!!!!!! XTFIXME: | ||
316 | * !!!!!!! Handling of IRAM/IROM has not yet | ||
317 | * !!!!!!! been implemented. | ||
318 | * | ||
319 | * The (general case) algorithm is as follows: | ||
320 | * If end of source doesn't overlap destination then use memcpy. | ||
321 | * Otherwise do memcpy backwards. | ||
322 | * | ||
323 | * Register use: | ||
324 | * a0/ return address | ||
325 | * a1/ stack pointer | ||
326 | * a2/ return value | ||
327 | * a3/ src | ||
328 | * a4/ length | ||
329 | * a5/ dst | ||
330 | * a6/ tmp | ||
331 | * a7/ tmp | ||
332 | * a8/ tmp | ||
333 | * a9/ tmp | ||
334 | * a10/ tmp | ||
335 | * a11/ tmp | ||
336 | */ | ||
337 | |||
338 | /* | ||
339 | * Byte by byte copy | ||
340 | */ | ||
341 | .align 4 | ||
342 | .byte 0 # 1 mod 4 alignment for LOOPNEZ | ||
343 | # (0 mod 4 alignment for LBEG) | ||
344 | .Lbackbytecopy: | ||
345 | #if XCHAL_HAVE_LOOPS | ||
346 | loopnez a4, .Lbackbytecopydone | ||
347 | #else /* !XCHAL_HAVE_LOOPS */ | ||
348 | beqz a4, .Lbackbytecopydone | ||
349 | sub a7, a3, a4 # a7 = start address for source | ||
350 | #endif /* !XCHAL_HAVE_LOOPS */ | ||
351 | .Lbacknextbyte: | ||
352 | addi a3, a3, -1 | ||
353 | l8ui a6, a3, 0 | ||
354 | addi a5, a5, -1 | ||
355 | s8i a6, a5, 0 | ||
356 | #if !XCHAL_HAVE_LOOPS | ||
357 | bne a3, a7, .Lbacknextbyte # continue loop if | ||
358 | # $a3:src != $a7:src_start | ||
359 | #endif /* !XCHAL_HAVE_LOOPS */ | ||
360 | .Lbackbytecopydone: | ||
361 | retw | ||
362 | |||
363 | /* | ||
364 | * Destination is unaligned | ||
365 | */ | ||
366 | |||
367 | .align 4 | ||
368 | .Lbackdst1mod2: # dst is only byte aligned | ||
369 | _bltui a4, 7, .Lbackbytecopy # do short copies byte by byte | ||
370 | |||
371 | # copy 1 byte | ||
372 | addi a3, a3, -1 | ||
373 | l8ui a6, a3, 0 | ||
374 | addi a5, a5, -1 | ||
375 | s8i a6, a5, 0 | ||
376 | addi a4, a4, -1 | ||
377 | _bbci.l a5, 1, .Lbackdstaligned # if dst is now aligned, then | ||
378 | # return to main algorithm | ||
379 | .Lbackdst2mod4: # dst 16-bit aligned | ||
380 | # copy 2 bytes | ||
381 | _bltui a4, 6, .Lbackbytecopy # do short copies byte by byte | ||
382 | addi a3, a3, -2 | ||
383 | l8ui a6, a3, 0 | ||
384 | l8ui a7, a3, 1 | ||
385 | addi a5, a5, -2 | ||
386 | s8i a6, a5, 0 | ||
387 | s8i a7, a5, 1 | ||
388 | addi a4, a4, -2 | ||
389 | j .Lbackdstaligned # dst is now aligned, | ||
390 | # return to main algorithm | ||
391 | |||
392 | .align 4 | ||
393 | .global memmove | ||
394 | .type memmove,@function | ||
395 | memmove: | ||
396 | |||
397 | entry sp, 16 # minimal stack frame | ||
398 | # a2/ dst, a3/ src, a4/ len | ||
399 | mov a5, a2 # copy dst so that a2 is return value | ||
400 | .Lmovecommon: | ||
401 | sub a6, a5, a3 | ||
402 | bgeu a6, a4, .Lcommon | ||
403 | |||
404 | add a5, a5, a4 | ||
405 | add a3, a3, a4 | ||
406 | |||
407 | _bbsi.l a5, 0, .Lbackdst1mod2 # if dst is 1 mod 2 | ||
408 | _bbsi.l a5, 1, .Lbackdst2mod4 # if dst is 2 mod 4 | ||
409 | .Lbackdstaligned: # return here from .Lbackdst?mod? once dst is aligned | ||
410 | srli a7, a4, 4 # number of loop iterations with 16B | ||
411 | # per iteration | ||
412 | movi a8, 3 # if source is not aligned, | ||
413 | _bany a3, a8, .Lbacksrcunaligned # then use shifting copy | ||
414 | /* | ||
415 | * Destination and source are word-aligned, use word copy. | ||
416 | */ | ||
417 | # copy 16 bytes per iteration for word-aligned dst and word-aligned src | ||
418 | #if XCHAL_HAVE_LOOPS | ||
419 | loopnez a7, .backLoop1done | ||
420 | #else /* !XCHAL_HAVE_LOOPS */ | ||
421 | beqz a7, .backLoop1done | ||
422 | slli a8, a7, 4 | ||
423 | sub a8, a3, a8 # a8 = start of first 16B source chunk | ||
424 | #endif /* !XCHAL_HAVE_LOOPS */ | ||
425 | .backLoop1: | ||
426 | addi a3, a3, -16 | ||
427 | l32i a7, a3, 12 | ||
428 | l32i a6, a3, 8 | ||
429 | addi a5, a5, -16 | ||
430 | s32i a7, a5, 12 | ||
431 | l32i a7, a3, 4 | ||
432 | s32i a6, a5, 8 | ||
433 | l32i a6, a3, 0 | ||
434 | s32i a7, a5, 4 | ||
435 | s32i a6, a5, 0 | ||
436 | #if !XCHAL_HAVE_LOOPS | ||
437 | bne a3, a8, .backLoop1 # continue loop if a3:src != a8:src_start | ||
438 | #endif /* !XCHAL_HAVE_LOOPS */ | ||
439 | .backLoop1done: | ||
440 | bbci.l a4, 3, .Lback2 | ||
441 | # copy 8 bytes | ||
442 | addi a3, a3, -8 | ||
443 | l32i a6, a3, 0 | ||
444 | l32i a7, a3, 4 | ||
445 | addi a5, a5, -8 | ||
446 | s32i a6, a5, 0 | ||
447 | s32i a7, a5, 4 | ||
448 | .Lback2: | ||
449 | bbsi.l a4, 2, .Lback3 | ||
450 | bbsi.l a4, 1, .Lback4 | ||
451 | bbsi.l a4, 0, .Lback5 | ||
452 | retw | ||
453 | .Lback3: | ||
454 | # copy 4 bytes | ||
455 | addi a3, a3, -4 | ||
456 | l32i a6, a3, 0 | ||
457 | addi a5, a5, -4 | ||
458 | s32i a6, a5, 0 | ||
459 | bbsi.l a4, 1, .Lback4 | ||
460 | bbsi.l a4, 0, .Lback5 | ||
461 | retw | ||
462 | .Lback4: | ||
463 | # copy 2 bytes | ||
464 | addi a3, a3, -2 | ||
465 | l16ui a6, a3, 0 | ||
466 | addi a5, a5, -2 | ||
467 | s16i a6, a5, 0 | ||
468 | bbsi.l a4, 0, .Lback5 | ||
469 | retw | ||
470 | .Lback5: | ||
471 | # copy 1 byte | ||
472 | addi a3, a3, -1 | ||
473 | l8ui a6, a3, 0 | ||
474 | addi a5, a5, -1 | ||
475 | s8i a6, a5, 0 | ||
476 | retw | ||
477 | |||
478 | /* | ||
479 | * Destination is aligned, Source is unaligned | ||
480 | */ | ||
481 | |||
482 | .align 4 | ||
483 | .Lbacksrcunaligned: | ||
484 | _beqz a4, .Lbackdone # avoid loading anything for zero-length copies | ||
485 | # copy 16 bytes per iteration for word-aligned dst and unaligned src | ||
486 | ssa8 a3 # set shift amount from byte offset | ||
487 | #define SIM_CHECKS_ALIGNMENT 1 /* set to 1 when running on ISS with | ||
488 | * the lint or ferret client, or 0 | ||
489 | * to save a few cycles */ | ||
490 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || SIM_CHECKS_ALIGNMENT | ||
491 | and a11, a3, a8 # save unalignment offset for below | ||
492 | sub a3, a3, a11 # align a3 | ||
493 | #endif | ||
494 | l32i a6, a3, 0 # load first word | ||
495 | #if XCHAL_HAVE_LOOPS | ||
496 | loopnez a7, .backLoop2done | ||
497 | #else /* !XCHAL_HAVE_LOOPS */ | ||
498 | beqz a7, .backLoop2done | ||
499 | slli a10, a7, 4 | ||
500 | sub a10, a3, a10 # a10 = start of first 16B source chunk | ||
501 | #endif /* !XCHAL_HAVE_LOOPS */ | ||
502 | .backLoop2: | ||
503 | addi a3, a3, -16 | ||
504 | l32i a7, a3, 12 | ||
505 | l32i a8, a3, 8 | ||
506 | addi a5, a5, -16 | ||
507 | src_b a6, a7, a6 | ||
508 | s32i a6, a5, 12 | ||
509 | l32i a9, a3, 4 | ||
510 | src_b a7, a8, a7 | ||
511 | s32i a7, a5, 8 | ||
512 | l32i a6, a3, 0 | ||
513 | src_b a8, a9, a8 | ||
514 | s32i a8, a5, 4 | ||
515 | src_b a9, a6, a9 | ||
516 | s32i a9, a5, 0 | ||
517 | #if !XCHAL_HAVE_LOOPS | ||
518 | bne a3, a10, .backLoop2 # continue loop if a3:src != a10:src_start | ||
519 | #endif /* !XCHAL_HAVE_LOOPS */ | ||
520 | .backLoop2done: | ||
521 | bbci.l a4, 3, .Lback12 | ||
522 | # copy 8 bytes | ||
523 | addi a3, a3, -8 | ||
524 | l32i a7, a3, 4 | ||
525 | l32i a8, a3, 0 | ||
526 | addi a5, a5, -8 | ||
527 | src_b a6, a7, a6 | ||
528 | s32i a6, a5, 4 | ||
529 | src_b a7, a8, a7 | ||
530 | s32i a7, a5, 0 | ||
531 | mov a6, a8 | ||
532 | .Lback12: | ||
533 | bbci.l a4, 2, .Lback13 | ||
534 | # copy 4 bytes | ||
535 | addi a3, a3, -4 | ||
536 | l32i a7, a3, 0 | ||
537 | addi a5, a5, -4 | ||
538 | src_b a6, a7, a6 | ||
539 | s32i a6, a5, 0 | ||
540 | mov a6, a7 | ||
541 | .Lback13: | ||
542 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || SIM_CHECKS_ALIGNMENT | ||
543 | add a3, a3, a11 # readjust a3 with correct misalignment | ||
544 | #endif | ||
545 | bbsi.l a4, 1, .Lback14 | ||
546 | bbsi.l a4, 0, .Lback15 | ||
547 | .Lbackdone: | ||
548 | retw | ||
549 | .Lback14: | ||
550 | # copy 2 bytes | ||
551 | addi a3, a3, -2 | ||
552 | l8ui a6, a3, 0 | ||
553 | l8ui a7, a3, 1 | ||
554 | addi a5, a5, -2 | ||
555 | s8i a6, a5, 0 | ||
556 | s8i a7, a5, 1 | ||
557 | bbsi.l a4, 0, .Lback15 | ||
558 | retw | ||
559 | .Lback15: | ||
560 | # copy 1 byte | ||
561 | addi a3, a3, -1 | ||
562 | addi a5, a5, -1 | ||
563 | l8ui a6, a3, 0 | ||
564 | s8i a6, a5, 0 | ||
565 | retw | ||
566 | |||
308 | 567 | ||
309 | /* | 568 | /* |
310 | * Local Variables: | 569 | * Local Variables: |
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c index 2c2f710ed1dc..245b08f7eaf4 100644 --- a/arch/xtensa/mm/fault.c +++ b/arch/xtensa/mm/fault.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * License. See the file "COPYING" in the main directory of this archive | 6 | * License. See the file "COPYING" in the main directory of this archive |
7 | * for more details. | 7 | * for more details. |
8 | * | 8 | * |
9 | * Copyright (C) 2001 - 2005 Tensilica Inc. | 9 | * Copyright (C) 2001 - 2010 Tensilica Inc. |
10 | * | 10 | * |
11 | * Chris Zankel <chris@zankel.net> | 11 | * Chris Zankel <chris@zankel.net> |
12 | * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com> | 12 | * Joe Taylor <joe@tensilica.com, joetylr@yahoo.com> |
@@ -186,6 +186,7 @@ do_sigbus: | |||
186 | /* Kernel mode? Handle exceptions or die */ | 186 | /* Kernel mode? Handle exceptions or die */ |
187 | if (!user_mode(regs)) | 187 | if (!user_mode(regs)) |
188 | bad_page_fault(regs, address, SIGBUS); | 188 | bad_page_fault(regs, address, SIGBUS); |
189 | return; | ||
189 | 190 | ||
190 | vmalloc_fault: | 191 | vmalloc_fault: |
191 | { | 192 | { |
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index 8ab47edd7c82..7e74895eee04 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c | |||
@@ -91,7 +91,7 @@ static int rs_write(struct tty_struct * tty, | |||
91 | { | 91 | { |
92 | /* see drivers/char/serialX.c to reference original version */ | 92 | /* see drivers/char/serialX.c to reference original version */ |
93 | 93 | ||
94 | __simc (SYS_write, 1, (unsigned long)buf, count, 0, 0); | 94 | simc_write(1, buf, count); |
95 | return count; | 95 | return count; |
96 | } | 96 | } |
97 | 97 | ||
@@ -122,12 +122,7 @@ static void rs_poll(unsigned long priv) | |||
122 | 122 | ||
123 | static int rs_put_char(struct tty_struct *tty, unsigned char ch) | 123 | static int rs_put_char(struct tty_struct *tty, unsigned char ch) |
124 | { | 124 | { |
125 | char buf[2]; | 125 | return rs_write(tty, &ch, 1); |
126 | |||
127 | buf[0] = ch; | ||
128 | buf[1] = '\0'; /* Is this NULL necessary? */ | ||
129 | __simc (SYS_write, 1, (unsigned long) buf, 1, 0, 0); | ||
130 | return 1; | ||
131 | } | 126 | } |
132 | 127 | ||
133 | static void rs_flush_chars(struct tty_struct *tty) | 128 | static void rs_flush_chars(struct tty_struct *tty) |
diff --git a/arch/xtensa/platforms/iss/include/platform/simcall.h b/arch/xtensa/platforms/iss/include/platform/simcall.h index 8c43bfea05e1..bd78192e2fc9 100644 --- a/arch/xtensa/platforms/iss/include/platform/simcall.h +++ b/arch/xtensa/platforms/iss/include/platform/simcall.h | |||
@@ -78,8 +78,9 @@ static inline int __simc(int a, int b, int c, int d, int e, int f) | |||
78 | return ret; | 78 | return ret; |
79 | } | 79 | } |
80 | 80 | ||
81 | static inline int simc_open(char *file, int flags, int mode) | 81 | static inline int simc_open(const char *file, int flags, int mode) |
82 | { | 82 | { |
83 | wmb(); | ||
83 | return __simc(SYS_open, (int) file, flags, mode, 0, 0); | 84 | return __simc(SYS_open, (int) file, flags, mode, 0, 0); |
84 | } | 85 | } |
85 | 86 | ||
@@ -90,16 +91,19 @@ static inline int simc_close(int fd) | |||
90 | 91 | ||
91 | static inline int simc_ioctl(int fd, int request, void *arg) | 92 | static inline int simc_ioctl(int fd, int request, void *arg) |
92 | { | 93 | { |
94 | wmb(); | ||
93 | return __simc(SYS_ioctl, fd, request, (int) arg, 0, 0); | 95 | return __simc(SYS_ioctl, fd, request, (int) arg, 0, 0); |
94 | } | 96 | } |
95 | 97 | ||
96 | static inline int simc_read(int fd, void *buf, size_t count) | 98 | static inline int simc_read(int fd, void *buf, size_t count) |
97 | { | 99 | { |
100 | rmb(); | ||
98 | return __simc(SYS_read, fd, (int) buf, count, 0, 0); | 101 | return __simc(SYS_read, fd, (int) buf, count, 0, 0); |
99 | } | 102 | } |
100 | 103 | ||
101 | static inline int simc_write(int fd, void *buf, size_t count) | 104 | static inline int simc_write(int fd, const void *buf, size_t count) |
102 | { | 105 | { |
106 | wmb(); | ||
103 | return __simc(SYS_write, fd, (int) buf, count, 0, 0); | 107 | return __simc(SYS_write, fd, (int) buf, count, 0, 0); |
104 | } | 108 | } |
105 | 109 | ||
@@ -107,6 +111,7 @@ static inline int simc_poll(int fd) | |||
107 | { | 111 | { |
108 | struct timeval tv = { .tv_sec = 0, .tv_usec = 0 }; | 112 | struct timeval tv = { .tv_sec = 0, .tv_usec = 0 }; |
109 | 113 | ||
114 | wmb(); | ||
110 | return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv, | 115 | return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv, |
111 | 0, 0); | 116 | 0, 0); |
112 | } | 117 | } |
diff --git a/arch/xtensa/platforms/iss/setup.c b/arch/xtensa/platforms/iss/setup.c index 927acf378ea3..e1700102f35e 100644 --- a/arch/xtensa/platforms/iss/setup.c +++ b/arch/xtensa/platforms/iss/setup.c | |||
@@ -61,13 +61,13 @@ void platform_restart(void) | |||
61 | * jump to the reset vector. */ | 61 | * jump to the reset vector. */ |
62 | 62 | ||
63 | __asm__ __volatile__("movi a2, 15\n\t" | 63 | __asm__ __volatile__("movi a2, 15\n\t" |
64 | "wsr a2, " __stringify(ICOUNTLEVEL) "\n\t" | 64 | "wsr a2, icountlevel\n\t" |
65 | "movi a2, 0\n\t" | 65 | "movi a2, 0\n\t" |
66 | "wsr a2, " __stringify(ICOUNT) "\n\t" | 66 | "wsr a2, icount\n\t" |
67 | "wsr a2, " __stringify(IBREAKENABLE) "\n\t" | 67 | "wsr a2, ibreakenable\n\t" |
68 | "wsr a2, " __stringify(LCOUNT) "\n\t" | 68 | "wsr a2, lcount\n\t" |
69 | "movi a2, 0x1f\n\t" | 69 | "movi a2, 0x1f\n\t" |
70 | "wsr a2, " __stringify(PS) "\n\t" | 70 | "wsr a2, ps\n\t" |
71 | "isync\n\t" | 71 | "isync\n\t" |
72 | "jx %0\n\t" | 72 | "jx %0\n\t" |
73 | : | 73 | : |
diff --git a/arch/xtensa/platforms/xt2000/setup.c b/arch/xtensa/platforms/xt2000/setup.c index 9e83940ac265..c7d90f17886e 100644 --- a/arch/xtensa/platforms/xt2000/setup.c +++ b/arch/xtensa/platforms/xt2000/setup.c | |||
@@ -66,13 +66,13 @@ void platform_restart(void) | |||
66 | * jump to the reset vector. */ | 66 | * jump to the reset vector. */ |
67 | 67 | ||
68 | __asm__ __volatile__ ("movi a2, 15\n\t" | 68 | __asm__ __volatile__ ("movi a2, 15\n\t" |
69 | "wsr a2, " __stringify(ICOUNTLEVEL) "\n\t" | 69 | "wsr a2, icountlevel\n\t" |
70 | "movi a2, 0\n\t" | 70 | "movi a2, 0\n\t" |
71 | "wsr a2, " __stringify(ICOUNT) "\n\t" | 71 | "wsr a2, icount\n\t" |
72 | "wsr a2, " __stringify(IBREAKENABLE) "\n\t" | 72 | "wsr a2, ibreakenable\n\t" |
73 | "wsr a2, " __stringify(LCOUNT) "\n\t" | 73 | "wsr a2, lcount\n\t" |
74 | "movi a2, 0x1f\n\t" | 74 | "movi a2, 0x1f\n\t" |
75 | "wsr a2, " __stringify(PS) "\n\t" | 75 | "wsr a2, ps\n\t" |
76 | "isync\n\t" | 76 | "isync\n\t" |
77 | "jx %0\n\t" | 77 | "jx %0\n\t" |
78 | : | 78 | : |