diff options
Diffstat (limited to 'arch/parisc/kernel')
| -rw-r--r-- | arch/parisc/kernel/hardware.c | 7 | ||||
| -rw-r--r-- | arch/parisc/kernel/head.S | 6 | ||||
| -rw-r--r-- | arch/parisc/kernel/sys_parisc.c | 25 | ||||
| -rw-r--r-- | arch/parisc/kernel/unwind.c | 9 | ||||
| -rw-r--r-- | arch/parisc/kernel/vmlinux.lds.S | 138 |
5 files changed, 86 insertions, 99 deletions
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index 06cb3992907e..608716f8496b 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c | |||
| @@ -36,6 +36,9 @@ | |||
| 36 | * HP PARISC Hardware Database | 36 | * HP PARISC Hardware Database |
| 37 | * Access to this database is only possible during bootup | 37 | * Access to this database is only possible during bootup |
| 38 | * so don't reference this table after starting the init process | 38 | * so don't reference this table after starting the init process |
| 39 | * | ||
| 40 | * NOTE: Product names which are listed here and ends with a '?' | ||
| 41 | * are guessed. If you know the correct name, please let us know. | ||
| 39 | */ | 42 | */ |
| 40 | 43 | ||
| 41 | static struct hp_hardware hp_hardware_list[] = { | 44 | static struct hp_hardware hp_hardware_list[] = { |
| @@ -222,7 +225,7 @@ static struct hp_hardware hp_hardware_list[] = { | |||
| 222 | {HPHW_NPROC,0x5DD,0x4,0x81,"Duet W2"}, | 225 | {HPHW_NPROC,0x5DD,0x4,0x81,"Duet W2"}, |
| 223 | {HPHW_NPROC,0x5DE,0x4,0x81,"Piccolo W+"}, | 226 | {HPHW_NPROC,0x5DE,0x4,0x81,"Piccolo W+"}, |
| 224 | {HPHW_NPROC,0x5DF,0x4,0x81,"Cantata W2"}, | 227 | {HPHW_NPROC,0x5DF,0x4,0x81,"Cantata W2"}, |
| 225 | {HPHW_NPROC,0x5DF,0x0,0x00,"Marcato W+? (rp5470)"}, | 228 | {HPHW_NPROC,0x5DF,0x0,0x00,"Marcato W+ (rp5470)?"}, |
| 226 | {HPHW_NPROC,0x5E0,0x4,0x91,"Cantata DC- W2"}, | 229 | {HPHW_NPROC,0x5E0,0x4,0x91,"Cantata DC- W2"}, |
| 227 | {HPHW_NPROC,0x5E1,0x4,0x91,"Crescendo DC- W2"}, | 230 | {HPHW_NPROC,0x5E1,0x4,0x91,"Crescendo DC- W2"}, |
| 228 | {HPHW_NPROC,0x5E2,0x4,0x91,"Crescendo 650 W2"}, | 231 | {HPHW_NPROC,0x5E2,0x4,0x91,"Crescendo 650 W2"}, |
| @@ -276,9 +279,11 @@ static struct hp_hardware hp_hardware_list[] = { | |||
| 276 | {HPHW_NPROC,0x888,0x4,0x91,"Storm Peak Fast DC-"}, | 279 | {HPHW_NPROC,0x888,0x4,0x91,"Storm Peak Fast DC-"}, |
| 277 | {HPHW_NPROC,0x889,0x4,0x91,"Storm Peak Fast"}, | 280 | {HPHW_NPROC,0x889,0x4,0x91,"Storm Peak Fast"}, |
| 278 | {HPHW_NPROC,0x88A,0x4,0x91,"Crestone Peak Slow"}, | 281 | {HPHW_NPROC,0x88A,0x4,0x91,"Crestone Peak Slow"}, |
| 282 | {HPHW_NPROC,0x88B,0x4,0x91,"Crestone Peak Fast?"}, | ||
| 279 | {HPHW_NPROC,0x88C,0x4,0x91,"Orca Mako+"}, | 283 | {HPHW_NPROC,0x88C,0x4,0x91,"Orca Mako+"}, |
| 280 | {HPHW_NPROC,0x88D,0x4,0x91,"Rainier/Medel Mako+ Slow"}, | 284 | {HPHW_NPROC,0x88D,0x4,0x91,"Rainier/Medel Mako+ Slow"}, |
| 281 | {HPHW_NPROC,0x88E,0x4,0x91,"Rainier/Medel Mako+ Fast"}, | 285 | {HPHW_NPROC,0x88E,0x4,0x91,"Rainier/Medel Mako+ Fast"}, |
| 286 | {HPHW_NPROC,0x892,0x4,0x91,"Mt. Hamilton Slow Mako+?"}, | ||
| 282 | {HPHW_NPROC,0x894,0x4,0x91,"Mt. Hamilton Fast Mako+"}, | 287 | {HPHW_NPROC,0x894,0x4,0x91,"Mt. Hamilton Fast Mako+"}, |
| 283 | {HPHW_NPROC,0x895,0x4,0x91,"Storm Peak Slow Mako+"}, | 288 | {HPHW_NPROC,0x895,0x4,0x91,"Storm Peak Slow Mako+"}, |
| 284 | {HPHW_NPROC,0x896,0x4,0x91,"Storm Peak Fast Mako+"}, | 289 | {HPHW_NPROC,0x896,0x4,0x91,"Storm Peak Fast Mako+"}, |
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index d2d58258aea6..d4dc588c0dc1 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
| @@ -41,9 +41,7 @@ END(boot_args) | |||
| 41 | .import fault_vector_11,code /* IVA parisc 1.1 32 bit */ | 41 | .import fault_vector_11,code /* IVA parisc 1.1 32 bit */ |
| 42 | .import $global$ /* forward declaration */ | 42 | .import $global$ /* forward declaration */ |
| 43 | #endif /*!CONFIG_64BIT*/ | 43 | #endif /*!CONFIG_64BIT*/ |
| 44 | .export _stext,data /* Kernel want it this way! */ | 44 | ENTRY(parisc_kernel_start) |
| 45 | _stext: | ||
| 46 | ENTRY(stext) | ||
| 47 | .proc | 45 | .proc |
| 48 | .callinfo | 46 | .callinfo |
| 49 | 47 | ||
| @@ -347,7 +345,7 @@ smp_slave_stext: | |||
| 347 | .procend | 345 | .procend |
| 348 | #endif /* CONFIG_SMP */ | 346 | #endif /* CONFIG_SMP */ |
| 349 | 347 | ||
| 350 | ENDPROC(stext) | 348 | ENDPROC(parisc_kernel_start) |
| 351 | 349 | ||
| 352 | #ifndef CONFIG_64BIT | 350 | #ifndef CONFIG_64BIT |
| 353 | .section .data..read_mostly | 351 | .section .data..read_mostly |
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c index 5dfd248e3f1a..0d3a9d4927b5 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c | |||
| @@ -61,8 +61,15 @@ static int get_offset(struct address_space *mapping) | |||
| 61 | return (unsigned long) mapping >> 8; | 61 | return (unsigned long) mapping >> 8; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | static unsigned long get_shared_area(struct address_space *mapping, | 64 | static unsigned long shared_align_offset(struct file *filp, unsigned long pgoff) |
| 65 | unsigned long addr, unsigned long len, unsigned long pgoff) | 65 | { |
| 66 | struct address_space *mapping = filp ? filp->f_mapping : NULL; | ||
| 67 | |||
| 68 | return (get_offset(mapping) + pgoff) << PAGE_SHIFT; | ||
| 69 | } | ||
| 70 | |||
| 71 | static unsigned long get_shared_area(struct file *filp, unsigned long addr, | ||
| 72 | unsigned long len, unsigned long pgoff) | ||
| 66 | { | 73 | { |
| 67 | struct vm_unmapped_area_info info; | 74 | struct vm_unmapped_area_info info; |
| 68 | 75 | ||
| @@ -71,7 +78,7 @@ static unsigned long get_shared_area(struct address_space *mapping, | |||
| 71 | info.low_limit = PAGE_ALIGN(addr); | 78 | info.low_limit = PAGE_ALIGN(addr); |
| 72 | info.high_limit = TASK_SIZE; | 79 | info.high_limit = TASK_SIZE; |
| 73 | info.align_mask = PAGE_MASK & (SHMLBA - 1); | 80 | info.align_mask = PAGE_MASK & (SHMLBA - 1); |
| 74 | info.align_offset = (get_offset(mapping) + pgoff) << PAGE_SHIFT; | 81 | info.align_offset = shared_align_offset(filp, pgoff); |
| 75 | return vm_unmapped_area(&info); | 82 | return vm_unmapped_area(&info); |
| 76 | } | 83 | } |
| 77 | 84 | ||
| @@ -82,20 +89,18 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
| 82 | return -ENOMEM; | 89 | return -ENOMEM; |
| 83 | if (flags & MAP_FIXED) { | 90 | if (flags & MAP_FIXED) { |
| 84 | if ((flags & MAP_SHARED) && | 91 | if ((flags & MAP_SHARED) && |
| 85 | (addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)) | 92 | (addr - shared_align_offset(filp, pgoff)) & (SHMLBA - 1)) |
| 86 | return -EINVAL; | 93 | return -EINVAL; |
| 87 | return addr; | 94 | return addr; |
| 88 | } | 95 | } |
| 89 | if (!addr) | 96 | if (!addr) |
| 90 | addr = TASK_UNMAPPED_BASE; | 97 | addr = TASK_UNMAPPED_BASE; |
| 91 | 98 | ||
| 92 | if (filp) { | 99 | if (filp || (flags & MAP_SHARED)) |
| 93 | addr = get_shared_area(filp->f_mapping, addr, len, pgoff); | 100 | addr = get_shared_area(filp, addr, len, pgoff); |
| 94 | } else if(flags & MAP_SHARED) { | 101 | else |
| 95 | addr = get_shared_area(NULL, addr, len, pgoff); | ||
| 96 | } else { | ||
| 97 | addr = get_unshared_area(addr, len); | 102 | addr = get_unshared_area(addr, len); |
| 98 | } | 103 | |
| 99 | return addr; | 104 | return addr; |
| 100 | } | 105 | } |
| 101 | 106 | ||
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c index 76ed62ed785b..ddd988b267a9 100644 --- a/arch/parisc/kernel/unwind.c +++ b/arch/parisc/kernel/unwind.c | |||
| @@ -168,7 +168,7 @@ void unwind_table_remove(struct unwind_table *table) | |||
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | /* Called from setup_arch to import the kernel unwind info */ | 170 | /* Called from setup_arch to import the kernel unwind info */ |
| 171 | int unwind_init(void) | 171 | int __init unwind_init(void) |
| 172 | { | 172 | { |
| 173 | long start, stop; | 173 | long start, stop; |
| 174 | register unsigned long gp __asm__ ("r27"); | 174 | register unsigned long gp __asm__ ("r27"); |
| @@ -233,7 +233,6 @@ static void unwind_frame_regs(struct unwind_frame_info *info) | |||
| 233 | e = find_unwind_entry(info->ip); | 233 | e = find_unwind_entry(info->ip); |
| 234 | if (e == NULL) { | 234 | if (e == NULL) { |
| 235 | unsigned long sp; | 235 | unsigned long sp; |
| 236 | extern char _stext[], _etext[]; | ||
| 237 | 236 | ||
| 238 | dbg("Cannot find unwind entry for 0x%lx; forced unwinding\n", info->ip); | 237 | dbg("Cannot find unwind entry for 0x%lx; forced unwinding\n", info->ip); |
| 239 | 238 | ||
| @@ -281,8 +280,7 @@ static void unwind_frame_regs(struct unwind_frame_info *info) | |||
| 281 | break; | 280 | break; |
| 282 | info->prev_ip = tmp; | 281 | info->prev_ip = tmp; |
| 283 | sp = info->prev_sp; | 282 | sp = info->prev_sp; |
| 284 | } while (info->prev_ip < (unsigned long)_stext || | 283 | } while (!kernel_text_address(info->prev_ip)); |
| 285 | info->prev_ip > (unsigned long)_etext); | ||
| 286 | 284 | ||
| 287 | info->rp = 0; | 285 | info->rp = 0; |
| 288 | 286 | ||
| @@ -435,9 +433,8 @@ unsigned long return_address(unsigned int level) | |||
| 435 | do { | 433 | do { |
| 436 | if (unwind_once(&info) < 0 || info.ip == 0) | 434 | if (unwind_once(&info) < 0 || info.ip == 0) |
| 437 | return 0; | 435 | return 0; |
| 438 | if (!__kernel_text_address(info.ip)) { | 436 | if (!kernel_text_address(info.ip)) |
| 439 | return 0; | 437 | return 0; |
| 440 | } | ||
| 441 | } while (info.ip && level--); | 438 | } while (info.ip && level--); |
| 442 | 439 | ||
| 443 | return info.ip; | 440 | return info.ip; |
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index 4bb095a2f6fc..0dacc5ca555a 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S | |||
| @@ -6,24 +6,19 @@ | |||
| 6 | * Copyright (C) 2000 Michael Ang <mang with subcarrier.org> | 6 | * Copyright (C) 2000 Michael Ang <mang with subcarrier.org> |
| 7 | * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org> | 7 | * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org> |
| 8 | * Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org> | 8 | * Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org> |
| 9 | * Copyright (C) 2006 Helge Deller <deller@gmx.de> | 9 | * Copyright (C) 2006-2013 Helge Deller <deller@gmx.de> |
| 10 | * | 10 | */ |
| 11 | * | 11 | |
| 12 | * This program is free software; you can redistribute it and/or modify | 12 | /* |
| 13 | * it under the terms of the GNU General Public License as published by | 13 | * Put page table entries (swapper_pg_dir) as the first thing in .bss. This |
| 14 | * the Free Software Foundation; either version 2 of the License, or | 14 | * will ensure that it has .bss alignment (PAGE_SIZE). |
| 15 | * (at your option) any later version. | ||
| 16 | * | ||
| 17 | * This program is distributed in the hope that it will be useful, | ||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | * GNU General Public License for more details. | ||
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License | ||
| 23 | * along with this program; if not, write to the Free Software | ||
| 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 25 | */ | 15 | */ |
| 16 | #define BSS_FIRST_SECTIONS *(.data..vm0.pmd) \ | ||
| 17 | *(.data..vm0.pgd) \ | ||
| 18 | *(.data..vm0.pte) | ||
| 19 | |||
| 26 | #include <asm-generic/vmlinux.lds.h> | 20 | #include <asm-generic/vmlinux.lds.h> |
| 21 | |||
| 27 | /* needed for the processor specific cache alignment size */ | 22 | /* needed for the processor specific cache alignment size */ |
| 28 | #include <asm/cache.h> | 23 | #include <asm/cache.h> |
| 29 | #include <asm/page.h> | 24 | #include <asm/page.h> |
| @@ -39,7 +34,7 @@ OUTPUT_FORMAT("elf64-hppa-linux") | |||
| 39 | OUTPUT_ARCH(hppa:hppa2.0w) | 34 | OUTPUT_ARCH(hppa:hppa2.0w) |
| 40 | #endif | 35 | #endif |
| 41 | 36 | ||
| 42 | ENTRY(_stext) | 37 | ENTRY(parisc_kernel_start) |
| 43 | #ifndef CONFIG_64BIT | 38 | #ifndef CONFIG_64BIT |
| 44 | jiffies = jiffies_64 + 4; | 39 | jiffies = jiffies_64 + 4; |
| 45 | #else | 40 | #else |
| @@ -49,11 +44,29 @@ SECTIONS | |||
| 49 | { | 44 | { |
| 50 | . = KERNEL_BINARY_TEXT_START; | 45 | . = KERNEL_BINARY_TEXT_START; |
| 51 | 46 | ||
| 47 | __init_begin = .; | ||
| 48 | HEAD_TEXT_SECTION | ||
| 49 | INIT_TEXT_SECTION(8) | ||
| 50 | |||
| 51 | . = ALIGN(PAGE_SIZE); | ||
| 52 | INIT_DATA_SECTION(PAGE_SIZE) | ||
| 53 | /* we have to discard exit text and such at runtime, not link time */ | ||
| 54 | .exit.text : | ||
| 55 | { | ||
| 56 | EXIT_TEXT | ||
| 57 | } | ||
| 58 | .exit.data : | ||
| 59 | { | ||
| 60 | EXIT_DATA | ||
| 61 | } | ||
| 62 | PERCPU_SECTION(8) | ||
| 63 | . = ALIGN(PAGE_SIZE); | ||
| 64 | __init_end = .; | ||
| 65 | /* freed after init ends here */ | ||
| 66 | |||
| 52 | _text = .; /* Text and read-only data */ | 67 | _text = .; /* Text and read-only data */ |
| 53 | .head ALIGN(16) : { | 68 | _stext = .; |
| 54 | HEAD_TEXT | 69 | .text ALIGN(PAGE_SIZE) : { |
| 55 | } = 0 | ||
| 56 | .text ALIGN(16) : { | ||
| 57 | TEXT_TEXT | 70 | TEXT_TEXT |
| 58 | SCHED_TEXT | 71 | SCHED_TEXT |
| 59 | LOCK_TEXT | 72 | LOCK_TEXT |
| @@ -68,21 +81,28 @@ SECTIONS | |||
| 68 | *(.lock.text) /* out-of-line lock text */ | 81 | *(.lock.text) /* out-of-line lock text */ |
| 69 | *(.gnu.warning) | 82 | *(.gnu.warning) |
| 70 | } | 83 | } |
| 71 | /* End of text section */ | 84 | . = ALIGN(PAGE_SIZE); |
| 72 | _etext = .; | 85 | _etext = .; |
| 86 | /* End of text section */ | ||
| 73 | 87 | ||
| 74 | /* Start of data section */ | 88 | /* Start of data section */ |
| 75 | _sdata = .; | 89 | _sdata = .; |
| 76 | 90 | ||
| 77 | RODATA | 91 | RO_DATA_SECTION(8) |
| 78 | 92 | ||
| 79 | /* writeable */ | 93 | #ifdef CONFIG_64BIT |
| 80 | /* Make sure this is page aligned so | 94 | . = ALIGN(16); |
| 81 | * that we can properly leave these | 95 | /* Linkage tables */ |
| 82 | * as writable | 96 | .opd : { |
| 83 | */ | 97 | *(.opd) |
| 84 | . = ALIGN(PAGE_SIZE); | 98 | } PROVIDE (__gp = .); |
| 85 | data_start = .; | 99 | .plt : { |
| 100 | *(.plt) | ||
| 101 | } | ||
| 102 | .dlt : { | ||
| 103 | *(.dlt) | ||
| 104 | } | ||
| 105 | #endif | ||
| 86 | 106 | ||
| 87 | /* unwind info */ | 107 | /* unwind info */ |
| 88 | .PARISC.unwind : { | 108 | .PARISC.unwind : { |
| @@ -91,7 +111,15 @@ SECTIONS | |||
| 91 | __stop___unwind = .; | 111 | __stop___unwind = .; |
| 92 | } | 112 | } |
| 93 | 113 | ||
| 94 | EXCEPTION_TABLE(16) | 114 | /* writeable */ |
| 115 | /* Make sure this is page aligned so | ||
| 116 | * that we can properly leave these | ||
| 117 | * as writable | ||
| 118 | */ | ||
| 119 | . = ALIGN(PAGE_SIZE); | ||
| 120 | data_start = .; | ||
| 121 | |||
| 122 | EXCEPTION_TABLE(8) | ||
| 95 | NOTES | 123 | NOTES |
| 96 | 124 | ||
| 97 | /* Data */ | 125 | /* Data */ |
| @@ -107,54 +135,8 @@ SECTIONS | |||
| 107 | _edata = .; | 135 | _edata = .; |
| 108 | 136 | ||
| 109 | /* BSS */ | 137 | /* BSS */ |
| 110 | __bss_start = .; | 138 | BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 8) |
| 111 | /* page table entries need to be PAGE_SIZE aligned */ | ||
| 112 | . = ALIGN(PAGE_SIZE); | ||
| 113 | .data..vmpages : { | ||
| 114 | *(.data..vm0.pmd) | ||
| 115 | *(.data..vm0.pgd) | ||
| 116 | *(.data..vm0.pte) | ||
| 117 | } | ||
| 118 | .bss : { | ||
| 119 | *(.bss) | ||
| 120 | *(COMMON) | ||
| 121 | } | ||
| 122 | __bss_stop = .; | ||
| 123 | |||
| 124 | #ifdef CONFIG_64BIT | ||
| 125 | . = ALIGN(16); | ||
| 126 | /* Linkage tables */ | ||
| 127 | .opd : { | ||
| 128 | *(.opd) | ||
| 129 | } PROVIDE (__gp = .); | ||
| 130 | .plt : { | ||
| 131 | *(.plt) | ||
| 132 | } | ||
| 133 | .dlt : { | ||
| 134 | *(.dlt) | ||
| 135 | } | ||
| 136 | #endif | ||
| 137 | 139 | ||
| 138 | /* reserve space for interrupt stack by aligning __init* to 16k */ | ||
| 139 | . = ALIGN(16384); | ||
| 140 | __init_begin = .; | ||
| 141 | INIT_TEXT_SECTION(16384) | ||
| 142 | . = ALIGN(PAGE_SIZE); | ||
| 143 | INIT_DATA_SECTION(16) | ||
| 144 | /* we have to discard exit text and such at runtime, not link time */ | ||
| 145 | .exit.text : | ||
| 146 | { | ||
| 147 | EXIT_TEXT | ||
| 148 | } | ||
| 149 | .exit.data : | ||
| 150 | { | ||
| 151 | EXIT_DATA | ||
| 152 | } | ||
| 153 | |||
| 154 | PERCPU_SECTION(L1_CACHE_BYTES) | ||
| 155 | . = ALIGN(PAGE_SIZE); | ||
| 156 | __init_end = .; | ||
| 157 | /* freed after init ends here */ | ||
| 158 | _end = . ; | 140 | _end = . ; |
| 159 | 141 | ||
| 160 | STABS_DEBUG | 142 | STABS_DEBUG |
