aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-27 13:04:02 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-27 13:04:02 -0400
commitb75ae8603568ae18f270213693758c78fb8a29ff (patch)
tree15e6c100baadcbce6b7f9f00d50de8c2b7da4c01 /arch
parent75ca0d22668a36fc83e17407d369b528a22c562c (diff)
parent1ee27a4eedf3cc08245d395936c1bfaf80c074cc (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] Make SN2 PCI code use ioremap rather than manually mangle the address [IA64] Force error to surface in nofault code [IA64] change sh_change_coherence oemcall to use nolock [IA64] remove duplicate header include line [IA64] Correct unwind validation code [IA64] is_power_of_2-ia64/mm/hugetlbpage.c
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/time.c1
-rw-r--r--arch/ia64/kernel/unwind.c16
-rw-r--r--arch/ia64/mm/hugetlbpage.c3
-rw-r--r--arch/ia64/sn/kernel/xp_nofault.S3
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c7
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c4
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c4
7 files changed, 25 insertions, 13 deletions
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index a06667c7acc0..3486fe7d6e65 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -18,7 +18,6 @@
18#include <linux/time.h> 18#include <linux/time.h>
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/efi.h> 20#include <linux/efi.h>
21#include <linux/profile.h>
22#include <linux/timex.h> 21#include <linux/timex.h>
23 22
24#include <asm/machvec.h> 23#include <asm/machvec.h>
diff --git a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c
index b0b08b5f3eca..c1bdb5131814 100644
--- a/arch/ia64/kernel/unwind.c
+++ b/arch/ia64/kernel/unwind.c
@@ -1856,11 +1856,19 @@ find_save_locs (struct unw_frame_info *info)
1856 return 0; 1856 return 0;
1857} 1857}
1858 1858
1859static int
1860unw_valid(const struct unw_frame_info *info, unsigned long* p)
1861{
1862 unsigned long loc = (unsigned long)p;
1863 return (loc >= info->regstk.limit && loc < info->regstk.top) ||
1864 (loc >= info->memstk.top && loc < info->memstk.limit);
1865}
1866
1859int 1867int
1860unw_unwind (struct unw_frame_info *info) 1868unw_unwind (struct unw_frame_info *info)
1861{ 1869{
1862 unsigned long prev_ip, prev_sp, prev_bsp; 1870 unsigned long prev_ip, prev_sp, prev_bsp;
1863 unsigned long ip, pr, num_regs, rp_loc, pfs_loc; 1871 unsigned long ip, pr, num_regs;
1864 STAT(unsigned long start, flags;) 1872 STAT(unsigned long start, flags;)
1865 int retval; 1873 int retval;
1866 1874
@@ -1871,8 +1879,7 @@ unw_unwind (struct unw_frame_info *info)
1871 prev_bsp = info->bsp; 1879 prev_bsp = info->bsp;
1872 1880
1873 /* validate the return IP pointer */ 1881 /* validate the return IP pointer */
1874 rp_loc = (unsigned long) info->rp_loc; 1882 if (!unw_valid(info, info->rp_loc)) {
1875 if ((rp_loc < info->regstk.limit) || (rp_loc > info->regstk.top)) {
1876 /* FIXME: should really be level 0 but it occurs too often. KAO */ 1883 /* FIXME: should really be level 0 but it occurs too often. KAO */
1877 UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n", 1884 UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n",
1878 __FUNCTION__, info->ip); 1885 __FUNCTION__, info->ip);
@@ -1888,8 +1895,7 @@ unw_unwind (struct unw_frame_info *info)
1888 } 1895 }
1889 1896
1890 /* validate the previous stack frame pointer */ 1897 /* validate the previous stack frame pointer */
1891 pfs_loc = (unsigned long) info->pfs_loc; 1898 if (!unw_valid(info, info->pfs_loc)) {
1892 if ((pfs_loc < info->regstk.limit) || (pfs_loc > info->regstk.top)) {
1893 UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__); 1899 UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__);
1894 STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); 1900 STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
1895 return -1; 1901 return -1;
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index 1346b7f05397..d22861c5b04c 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -15,6 +15,7 @@
15#include <linux/pagemap.h> 15#include <linux/pagemap.h>
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/sysctl.h> 17#include <linux/sysctl.h>
18#include <linux/log2.h>
18#include <asm/mman.h> 19#include <asm/mman.h>
19#include <asm/pgalloc.h> 20#include <asm/pgalloc.h>
20#include <asm/tlb.h> 21#include <asm/tlb.h>
@@ -182,7 +183,7 @@ static int __init hugetlb_setup_sz(char *str)
182 tr_pages = 0x15557000UL; 183 tr_pages = 0x15557000UL;
183 184
184 size = memparse(str, &str); 185 size = memparse(str, &str);
185 if (*str || (size & (size-1)) || !(tr_pages & size) || 186 if (*str || !is_power_of_2(size) || !(tr_pages & size) ||
186 size <= PAGE_SIZE || 187 size <= PAGE_SIZE ||
187 size >= (1UL << PAGE_SHIFT << MAX_ORDER)) { 188 size >= (1UL << PAGE_SHIFT << MAX_ORDER)) {
188 printk(KERN_WARNING "Invalid huge page size specified\n"); 189 printk(KERN_WARNING "Invalid huge page size specified\n");
diff --git a/arch/ia64/sn/kernel/xp_nofault.S b/arch/ia64/sn/kernel/xp_nofault.S
index b772543053c9..54e8973b6e99 100644
--- a/arch/ia64/sn/kernel/xp_nofault.S
+++ b/arch/ia64/sn/kernel/xp_nofault.S
@@ -21,7 +21,8 @@
21xp_nofault_PIOR: 21xp_nofault_PIOR:
22 mov r8=r0 // Stage a success return value 22 mov r8=r0 // Stage a success return value
23 ld8.acq r9=[r32];; // PIO Read the specified register 23 ld8.acq r9=[r32];; // PIO Read the specified register
24 adds r9=1,r9 // Add to force a consume 24 adds r9=1,r9;; // Add to force consumption
25 or r9=r9,r9;; // Or to force consumption
25 br.ret.sptk.many b0;; // Return success 26 br.ret.sptk.many b0;; // Return success
26 27
27 .global xp_error_PIOR 28 .global xp_error_PIOR
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 04a8256017eb..b42bfcae6f91 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -15,6 +15,7 @@
15#include <asm/sn/pcibus_provider_defs.h> 15#include <asm/sn/pcibus_provider_defs.h>
16#include <asm/sn/pcidev.h> 16#include <asm/sn/pcidev.h>
17#include <asm/sn/sn_sal.h> 17#include <asm/sn/sn_sal.h>
18#include <asm/sn/pic.h>
18#include <asm/sn/sn2/sn_hwperf.h> 19#include <asm/sn/sn2/sn_hwperf.h>
19#include "xtalk/xwidgetdev.h" 20#include "xtalk/xwidgetdev.h"
20#include "xtalk/hubdev.h" 21#include "xtalk/hubdev.h"
@@ -130,9 +131,9 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
130 } 131 }
131 132
132 memcpy(soft, prom_bussoft, sizeof(struct pcibus_info)); 133 memcpy(soft, prom_bussoft, sizeof(struct pcibus_info));
133 soft->pbi_buscommon.bs_base = 134 soft->pbi_buscommon.bs_base = (unsigned long)
134 (((u64) soft->pbi_buscommon. 135 ioremap(REGION_OFFSET(soft->pbi_buscommon.bs_base),
135 bs_base << 4) >> 4) | __IA64_UNCACHED_OFFSET; 136 sizeof(struct pic));
136 137
137 spin_lock_init(&soft->pbi_lock); 138 spin_lock_init(&soft->pbi_lock);
138 139
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index b9bedbd6e1d6..d798dd4d0dc4 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -610,7 +610,9 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
610 return NULL; 610 return NULL;
611 611
612 memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common)); 612 memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common));
613 tioca_common->ca_common.bs_base |= __IA64_UNCACHED_OFFSET; 613 tioca_common->ca_common.bs_base = (unsigned long)
614 ioremap(REGION_OFFSET(tioca_common->ca_common.bs_base),
615 sizeof(struct tioca_common));
614 616
615 /* init kernel-private area */ 617 /* init kernel-private area */
616 618
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index f4c0b961a939..84b72b27e27f 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -1002,7 +1002,9 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
1002 return NULL; 1002 return NULL;
1003 1003
1004 memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common)); 1004 memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common));
1005 tioce_common->ce_pcibus.bs_base |= __IA64_UNCACHED_OFFSET; 1005 tioce_common->ce_pcibus.bs_base = (unsigned long)
1006 ioremap(REGION_OFFSET(tioce_common->ce_pcibus.bs_base),
1007 sizeof(struct tioce_common));
1006 1008
1007 tioce_kern = tioce_kern_init(tioce_common); 1009 tioce_kern = tioce_kern_init(tioce_common);
1008 if (tioce_kern == NULL) { 1010 if (tioce_kern == NULL) {