| To: | <linux-mips@linux-mips.org>, <ralf@linux-mips.org>, "David Daney" <ddaney@caviumnetworks.com> |
|---|---|
| Subject: | [PATCH] MIPS: Allocate exception vector on 64 KiB boundary |
| From: | "David VomLehn (dvomlehn)" <dvomlehn@cisco.com> |
| Date: | Fri, 30 Jan 2009 13:43:42 -0500 |
| Authentication-results: | rtp-dkim-1; header.From=dvomlehn@cisco.com; dkim=pass ( sig from cisco.com/rtpdkim1001 verified; ); |
| Dkim-signature: | v=1; a=rsa-sha256; q=dns/txt; l=1434; t=1233341022; x=1234205022; c=relaxed/simple; s=rtpdkim1001; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=dvomlehn@cisco.com; z=From:=20=22David=20VomLehn=20(dvomlehn)=22=20<dvomlehn@cis co.com> |Subject:=20[PATCH]=20MIPS=3A=20Allocate=20exception=20vect or=20on=2064=20KiB=20boundary |Sender:=20 |To:=20<linux-mips@linux-mips.org>,=20<ralf@linux-mips.org> ,=0A=20=20=20=20=20=20=20=20=22David=20Daney=22=20<ddaney@ca viumnetworks.com>; bh=1fPf7N58tN7YZWhB1AIoYIBqO60adTZQriJQ7euI2hA=; b=XLZSPPIp8iEtRs/p9YVbOluSRm7EkqWBoqBilq2iiuUfW88ImMZNA29zJP VtRhQbeVcgmIno6LhQv1+kgWGwv4MS9SkCUQIUEWY/GHDdAm1xpXi4M7IBOx /asHqD7U0d; |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| Sender: | linux-mips-bounce@linux-mips.org |
| Thread-index: | AcmDCqxxcwzDWyJoRLCej1ccrrdgBw== |
| Thread-topic: | [PATCH] MIPS: Allocate exception vector on 64 KiB boundary |
Fix problem with code that incorrectly modifies ebase.
Commit 566f74f6b2f8b85d5b8d6caaf97e5672cecd3e3e had a change that
incorrectly
modified ebase. This backs out the lines that modified ebase and then
modified
the code to allocate the exception vector with an alignment that
guarantees
that bits 15..12 are always zero. This is a good thing in any case as it
will work regardless of the interrupt vector spacing, and may be what
the
original code was attempting to accomplish.
Signed-off-by: David VomLehn <dvomlehn@cisco.com>
---
arch/mips/kernel/traps.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 3530561..a0ce7fc 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1571,8 +1571,6 @@ void __cpuinit set_uncached_handler(unsigned long
offset, void *addr,
#ifdef CONFIG_64BIT
unsigned long uncached_ebase = TO_UNCAC(ebase);
#endif
- if (cpu_has_mips_r2)
- ebase += (read_c0_ebase() & 0x3ffff000);
if (!addr)
panic(panic_null_cerr);
@@ -1605,7 +1603,8 @@ void __init trap_init(void)
#endif
if (cpu_has_veic || cpu_has_vint)
- ebase = (unsigned long) alloc_bootmem_low_pages(0x200 +
VECTORSPACING*64);
+ ebase = (unsigned long)
+ __alloc_bootmem(0x200 + VECTORSPACING*64, 1 <<
16, 0);
else {
ebase = CAC_BASE;
if (cpu_has_mips_r2)
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 2/3] Alchemy: provide cpu feature overrides., Ralf Baechle |
|---|---|
| Next by Date: | [PATCH v2 2/3] Alchemy: provide cpu feature overrides., Manuel Lauss |
| Previous by Thread: | [PATCH 1/3] Alchemy: unify CPU model constants., Manuel Lauss |
| Next by Thread: | [PATCH] MIPS: in plat_time_init() t reaches -1, tested: 0, Roel Kluin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |