Commit b75ae860 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 75ca0d22 1ee27a4e
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/time.h> #include <linux/time.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/efi.h> #include <linux/efi.h>
#include <linux/profile.h>
#include <linux/timex.h> #include <linux/timex.h>
#include <asm/machvec.h> #include <asm/machvec.h>
......
...@@ -1856,11 +1856,19 @@ find_save_locs (struct unw_frame_info *info) ...@@ -1856,11 +1856,19 @@ find_save_locs (struct unw_frame_info *info)
return 0; return 0;
} }
static int
unw_valid(const struct unw_frame_info *info, unsigned long* p)
{
unsigned long loc = (unsigned long)p;
return (loc >= info->regstk.limit && loc < info->regstk.top) ||
(loc >= info->memstk.top && loc < info->memstk.limit);
}
int int
unw_unwind (struct unw_frame_info *info) unw_unwind (struct unw_frame_info *info)
{ {
unsigned long prev_ip, prev_sp, prev_bsp; unsigned long prev_ip, prev_sp, prev_bsp;
unsigned long ip, pr, num_regs, rp_loc, pfs_loc; unsigned long ip, pr, num_regs;
STAT(unsigned long start, flags;) STAT(unsigned long start, flags;)
int retval; int retval;
...@@ -1871,8 +1879,7 @@ unw_unwind (struct unw_frame_info *info) ...@@ -1871,8 +1879,7 @@ unw_unwind (struct unw_frame_info *info)
prev_bsp = info->bsp; prev_bsp = info->bsp;
/* validate the return IP pointer */ /* validate the return IP pointer */
rp_loc = (unsigned long) info->rp_loc; if (!unw_valid(info, info->rp_loc)) {
if ((rp_loc < info->regstk.limit) || (rp_loc > info->regstk.top)) {
/* FIXME: should really be level 0 but it occurs too often. KAO */ /* FIXME: should really be level 0 but it occurs too often. KAO */
UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n", UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n",
__FUNCTION__, info->ip); __FUNCTION__, info->ip);
...@@ -1888,8 +1895,7 @@ unw_unwind (struct unw_frame_info *info) ...@@ -1888,8 +1895,7 @@ unw_unwind (struct unw_frame_info *info)
} }
/* validate the previous stack frame pointer */ /* validate the previous stack frame pointer */
pfs_loc = (unsigned long) info->pfs_loc; if (!unw_valid(info, info->pfs_loc)) {
if ((pfs_loc < info->regstk.limit) || (pfs_loc > info->regstk.top)) {
UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__); UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__);
STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
return -1; return -1;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/sysctl.h> #include <linux/sysctl.h>
#include <linux/log2.h>
#include <asm/mman.h> #include <asm/mman.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/tlb.h> #include <asm/tlb.h>
...@@ -182,7 +183,7 @@ static int __init hugetlb_setup_sz(char *str) ...@@ -182,7 +183,7 @@ static int __init hugetlb_setup_sz(char *str)
tr_pages = 0x15557000UL; tr_pages = 0x15557000UL;
size = memparse(str, &str); size = memparse(str, &str);
if (*str || (size & (size-1)) || !(tr_pages & size) || if (*str || !is_power_of_2(size) || !(tr_pages & size) ||
size <= PAGE_SIZE || size <= PAGE_SIZE ||
size >= (1UL << PAGE_SHIFT << MAX_ORDER)) { size >= (1UL << PAGE_SHIFT << MAX_ORDER)) {
printk(KERN_WARNING "Invalid huge page size specified\n"); printk(KERN_WARNING "Invalid huge page size specified\n");
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
xp_nofault_PIOR: xp_nofault_PIOR:
mov r8=r0 // Stage a success return value mov r8=r0 // Stage a success return value
ld8.acq r9=[r32];; // PIO Read the specified register ld8.acq r9=[r32];; // PIO Read the specified register
adds r9=1,r9 // Add to force a consume adds r9=1,r9;; // Add to force consumption
or r9=r9,r9;; // Or to force consumption
br.ret.sptk.many b0;; // Return success br.ret.sptk.many b0;; // Return success
.global xp_error_PIOR .global xp_error_PIOR
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <asm/sn/pcibus_provider_defs.h> #include <asm/sn/pcibus_provider_defs.h>
#include <asm/sn/pcidev.h> #include <asm/sn/pcidev.h>
#include <asm/sn/sn_sal.h> #include <asm/sn/sn_sal.h>
#include <asm/sn/pic.h>
#include <asm/sn/sn2/sn_hwperf.h> #include <asm/sn/sn2/sn_hwperf.h>
#include "xtalk/xwidgetdev.h" #include "xtalk/xwidgetdev.h"
#include "xtalk/hubdev.h" #include "xtalk/hubdev.h"
...@@ -130,9 +131,9 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont ...@@ -130,9 +131,9 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
} }
memcpy(soft, prom_bussoft, sizeof(struct pcibus_info)); memcpy(soft, prom_bussoft, sizeof(struct pcibus_info));
soft->pbi_buscommon.bs_base = soft->pbi_buscommon.bs_base = (unsigned long)
(((u64) soft->pbi_buscommon. ioremap(REGION_OFFSET(soft->pbi_buscommon.bs_base),
bs_base << 4) >> 4) | __IA64_UNCACHED_OFFSET; sizeof(struct pic));
spin_lock_init(&soft->pbi_lock); spin_lock_init(&soft->pbi_lock);
......
...@@ -610,7 +610,9 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont ...@@ -610,7 +610,9 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
return NULL; return NULL;
memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common)); memcpy(tioca_common, prom_bussoft, sizeof(struct tioca_common));
tioca_common->ca_common.bs_base |= __IA64_UNCACHED_OFFSET; tioca_common->ca_common.bs_base = (unsigned long)
ioremap(REGION_OFFSET(tioca_common->ca_common.bs_base),
sizeof(struct tioca_common));
/* init kernel-private area */ /* init kernel-private area */
......
...@@ -1002,7 +1002,9 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont ...@@ -1002,7 +1002,9 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
return NULL; return NULL;
memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common)); memcpy(tioce_common, prom_bussoft, sizeof(struct tioce_common));
tioce_common->ce_pcibus.bs_base |= __IA64_UNCACHED_OFFSET; tioce_common->ce_pcibus.bs_base = (unsigned long)
ioremap(REGION_OFFSET(tioce_common->ce_pcibus.bs_base),
sizeof(struct tioce_common));
tioce_kern = tioce_kern_init(tioce_common); tioce_kern = tioce_kern_init(tioce_common);
if (tioce_kern == NULL) { if (tioce_kern == NULL) {
......
...@@ -696,7 +696,7 @@ static inline int ...@@ -696,7 +696,7 @@ static inline int
sn_change_coherence(u64 *new_domain, u64 *old_domain) sn_change_coherence(u64 *new_domain, u64 *old_domain)
{ {
struct ia64_sal_retval ret_stuff; struct ia64_sal_retval ret_stuff;
ia64_sal_oemcall(&ret_stuff, SN_SAL_COHERENCE, (u64)new_domain, ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_COHERENCE, (u64)new_domain,
(u64)old_domain, 0, 0, 0, 0, 0); (u64)old_domain, 0, 0, 0, 0, 0);
return ret_stuff.status; return ret_stuff.status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment