Commit 26c5cebf authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'parisc-4.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parsic fixes from Helge Deller:

 - Our cache flushing code ran into a BUG in case context is not
   current. Fix it by flushing the whole cache in such rare situations
   (by Dave Anglin).

 - Fix a "sleeping function called from invalid context BUG" in our
   pdc_stable driver by rearranging our locks (by James Bottomley)

 - The thread and irq stacks require more than 16 KB since kernel 4.11.
   Increase both to 32 KB.

 - Define CONFIG_CPU_BIG_ENDIAN unconditionally on parisc to avoid wrong
   behaviour in qrwlock functions (by Babu Moger).

* 'parisc-4.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Define CONFIG_CPU_BIG_ENDIAN
  parisc: pdc_stable: Fix locking when creating sysfs links
  parisc: Increase thread and stack size to 32kb
  parisc: Handle vma's whose context is not current in flush_cache_range
parents bc78d646 74ad3d28
......@@ -47,6 +47,9 @@ config PARISC
and later HP3000 series). The PA-RISC Linux project home page is
at <http://www.parisc-linux.org/>.
config CPU_BIG_ENDIAN
def_bool y
config MMU
def_bool y
......
......@@ -34,7 +34,7 @@ struct thread_info {
/* thread information allocation */
#define THREAD_SIZE_ORDER 2 /* PA-RISC requires at least 16k stack */
#define THREAD_SIZE_ORDER 3 /* PA-RISC requires at least 32k stack */
/* Be sure to hunt all references to this down when you change the size of
* the kernel stack */
#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
......
......@@ -587,13 +587,12 @@ void flush_cache_range(struct vm_area_struct *vma,
if (parisc_requires_coherency())
flush_tlb_range(vma, start, end);
if ((end - start) >= parisc_cache_flush_threshold) {
if ((end - start) >= parisc_cache_flush_threshold
|| vma->vm_mm->context != mfsp(3)) {
flush_cache_all();
return;
}
BUG_ON(vma->vm_mm->context != mfsp(3));
flush_user_dcache_range_asm(start, end);
if (vma->vm_flags & VM_EXEC)
flush_user_icache_range_asm(start, end);
......
......@@ -380,7 +380,7 @@ static inline int eirr_to_irq(unsigned long eirr)
/*
* IRQ STACK - used for irq handler
*/
#define IRQ_STACK_SIZE (4096 << 2) /* 16k irq stack size */
#define IRQ_STACK_SIZE (4096 << 3) /* 32k irq stack size */
union irq_stack_union {
unsigned long stack[IRQ_STACK_SIZE/sizeof(unsigned long)];
......
......@@ -333,11 +333,11 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun
/* Update the symlink to the real device */
sysfs_remove_link(&entry->kobj, "device");
write_unlock(&entry->rw_lock);
ret = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device");
WARN_ON(ret);
write_unlock(&entry->rw_lock);
printk(KERN_INFO PDCS_PREFIX ": changed \"%s\" path to \"%s\"\n",
entry->name, buf);
......@@ -998,6 +998,7 @@ pdcs_register_pathentries(void)
/* kobject is now registered */
write_lock(&entry->rw_lock);
entry->ready = 2;
write_unlock(&entry->rw_lock);
/* Add a nice symlink to the real device */
if (entry->dev) {
......@@ -1005,7 +1006,6 @@ pdcs_register_pathentries(void)
WARN_ON(err);
}
write_unlock(&entry->rw_lock);
kobject_uevent(&entry->kobj, KOBJ_ADD);
}
......
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