aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-08 19:06:15 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-08 19:06:15 -0400
commita38133298fc678335a0229e97b6161a7ac6fec84 (patch)
tree2500f23fd230e67a8eba96b380245ecb43c3fd4c /arch
parent97d26b8042a6f14cc4a19e84e911a953363e3d69 (diff)
parent70aa488cff83c965c9e1850f48d82b000d0d6c1c (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/module.c10
-rw-r--r--arch/ia64/kernel/setup.c3
-rw-r--r--arch/ia64/kernel/traps.c18
-rw-r--r--arch/ia64/mm/init.c19
-rw-r--r--arch/ia64/sn/kernel/setup.c4
5 files changed, 45 insertions, 9 deletions
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
index febc091c2f02..f1aca7cffd12 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
@@ -825,14 +825,16 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
825 * XXX Should have an arch-hook for running this after final section 825 * XXX Should have an arch-hook for running this after final section
826 * addresses have been selected... 826 * addresses have been selected...
827 */ 827 */
828 /* See if gp can cover the entire core module: */ 828 uint64_t gp;
829 uint64_t gp = (uint64_t) mod->module_core + MAX_LTOFF / 2; 829 if (mod->core_size > MAX_LTOFF)
830 if (mod->core_size >= MAX_LTOFF)
831 /* 830 /*
832 * This takes advantage of fact that SHF_ARCH_SMALL gets allocated 831 * This takes advantage of fact that SHF_ARCH_SMALL gets allocated
833 * at the end of the module. 832 * at the end of the module.
834 */ 833 */
835 gp = (uint64_t) mod->module_core + mod->core_size - MAX_LTOFF / 2; 834 gp = mod->core_size - MAX_LTOFF / 2;
835 else
836 gp = mod->core_size / 2;
837 gp = (uint64_t) mod->module_core + ((gp + 7) & -8);
836 mod->arch.gp = gp; 838 mod->arch.gp = gp;
837 DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp); 839 DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp);
838 } 840 }
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index b7e6b4cb374b..d14692e0920a 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -720,7 +720,8 @@ cpu_init (void)
720 ia64_set_kr(IA64_KR_PT_BASE, __pa(ia64_imva(empty_zero_page))); 720 ia64_set_kr(IA64_KR_PT_BASE, __pa(ia64_imva(empty_zero_page)));
721 721
722 /* 722 /*
723 * Initialize default control register to defer all speculative faults. The 723 * Initialize default control register to defer speculative faults except
724 * for those arising from TLB misses, which are not deferred. The
724 * kernel MUST NOT depend on a particular setting of these bits (in other words, 725 * kernel MUST NOT depend on a particular setting of these bits (in other words,
725 * the kernel must have recovery code for all speculative accesses). Turn on 726 * the kernel must have recovery code for all speculative accesses). Turn on
726 * dcr.lc as per recommendation by the architecture team. Most IA-32 apps 727 * dcr.lc as per recommendation by the architecture team. Most IA-32 apps
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index e82ad78081b3..9bad6652d531 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -111,6 +111,24 @@ ia64_bad_break (unsigned long break_num, struct pt_regs *regs)
111 siginfo_t siginfo; 111 siginfo_t siginfo;
112 int sig, code; 112 int sig, code;
113 113
114 /* break.b always sets cr.iim to 0, which causes problems for
115 * debuggers. Get the real break number from the original instruction,
116 * but only for kernel code. User space break.b is left alone, to
117 * preserve the existing behaviour. All break codings have the same
118 * format, so there is no need to check the slot type.
119 */
120 if (break_num == 0 && !user_mode(regs)) {
121 struct ia64_psr *ipsr = ia64_psr(regs);
122 unsigned long *bundle = (unsigned long *)regs->cr_iip;
123 unsigned long slot;
124 switch (ipsr->ri) {
125 case 0: slot = (bundle[0] >> 5); break;
126 case 1: slot = (bundle[0] >> 46) | (bundle[1] << 18); break;
127 default: slot = (bundle[1] >> 23); break;
128 }
129 break_num = ((slot >> 36 & 1) << 20) | (slot >> 6 & 0xfffff);
130 }
131
114 /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */ 132 /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */
115 siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri); 133 siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri);
116 siginfo.si_imm = break_num; 134 siginfo.si_imm = break_num;
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 547785e3cba2..4eb2f52b87a1 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -305,8 +305,9 @@ setup_gate (void)
305 struct page *page; 305 struct page *page;
306 306
307 /* 307 /*
308 * Map the gate page twice: once read-only to export the ELF headers etc. and once 308 * Map the gate page twice: once read-only to export the ELF
309 * execute-only page to enable privilege-promotion via "epc": 309 * headers etc. and once execute-only page to enable
310 * privilege-promotion via "epc":
310 */ 311 */
311 page = virt_to_page(ia64_imva(__start_gate_section)); 312 page = virt_to_page(ia64_imva(__start_gate_section));
312 put_kernel_page(page, GATE_ADDR, PAGE_READONLY); 313 put_kernel_page(page, GATE_ADDR, PAGE_READONLY);
@@ -315,6 +316,20 @@ setup_gate (void)
315 put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE); 316 put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE);
316#else 317#else
317 put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE); 318 put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE);
319 /* Fill in the holes (if any) with read-only zero pages: */
320 {
321 unsigned long addr;
322
323 for (addr = GATE_ADDR + PAGE_SIZE;
324 addr < GATE_ADDR + PERCPU_PAGE_SIZE;
325 addr += PAGE_SIZE)
326 {
327 put_kernel_page(ZERO_PAGE(0), addr,
328 PAGE_READONLY);
329 put_kernel_page(ZERO_PAGE(0), addr + PERCPU_PAGE_SIZE,
330 PAGE_READONLY);
331 }
332 }
318#endif 333#endif
319 ia64_patch_gate(); 334 ia64_patch_gate();
320} 335}
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index e64cb8175f7a..44bfc7f318cb 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -222,7 +222,7 @@ void __init early_sn_setup(void)
222 222
223extern int platform_intr_list[]; 223extern int platform_intr_list[];
224extern nasid_t master_nasid; 224extern nasid_t master_nasid;
225static int shub_1_1_found __initdata; 225static int __initdata shub_1_1_found = 0;
226 226
227/* 227/*
228 * sn_check_for_wars 228 * sn_check_for_wars
@@ -251,7 +251,7 @@ static void __init sn_check_for_wars(void)
251 } else { 251 } else {
252 for_each_online_node(cnode) { 252 for_each_online_node(cnode) {
253 if (is_shub_1_1(cnodeid_to_nasid(cnode))) 253 if (is_shub_1_1(cnodeid_to_nasid(cnode)))
254 sn_hub_info->shub_1_1_found = 1; 254 shub_1_1_found = 1;
255 } 255 }
256 } 256 }
257} 257}