Commit 230c7623 authored by Tony Luck's avatar Tony Luck

Merge intel.com:/data/home/aegl/BK/Linus

into intel.com:/data/home/aegl/BK/linux-ia64-release-2.6.10
parents 1c854f6f bbc48478
......@@ -42,8 +42,7 @@ $(error Sorry, your compiler is too old. GCC v2.96 is known to generate bad cod
endif
ifeq ($(GCC_VERSION),0304)
# Workaround Itanium 1 bugs in gcc 3.4.
# cflags-$(CONFIG_ITANIUM) += -mtune=merced
cflags-$(CONFIG_ITANIUM) += -mtune=merced
cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley
endif
......
......@@ -559,6 +559,10 @@ struct user_regs_struct32 {
extern int save_ia32_fpstate (struct task_struct *, struct ia32_user_i387_struct __user *);
extern int save_ia32_fpxstate (struct task_struct *, struct ia32_user_fxsr_struct __user *);
/* Prototypes for use in sys_ia32.c */
int copy_siginfo_to_user32 (siginfo_t32 __user *to, siginfo_t *from);
int copy_siginfo_from_user32 (siginfo_t *to, siginfo_t32 __user *from);
#endif /* !CONFIG_IA32_SUPPORT */
#endif /* _ASM_IA64_IA32_PRIV_H */
......@@ -1269,7 +1269,6 @@ script_new (unsigned long ip)
{
struct unw_script *script, *prev, *tmp;
unw_hash_index_t index;
unsigned long flags;
unsigned short head;
STAT(++unw.stat.script.news);
......@@ -1278,13 +1277,9 @@ script_new (unsigned long ip)
* Can't (easily) use cmpxchg() here because of ABA problem
* that is intrinsic in cmpxchg()...
*/
spin_lock_irqsave(&unw.lock, flags);
{
head = unw.lru_head;
script = unw.cache + head;
unw.lru_head = script->lru_chain;
}
spin_unlock(&unw.lock);
/*
* We'd deadlock here if we interrupted a thread that is holding a read lock on
......@@ -1295,8 +1290,6 @@ script_new (unsigned long ip)
if (!write_trylock(&script->lock))
return NULL;
spin_lock(&unw.lock);
{
/* re-insert script at the tail of the LRU chain: */
unw.cache[unw.lru_tail].lru_chain = head;
unw.lru_tail = head;
......@@ -1330,8 +1323,6 @@ script_new (unsigned long ip)
script->ip = ip; /* set new IP while we're holding the locks */
STAT(if (script->coll_chain < UNW_CACHE_SIZE) ++unw.stat.script.collisions);
}
spin_unlock_irqrestore(&unw.lock, flags);
script->flags = 0;
script->hint = 0;
......@@ -1830,6 +1821,7 @@ find_save_locs (struct unw_frame_info *info)
{
int have_write_lock = 0;
struct unw_script *scr;
unsigned long flags = 0;
if ((info->ip & (local_cpu_data->unimpl_va_mask | 0xf)) || info->ip < TASK_SIZE) {
/* don't let obviously bad addresses pollute the cache */
......@@ -1841,8 +1833,10 @@ find_save_locs (struct unw_frame_info *info)
scr = script_lookup(info);
if (!scr) {
spin_lock_irqsave(&unw.lock, flags);
scr = build_script(info);
if (!scr) {
spin_unlock_irqrestore(&unw.lock, flags);
UNW_DPRINT(0,
"unwind.%s: failed to locate/build unwind script for ip %lx\n",
__FUNCTION__, info->ip);
......@@ -1855,9 +1849,10 @@ find_save_locs (struct unw_frame_info *info)
run_script(scr, info);
if (have_write_lock)
if (have_write_lock) {
write_unlock(&scr->lock);
else
spin_unlock_irqrestore(&unw.lock, flags);
} else
read_unlock(&scr->lock);
return 0;
}
......
......@@ -305,9 +305,16 @@ swiotlb_alloc_coherent (struct device *hwdev, size_t size, dma_addr_t *dma_handl
flags |= GFP_DMA;
ret = (void *)__get_free_pages(flags, get_order(size));
if (!ret)
if (!ret) {
/* DMA_FROM_DEVICE is to avoid the memcpy in map_single */
dma_addr_t handle;
handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE);
if (dma_mapping_error(handle))
return NULL;
ret = phys_to_virt(handle);
}
memset(ret, 0, size);
dev_addr = virt_to_phys(ret);
if (address_needs_mapping(hwdev,dev_addr))
......@@ -319,7 +326,12 @@ swiotlb_alloc_coherent (struct device *hwdev, size_t size, dma_addr_t *dma_handl
void
swiotlb_free_coherent (struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle)
{
if (!(vaddr >= (void *)io_tlb_start
&& vaddr < (void *)io_tlb_end))
free_pages((unsigned long) vaddr, get_order(size));
else
/* DMA_TO_DEVICE to avoid memcpy in unmap_single */
swiotlb_unmap_single (hwdev, dma_handle, size, DMA_TO_DEVICE);
}
static void swiotlb_full(struct device *dev, size_t size, int dir, int do_panic)
......
......@@ -275,7 +275,7 @@ add_window (struct acpi_resource *res, void *data)
return AE_OK;
window = &info->controller->window[info->controller->windows++];
window->resource.flags |= flags;
window->resource.flags = flags;
window->resource.start = addr.min_address_range;
window->resource.end = addr.max_address_range;
window->offset = offset;
......
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