mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
Merge branch 'akpm' (Andrew's patch-bomb)
Merge misc fixes from Andrew Morton. * emailed from Andrew Morton <akpm@linux-foundation.org>: (4 patches) frv: delete incorrect task prototypes causing compile fail slub: missing test for partial pages flush work in flush_all() fs, proc: fix ABBA deadlock in case of execution attempt of map_files/ entries drivers/rtc/rtc-pl031.c: configure correct wday for 2000-01-01
This commit is contained in:
commit
73f1f5dd3e
@ -135,10 +135,6 @@ unsigned long get_wchan(struct task_struct *p);
|
||||
#define KSTK_EIP(tsk) ((tsk)->thread.frame0->pc)
|
||||
#define KSTK_ESP(tsk) ((tsk)->thread.frame0->sp)
|
||||
|
||||
/* Allocation and freeing of basic task resources. */
|
||||
extern struct task_struct *alloc_task_struct_node(int node);
|
||||
extern void free_task_struct(struct task_struct *p);
|
||||
|
||||
#define cpu_relax() barrier()
|
||||
|
||||
/* data cache prefetch */
|
||||
|
@ -312,6 +312,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
int ret;
|
||||
struct pl031_local *ldata;
|
||||
struct rtc_class_ops *ops = id->data;
|
||||
unsigned long time;
|
||||
|
||||
ret = amba_request_regions(adev, NULL);
|
||||
if (ret)
|
||||
@ -343,6 +344,23 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
writel(readl(ldata->base + RTC_CR) | RTC_CR_CWEN,
|
||||
ldata->base + RTC_CR);
|
||||
|
||||
/*
|
||||
* On ST PL031 variants, the RTC reset value does not provide correct
|
||||
* weekday for 2000-01-01. Correct the erroneous sunday to saturday.
|
||||
*/
|
||||
if (ldata->hw_designer == AMBA_VENDOR_ST) {
|
||||
if (readl(ldata->base + RTC_YDR) == 0x2000) {
|
||||
time = readl(ldata->base + RTC_DR);
|
||||
if ((time &
|
||||
(RTC_MON_MASK | RTC_MDAY_MASK | RTC_WDAY_MASK))
|
||||
== 0x02120000) {
|
||||
time = time | (0x7 << RTC_WDAY_SHIFT);
|
||||
writel(0x2000, ldata->base + RTC_YLR);
|
||||
writel(time, ldata->base + RTC_LR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ldata->rtc = rtc_device_register("pl031", &adev->dev, ops,
|
||||
THIS_MODULE);
|
||||
if (IS_ERR(ldata->rtc)) {
|
||||
|
@ -2162,16 +2162,16 @@ static struct dentry *proc_map_files_lookup(struct inode *dir,
|
||||
goto out;
|
||||
|
||||
result = ERR_PTR(-EACCES);
|
||||
if (lock_trace(task))
|
||||
if (!ptrace_may_access(task, PTRACE_MODE_READ))
|
||||
goto out_put_task;
|
||||
|
||||
result = ERR_PTR(-ENOENT);
|
||||
if (dname_to_vma_addr(dentry, &vm_start, &vm_end))
|
||||
goto out_unlock;
|
||||
goto out_put_task;
|
||||
|
||||
mm = get_task_mm(task);
|
||||
if (!mm)
|
||||
goto out_unlock;
|
||||
goto out_put_task;
|
||||
|
||||
down_read(&mm->mmap_sem);
|
||||
vma = find_exact_vma(mm, vm_start, vm_end);
|
||||
@ -2183,8 +2183,6 @@ static struct dentry *proc_map_files_lookup(struct inode *dir,
|
||||
out_no_vma:
|
||||
up_read(&mm->mmap_sem);
|
||||
mmput(mm);
|
||||
out_unlock:
|
||||
unlock_trace(task);
|
||||
out_put_task:
|
||||
put_task_struct(task);
|
||||
out:
|
||||
@ -2218,7 +2216,7 @@ proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
|
||||
goto out;
|
||||
|
||||
ret = -EACCES;
|
||||
if (lock_trace(task))
|
||||
if (!ptrace_may_access(task, PTRACE_MODE_READ))
|
||||
goto out_put_task;
|
||||
|
||||
ret = 0;
|
||||
@ -2226,12 +2224,12 @@ proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
|
||||
case 0:
|
||||
ino = inode->i_ino;
|
||||
if (filldir(dirent, ".", 1, 0, ino, DT_DIR) < 0)
|
||||
goto out_unlock;
|
||||
goto out_put_task;
|
||||
filp->f_pos++;
|
||||
case 1:
|
||||
ino = parent_ino(dentry);
|
||||
if (filldir(dirent, "..", 2, 1, ino, DT_DIR) < 0)
|
||||
goto out_unlock;
|
||||
goto out_put_task;
|
||||
filp->f_pos++;
|
||||
default:
|
||||
{
|
||||
@ -2242,7 +2240,7 @@ proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
|
||||
|
||||
mm = get_task_mm(task);
|
||||
if (!mm)
|
||||
goto out_unlock;
|
||||
goto out_put_task;
|
||||
down_read(&mm->mmap_sem);
|
||||
|
||||
nr_files = 0;
|
||||
@ -2272,7 +2270,7 @@ proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
|
||||
flex_array_free(fa);
|
||||
up_read(&mm->mmap_sem);
|
||||
mmput(mm);
|
||||
goto out_unlock;
|
||||
goto out_put_task;
|
||||
}
|
||||
for (i = 0, vma = mm->mmap, pos = 2; vma;
|
||||
vma = vma->vm_next) {
|
||||
@ -2317,8 +2315,6 @@ proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
|
||||
}
|
||||
}
|
||||
|
||||
out_unlock:
|
||||
unlock_trace(task);
|
||||
out_put_task:
|
||||
put_task_struct(task);
|
||||
out:
|
||||
|
Loading…
Reference in New Issue
Block a user