diff options
author | Helge Deller <deller@gmx.de> | 2015-02-16 16:21:00 -0500 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2015-02-16 16:35:06 -0500 |
commit | c78c2b7e0409feed41ba1b5e84bff5d901c9b65f (patch) | |
tree | 66870948164f863cfc0c09e3c2de124ae94b71d7 /arch/parisc | |
parent | 863722e856e64dae0e252b6bb546737c6c5626ce (diff) |
parisc: hpux - Remove hpux gateway page
Drop code to create HP-UX gateway page and syscall entry code.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/entry.S | 20 | ||||
-rw-r--r-- | arch/parisc/kernel/process.c | 15 | ||||
-rw-r--r-- | arch/parisc/kernel/signal.c | 3 | ||||
-rw-r--r-- | arch/parisc/mm/init.c | 72 |
5 files changed, 4 insertions, 108 deletions
diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h index 689a8ade3606..54adb60c0a42 100644 --- a/arch/parisc/include/asm/processor.h +++ b/arch/parisc/include/asm/processor.h | |||
@@ -330,8 +330,6 @@ struct mm_struct; | |||
330 | /* Free all resources held by a thread. */ | 330 | /* Free all resources held by a thread. */ |
331 | extern void release_thread(struct task_struct *); | 331 | extern void release_thread(struct task_struct *); |
332 | 332 | ||
333 | extern void map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm); | ||
334 | |||
335 | extern unsigned long get_wchan(struct task_struct *p); | 333 | extern unsigned long get_wchan(struct task_struct *p); |
336 | 334 | ||
337 | #define KSTK_EIP(tsk) ((tsk)->thread.regs.iaoq[0]) | 335 | #define KSTK_EIP(tsk) ((tsk)->thread.regs.iaoq[0]) |
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index e8f07dd28401..2ab16bb160a8 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -1774,10 +1774,6 @@ ENTRY(sys_rt_sigreturn_wrapper) | |||
1774 | ENDPROC(sys_rt_sigreturn_wrapper) | 1774 | ENDPROC(sys_rt_sigreturn_wrapper) |
1775 | 1775 | ||
1776 | ENTRY(syscall_exit) | 1776 | ENTRY(syscall_exit) |
1777 | /* NOTE: HP-UX syscalls also come through here | ||
1778 | * after hpux_syscall_exit fixes up return | ||
1779 | * values. */ | ||
1780 | |||
1781 | /* NOTE: Not all syscalls exit this way. rt_sigreturn will exit | 1777 | /* NOTE: Not all syscalls exit this way. rt_sigreturn will exit |
1782 | * via syscall_exit_rfi if the signal was received while the process | 1778 | * via syscall_exit_rfi if the signal was received while the process |
1783 | * was running. | 1779 | * was running. |
@@ -1789,22 +1785,6 @@ ENTRY(syscall_exit) | |||
1789 | LDREG TI_TASK(%r1),%r1 | 1785 | LDREG TI_TASK(%r1),%r1 |
1790 | STREG %r28,TASK_PT_GR28(%r1) | 1786 | STREG %r28,TASK_PT_GR28(%r1) |
1791 | 1787 | ||
1792 | #ifdef CONFIG_HPUX | ||
1793 | /* <linux/personality.h> cannot be easily included */ | ||
1794 | #define PER_HPUX 0x10 | ||
1795 | ldw TASK_PERSONALITY(%r1),%r19 | ||
1796 | |||
1797 | /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ | ||
1798 | ldo -PER_HPUX(%r19), %r19 | ||
1799 | cmpib,COND(<>),n 0,%r19,1f | ||
1800 | |||
1801 | /* Save other hpux returns if personality is PER_HPUX */ | ||
1802 | STREG %r22,TASK_PT_GR22(%r1) | ||
1803 | STREG %r29,TASK_PT_GR29(%r1) | ||
1804 | 1: | ||
1805 | |||
1806 | #endif /* CONFIG_HPUX */ | ||
1807 | |||
1808 | /* Seems to me that dp could be wrong here, if the syscall involved | 1788 | /* Seems to me that dp could be wrong here, if the syscall involved |
1809 | * calling a module, and nothing got round to restoring dp on return. | 1789 | * calling a module, and nothing got round to restoring dp on return. |
1810 | */ | 1790 | */ |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 0bbbf0d3f608..8a488c22a99f 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -193,9 +193,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
193 | * Make them const so the compiler knows they live in .text */ | 193 | * Make them const so the compiler knows they live in .text */ |
194 | extern void * const ret_from_kernel_thread; | 194 | extern void * const ret_from_kernel_thread; |
195 | extern void * const child_return; | 195 | extern void * const child_return; |
196 | #ifdef CONFIG_HPUX | 196 | |
197 | extern void * const hpux_child_return; | ||
198 | #endif | ||
199 | if (unlikely(p->flags & PF_KTHREAD)) { | 197 | if (unlikely(p->flags & PF_KTHREAD)) { |
200 | memset(cregs, 0, sizeof(struct pt_regs)); | 198 | memset(cregs, 0, sizeof(struct pt_regs)); |
201 | if (!usp) /* idle thread */ | 199 | if (!usp) /* idle thread */ |
@@ -229,15 +227,8 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
229 | cregs->gr[30] = usp; | 227 | cregs->gr[30] = usp; |
230 | } | 228 | } |
231 | cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN + FRAME_SIZE; | 229 | cregs->ksp = (unsigned long)stack + THREAD_SZ_ALGN + FRAME_SIZE; |
232 | if (personality(p->personality) == PER_HPUX) { | 230 | cregs->kpc = (unsigned long) &child_return; |
233 | #ifdef CONFIG_HPUX | 231 | |
234 | cregs->kpc = (unsigned long) &hpux_child_return; | ||
235 | #else | ||
236 | BUG(); | ||
237 | #endif | ||
238 | } else { | ||
239 | cregs->kpc = (unsigned long) &child_return; | ||
240 | } | ||
241 | /* Setup thread TLS area from the 4th parameter in clone */ | 232 | /* Setup thread TLS area from the 4th parameter in clone */ |
242 | if (clone_flags & CLONE_SETTLS) | 233 | if (clone_flags & CLONE_SETTLS) |
243 | cregs->cr27 = cregs->gr[23]; | 234 | cregs->cr27 = cregs->gr[23]; |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 1fd300c00a80..dc1ea796fd60 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -9,8 +9,7 @@ | |||
9 | * | 9 | * |
10 | * Like the IA-64, we are a recent enough port (we are *starting* | 10 | * Like the IA-64, we are a recent enough port (we are *starting* |
11 | * with glibc2.2) that we do not need to support the old non-realtime | 11 | * with glibc2.2) that we do not need to support the old non-realtime |
12 | * Linux signals. Therefore we don't. HP/UX signals will go in | 12 | * Linux signals. Therefore we don't. |
13 | * arch/parisc/hpux/signal.c when we figure out how to do them. | ||
14 | */ | 13 | */ |
15 | 14 | ||
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 0bef864264c0..15dbe81cf5f3 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -750,78 +750,6 @@ static void __init gateway_init(void) | |||
750 | PAGE_SIZE, PAGE_GATEWAY, 1); | 750 | PAGE_SIZE, PAGE_GATEWAY, 1); |
751 | } | 751 | } |
752 | 752 | ||
753 | #ifdef CONFIG_HPUX | ||
754 | void | ||
755 | map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm) | ||
756 | { | ||
757 | pgd_t *pg_dir; | ||
758 | pmd_t *pmd; | ||
759 | pte_t *pg_table; | ||
760 | unsigned long start_pmd; | ||
761 | unsigned long start_pte; | ||
762 | unsigned long address; | ||
763 | unsigned long hpux_gw_page_addr; | ||
764 | /* FIXME: This is 'const' in order to trick the compiler | ||
765 | into not treating it as DP-relative data. */ | ||
766 | extern void * const hpux_gateway_page; | ||
767 | |||
768 | hpux_gw_page_addr = HPUX_GATEWAY_ADDR & PAGE_MASK; | ||
769 | |||
770 | /* | ||
771 | * Setup HP-UX Gateway page. | ||
772 | * | ||
773 | * The HP-UX gateway page resides in the user address space, | ||
774 | * so it needs to be aliased into each process. | ||
775 | */ | ||
776 | |||
777 | pg_dir = pgd_offset(mm,hpux_gw_page_addr); | ||
778 | |||
779 | #if PTRS_PER_PMD == 1 | ||
780 | start_pmd = 0; | ||
781 | #else | ||
782 | start_pmd = ((hpux_gw_page_addr >> PMD_SHIFT) & (PTRS_PER_PMD - 1)); | ||
783 | #endif | ||
784 | start_pte = ((hpux_gw_page_addr >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); | ||
785 | |||
786 | address = __pa(&hpux_gateway_page); | ||
787 | #if PTRS_PER_PMD == 1 | ||
788 | pmd = (pmd_t *)__pa(pg_dir); | ||
789 | #else | ||
790 | pmd = (pmd_t *) pgd_address(*pg_dir); | ||
791 | |||
792 | /* | ||
793 | * pmd is physical at this point | ||
794 | */ | ||
795 | |||
796 | if (!pmd) { | ||
797 | pmd = (pmd_t *) get_zeroed_page(GFP_KERNEL); | ||
798 | pmd = (pmd_t *) __pa(pmd); | ||
799 | } | ||
800 | |||
801 | __pgd_val_set(*pg_dir, PxD_FLAG_PRESENT | PxD_FLAG_VALID | (unsigned long) pmd); | ||
802 | #endif | ||
803 | /* now change pmd to kernel virtual addresses */ | ||
804 | |||
805 | pmd = (pmd_t *)__va(pmd) + start_pmd; | ||
806 | |||
807 | /* | ||
808 | * pg_table is physical at this point | ||
809 | */ | ||
810 | |||
811 | pg_table = (pte_t *) pmd_address(*pmd); | ||
812 | if (!pg_table) | ||
813 | pg_table = (pte_t *) __pa(get_zeroed_page(GFP_KERNEL)); | ||
814 | |||
815 | __pmd_val_set(*pmd, PxD_FLAG_PRESENT | PxD_FLAG_VALID | (unsigned long) pg_table); | ||
816 | |||
817 | /* now change pg_table to kernel virtual addresses */ | ||
818 | |||
819 | pg_table = (pte_t *) __va(pg_table) + start_pte; | ||
820 | set_pte(pg_table, __mk_pte(address, PAGE_GATEWAY)); | ||
821 | } | ||
822 | EXPORT_SYMBOL(map_hpux_gateway_page); | ||
823 | #endif | ||
824 | |||
825 | void __init paging_init(void) | 753 | void __init paging_init(void) |
826 | { | 754 | { |
827 | int i; | 755 | int i; |