* [folded] cross-memory-attach-update.patch removed from -mm tree
From: akpm @ 2011-10-31 23:39 UTC (permalink / raw)
To: cyeoh, hpa, mingo, rdunlap, tglx, mm-commits
The patch titled
Subject: cross-memory-attach-update
has been removed from the -mm tree. Its filename was
cross-memory-attach-update.patch
This patch was dropped because it was folded into cross-memory-attach-v3.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Christopher Yeoh <cyeoh@au1.ibm.com>
Subject: cross-memory-attach-update
- Add x86_64 specific wire up
- Change behaviour so process_vm_readv and process_vm_writev return
the number of bytes successfully read or written even if an error
occurs
- Add more kernel doc interface comments
- rename some internal functions (process_vm_rw_check_iovecs,
process_vm_rw) so they make more sense.
- Add licence message
- Fix kernel-doc comment format
Still need to do benchmarking to see if the optimisation for small copies
using a local on-stack array in process_vm_rw_core is worth it.
Signed-off-by: Chris Yeoh <cyeoh@au1.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/x86/ia32/ia32entry.S | 2
arch/x86/include/asm/unistd_64.h | 4
kernel/sys_ni.c | 4
mm/process_vm_access.c | 203 +++++++++++++++++------------
4 files changed, 132 insertions(+), 81 deletions(-)
diff -puN arch/x86/ia32/ia32entry.S~cross-memory-attach-update arch/x86/ia32/ia32entry.S
--- a/arch/x86/ia32/ia32entry.S~cross-memory-attach-update
+++ a/arch/x86/ia32/ia32entry.S
@@ -850,4 +850,6 @@ ia32_sys_call_table:
.quad sys_syncfs
.quad compat_sys_sendmmsg /* 345 */
.quad sys_setns
+ .quad compat_sys_process_vm_readv
+ .quad compat_sys_process_vm_writev
ia32_syscall_end:
diff -puN arch/x86/include/asm/unistd_64.h~cross-memory-attach-update arch/x86/include/asm/unistd_64.h
--- a/arch/x86/include/asm/unistd_64.h~cross-memory-attach-update
+++ a/arch/x86/include/asm/unistd_64.h
@@ -682,6 +682,10 @@ __SYSCALL(__NR_sendmmsg, sys_sendmmsg)
__SYSCALL(__NR_setns, sys_setns)
#define __NR_getcpu 309
__SYSCALL(__NR_getcpu, sys_getcpu)
+#define __NR_process_vm_readv 310
+__SYSCALL(__NR_process_vm_readv, sys_process_vm_readv)
+#define __NR_process_vm_writev 311
+__SYSCALL(__NR_process_vm_writev, sys_process_vm_writev)
#ifndef __NO_STUBS
#define __ARCH_WANT_OLD_READDIR
diff -puN kernel/sys_ni.c~cross-memory-attach-update kernel/sys_ni.c
--- a/kernel/sys_ni.c~cross-memory-attach-update
+++ a/kernel/sys_ni.c
@@ -145,6 +145,10 @@ cond_syscall(sys_io_submit);
cond_syscall(sys_io_cancel);
cond_syscall(sys_io_getevents);
cond_syscall(sys_syslog);
+cond_syscall(sys_process_vm_readv);
+cond_syscall(sys_process_vm_writev);
+cond_syscall(compat_sys_process_vm_readv);
+cond_syscall(compat_sys_process_vm_writev);
/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read);
diff -puN mm/process_vm_access.c~cross-memory-attach-update mm/process_vm_access.c
--- a/mm/process_vm_access.c~cross-memory-attach-update
+++ a/mm/process_vm_access.c
@@ -1,7 +1,12 @@
/*
- * linux/mm/process_vm_access.c
+ * linux/mm/process_vm_access.c
*
- * Copyright (C) 2010-2011 Christopher Yeoh <cyeoh@au1.ibm.com>, IBM Corp.
+ * Copyright (C) 2010-2011 Christopher Yeoh <cyeoh@au1.ibm.com>, IBM Corp.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
*/
#include <linux/mm.h>
@@ -16,7 +21,7 @@
#include <linux/compat.h>
#endif
-/*
+/**
* process_vm_rw_pages - read/write pages from task specified
* @task: task to read/write from
* @mm: mm for task
@@ -31,19 +36,22 @@
* @lvec_offset: offset in bytes from current iovec iov_base we are up to
* @vm_write: 0 means copy from, 1 means copy to
* @nr_pages_to_copy: number of pages to copy
+ * @bytes_copied: returns number of bytes successfully copied
+ * Returns 0 on success, error code otherwise
*/
-static ssize_t process_vm_rw_pages(struct task_struct *task,
- struct mm_struct *mm,
- struct page **process_pages,
- unsigned long pa,
- unsigned long start_offset,
- unsigned long len,
- const struct iovec *lvec,
- unsigned long lvec_cnt,
- unsigned long *lvec_current,
- size_t *lvec_offset,
- int vm_write,
- unsigned int nr_pages_to_copy)
+static int process_vm_rw_pages(struct task_struct *task,
+ struct mm_struct *mm,
+ struct page **process_pages,
+ unsigned long pa,
+ unsigned long start_offset,
+ unsigned long len,
+ const struct iovec *lvec,
+ unsigned long lvec_cnt,
+ unsigned long *lvec_current,
+ size_t *lvec_offset,
+ int vm_write,
+ unsigned int nr_pages_to_copy,
+ ssize_t *bytes_copied)
{
int pages_pinned;
void *target_kaddr;
@@ -51,8 +59,9 @@ static ssize_t process_vm_rw_pages(struc
int j;
int ret;
ssize_t bytes_to_copy;
- ssize_t bytes_copied = 0;
- ssize_t rc = -EFAULT;
+ ssize_t rc = 0;
+
+ *bytes_copied = 0;
/* Get the pages we're interested in */
down_read(&mm->mmap_sem);
@@ -61,8 +70,10 @@ static ssize_t process_vm_rw_pages(struc
vm_write, 0, process_pages, NULL);
up_read(&mm->mmap_sem);
- if (pages_pinned != nr_pages_to_copy)
+ if (pages_pinned != nr_pages_to_copy) {
+ rc = -EFAULT;
goto end;
+ }
/* Do the copy for each page */
for (pgs_copied = 0;
@@ -81,7 +92,7 @@ static ssize_t process_vm_rw_pages(struc
* - bytes remaining in destination iovec
*/
bytes_to_copy = min_t(ssize_t, PAGE_SIZE - start_offset,
- len - bytes_copied);
+ len - *bytes_copied);
bytes_to_copy = min_t(ssize_t, bytes_to_copy,
lvec[*lvec_current].iov_len
- *lvec_offset);
@@ -99,10 +110,12 @@ static ssize_t process_vm_rw_pages(struc
target_kaddr, bytes_to_copy);
kunmap(process_pages[pgs_copied]);
if (ret) {
+ *bytes_copied += bytes_to_copy - ret;
pgs_copied++;
+ rc = -EFAULT;
goto end;
}
- bytes_copied += bytes_to_copy;
+ *bytes_copied += bytes_to_copy;
*lvec_offset += bytes_to_copy;
if (*lvec_offset == lvec[*lvec_current].iov_len) {
/*
@@ -120,8 +133,6 @@ static ssize_t process_vm_rw_pages(struc
}
}
- rc = bytes_copied;
-
end:
if (vm_write) {
for (j = 0; j < pages_pinned; j++) {
@@ -140,7 +151,7 @@ end:
/* Maximum number of pages kmalloc'd to hold struct page's during copy */
#define PVM_MAX_KMALLOC_PAGES (PAGE_SIZE * 2)
-/*
+/**
* process_vm_rw_single_vec - read/write pages from task specified
* @addr: start memory address of target process
* @len: size of area to copy to/from
@@ -153,35 +164,38 @@ end:
* @mm: mm for task
* @task: task to read/write from
* @vm_write: 0 means copy from, 1 means copy to
+ * @bytes_copied: returns number of bytes successfully copied
+ * Returns 0 on success or on failure error code
*/
-static ssize_t process_vm_rw_single_vec(unsigned long addr,
- unsigned long len,
- const struct iovec *lvec,
- unsigned long lvec_cnt,
- unsigned long *lvec_current,
- size_t *lvec_offset,
- struct page **process_pages,
- struct mm_struct *mm,
- struct task_struct *task,
- int vm_write)
+static int process_vm_rw_single_vec(unsigned long addr,
+ unsigned long len,
+ const struct iovec *lvec,
+ unsigned long lvec_cnt,
+ unsigned long *lvec_current,
+ size_t *lvec_offset,
+ struct page **process_pages,
+ struct mm_struct *mm,
+ struct task_struct *task,
+ int vm_write,
+ ssize_t *bytes_copied)
{
unsigned long pa = addr & PAGE_MASK;
unsigned long start_offset = addr - pa;
unsigned long nr_pages;
- ssize_t bytes_copied = 0;
- ssize_t rc;
+ ssize_t bytes_copied_loop;
+ ssize_t rc = 0;
unsigned long nr_pages_copied = 0;
unsigned long nr_pages_to_copy;
unsigned long max_pages_per_loop = PVM_MAX_KMALLOC_PAGES
/ sizeof(struct pages *);
+ *bytes_copied = 0;
/* Work out address and page range required */
if (len == 0)
return 0;
nr_pages = (addr + len - 1) / PAGE_SIZE - addr / PAGE_SIZE + 1;
-
while ((nr_pages_copied < nr_pages) && (*lvec_current < lvec_cnt)) {
nr_pages_to_copy = min(nr_pages - nr_pages_copied,
max_pages_per_loop);
@@ -190,35 +204,49 @@ static ssize_t process_vm_rw_single_vec(
start_offset, len,
lvec, lvec_cnt,
lvec_current, lvec_offset,
- vm_write, nr_pages_to_copy);
+ vm_write, nr_pages_to_copy,
+ &bytes_copied_loop);
start_offset = 0;
+ *bytes_copied += bytes_copied_loop;
- if (rc < 0)
+ if (rc < 0) {
return rc;
- else {
- bytes_copied += rc;
- len -= rc;
+ } else {
+ len -= bytes_copied_loop;
nr_pages_copied += nr_pages_to_copy;
pa += nr_pages_to_copy * PAGE_SIZE;
}
}
- rc = bytes_copied;
return rc;
}
-static ssize_t process_vm_rw(pid_t pid, const struct iovec *lvec,
- unsigned long liovcnt,
- const struct iovec *rvec,
- unsigned long riovcnt,
- unsigned long flags, int vm_write)
+/**
+ * process_vm_rw_core - core of reading/writing pages from task specified
+ * @pid: PID of process to read/write from/to
+ * @lvec: iovec array specifying where to copy to/from locally
+ * @liovcnt: size of lvec array
+ * @rvec: iovec array specifying where to copy to/from in the other process
+ * @riovcnt: size of rvec array
+ * @flags: currently unused
+ * @vm_write: 0 if reading from other process, 1 if writing to other process
+ * Returns the number of bytes read/written or error code. May
+ * return less bytes than expected if an error occurs during the copying
+ * process.
+ */
+static ssize_t process_vm_rw_core(pid_t pid, const struct iovec *lvec,
+ unsigned long liovcnt,
+ const struct iovec *rvec,
+ unsigned long riovcnt,
+ unsigned long flags, int vm_write)
{
struct task_struct *task;
struct page **process_pages = NULL;
struct mm_struct *mm;
unsigned long i;
- ssize_t rc;
- ssize_t bytes_copied;
+ ssize_t rc = 0;
+ ssize_t bytes_copied_loop;
+ ssize_t bytes_copied = 0;
unsigned long nr_pages = 0;
unsigned long nr_pages_iov;
unsigned long iov_l_curr_idx = 0;
@@ -279,38 +307,53 @@ static ssize_t process_vm_rw(pid_t pid,
atomic_inc(&mm->mm_users);
task_unlock(task);
- rc = 0;
for (i = 0; i < riovcnt && iov_l_curr_idx < liovcnt; i++) {
- bytes_copied = process_vm_rw_single_vec(
+ rc = process_vm_rw_single_vec(
(unsigned long)rvec[i].iov_base, rvec[i].iov_len,
lvec, liovcnt, &iov_l_curr_idx, &iov_l_curr_offset,
- process_pages, mm, task, vm_write);
- if (bytes_copied < 0) {
- rc = bytes_copied;
+ process_pages, mm, task, vm_write, &bytes_copied_loop);
+ bytes_copied += bytes_copied_loop;
+ if (rc != 0) {
+ /* If we have managed to copy any data at all then
+ we return the number of bytes copied. Otherwise
+ we return the error code */
+ if (bytes_copied)
+ rc = bytes_copied;
goto put_mm;
- } else {
- rc += bytes_copied;
}
}
+ rc = bytes_copied;
put_mm:
mmput(mm);
put_task_struct:
put_task_struct(task);
-
free_proc_pages:
kfree(process_pages);
return rc;
}
-static ssize_t process_vm_rw_check_iovecs(pid_t pid,
- const struct iovec __user *lvec,
- unsigned long liovcnt,
- const struct iovec __user *rvec,
- unsigned long riovcnt,
- unsigned long flags, int vm_write)
+/**
+ * process_vm_rw - check iovecs before calling core routine
+ * @pid: PID of process to read/write from/to
+ * @lvec: iovec array specifying where to copy to/from locally
+ * @liovcnt: size of lvec array
+ * @rvec: iovec array specifying where to copy to/from in the other process
+ * @riovcnt: size of rvec array
+ * @flags: currently unused
+ * @vm_write: 0 if reading from other process, 1 if writing to other process
+ * Returns the number of bytes read/written or error code. May
+ * return less bytes than expected if an error occurs during the copying
+ * process.
+ */
+static ssize_t process_vm_rw(pid_t pid,
+ const struct iovec __user *lvec,
+ unsigned long liovcnt,
+ const struct iovec __user *rvec,
+ unsigned long riovcnt,
+ unsigned long flags, int vm_write)
{
struct iovec iovstack_l[UIO_FASTIOV];
struct iovec iovstack_r[UIO_FASTIOV];
@@ -336,8 +379,8 @@ static ssize_t process_vm_rw_check_iovec
if (rc <= 0)
goto free_iovecs;
- rc = process_vm_rw(pid, iov_l, liovcnt, iov_r, riovcnt, flags,
- vm_write);
+ rc = process_vm_rw_core(pid, iov_l, liovcnt, iov_r, riovcnt, flags,
+ vm_write);
free_iovecs:
if (iov_r != iovstack_r)
@@ -352,8 +395,7 @@ SYSCALL_DEFINE6(process_vm_readv, pid_t,
unsigned long, liovcnt, const struct iovec __user *, rvec,
unsigned long, riovcnt, unsigned long, flags)
{
- return process_vm_rw_check_iovecs(pid, lvec, liovcnt, rvec, riovcnt,
- flags, 0);
+ return process_vm_rw(pid, lvec, liovcnt, rvec, riovcnt, flags, 0);
}
SYSCALL_DEFINE6(process_vm_writev, pid_t, pid,
@@ -361,19 +403,18 @@ SYSCALL_DEFINE6(process_vm_writev, pid_t
unsigned long, liovcnt, const struct iovec __user *, rvec,
unsigned long, riovcnt, unsigned long, flags)
{
- return process_vm_rw_check_iovecs(pid, lvec, liovcnt, rvec, riovcnt,
- flags, 1);
+ return process_vm_rw(pid, lvec, liovcnt, rvec, riovcnt, flags, 1);
}
#ifdef CONFIG_COMPAT
asmlinkage ssize_t
-compat_process_vm_rw_check_iovecs(compat_pid_t pid,
- const struct compat_iovec __user *lvec,
- unsigned long liovcnt,
- const struct compat_iovec __user *rvec,
- unsigned long riovcnt,
- unsigned long flags, int vm_write)
+compat_process_vm_rw(compat_pid_t pid,
+ const struct compat_iovec __user *lvec,
+ unsigned long liovcnt,
+ const struct compat_iovec __user *rvec,
+ unsigned long riovcnt,
+ unsigned long flags, int vm_write)
{
struct iovec iovstack_l[UIO_FASTIOV];
struct iovec iovstack_r[UIO_FASTIOV];
@@ -406,8 +447,8 @@ compat_process_vm_rw_check_iovecs(compat
if (rc <= 0)
goto free_iovecs;
- rc = process_vm_rw(pid, iov_l, liovcnt, iov_r, riovcnt, flags,
- vm_write);
+ rc = process_vm_rw_core(pid, iov_l, liovcnt, iov_r, riovcnt, flags,
+ vm_write);
free_iovecs:
if (iov_r != iovstack_r)
@@ -427,8 +468,8 @@ compat_sys_process_vm_readv(compat_pid_t
unsigned long riovcnt,
unsigned long flags)
{
- return compat_process_vm_rw_check_iovecs(pid, lvec, liovcnt, rvec,
- riovcnt, flags, 0);
+ return compat_process_vm_rw(pid, lvec, liovcnt, rvec,
+ riovcnt, flags, 0);
}
asmlinkage ssize_t
@@ -439,8 +480,8 @@ compat_sys_process_vm_writev(compat_pid_
unsigned long riovcnt,
unsigned long flags)
{
- return compat_process_vm_rw_check_iovecs(pid, lvec, liovcnt, rvec,
- riovcnt, flags, 1);
+ return compat_process_vm_rw(pid, lvec, liovcnt, rvec,
+ riovcnt, flags, 1);
}
#endif
_
Patches currently in -mm which might be from cyeoh@au1.ibm.com are
cross-memory-attach-v3.patch
cross-memory-attach-v4.patch
^ permalink raw reply
* [folded] cross-memory-attach-v4.patch removed from -mm tree
From: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b @ 2011-10-31 23:39 UTC (permalink / raw)
To: cyeoh-8fk3Idey6ehBDgjK7y7TUQ, arnd-r2nGTMty4D4,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
dhowells-H+wXaHxf7aLQT0dZR+AlfA, hpa-YMNOUZJC4hwAvxtiuMwx3w,
jmorris-gx6/JNMH7DfYtjvyW6yDsg, linux-arch-u79uwXL29TY76Z2rM5mHXA,
linux-man-u79uwXL29TY76Z2rM5mHXA, mingo-X9Un+BFzKDI
The patch titled
Subject: cross-memory-attach-v4
has been removed from the -mm tree. Its filename was
cross-memory-attach-v4.patch
This patch was dropped because it was folded into cross-memory-attach-v3.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Christopher Yeoh <cyeoh-8fk3Idey6ehBDgjK7y7TUQ@public.gmane.org>
Subject: cross-memory-attach-v4
> You might get some speed benefit by optimising for the small copies
> here. Define a local on-stack array of N page*'s and point
> process_pages at that if the number of pages is <= N. Saves a
> malloc/free and is more cache-friendly. But only if the result is
> measurable!
I have done some benchmarking on this, and it gains about 5-7% on a
microbenchmark with 4kb size copies and about a 1% gain with a more
realistic (but modified for smaller copies) hpcc benchmark. The
performance gain disappears into the noise by about 64kb sized copies.
No measurable overhead for larger copies. So I think its worth including
Included below is the patch (based on v4) - for ease of review the first diff
is just against the latest version of CMA which has been posted here previously.
The second is the entire CMA patch.
Signed-off-by: Chris Yeoh <cyeoh-8fk3Idey6ehBDgjK7y7TUQ@public.gmane.org>
Cc: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
Cc: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: Paul Mackerras <paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Cc: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
Cc: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: James Morris <jmorris-gx6/JNMH7DfYtjvyW6yDsg@public.gmane.org>
Cc: <linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: <linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Signed-off-by: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
---
mm/process_vm_access.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff -puN mm/process_vm_access.c~cross-memory-attach-v4 mm/process_vm_access.c
--- a/mm/process_vm_access.c~cross-memory-attach-v4
+++ a/mm/process_vm_access.c
@@ -221,6 +221,10 @@ static int process_vm_rw_single_vec(unsi
return rc;
}
+/* Maximum number of entries for process pages array
+ which lives on stack */
+#define PVM_MAX_PP_ARRAY_COUNT 16
+
/**
* process_vm_rw_core - core of reading/writing pages from task specified
* @pid: PID of process to read/write from/to
@@ -241,7 +245,8 @@ static ssize_t process_vm_rw_core(pid_t
unsigned long flags, int vm_write)
{
struct task_struct *task;
- struct page **process_pages = NULL;
+ struct page *pp_stack[PVM_MAX_PP_ARRAY_COUNT];
+ struct page **process_pages = pp_stack;
struct mm_struct *mm;
unsigned long i;
ssize_t rc = 0;
@@ -271,13 +276,16 @@ static ssize_t process_vm_rw_core(pid_t
if (nr_pages == 0)
return 0;
- /* For reliability don't try to kmalloc more than 2 pages worth */
- process_pages = kmalloc(min_t(size_t, PVM_MAX_KMALLOC_PAGES,
- sizeof(struct pages *)*nr_pages),
- GFP_KERNEL);
+ if (nr_pages > PVM_MAX_PP_ARRAY_COUNT) {
+ /* For reliability don't try to kmalloc more than
+ 2 pages worth */
+ process_pages = kmalloc(min_t(size_t, PVM_MAX_KMALLOC_PAGES,
+ sizeof(struct pages *)*nr_pages),
+ GFP_KERNEL);
- if (!process_pages)
- return -ENOMEM;
+ if (!process_pages)
+ return -ENOMEM;
+ }
/* Get process information */
rcu_read_lock();
@@ -331,7 +339,8 @@ put_task_struct:
put_task_struct(task);
free_proc_pages:
- kfree(process_pages);
+ if (process_pages != pp_stack)
+ kfree(process_pages);
return rc;
}
_
Patches currently in -mm which might be from cyeoh-8fk3Idey6ehBDgjK7y7TUQ@public.gmane.org are
cross-memory-attach-v3.patch
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [folded] dma-mapping-fix-sync_single_range_-dma-debugging-checkpatch-fixes.patch removed from -mm tree
From: akpm @ 2011-10-31 23:39 UTC (permalink / raw)
To: akpm, clemens, fujita.tomonori, konrad.wilk, mm-commits
The patch titled
Subject: dma-mapping-fix-sync_single_range_-dma-debugging-checkpatch-fixes
has been removed from the -mm tree. Its filename was
dma-mapping-fix-sync_single_range_-dma-debugging-checkpatch-fixes.patch
This patch was dropped because it was folded into dma-mapping-fix-sync_single_range_-dma-debugging.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: dma-mapping-fix-sync_single_range_-dma-debugging-checkpatch-fixes
Cc: Clemens Ladisch <clemens@ladisch.de>
WARNING: struct dma_map_ops should normally be const
#39: FILE: include/asm-generic/dma-mapping-common.h:126:
+ struct dma_map_ops *ops = get_dma_ops(dev);
WARNING: struct dma_map_ops should normally be const
#53: FILE: include/asm-generic/dma-mapping-common.h:140:
+ struct dma_map_ops *ops = get_dma_ops(dev);
total: 0 errors, 2 warnings, 26 lines checked
./patches/dma-mapping-fix-sync_single_range_-dma-debugging.patch has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
Please run checkpatch prior to sending patches
Cc: Clemens Ladisch <clemens@ladisch.de>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/asm-generic/dma-mapping-common.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN include/asm-generic/dma-mapping-common.h~dma-mapping-fix-sync_single_range_-dma-debugging-checkpatch-fixes include/asm-generic/dma-mapping-common.h
--- a/include/asm-generic/dma-mapping-common.h~dma-mapping-fix-sync_single_range_-dma-debugging-checkpatch-fixes
+++ a/include/asm-generic/dma-mapping-common.h
@@ -123,7 +123,7 @@ static inline void dma_sync_single_range
size_t size,
enum dma_data_direction dir)
{
- struct dma_map_ops *ops = get_dma_ops(dev);
+ const struct dma_map_ops *ops = get_dma_ops(dev);
BUG_ON(!valid_dma_direction(dir));
if (ops->sync_single_for_cpu)
@@ -137,7 +137,7 @@ static inline void dma_sync_single_range
size_t size,
enum dma_data_direction dir)
{
- struct dma_map_ops *ops = get_dma_ops(dev);
+ const struct dma_map_ops *ops = get_dma_ops(dev);
BUG_ON(!valid_dma_direction(dir));
if (ops->sync_single_for_device)
_
Patches currently in -mm which might be from akpm@linux-foundation.org are
origin.patch
dma-mapping-fix-sync_single_range_-dma-debugging.patch
include-linux-dmarh-forward-declare-struct-acpi_dmar_header.patch
proc-self-numa_maps-restore-huge-tag-for-hugetlb-vmas.patch
mm-add-comments-to-explain-mm_struct-fields-fix.patch
mm-avoid-null-pointer-access-in-vm_struct-via-proc-vmallocinfo.patch
thp-mremap-support-and-tlb-optimization-fix.patch
thp-mremap-support-and-tlb-optimization-fix-fix.patch
mm-neaten-warn_alloc_failed-fix.patch
debug-pagealloc-add-support-for-highmem-pages-fix.patch
mm-add-comment-explaining-task-state-setting-in-bdi_forker_thread-fix.patch
mm-mmapc-eliminate-the-ret-variable-from-mm_take_all_locks-fix.patch
mm-munlock-use-mapcount-to-avoid-terrible-overhead-fix.patch
kernel-sysctlc-add-cap_last_cap-to-proc-sys-kernel-fix.patch
drivers-leds-leds-lp5521c-check-if-reset-is-successful-fix.patch
lib-bitmapc-quiet-sparse-noise-about-address-space-fix.patch
llist-return-whether-list-is-empty-before-adding-in-llist_add-fix.patch
checkpatch-add-a-strict-check-for-utf-8-in-commit-logs.patch
^ permalink raw reply
* [PATCH] bitbake.conf: drop STAGING_PYDIR
From: Martin Jansa @ 2011-10-31 23:31 UTC (permalink / raw)
To: openembedded-core
* seems unused in oe-core
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
meta/conf/bitbake.conf | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e2c1b6f..d0235ba 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -345,7 +345,6 @@ STAGING_DATADIR = "${STAGING_DIR_HOST}${datadir}"
STAGING_EXECPREFIXDIR = "${STAGING_DIR_HOST}${exec_prefix}"
STAGING_LOADER_DIR = "${STAGING_DIR_HOST}/loader"
STAGING_FIRMWARE_DIR = "${STAGING_DIR_HOST}/firmware"
-STAGING_PYDIR = "${STAGING_DIR}/lib/python2.4"
STAGING_DIR_TARGET = "${STAGING_DIR}/${MACHINE}"
STAGING_DIR_TCBOOTSTRAP = "${STAGING_DIR_TARGET}-tcbootstrap"
--
1.7.7.1
^ permalink raw reply related
* RE: [GIT PULL] mm: frontswap (for 3.2 window)
From: Dan Magenheimer @ 2011-10-31 23:36 UTC (permalink / raw)
To: Andrea Arcangeli
Cc: Pekka Enberg, Cyclonus J, Sasha Levin, Christoph Hellwig,
David Rientjes, Linus Torvalds, linux-mm, LKML, Andrew Morton,
Konrad Wilk, Jeremy Fitzhardinge, Seth Jennings, ngupta,
Chris Mason, JBeulich, Dave Hansen, Jonathan Corbet
In-Reply-To: <20111031223717.GI3466@redhat.com>
> From: Andrea Arcangeli [mailto:aarcange@redhat.com]
> Subject: Re: [GIT PULL] mm: frontswap (for 3.2 window)
>
> On Mon, Oct 31, 2011 at 01:58:39PM -0700, Dan Magenheimer wrote:
> > Hmmm... not sure I understand this one. It IS copy-based
> > so is not zerocopy; the page of data is actually moving out
>
> copy-based is my main problem, being synchronous is no big deal I
> agree.
>
> I mean, I don't see why you have to make one copy before you start
> compressing and then you write to disk the output of the compression
> algorithm. To me it looks like this API forces on zcache one more copy
> than necessary.
>
> I can't see why this copy is necessary and why zcache isn't working on
> "struct page" on core kernel structures instead of moving the memory
> off to a memory object invisible to the core VM.
Do you see code doing this? I am pretty sure zcache is
NOT doing an extra copy, it is compressing from the source
page. And I am pretty sure Xen tmem is not doing the
extra copy either.
Seth and I had discussed ADDING the extra copy in zcache
to make the synchronous/irq-disabled time shorter for puts
and doing the compression as a separate thread, but I
don't think I have seen any patch to implement that.
So if this is true (no extra copy), are you happy?
Maybe you are saying that the extra copy would be necessary
in a KVM implementation of tmem? If so, I haven't thought
about a KVM+tmem design enough to comment on that.
> > TRUE. Tell me again why a vmexit/vmenter per 4K page is
> > "impossible"? Again you are assuming (1) the CPU had some
>
> It's sure not impossible, it's just impossible we want it as it'd be
> too slow.
You are clearly speculating here. Wouldn't it be nice to
try it and find out?
> > real work to do instead and (2) that vmexit/vmenter is horribly
>
> Sure the CPU has another 1000 VM to schedule. This is like saying
> virtio-blk isn't needed on desktop virt becauase the desktop isn't
> doing much I/O. Absurd argument, there are another 1000 desktops doing
> I/O at the same time of course.
But this is truly different, I think at least for the most common
cases, because the guest is essentially out of physical memory if it
is swapping. And the vmexit/vmenter (I assume, I don't really
know KVM) gives the KVM scheduler the opportunity to schedule
another of those 1000 VMs if it wishes.
Also I'll venture to guess (without any proof) that the path through
the blkio subsystem to deal with any swap page and set up the disk
I/O is not much shorter than the cost of a vmexit/vmenter on
modern systems ;-)
Now we are both speculating. :-)
> > slow. Even if vmexit/vmenter is thousands of cycles, it is still
> > orders of magnitude faster than a disk access. And vmexit/vmenter
>
> I fully agree tmem is faster for Xen than no tmem. That's not the
> point, we don't need such an articulate hack hiding pages from the
> guest OS in order to share pagecache, our hypervisor is just a bit
> more powerful and has a function called file_read_actor that does what
> your tmem copy does...
Well either then KVM doesn't need frontswap at all and need
not be interfering with a patch that works fine for the
other users, or Sasha and Neo will implement it and find
that frontswap does (sometimes?) provide some benefits.
In either case, I'm not sure why you would be objecting
to merging frontswap.
> > is about the same order of magnitude as page copy, and much
> > faster than compression/decompression, both of which still
> > result in a nice win.
>
> Saying it's a small overhead, is not like saying it is _needed_. Why
> not add a udelay(1) in it too? Sure it won't be noticeable.
Actually the current implementation of RAMster over LAN adds
quite a bit more than udelay(1). But that's all still experimental.
It might be interesting to try adding udelay(1) in zcache
to see if there is any noticeable effect.
> > You are also assuming that frontswap puts/gets are highly
> > frequent. By definition they are not, because they are
> > replacing single-page disk reads/writes due to swapping.
>
> They'll be as frequent as the highmem bounce buffers...
I don't understand. Sorry, I really am ignorant of
highmem systems as I grew up on PA-RISC and IA-64.
> > That said, the API/ABI is very extensible, so if it were
> > proven that batching was sufficiently valuable, it could
> > be added later... but I don't see it as a showstopper.
> > Really do you?
>
> That's fine with me... but like ->writepages it'll take ages for the
> fs to switch from writepage to writepages. Considering this is a new
> API I don't think it's unreasonable to ask at least it to handle
> immediately zerocopy behavior. So showing the userland mapping to the
> tmem layer so it can avoid the copy and read from the userland
> address. Xen will badly choke if ever tries to do that, but zcache
> should be ok with that.
>
> Now there may be algorithms where the page must be stable, but others
> will be perfectly fine even if the page is changing under the
> compression, and in that case the page won't be discarded and it'll be
> marked dirty again. So even if a wrong data goes on disk, we'll
> rewrite later. I see no reason why there has always to be a copy
> before starting any compression/encryption as long as the algorithm
> will not crash its input data isn't changing under it.
>
> The ideal API would be to send down page pointers (and handling
> compound pages too), not to copy. Maybe with a flag where you can also
> specify offsets so you can send down partial pages too down to a byte
> granularity. The "copy input data before anything else can happen"
> looks flawed to me. It is not flawed for Xen because Xen has no
> knowledge of the guest "struct page" but her I'm talking about the
> not-virt usages.
Again, I think you are assuming things work differently than
I think they do. I don't think there is an extra copy before
the compression. And Xen isn't choking, nor is zcache.
(Note that the Xen tmem implementation, as all of Xen will be
soon, is 64-bit only... Seth recently fixed a bug keeping
zcache from working in 32-bit highmem systems, so I know
32-bit works for zcache.)
So if this is true (no extra copy), are you happy?
> > So, please, all the other parts necessary for tmem are
> > already in-tree, why all the resistance about frontswap?
>
> Well my comments are generic not specific to frontswap.
OK, but cleancache is already in-tree and open to any improvement
ideas you may have. Frontswap is only using the existing ABI/API
that cleancache already uses.
Thanks,
Dan
^ permalink raw reply
* [Bug 16923] ClipRectangles on mask ignored if transformation is used
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2011-10-31 23:36 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
In-Reply-To: <bug-16923-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
https://bugs.freedesktop.org/show_bug.cgi?id=16923
Jeremy Huddleston <jeremyhu-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply
* RE: [GIT PULL] mm: frontswap (for 3.2 window)
From: Dan Magenheimer @ 2011-10-31 23:36 UTC (permalink / raw)
To: Andrea Arcangeli
Cc: Pekka Enberg, Cyclonus J, Sasha Levin, Christoph Hellwig,
David Rientjes, Linus Torvalds, linux-mm, LKML, Andrew Morton,
Konrad Wilk, Jeremy Fitzhardinge, Seth Jennings, ngupta,
Chris Mason, JBeulich, Dave Hansen, Jonathan Corbet
In-Reply-To: <20111031223717.GI3466@redhat.com>
> From: Andrea Arcangeli [mailto:aarcange@redhat.com]
> Subject: Re: [GIT PULL] mm: frontswap (for 3.2 window)
>
> On Mon, Oct 31, 2011 at 01:58:39PM -0700, Dan Magenheimer wrote:
> > Hmmm... not sure I understand this one. It IS copy-based
> > so is not zerocopy; the page of data is actually moving out
>
> copy-based is my main problem, being synchronous is no big deal I
> agree.
>
> I mean, I don't see why you have to make one copy before you start
> compressing and then you write to disk the output of the compression
> algorithm. To me it looks like this API forces on zcache one more copy
> than necessary.
>
> I can't see why this copy is necessary and why zcache isn't working on
> "struct page" on core kernel structures instead of moving the memory
> off to a memory object invisible to the core VM.
Do you see code doing this? I am pretty sure zcache is
NOT doing an extra copy, it is compressing from the source
page. And I am pretty sure Xen tmem is not doing the
extra copy either.
Seth and I had discussed ADDING the extra copy in zcache
to make the synchronous/irq-disabled time shorter for puts
and doing the compression as a separate thread, but I
don't think I have seen any patch to implement that.
So if this is true (no extra copy), are you happy?
Maybe you are saying that the extra copy would be necessary
in a KVM implementation of tmem? If so, I haven't thought
about a KVM+tmem design enough to comment on that.
> > TRUE. Tell me again why a vmexit/vmenter per 4K page is
> > "impossible"? Again you are assuming (1) the CPU had some
>
> It's sure not impossible, it's just impossible we want it as it'd be
> too slow.
You are clearly speculating here. Wouldn't it be nice to
try it and find out?
> > real work to do instead and (2) that vmexit/vmenter is horribly
>
> Sure the CPU has another 1000 VM to schedule. This is like saying
> virtio-blk isn't needed on desktop virt becauase the desktop isn't
> doing much I/O. Absurd argument, there are another 1000 desktops doing
> I/O at the same time of course.
But this is truly different, I think at least for the most common
cases, because the guest is essentially out of physical memory if it
is swapping. And the vmexit/vmenter (I assume, I don't really
know KVM) gives the KVM scheduler the opportunity to schedule
another of those 1000 VMs if it wishes.
Also I'll venture to guess (without any proof) that the path through
the blkio subsystem to deal with any swap page and set up the disk
I/O is not much shorter than the cost of a vmexit/vmenter on
modern systems ;-)
Now we are both speculating. :-)
> > slow. Even if vmexit/vmenter is thousands of cycles, it is still
> > orders of magnitude faster than a disk access. And vmexit/vmenter
>
> I fully agree tmem is faster for Xen than no tmem. That's not the
> point, we don't need such an articulate hack hiding pages from the
> guest OS in order to share pagecache, our hypervisor is just a bit
> more powerful and has a function called file_read_actor that does what
> your tmem copy does...
Well either then KVM doesn't need frontswap at all and need
not be interfering with a patch that works fine for the
other users, or Sasha and Neo will implement it and find
that frontswap does (sometimes?) provide some benefits.
In either case, I'm not sure why you would be objecting
to merging frontswap.
> > is about the same order of magnitude as page copy, and much
> > faster than compression/decompression, both of which still
> > result in a nice win.
>
> Saying it's a small overhead, is not like saying it is _needed_. Why
> not add a udelay(1) in it too? Sure it won't be noticeable.
Actually the current implementation of RAMster over LAN adds
quite a bit more than udelay(1). But that's all still experimental.
It might be interesting to try adding udelay(1) in zcache
to see if there is any noticeable effect.
> > You are also assuming that frontswap puts/gets are highly
> > frequent. By definition they are not, because they are
> > replacing single-page disk reads/writes due to swapping.
>
> They'll be as frequent as the highmem bounce buffers...
I don't understand. Sorry, I really am ignorant of
highmem systems as I grew up on PA-RISC and IA-64.
> > That said, the API/ABI is very extensible, so if it were
> > proven that batching was sufficiently valuable, it could
> > be added later... but I don't see it as a showstopper.
> > Really do you?
>
> That's fine with me... but like ->writepages it'll take ages for the
> fs to switch from writepage to writepages. Considering this is a new
> API I don't think it's unreasonable to ask at least it to handle
> immediately zerocopy behavior. So showing the userland mapping to the
> tmem layer so it can avoid the copy and read from the userland
> address. Xen will badly choke if ever tries to do that, but zcache
> should be ok with that.
>
> Now there may be algorithms where the page must be stable, but others
> will be perfectly fine even if the page is changing under the
> compression, and in that case the page won't be discarded and it'll be
> marked dirty again. So even if a wrong data goes on disk, we'll
> rewrite later. I see no reason why there has always to be a copy
> before starting any compression/encryption as long as the algorithm
> will not crash its input data isn't changing under it.
>
> The ideal API would be to send down page pointers (and handling
> compound pages too), not to copy. Maybe with a flag where you can also
> specify offsets so you can send down partial pages too down to a byte
> granularity. The "copy input data before anything else can happen"
> looks flawed to me. It is not flawed for Xen because Xen has no
> knowledge of the guest "struct page" but her I'm talking about the
> not-virt usages.
Again, I think you are assuming things work differently than
I think they do. I don't think there is an extra copy before
the compression. And Xen isn't choking, nor is zcache.
(Note that the Xen tmem implementation, as all of Xen will be
soon, is 64-bit only... Seth recently fixed a bug keeping
zcache from working in 32-bit highmem systems, so I know
32-bit works for zcache.)
So if this is true (no extra copy), are you happy?
> > So, please, all the other parts necessary for tmem are
> > already in-tree, why all the resistance about frontswap?
>
> Well my comments are generic not specific to frontswap.
OK, but cleancache is already in-tree and open to any improvement
ideas you may have. Frontswap is only using the existing ABI/API
that cleancache already uses.
Thanks,
Dan
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* [U-Boot] [PATCH v2 3/4] EHCI: adjust for mx5
From: Jana Rapava @ 2011-10-31 23:35 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1317253971-24558-4-git-send-email-fermata7@gmail.com>
Add macros and structures needed by Efika USB support code.
Move shared offset and bits definitions into common header file.
Signed-off-by: Jana Rapava <fermata7@gmail.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
---
Changes for v2:
- whitespace and coding style changes (no actual changes)
drivers/usb/host/ehci-mxc.c | 31 +--------
include/usb/ehci-fsl.h | 146 ++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 148 insertions(+), 29 deletions(-)
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index fde1f0f..2c1295f 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -27,31 +27,6 @@
#include <usb/ehci.h>
#include <usb/ehci-core.h>
-#define USBCTRL_OTGBASE_OFFSET 0x600
-
-#ifdef CONFIG_MX25
-#define MX25_USB_CTRL_IP_PUE_DOWN_BIT (1<<6)
-#define MX25_USB_CTRL_HSTD_BIT (1<<5)
-#define MX25_USB_CTRL_USBTE_BIT (1<<4)
-#define MX25_USB_CTRL_OCPOL_OTG_BIT (1<<3)
-#endif
-
-#ifdef CONFIG_MX31
-#define MX31_OTG_SIC_SHIFT 29
-#define MX31_OTG_SIC_MASK (0x3 << MX31_OTG_SIC_SHIFT)
-#define MX31_OTG_PM_BIT (1 << 24)
-
-#define MX31_H2_SIC_SHIFT 21
-#define MX31_H2_SIC_MASK (0x3 << MX31_H2_SIC_SHIFT)
-#define MX31_H2_PM_BIT (1 << 16)
-#define MX31_H2_DT_BIT (1 << 5)
-
-#define MX31_H1_SIC_SHIFT 13
-#define MX31_H1_SIC_MASK (0x3 << MX31_H1_SIC_SHIFT)
-#define MX31_H1_PM_BIT (1 << 8)
-#define MX31_H1_DT_BIT (1 << 4)
-#endif
-
static int mxc_set_usbcontrol(int port, unsigned int flags)
{
unsigned int v;
@@ -66,11 +41,11 @@ static int mxc_set_usbcontrol(int port, unsigned int flags)
switch (port) {
case 0: /* OTG port */
- v &= ~(MX31_OTG_SIC_MASK | MX31_OTG_PM_BIT);
+ v &= ~(MXC_OTG_SIC_MASK | MXC_OTG_PM_BIT);
v |= (flags & MXC_EHCI_INTERFACE_MASK)
- << MX31_OTG_SIC_SHIFT;
+ << MXC_OTG_SIC_SHIFT;
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
- v |= MX31_OTG_PM_BIT;
+ v |= MXC_OTG_PM_BIT;
break;
case 1: /* H1 port */
diff --git a/include/usb/ehci-fsl.h b/include/usb/ehci-fsl.h
index 67600ed..f957c65 100644
--- a/include/usb/ehci-fsl.h
+++ b/include/usb/ehci-fsl.h
@@ -169,6 +169,106 @@
#define CONFIG_SYS_FSL_USB_ADDR CONFIG_SYS_MPC512x_USB_ADDR
#endif
+#if defined(CONFIG_MX25) || defined(CONFIG_MX31)
+#define USBCTRL_OTGBASE_OFFSET 0x600
+#endif
+
+#ifdef CONFIG_MX25
+#define MX25_USB_CTRL_IP_PUE_DOWN_BIT (1 << 6)
+#define MX25_USB_CTRL_HSTD_BIT (1 << 5)
+#define MX25_USB_CTRL_USBTE_BIT (1 << 4)
+#define MX25_USB_CTRL_OCPOL_OTG_BIT (1 << 3)
+#endif
+
+#ifdef CONFIG_MX31
+#define MX31_H2_SIC_SHIFT 21
+#define MX31_H2_SIC_MASK (0x3 << MX31_H2_SIC_SHIFT)
+#define MX31_H2_PM_BIT (1 << 16)
+#define MX31_H2_DT_BIT (1 << 5)
+
+#define MX31_H1_SIC_SHIFT 13
+#define MX31_H1_SIC_MASK (0x3 << MX31_H1_SIC_SHIFT)
+#define MX31_H1_PM_BIT (1 << 8)
+#define MX31_H1_DT_BIT (1 << 4)
+#endif
+
+#if defined(CONFIG_MX51) || defined(CONFIG_MX53)
+/* offset for first USB CTRL register */
+#define MX5_CTRL_REGS_OFFSET 0x800
+#endif
+
+#if defined(CONFIG_MX51) || defined(CONFIG_MX31)
+/* USB_CTRL register bits of interest */
+#define MXC_OTG_SIC_SHIFT 29
+#define MXC_OTG_SIC_MASK (0x3 << MX31_OTG_SIC_SHIFT)
+#define MXC_OTG_WUE (1 << 27)
+#define MXC_OTG_PM (1 << 24)
+#endif
+
+#ifdef CONFIG_MX51
+#define MX51_REGISTER_LAYOUT_LENGTH 0x200
+
+/* Register offsets for MX51 */
+#define MX51_OTG_ID 0x000
+#define MX51_UH1_ID 0x200
+#define MX51_UH2_ID 0x400
+
+/* USB_CTRL register bits of interest */
+#define MX51_OTG_PM (1 << 24)
+#define MX51_H1_ULPI_IE (1 << 12)
+#define MX51_H1_WUE (1 << 11)
+#define MX51_H1_PM (1 << 8)
+
+/* PHY_CTRL_0 register bits of interest */
+#define MX51_OTG_OVERCURD (1 << 8)
+#define MX51_EHCI_POWERPINSE (1 << 5)
+
+/* PHY_CTRL_1 register bits of interest */
+#define MX51_SYSCLOCK_24_MHZ (1 << 0)
+#define MX51_SYSCLOCK_MASK (0x3)
+
+/* USB_CTRL_1 register bits of interest */
+#define MX51_H1_EXTCLKE (1 << 25)
+
+/* USB Host 2 CTRL register bits of interest */
+#define MX51_H2_ULPI_IE (1 << 8)
+#define MX51_H2_WUE (1 << 7)
+#define MX51_H2_PM (1 << 4)
+
+/* PORTSCx bits of interest */
+#define MX51_ULPI_MODE_MASK (2 << 30)
+#define MX51_16BIT_UTMI (1 << 28)
+
+/* USBCMD bits of interest */
+#define MX51_ITC_IMMEDIATE_MASK (0xff << 16)
+#endif
+
+/*
+* ULPI
+*/
+#define ULPI_ID_REGS_COUNT 4
+#define ULPI_TEST_VALUE 0x55
+#define ULPI_TIMEOUT 1000 /* some reasonable value */
+
+/* ULPI viewport control bits */
+#define ULPI_WU (1 << 31)
+#define ULPI_SS (1 << 27)
+#define ULPI_RWRUN (1 << 30)
+#define ULPI_RWCTRL (1 << 29)
+
+/* ULPI OTG Control bits of interest */
+#define ULPI_OTG_EXT_VBUS_IND (1 << 7)
+#define ULPI_OTG_DM_PULLDOWN (1 << 2)
+#define ULPI_OTG_DP_PULLDOWN (1 << 1)
+#define ULPI_OTG_DRV_VBUS (1 << 5)
+#define ULPI_OTG_DRV_VBUS_EXT (1 << 6)
+#define ULPI_OTG_CHRG_VBUS (1 << 4)
+
+/* ULPI Function Control bits of interest */
+#define ULPI_FC_XCVR_SELECT (1 << 0)
+#define ULPI_FC_OPMODE_NORMAL (0 << 3)
+#define ULPI_FC_SUSPENDM_PWRED (1 << 6)
+
/*
* USB Registers
*/
@@ -210,7 +310,7 @@ struct usb_ehci {
u32 txfilltuning; /* 0x164 - Host TT Transmit
pre-buffer packet tuning */
u8 res7[0x8];
- u32 ulpi_viewpoint; /* 0x170 - ULPI Reister Access */
+ u32 ulpi_viewpoint; /* 0x170 - ULPI Register Access */
u8 res8[0xc];
u32 config_flag; /* 0x180 - Configured Flag Register */
u32 portsc; /* 0x184 - Port status/control */
@@ -242,4 +342,48 @@ struct usb_ehci {
u8 res13[0xafc];
};
+struct mx5_usb_control_regs {
+ u32 usbctrl; /* 0x800 - USB Control */
+ u32 otgmirror; /* 0x804 - OTG Port Mirror */
+ u32 phyctrl0; /* 0x808 - UTMI PHY Control Register 0 */
+ u32 phyctrl1; /* 0x80C - UTMI PHY Control Register 1 */
+ u32 usbctrl1; /* 0x810 - USB Control Register 1 */
+ u32 uh2ctrl; /* 0x814 - USB Host2 Control */
+ u32 uh3ctrl; /* 0x818 - USB Host3 Control */
+};
+
+struct mxc_ulpi_regs {
+ u8 vendor_id_low; /* 0x00 - Vendor ID lower byte */
+ u8 vendor_id_high; /* 0x01 - Vendor ID upper byte */
+ u8 product_id_low; /* 0x02 - Product ID lower byte */
+ u8 product_id_high; /* 0x03 - Product ID higher byte */
+ /* Function Control; 0x04 - 0x06 Read, 0x04 Write */
+ u8 function_ctrl_write;
+ u8 function_ctrl_set; /* 0x05 Set */
+ u8 function_ctrl_clear; /* 0x06 Clear */
+ /* Interface Control; 0x07 - 0x09 Read, 0x07 Write */
+ u8 iface_ctrl_write;
+ u8 iface_ctrl_set; /* 0x08 Set */
+ u8 iface_ctrl_clear; /* 0x09 Clear */
+ /* OTG Control; 0x0A - 0x0C Read, 0x0A Write */
+ u8 otg_ctrl_write;
+ u8 otg_ctrl_set; /* 0x0B Set */
+ u8 otg_ctrl_clear; /* 0x0C Clear */
+ /* USB Interrupt Enable Rising; 0x0D - 0x0F Read, 0x0D Write */
+ u8 usb_ie_rising_write;
+ u8 usb_ie_rising_set; /* 0x0E Set */
+ u8 usb_ie_rising_clear; /* 0x0F Clear */
+ /* USB Interrupt Enable Falling; 0x10 - 0x12 Read, 0x10 Write */
+ u8 usb_ie_falling_write;
+ u8 usb_ie_falling_set; /* 0x11 Set */
+ u8 usb_ie_falling_clear; /* 0x12 Clear */
+ u8 usb_int_status; /* 0x13 - USB Interrupt Status */
+ u8 usb_int_latch; /* 0x14 - USB Interrupt Latch */
+ u8 debug; /* 0x15 - Debug */
+ /* Scratch Register; 0x16 - 0x18 Read, 0x16 Write */
+ u8 scratch_write;
+ u8 scratch_set; /* 0x17 Set */
+ u8 scratch_clear; /* 0x18 Clear*/
+};
+
#endif /* _EHCI_FSL_H */
--
1.7.6.3
^ permalink raw reply related
* Re: [RFC PATCH] freezer: revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too"
From: Tejun Heo @ 2011-10-31 23:30 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Jeff Layton, Steve French, linux-kernel, Oleg Nesterov, linux-pm,
linux-cifs, J. Bruce Fields, Neil Brown
In-Reply-To: <201111010024.16659.rjw@sisk.pl>
Hello,
On Tue, Nov 01, 2011 at 12:24:16AM +0100, Rafael J. Wysocki wrote:
> > This is probably okay for most cases but circumventing fundamental
> > wakeup condition like this is asking for trouble. Furthermore, I'm
> > not sure the behavior change brought on by this change - breaking
> > nfs/cifs uninterruptible operation guarantee - is correct. If such
> > behavior is desirable, the right thing to do is using intr mount
> > option, not circumventing it from PM layer.
>
> Do you have any specific examples of breakage, or is it just that you _think_
> it's not quite right?
I can't remember one off the top of my head but I'm pretty sure there
at least are few which expect tight inter-locking between sleeps and
wakeups. I'll look for examples and post reply. ISTR them being
kernel threads so this might not apply directly but it's still a
dangerous game to play.
Bugs caused by behaviors like this will be very difficult to reproduce
and diagnose. There is no reason to play a gamble like this. If
somebody *really* wants non-interruptible killable & freezable sleep,
we really should be adding TASK_WAKE_FREEZER or something instead of
modifying the behavior of TASK_KILLABLE.
Thanks.
--
tejun
^ permalink raw reply
* Re: [PATCH 1/8] pnfs-obj: Remove redundant EOF from objlayout_io_state
From: Trond Myklebust @ 2011-10-31 23:29 UTC (permalink / raw)
To: Boaz Harrosh; +Cc: Brent Welch, NFS list, open-osd
In-Reply-To: <4EAF2521.2010204@panasas.com>
On Mon, 2011-10-31 at 15:45 -0700, Boaz Harrosh wrote:
> On 10/31/2011 03:24 PM, Trond Myklebust wrote:
> > On Mon, 2011-10-31 at 14:45 -0700, Boaz Harrosh wrote:
> >> The EOF calculation was done on .read_pagelist(), cached
> >> in objlayout_io_state->eof, and set in objlayout_read_done()
> >> into nfs_read_data->res.eof.
> >>
> >> So set it directly into nfs_read_data->res.eof and avoid
> >> the extra member.
> >>
> >> This is a slight behaviour change because before eof was
> >> *not* set on an error update at objlayout_read_done(). But
> >> is that a problem? Is Generic layer so sensitive that it
> >> will miss the error IO if eof was set? From my testing
> >> I did not see such a problem.
> >
> > That would probably be because the object layout will be recalled if the
> > file size changes on the server. If that is not the case, then you do
> > need eof detection...
> >
>
> OK Fair enough you mean from the time I opened the file to the
> actual read arriving.
>
> I have a question? What happens if the file-size on the server
> changed together with the changed-attribute, After the file was
> opened but before the actual read, does it get picked up by the
> client, and reflected in i_size_read() ?
Usually not, and this is why we have the eof mechanism. There are all
sorts of creepy things that can happen in the case where close-to-open
cache consistency is violated...
> Anyway as you said. On any system-wide file-truncate in Objects
> the layout is recalled, so we should be safe, here.
>
> >> Which brings me to a more abstract problem. Why does the
> >> LAYOUT driver needs to do this eof calculation? .i.e we
> >> are inspecting generic i_size_read() and if spanned by
> >> offset + count which is received from generic layer we set
> >> eof. It looks like all this can/should be done in generic
> >> layer and not at LD. Where does NFS and files-LD do it?
> >> It looks like it can be promoted.
> >
> > No it can't. The eof flag is returned as part of the READ4resok
> > structure (i.e. it is part of the READ return value) on both
> > read-through-mds and files-type layout reads. Basically, it allows the
> > server to tell you _why_ it returned a short read.
> >
>
> In files-type reads in a "condense" layout. You should be careful
> because in striping it is common place to have eof on some DSs because
> of file holes even though there are more bits higher on in the file
> at other DSs. You should check to return back only the answer from the
> highest logical read DS. (Or I'm wrong in my interpretation?)
In the close-to-open cache consistency, O_DIRECT database, or file
locking cases, then either the data has been committed, the file size
extended and the DSes updated, or our client must know that the server
has incomplete information because it is holding cached writes or
layoutcommits that extend the file. In either case, the meaning of the
eofs should be obvious.
Benny's old pet project of making 'tail -f' work on a log file that is
being extended by someone else is, OTOH, subject to screwiness. However
that case can be screwy on ordinary read-through-MDS too.
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
^ permalink raw reply
* Re: [PATCH] parisc: futex: Use same lock set as lws calls
From: John David Anglin @ 2011-10-31 23:26 UTC (permalink / raw)
To: Domenico Andreoli
Cc: Carlos O'Donell, Rolf Eike Beer, linux-parisc, debian-hppa
In-Reply-To: <20111031094110.GA29821@glitch>
[-- Attachment #1: Type: text/plain, Size: 593 bytes --]
On 31-Oct-11, at 5:41 AM, Domenico Andreoli wrote:
> I would like to redo the exercise on my j5600, are you building Debian
> packages? Could you please share the sources? Thank you.
Attached are the hppa libc6 patches that I'm using. The local-stack-
grows-up.diff patch needs
to be removed first, then the patches applied in order of date using
quilt.
The last change resolves the udev bug.
I will send you offline the eglibc_2.13-10.dsc and the
eglibc_2.13-10.diff.gz. The
eglibc_2.13.orig.tar.gz file should still be available.
Dave
--
John David Anglin dave.anglin@bell.net
[-- Attachment #2: ports-2011-08-31.diff --]
[-- Type: application/octet-stream, Size: 24762 bytes --]
Index: eglibc-2.13/ports/ChangeLog.hppa
===================================================================
--- eglibc-2.13.orig/ports/ChangeLog.hppa 2011-09-04 14:13:02.000000000 -0400
+++ eglibc-2.13/ports/ChangeLog.hppa 2011-09-04 14:20:23.000000000 -0400
@@ -1,3 +1,8 @@
+2010-10-29 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/hppa/dl-machine.h: Update copyright year.
+ (ELF_MACHINE_BEFORE_RTLD_RELOC): Call _dl_fptr_init.
+
2010-06-24 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Only create stack
Index: eglibc-2.13/ports/sysdeps/hppa/configure
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/hppa/configure 2011-09-04 14:13:32.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/hppa/configure 2011-09-04 14:34:35.000000000 -0400
@@ -1,19 +1,101 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
-{ $as_echo "$as_me:$LINENO: checking for assembler line separator" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler line separator" >&5
$as_echo_n "checking for assembler line separator... " >&6; }
-if test "${libc_cv_asm_line_sep+set}" = set; then
+if test "${libc_cv_asm_line_sep+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat > conftest.s <<EOF
nop ; is_old_puffin
EOF
if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
libc_cv_asm_line_sep='!'
else
if test -z "$enable_hacker_mode"; then
@@ -25,7 +107,7 @@
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_line_sep" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_line_sep" >&5
$as_echo "$libc_cv_asm_line_sep" >&6; }
cat >>confdefs.h <<_ACEOF
#define ASM_LINE_SEP $libc_cv_asm_line_sep
Index: eglibc-2.13/ports/sysdeps/hppa/dl-fptr.h
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/hppa/dl-fptr.h 2011-09-04 14:14:04.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/hppa/dl-fptr.h 2011-09-04 14:20:23.000000000 -0400
@@ -22,6 +22,9 @@
#include <sysdeps/generic/dl-fptr.h>
+/* Initialize function pointer code. Call before relocation processing. */
+extern void _dl_fptr_init (void);
+
/* There are currently 33 dynamic symbols in ld.so.
ELF_MACHINE_BOOT_FPTR_TABLE_LEN needs to be at least that big. */
#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 64
Index: eglibc-2.13/ports/sysdeps/hppa/dl-machine.h
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/hppa/dl-machine.h 2011-09-04 14:14:30.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/hppa/dl-machine.h 2011-09-04 14:20:23.000000000 -0400
@@ -1,6 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version.
- Copyright (C) 1995-1997,1999-2003
- Free Software Foundation, Inc.
+ Copyright (C) 1995-1997,1999-2003, 2010 Free Software Foundation, Inc.
Contributed by David Huggins-Daines <dhd@debian.org>
This file is part of the GNU C Library.
Index: eglibc-2.13/ports/sysdeps/hppa/dl-tls.h
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/hppa/dl-tls.h 2011-09-04 14:14:57.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/hppa/dl-tls.h 2011-09-04 14:20:23.000000000 -0400
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. hppa version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,6 @@
extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
Index: eglibc-2.13/ports/sysdeps/hppa/elf/configure
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/hppa/elf/configure 2011-09-04 14:15:24.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/hppa/elf/configure 2011-09-04 14:45:59.000000000 -0400
@@ -1,12 +1,94 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/hppa/elf.
if test "$usetls" != no; then
# Check for support of thread-local storage handling in assembler and
# linker.
-{ $as_echo "$as_me:$LINENO: checking for hppa TLS support" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hppa TLS support" >&5
$as_echo_n "checking for hppa TLS support... " >&6; }
-if test "${libc_cv_hppa_tls+set}" = set; then
+if test "${libc_cv_hppa_tls+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat > conftest.s <<\EOF
@@ -41,23 +123,21 @@
; Done all the TLS tests.
EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
libc_cv_hppa_tls=yes
else
libc_cv_hppa_tls=no
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_hppa_tls" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hppa_tls" >&5
$as_echo "$libc_cv_hppa_tls" >&6; }
if test $libc_cv_hppa_tls = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_TLS_SUPPORT 1
-_ACEOF
+ $as_echo "#define HAVE_TLS_SUPPORT 1" >>confdefs.h
fi
fi
Index: eglibc-2.13/ports/sysdeps/hppa/fpu/fegetenv.c
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/hppa/fpu/fegetenv.c 2011-09-04 14:15:52.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/hppa/fpu/fegetenv.c 2011-09-04 14:20:23.000000000 -0400
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
Index: eglibc-2.13/ports/sysdeps/hppa/fpu/feupdateenv.c
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/hppa/fpu/feupdateenv.c 2011-09-04 14:16:18.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/hppa/fpu/feupdateenv.c 2011-09-04 14:20:23.000000000 -0400
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
Index: eglibc-2.13/ports/sysdeps/hppa/fpu/ftestexcept.c
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/hppa/fpu/ftestexcept.c 2011-09-04 14:16:49.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/hppa/fpu/ftestexcept.c 2011-09-04 14:20:23.000000000 -0400
@@ -1,5 +1,5 @@
/* Test exception in current environment.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
Index: eglibc-2.13/ports/sysdeps/hppa/stackinfo.h
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/hppa/stackinfo.h 2011-09-04 14:17:22.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/hppa/stackinfo.h 2011-09-04 14:20:23.000000000 -0400
@@ -22,6 +22,12 @@
#ifndef _STACKINFO_H
#define _STACKINFO_H 1
+#include <elf.h>
+
+/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is
+ * present, but it is presumed absent. */
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)
+
/* On PA the stack grows up. */
#define _STACK_GROWS_UP 1
Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h 2011-09-04 14:17:42.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h 2011-09-04 14:20:23.000000000 -0400
@@ -1,5 +1,5 @@
-/* O_*, F_*, FD_* bit values for Linux/HPPA.
- Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2004
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2004, 2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -29,7 +29,7 @@
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on an ext2 file system */
+ located on a few file systems. */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h 2011-09-04 14:18:10.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h 2011-09-04 14:20:23.000000000 -0400
@@ -61,11 +61,53 @@
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
+ ENTRY (__##syscall_name##_nocancel) \
+ DOARGS_##args ASM_LINE_SEP \
+ stwm TREG, 64(%sp) ASM_LINE_SEP \
+ .cfi_offset TREG, 0 ASM_LINE_SEP \
+ .cfi_adjust_cfa_offset 64 ASM_LINE_SEP \
+ stw %sp, -4(%sp) ASM_LINE_SEP \
+ .cfi_offset 30, -4 ASM_LINE_SEP \
+ stw %r19, -32(%sp) ASM_LINE_SEP \
+ .cfi_offset 19, -32 ASM_LINE_SEP \
+ /* Save r19 */ ASM_LINE_SEP \
+ SAVE_PIC(TREG) ASM_LINE_SEP \
+ /* Do syscall, delay loads # */ ASM_LINE_SEP \
+ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
+ ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \
+ ldi NO_ERROR,%r1 ASM_LINE_SEP \
+ cmpb,>>=,n %r1,%ret0,L(pre_nc_end) ASM_LINE_SEP \
+ /* Restore r19 from TREG */ ASM_LINE_SEP \
+ LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \
+ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
+ /* Use TREG for temp storage */ ASM_LINE_SEP \
+ copy %ret0, TREG /* delay */ ASM_LINE_SEP \
+ /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \
+ /* do a -1*syscall_ret0 */ ASM_LINE_SEP \
+ sub %r0, TREG, TREG ASM_LINE_SEP \
+ /* Store into errno location */ ASM_LINE_SEP \
+ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
+ /* return -1 as error */ ASM_LINE_SEP \
+ ldi -1, %ret0 ASM_LINE_SEP \
+L(pre_nc_end): ASM_LINE_SEP \
+ /* No need to LOAD_PIC */ ASM_LINE_SEP \
+ /* Undo frame */ ASM_LINE_SEP \
+ ldwm -64(%sp),TREG ASM_LINE_SEP \
+ .cfi_adjust_cfa_offset -64 ASM_LINE_SEP \
+ /* Restore rp before exit */ ASM_LINE_SEP \
+ ldw -20(%sp), %rp ASM_LINE_SEP \
+ .cfi_restore 2 ASM_LINE_SEP \
+ ret ASM_LINE_SEP \
+ END(__##syscall_name##_nocancel) ASM_LINE_SEP \
+ /**********************************************/ASM_LINE_SEP \
ENTRY (name) \
DOARGS_##args ASM_LINE_SEP \
stwm TREG, 64(%sp) ASM_LINE_SEP \
+ .cfi_adjust_cfa_offset 64 ASM_LINE_SEP \
stw %sp, -4(%sp) ASM_LINE_SEP \
+ .cfi_offset 30, -4 ASM_LINE_SEP \
stw %r19, -32(%sp) ASM_LINE_SEP \
+ .cfi_offset 19, -32 ASM_LINE_SEP \
/* Done setting up frame, continue... */ ASM_LINE_SEP \
SINGLE_THREAD_P ASM_LINE_SEP \
cmpib,<>,n 0,%ret0,L(pseudo_cancel) ASM_LINE_SEP \
@@ -128,26 +170,40 @@
/* No need to LOAD_PIC */ ASM_LINE_SEP \
/* Undo frame */ ASM_LINE_SEP \
ldwm -64(%sp),TREG ASM_LINE_SEP \
+ .cfi_adjust_cfa_offset -64 ASM_LINE_SEP \
/* Restore rp before exit */ ASM_LINE_SEP \
- ldw -20(%sp), %rp ASM_LINE_SEP
+ ldw -20(%sp), %rp ASM_LINE_SEP \
+ .cfi_restore 2 ASM_LINE_SEP
/* Save arguments into our frame */
# define PUSHARGS_0 /* nothing to do */
-# define PUSHARGS_1 PUSHARGS_0 stw %r26, -36(%sr0,%sp) ASM_LINE_SEP
-# define PUSHARGS_2 PUSHARGS_1 stw %r25, -40(%sr0,%sp) ASM_LINE_SEP
-# define PUSHARGS_3 PUSHARGS_2 stw %r24, -44(%sr0,%sp) ASM_LINE_SEP
-# define PUSHARGS_4 PUSHARGS_3 stw %r23, -48(%sr0,%sp) ASM_LINE_SEP
-# define PUSHARGS_5 PUSHARGS_4 stw %r22, -52(%sr0,%sp) ASM_LINE_SEP
-# define PUSHARGS_6 PUSHARGS_5 stw %r21, -56(%sr0,%sp) ASM_LINE_SEP
+# define PUSHARGS_1 PUSHARGS_0 stw %r26, -36(%sr0,%sp) ASM_LINE_SEP \
+ .cfi_offset 26, -36 ASM_LINE_SEP
+# define PUSHARGS_2 PUSHARGS_1 stw %r25, -40(%sr0,%sp) ASM_LINE_SEP \
+ .cfi_offset 25, -40 ASM_LINE_SEP
+# define PUSHARGS_3 PUSHARGS_2 stw %r24, -44(%sr0,%sp) ASM_LINE_SEP \
+ .cfi_offset 24, -44 ASM_LINE_SEP
+# define PUSHARGS_4 PUSHARGS_3 stw %r23, -48(%sr0,%sp) ASM_LINE_SEP \
+ .cfi_offset 23, -48 ASM_LINE_SEP
+# define PUSHARGS_5 PUSHARGS_4 stw %r22, -52(%sr0,%sp) ASM_LINE_SEP \
+ .cfi_offset 22, -52 ASM_LINE_SEP
+# define PUSHARGS_6 PUSHARGS_5 stw %r21, -56(%sr0,%sp) ASM_LINE_SEP \
+ .cfi_offset 21, -56 ASM_LINE_SEP
/* Bring them back from the stack */
# define POPARGS_0 /* nothing to do */
-# define POPARGS_1 POPARGS_0 ldw -36(%sr0,%sp), %r26 ASM_LINE_SEP
-# define POPARGS_2 POPARGS_1 ldw -40(%sr0,%sp), %r25 ASM_LINE_SEP
-# define POPARGS_3 POPARGS_2 ldw -44(%sr0,%sp), %r24 ASM_LINE_SEP
-# define POPARGS_4 POPARGS_3 ldw -48(%sr0,%sp), %r23 ASM_LINE_SEP
-# define POPARGS_5 POPARGS_4 ldw -52(%sr0,%sp), %r22 ASM_LINE_SEP
-# define POPARGS_6 POPARGS_5 ldw -56(%sr0,%sp), %r21 ASM_LINE_SEP
+# define POPARGS_1 POPARGS_0 ldw -36(%sr0,%sp), %r26 ASM_LINE_SEP \
+ .cfi_restore 26 ASM_LINE_SEP
+# define POPARGS_2 POPARGS_1 ldw -40(%sr0,%sp), %r25 ASM_LINE_SEP \
+ .cfi_restore 25 ASM_LINE_SEP
+# define POPARGS_3 POPARGS_2 ldw -44(%sr0,%sp), %r24 ASM_LINE_SEP \
+ .cfi_restore 24 ASM_LINE_SEP
+# define POPARGS_4 POPARGS_3 ldw -48(%sr0,%sp), %r23 ASM_LINE_SEP \
+ .cfi_restore 23 ASM_LINE_SEP
+# define POPARGS_5 POPARGS_4 ldw -52(%sr0,%sp), %r22 ASM_LINE_SEP \
+ .cfi_restore 22 ASM_LINE_SEP
+# define POPARGS_6 POPARGS_5 ldw -56(%sr0,%sp), %r21 ASM_LINE_SEP \
+ .cfi_restore 21 ASM_LINE_SEP
# ifdef IS_IN_libpthread
# ifdef PIC
Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h 2011-09-04 14:18:44.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h 2011-09-04 14:20:23.000000000 -0400
@@ -29,10 +29,8 @@
GDB unless you know what you are doing. */
#include <features.h>
-#include <signal.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <sys/ucontext.h>
#include <sys/user.h>
__BEGIN_DECLS
Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h 2011-09-04 14:19:27.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h 2011-09-04 14:20:23.000000000 -0400
@@ -22,7 +22,6 @@
#include <asm/unistd.h>
#include <sysdeps/generic/sysdep.h>
-#include <sys/syscall.h>
/* In order to get __set_errno() definition in INLINE_SYSCALL. */
#ifndef __ASSEMBLER__
@@ -35,32 +34,28 @@
#undef SYS_ify
#define SYS_ify(syscall_name) (__NR_##syscall_name)
+/* The vfork, fork, and clone syscalls clobber r19
+ * and r21. We list r21 as either clobbered or as an
+ * input to a 6-argument syscall. We must save and
+ * restore r19 in both PIC and non-PIC cases.
+ */
/* WARNING: TREG must be a callee saves register so
that it doesn't have to be restored after a call
to another function */
-#ifdef PIC
-# define TREG %r3
-# define SAVE_PIC(SREG) copy %r19, SREG ASM_LINE_SEP
-# define LOAD_PIC(LREG) copy LREG, %r19 ASM_LINE_SEP
-/* Inline assembly defines */
-# define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */
-# define SAVE_ASM_PIC " copy %%r19, %" TREG_ASM "\n"
-# define LOAD_ASM_PIC " copy %" TREG_ASM ", %%r19\n"
-# define CLOB_TREG TREG_ASM ,
-# define PIC_REG_DEF register unsigned long __r19 asm("r19");
-# define PIC_REG_USE , "r" (__r19)
-#else
-# define TREG %r3
-# define SAVE_PIC(SREG) nop ASM_LINE_SEP
-# define LOAD_PIC(LREG) nop ASM_LINE_SEP
+#define TREG 4
+#define SAVE_PIC(SREG) \
+ copy %r19, SREG ASM_LINE_SEP \
+ .cfi_register 19, SREG
+#define LOAD_PIC(LREG) \
+ copy LREG , %r19 ASM_LINE_SEP \
+ .cfi_restore 19
/* Inline assembly defines */
-# define TREG_ASM
-# define SAVE_ASM_PIC "nop \n"
-# define LOAD_ASM_PIC "nop \n"
-# define CLOB_TREG
-# define PIC_REG_DEF
-# define PIC_REG_USE
-#endif
+#define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */
+#define SAVE_ASM_PIC " copy %%r19, %" TREG_ASM "\n"
+#define LOAD_ASM_PIC " copy %" TREG_ASM ", %%r19\n"
+#define CLOB_TREG TREG_ASM ,
+#define PIC_REG_DEF register unsigned long __r19 asm("r19");
+#define PIC_REG_USE , "r" (__r19)
#ifdef __ASSEMBLER__
@@ -127,12 +122,14 @@
.align ALIGNARG(4) ASM_LINE_SEP \
.export C_SYMBOL_NAME(name) ASM_LINE_SEP \
.type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
+ cfi_startproc ASM_LINE_SEP \
C_LABEL(name) ASM_LINE_SEP \
.PROC ASM_LINE_SEP \
.CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \
.ENTRY ASM_LINE_SEP \
/* SAVE_RP says we do */ ASM_LINE_SEP \
stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \
+ .cfi_offset 2, -20 ASM_LINE_SEP \
/*FIXME: Call mcount? (carefull with stack!) */
/* Some syscall wrappers do not call other functions, and
@@ -142,18 +139,21 @@
.align ALIGNARG(4) ASM_LINE_SEP \
.export C_SYMBOL_NAME(name) ASM_LINE_SEP \
.type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
+ cfi_startproc ASM_LINE_SEP \
C_LABEL(name) ASM_LINE_SEP \
.PROC ASM_LINE_SEP \
.CALLINFO FRAME=64,NO_CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \
.ENTRY ASM_LINE_SEP \
/* SAVE_RP says we do */ ASM_LINE_SEP \
stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \
+ .cfi_offset 2, -20 ASM_LINE_SEP \
/*FIXME: Call mcount? (carefull with stack!) */
#undef END
#define END(name) \
.EXIT ASM_LINE_SEP \
.PROCEND ASM_LINE_SEP \
+ cfi_endproc ASM_LINE_SEP \
.size C_SYMBOL_NAME(name), .-C_SYMBOL_NAME(name) ASM_LINE_SEP
/* If compiled for profiling, call `mcount' at the start
@@ -170,9 +170,7 @@
which means
ENTRY(name)
DO_CALL(...)
- nop
- bv 0(2)
- nop
+ bv,n 0(2)
*/
#define PSEUDO(name, syscall_name, args) \
@@ -180,8 +178,7 @@
/* If necc. load args from stack */ ASM_LINE_SEP \
DOARGS_##args ASM_LINE_SEP \
DO_CALL (syscall_name, args) ASM_LINE_SEP \
- UNDOARGS_##args ASM_LINE_SEP \
- nop ASM_LINE_SEP
+ UNDOARGS_##args ASM_LINE_SEP
#define ret \
/* Return value set by ERRNO code */ ASM_LINE_SEP \
@@ -196,8 +193,7 @@
ENTRY_LEAF (name) ASM_LINE_SEP \
DOARGS_##args ASM_LINE_SEP \
DO_CALL_NOERRNO (syscall_name, args) ASM_LINE_SEP \
- UNDOARGS_##args ASM_LINE_SEP \
- nop ASM_LINE_SEP
+ UNDOARGS_##args ASM_LINE_SEP
#define ret_NOERRNO ret
@@ -211,8 +207,7 @@
ENTRY_LEAF (name) ASM_LINE_SEP \
DOARGS_##args ASM_LINE_SEP \
DO_CALL_ERRVAL (syscall_name, args) ASM_LINE_SEP \
- UNDOARGS_##args ASM_LINE_SEP \
- nop ASM_LINE_SEP
+ UNDOARGS_##args ASM_LINE_SEP
#define ret_ERRVAL ret
@@ -290,8 +285,12 @@
#define DO_CALL(syscall_name, args) \
/* Create a frame */ ASM_LINE_SEP \
stwm TREG, 64(%sp) ASM_LINE_SEP \
+ .cfi_offset TREG, 0 ASM_LINE_SEP \
+ .cfi_adjust_cfa_offset 64 ASM_LINE_SEP \
stw %sp, -4(%sp) ASM_LINE_SEP \
+ .cfi_offset 30, -4 ASM_LINE_SEP \
stw %r19, -32(%sp) ASM_LINE_SEP \
+ .cfi_offset 19, -32 ASM_LINE_SEP \
/* Save r19 */ ASM_LINE_SEP \
SAVE_PIC(TREG) ASM_LINE_SEP \
/* Do syscall, delay loads # */ ASM_LINE_SEP \
@@ -314,8 +313,10 @@
L(pre_end): ASM_LINE_SEP \
/* Restore our frame, restoring TREG */ ASM_LINE_SEP \
ldwm -64(%sp), TREG ASM_LINE_SEP \
+ .cfi_adjust_cfa_offset -64 ASM_LINE_SEP \
/* Restore return pointer */ ASM_LINE_SEP \
- ldw -20(%sp),%rp ASM_LINE_SEP
+ ldw -20(%sp),%rp ASM_LINE_SEP \
+ .cfi_restore 2 ASM_LINE_SEP
/* We do nothing with the return, except hand it back to someone else */
#undef DO_CALL_NOERRNO
[-- Attachment #3: ports-2011-09-17.diff --]
[-- Type: application/octet-stream, Size: 1517 bytes --]
Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
===================================================================
--- eglibc-2.13.orig/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h 2011-09-05 00:09:53.000000000 -0400
+++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h 2011-09-17 23:07:14.000000000 -0400
@@ -288,18 +288,20 @@
__lll_robust_timedlock (&(futex), abstime, id, private)
#define __lll_unlock(futex, private) \
- (void) \
- ({ int val = atomic_exchange_rel (futex, 0); \
- if (__builtin_expect (val > 1, 0)) \
- lll_futex_wake (futex, 1, private); \
+ (void) \
+ ({ int *__futex = (futex); \
+ int val = atomic_exchange_rel (__futex, 0); \
+ if (__builtin_expect (val > 1, 0)) \
+ lll_futex_wake (__futex, 1, private); \
})
#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
#define __lll_robust_unlock(futex,private) \
- (void) \
- ({ int val = atomic_exchange_rel (futex, 0); \
- if (__builtin_expect (val & FUTEX_WAITERS, 0)) \
- lll_futex_wake (futex, 1, private); \
+ (void) \
+ ({ int *__futex = (futex); \
+ int val = atomic_exchange_rel (__futex, 0); \
+ if (__builtin_expect (val & FUTEX_WAITERS, 0)) \
+ lll_futex_wake (__futex, 1, private); \
})
#define lll_robust_unlock(futex, private) \
__lll_robust_unlock(&(futex), private)
[-- Attachment #4: ports-2011-10-30.diff --]
[-- Type: application/octet-stream, Size: 17124 bytes --]
Index: eglibc-2.13/ports/ChangeLog.hppa
===================================================================
--- eglibc-2.13.orig/ports/ChangeLog.hppa 2011-09-24 18:40:01.000000000 -0400
+++ eglibc-2.13/ports/ChangeLog.hppa 2011-10-30 11:43:20.000000000 -0400
@@ -3,6 +3,19 @@
* sysdeps/hppa/dl-machine.h: Update copyright year.
(ELF_MACHINE_BEFORE_RTLD_RELOC): Call _dl_fptr_init.
+2010-08-06 Guy Martin <gmsoft@tuxicoman.be>
+
+ * ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h:
+ Fix EPOLL_CLOEXEC and EPOLL_NONBLOCK to match kernel definition.
+ * ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h:
+ Fix EFD_CLOEXEC and EFD_NONBLOCK to match kernel definition.
+ * ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h:
+ Fix IN_CLOEXEC and IN_NONBLOCK to match kernel definition.
+ * ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h:
+ Fix SFD_CLOEXEC and SFD_NONBLOCK to match kernel definition.
+ * ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h:
+ Fix TFD_CLOEXEC and TFD_NONBLOCK to match kernel definition.
+
2010-06-24 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Only create stack
Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h 2011-10-30 11:44:30.000000000 -0400
@@ -0,0 +1,144 @@
+/* Copyright (C) 2002-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_EPOLL_H
+#define _SYS_EPOLL_H 1
+
+#include <stdint.h>
+#include <sys/types.h>
+
+/* Get __sigset_t. */
+#include <bits/sigset.h>
+
+#ifndef __sigset_t_defined
+# define __sigset_t_defined
+typedef __sigset_t sigset_t;
+#endif
+
+
+/* Flags to be passed to epoll_create1. */
+enum
+ {
+ EPOLL_CLOEXEC = 010000000,
+#define EPOLL_CLOEXEC EPOLL_CLOEXEC
+ EPOLL_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
+#define EPOLL_NONBLOCK EPOLL_NONBLOCK
+ };
+
+
+enum EPOLL_EVENTS
+ {
+ EPOLLIN = 0x001,
+#define EPOLLIN EPOLLIN
+ EPOLLPRI = 0x002,
+#define EPOLLPRI EPOLLPRI
+ EPOLLOUT = 0x004,
+#define EPOLLOUT EPOLLOUT
+ EPOLLRDNORM = 0x040,
+#define EPOLLRDNORM EPOLLRDNORM
+ EPOLLRDBAND = 0x080,
+#define EPOLLRDBAND EPOLLRDBAND
+ EPOLLWRNORM = 0x100,
+#define EPOLLWRNORM EPOLLWRNORM
+ EPOLLWRBAND = 0x200,
+#define EPOLLWRBAND EPOLLWRBAND
+ EPOLLMSG = 0x400,
+#define EPOLLMSG EPOLLMSG
+ EPOLLERR = 0x008,
+#define EPOLLERR EPOLLERR
+ EPOLLHUP = 0x010,
+#define EPOLLHUP EPOLLHUP
+ EPOLLRDHUP = 0x2000,
+#define EPOLLRDHUP EPOLLRDHUP
+ EPOLLONESHOT = (1 << 30),
+#define EPOLLONESHOT EPOLLONESHOT
+ EPOLLET = (1 << 31)
+#define EPOLLET EPOLLET
+ };
+
+
+/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */
+#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */
+#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */
+#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */
+
+
+typedef union epoll_data
+{
+ void *ptr;
+ int fd;
+ uint32_t u32;
+ uint64_t u64;
+} epoll_data_t;
+
+struct epoll_event
+{
+ uint32_t events; /* Epoll events */
+ epoll_data_t data; /* User data variable */
+};
+
+
+__BEGIN_DECLS
+
+/* Creates an epoll instance. Returns an fd for the new instance.
+ The "size" parameter is a hint specifying the number of file
+ descriptors to be associated with the new instance. The fd
+ returned by epoll_create() should be closed with close(). */
+extern int epoll_create (int __size) __THROW;
+
+/* Same as epoll_create but with an FLAGS parameter. The unused SIZE
+ parameter has been dropped. */
+extern int epoll_create1 (int __flags) __THROW;
+
+
+/* Manipulate an epoll instance "epfd". Returns 0 in case of success,
+ -1 in case of error ( the "errno" variable will contain the
+ specific error code ) The "op" parameter is one of the EPOLL_CTL_*
+ constants defined above. The "fd" parameter is the target of the
+ operation. The "event" parameter describes which events the caller
+ is interested in and any associated user data. */
+extern int epoll_ctl (int __epfd, int __op, int __fd,
+ struct epoll_event *__event) __THROW;
+
+
+/* Wait for events on an epoll instance "epfd". Returns the number of
+ triggered events returned in "events" buffer. Or -1 in case of
+ error with the "errno" variable set to the specific error code. The
+ "events" parameter is a buffer that will contain triggered
+ events. The "maxevents" is the maximum number of events to be
+ returned ( usually size of "events" ). The "timeout" parameter
+ specifies the maximum wait time in milliseconds (-1 == infinite).
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int epoll_wait (int __epfd, struct epoll_event *__events,
+ int __maxevents, int __timeout);
+
+
+/* Same as epoll_wait, but the thread's signal mask is temporarily
+ and atomically replaced with the one provided as parameter.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int epoll_pwait (int __epfd, struct epoll_event *__events,
+ int __maxevents, int __timeout,
+ __const __sigset_t *__ss);
+
+__END_DECLS
+
+#endif /* sys/epoll.h */
Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h 2011-10-30 11:44:30.000000000 -0400
@@ -0,0 +1,54 @@
+/* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_EVENTFD_H
+#define _SYS_EVENTFD_H 1
+
+#include <stdint.h>
+
+
+/* Type for event counter. */
+typedef uint64_t eventfd_t;
+
+/* Flags for signalfd. */
+enum
+ {
+ EFD_SEMAPHORE = 1,
+#define EFD_SEMAPHORE EFD_SEMAPHORE
+ EFD_CLOEXEC = 010000000,
+#define EFD_CLOEXEC EFD_CLOEXEC
+ EFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
+#define EFD_NONBLOCK EFD_NONBLOCK
+ };
+
+
+__BEGIN_DECLS
+
+/* Return file descriptor for generic event channel. Set initial
+ value to COUNT. */
+extern int eventfd (int __count, int __flags) __THROW;
+
+/* Read event counter and possibly wait for events. */
+extern int eventfd_read (int __fd, eventfd_t *__value);
+
+/* Increment event counter. */
+extern int eventfd_write (int __fd, eventfd_t __value);
+
+__END_DECLS
+
+#endif /* sys/eventfd.h */
Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h 2011-10-30 11:44:30.000000000 -0400
@@ -0,0 +1,105 @@
+/* Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_INOTIFY_H
+#define _SYS_INOTIFY_H 1
+
+#include <stdint.h>
+
+
+/* Flags for the parameter of inotify_init1. */
+enum
+ {
+ IN_CLOEXEC = 010000000,
+#define IN_CLOEXEC IN_CLOEXEC
+ IN_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */
+#define IN_NONBLOCK IN_NONBLOCK
+ };
+
+
+/* Structure describing an inotify event. */
+struct inotify_event
+{
+ int wd; /* Watch descriptor. */
+ uint32_t mask; /* Watch mask. */
+ uint32_t cookie; /* Cookie to synchronize two events. */
+ uint32_t len; /* Length (including NULs) of name. */
+ char name __flexarr; /* Name. */
+};
+
+
+/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */
+#define IN_ACCESS 0x00000001 /* File was accessed. */
+#define IN_MODIFY 0x00000002 /* File was modified. */
+#define IN_ATTRIB 0x00000004 /* Metadata changed. */
+#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */
+#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */
+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
+#define IN_OPEN 0x00000020 /* File was opened. */
+#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */
+#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */
+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
+#define IN_CREATE 0x00000100 /* Subfile was created. */
+#define IN_DELETE 0x00000200 /* Subfile was deleted. */
+#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */
+#define IN_MOVE_SELF 0x00000800 /* Self was moved. */
+
+/* Events sent by the kernel. */
+#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */
+#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */
+#define IN_IGNORED 0x00008000 /* File was ignored. */
+
+/* Helper events. */
+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
+
+/* Special flags. */
+#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a
+ directory. */
+#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */
+#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already
+ existing watch. */
+#define IN_ISDIR 0x40000000 /* Event occurred against dir. */
+#define IN_ONESHOT 0x80000000 /* Only send event once. */
+
+/* All events which a program can wait on. */
+#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \
+ | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \
+ | IN_MOVED_TO | IN_CREATE | IN_DELETE \
+ | IN_DELETE_SELF | IN_MOVE_SELF)
+
+
+__BEGIN_DECLS
+
+/* Create and initialize inotify instance. */
+extern int inotify_init (void) __THROW;
+
+/* Create and initialize inotify instance. */
+extern int inotify_init1 (int __flags) __THROW;
+
+/* Add watch of object NAME to inotify instance FD. Notify about
+ events specified by MASK. */
+extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
+ __THROW;
+
+/* Remove the watch specified by WD from the inotify instance FD. */
+extern int inotify_rm_watch (int __fd, int __wd) __THROW;
+
+__END_DECLS
+
+#endif /* sys/inotify.h */
Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h 2011-10-30 11:44:30.000000000 -0400
@@ -0,0 +1,66 @@
+/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_SIGNALFD_H
+#define _SYS_SIGNALFD_H 1
+
+#define __need_sigset_t
+#include <signal.h>
+#include <stdint.h>
+
+
+struct signalfd_siginfo
+{
+ uint32_t ssi_signo;
+ int32_t ssi_errno;
+ int32_t ssi_code;
+ uint32_t ssi_pid;
+ uint32_t ssi_uid;
+ int32_t ssi_fd;
+ uint32_t ssi_tid;
+ uint32_t ssi_band;
+ uint32_t ssi_overrun;
+ uint32_t ssi_trapno;
+ int32_t ssi_status;
+ int32_t ssi_int;
+ uint64_t ssi_ptr;
+ uint64_t ssi_utime;
+ uint64_t ssi_stime;
+ uint64_t ssi_addr;
+ uint8_t __pad[48];
+};
+
+/* Flags for signalfd. */
+enum
+ {
+ SFD_CLOEXEC = 010000000,
+#define SFD_CLOEXEC SFD_CLOEXEC
+ SFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
+#define SFD_NONBLOCK SFD_NONBLOCK
+ };
+
+__BEGIN_DECLS
+
+/* Request notification for delivery of signals in MASK to be
+ performed using descriptor FD.*/
+extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
+ __THROW __nonnull ((2));
+
+__END_DECLS
+
+#endif /* sys/signalfd.h */
Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h 2011-10-30 11:44:30.000000000 -0400
@@ -0,0 +1,60 @@
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_TIMERFD_H
+#define _SYS_TIMERFD_H 1
+
+#include <time.h>
+
+
+/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
+enum
+ {
+ TFD_CLOEXEC = 010000000,
+#define TFD_CLOEXEC TFD_CLOEXEC
+ TFD_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */
+#define TFD_NONBLOCK TFD_NONBLOCK
+ };
+
+
+/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */
+enum
+ {
+ TFD_TIMER_ABSTIME = 1 << 0
+#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
+ };
+
+
+__BEGIN_DECLS
+
+/* Return file descriptor for new interval timer source. */
+extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
+
+/* Set next expiration time of interval timer source UFD to UTMR. If
+ FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is
+ absolute. Optionally return the old expiration time in OTMR. */
+extern int timerfd_settime (int __ufd, int __flags,
+ __const struct itimerspec *__utmr,
+ struct itimerspec *__otmr) __THROW;
+
+/* Return the next expiration time of UFD. */
+extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
+
+__END_DECLS
+
+#endif /* sys/timerfd.h */
[-- Attachment #5: Type: text/plain, Size: 1 bytes --]
^ permalink raw reply
* Re: [PATCH 1/8] pnfs-obj: Remove redundant EOF from objlayout_io_state
From: Boaz Harrosh @ 2011-10-31 23:23 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Brent Welch, NFS list, open-osd
In-Reply-To: <4EAF2521.2010204@panasas.com>
On 10/31/2011 03:45 PM, Boaz Harrosh wrote:
>>
>
> In files-type reads in a "condense" layout. You should be careful
I meant dense layout.
And in that case I think only the MDS knows the actual file-size. Because at
any given time a DS can never tell if it is the last one in the stripe, and
neither can any given client.
> because in striping it is common place to have eof on some DSs because
> of file holes even though there are more bits higher on in the file
> at other DSs. You should check to return back only the answer from the
> highest logical read DS. (Or I'm wrong in my interpretation?)
>
> Thanks
> Boaz
^ permalink raw reply
* Re: [RFC PATCH] freezer: revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too"
From: Rafael J. Wysocki @ 2011-10-31 23:24 UTC (permalink / raw)
To: Tejun Heo, Jeff Layton, Steve French
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Oleg Nesterov,
linux-pm-u79uwXL29TY76Z2rM5mHXA,
linux-cifs-u79uwXL29TY76Z2rM5mHXA, J. Bruce Fields, Neil Brown
In-Reply-To: <20111031221743.GA18855-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
On Monday, October 31, 2011, Tejun Heo wrote:
> Commit 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake
> TASK_KILLABLE tasks too" made freezer wake up tasks in TASK_KILLABLE
> sleep too citing non-interruptible but killable sleeps in cifs and
> nfs.
>
> I don't think we can do this. We should not send spurious unsolicited
> non-interruptible wakeups. Most synchornization constructs are built
> to cope with spurious wakeups and any INTERRUPTIBLE sleep must be able
> to handle spurious wakeups but that's not true for KILLABLE sleeps -
> KILLABLE condition cannot be cancelled.
>
> This is probably okay for most cases but circumventing fundamental
> wakeup condition like this is asking for trouble. Furthermore, I'm
> not sure the behavior change brought on by this change - breaking
> nfs/cifs uninterruptible operation guarantee - is correct. If such
> behavior is desirable, the right thing to do is using intr mount
> option, not circumventing it from PM layer.
Do you have any specific examples of breakage, or is it just that you _think_
it's not quite right?
One patch depending on that change has been merged already and I have two
more in the queue, so I'd like to clarify this ASAP. Jeff, Steve?
> Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> Neil, Steve, do the network filesystems need a way to indicate "I can
> either be killed or enter freezer"?
>
> Thanks.
>
> kernel/freezer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/freezer.c b/kernel/freezer.c
> index 66a594e..7b01de9 100644
> --- a/kernel/freezer.c
> +++ b/kernel/freezer.c
> @@ -67,7 +67,7 @@ static void fake_signal_wake_up(struct task_struct *p)
> unsigned long flags;
>
> spin_lock_irqsave(&p->sighand->siglock, flags);
> - signal_wake_up(p, 1);
> + signal_wake_up(p, 0);
> spin_unlock_irqrestore(&p->sighand->siglock, flags);
> }
Thanks,
Rafael
^ permalink raw reply
* [U-Boot] [PATCH] Move the SC520 specific pci.h header into an sc520 directory.
From: Gabe Black @ 2011-10-31 23:23 UTC (permalink / raw)
To: u-boot
In-Reply-To: <4EAB7A4A.5020807@gmail.com>
Ok, never mind then. I'm using a script Simon Glass wrote to prepare
patches for submission, so that option will probably need to be added there.
Gabe
On Fri, Oct 28, 2011 at 9:00 PM, Graeme Russ <graeme.russ@gmail.com> wrote:
> Gabe,
>
> I have already submitted a patch for this:
>
> http://patchwork.ozlabs.org/patch/120011/
>
> Also, you patch does a delete then create rather than a file rename - When
> you use git-format-patch, use the --find-renames option
>
> Regards,
>
> Graeme
>
> On 29/10/11 09:34, Gabe Black wrote:
> > The arch/i386/include/asm/ic/pci.h header file include definitions which
> were
> > not generic to i386 and where specifically for SC520. This change moves
> that
> > header into a directory which more accurately reflects that.
> >
> > Signed-off-by: Gabe Black <gabeblack@chromium.org>
> > ---
> > arch/x86/include/asm/ic/pci.h | 79
> -----------------------------------
> > arch/x86/include/asm/ic/sc520/pci.h | 79
> +++++++++++++++++++++++++++++++++++
> > 2 files changed, 79 insertions(+), 79 deletions(-)
> > delete mode 100644 arch/x86/include/asm/ic/pci.h
> > create mode 100644 arch/x86/include/asm/ic/sc520/pci.h
> >
> > diff --git a/arch/x86/include/asm/ic/pci.h
> b/arch/x86/include/asm/ic/pci.h
> > deleted file mode 100644
> > index 12ba656..0000000
> > --- a/arch/x86/include/asm/ic/pci.h
> > +++ /dev/null
> > @@ -1,79 +0,0 @@
> > -/*
> > - * (C) Copyright 2002
> > - * Daniel Engstr?m, Omicron Ceti AB <daniel@omicron.se>.
> > - *
> > - * See file CREDITS for list of people who contributed to this
> > - * project.
> > - *
> > - * This program is free software; you can redistribute it and/or
> > - * modify it under the terms of the GNU General Public License as
> > - * published by the Free Software Foundation; either version 2 of
> > - * the License, or (at your option) any later version.
> > - *
> > - * This program is distributed in the hope that it will be useful,
> > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> > - * GNU General Public License for more details.
> > - *
> > - * You should have received a copy of the GNU General Public License
> > - * along with this program; if not, write to the Free Software
> > - * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> > - * MA 02111-1307 USA
> > - */
> > -
> > -#ifndef _ASM_IC_SC520_PCI_H_
> > -#define _ASM_IC_SC520_PCI_H_ 1
> > -
> > -/* bus mapping constants (used for PCI core initialization) */
>
>
>
>
> /*
> bus mapping constants */
> > -#define SC520_REG_ADDR 0x00000cf8
> > -#define SC520_REG_DATA 0x00000cfc
> > -
> > -#define SC520_ISA_MEM_PHYS 0x00000000
> > -#define SC520_ISA_MEM_BUS 0x00000000
> > -#define SC520_ISA_MEM_SIZE 0x01000000
> > -
> > -#define SC520_ISA_IO_PHYS 0x00000000
> > -#define SC520_ISA_IO_BUS 0x00000000
> > -#define SC520_ISA_IO_SIZE 0x00001000
> > -
> > -/* PCI I/O space from 0x1000 to 0xdfff
> > - * (make 0xe000-0xfdff available for stuff like PCCard boot) */
> > -#define SC520_PCI_IO_PHYS 0x00001000
> > -#define SC520_PCI_IO_BUS 0x00001000
> > -#define SC520_PCI_IO_SIZE 0x0000d000
> > -
> > -/* system memory from 0x00000000 to 0x0fffffff */
> > -#define SC520_PCI_MEMORY_PHYS 0x00000000
> > -#define SC520_PCI_MEMORY_BUS 0x00000000
> > -#define SC520_PCI_MEMORY_SIZE 0x10000000
> > -
> > -/* PCI bus memory from 0x10000000 to 0x26ffffff
> > - * (make 0x27000000 - 0x27ffffff available for stuff like PCCard boot)
> */
> > -#define SC520_PCI_MEM_PHYS 0x10000000
> > -#define SC520_PCI_MEM_BUS 0x10000000
> > -#define SC520_PCI_MEM_SIZE 0x17000000
> > -
> > -/* pin number used for PCI interrupt mappings */
> > -#define SC520_PCI_INTA 0
> > -#define SC520_PCI_INTB 1
> > -#define SC520_PCI_INTC 2
> > -#define SC520_PCI_INTD 3
> > -#define SC520_PCI_GPIRQ0 4
> > -#define SC520_PCI_GPIRQ1 5
> > -#define SC520_PCI_GPIRQ2 6
> > -#define SC520_PCI_GPIRQ3 7
> > -#define SC520_PCI_GPIRQ4 8
> > -#define SC520_PCI_GPIRQ5 9
> > -#define SC520_PCI_GPIRQ6 10
> > -#define SC520_PCI_GPIRQ7 11
> > -#define SC520_PCI_GPIRQ8 12
> > -#define SC520_PCI_GPIRQ9 13
> > -#define SC520_PCI_GPIRQ10 14
> > -
> > -extern int sc520_pci_ints[];
> > -
> > -void pci_sc520_init(struct pci_controller *hose);
> > -int pci_set_regions(struct pci_controller *hose);
> > -int pci_sc520_set_irq(int pci_pin, int irq);
> > -
> > -#endif
> > diff --git a/arch/x86/include/asm/ic/sc520/pci.h
> b/arch/x86/include/asm/ic/sc520/pci.h
> > new file mode 100644
> > index 0000000..12ba656
> > --- /dev/null
> > +++ b/arch/x86/include/asm/ic/sc520/pci.h
> > @@ -0,0 +1,79 @@
> > +/*
> > + * (C) Copyright 2002
> > + * Daniel Engstr?m, Omicron Ceti AB <daniel@omicron.se>.
> > + *
> > + * See file CREDITS for list of people who contributed to this
> > + * project.
> > + *
> > + * This program is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU General Public License as
> > + * published by the Free Software Foundation; either version 2 of
> > + * the License, or (at your option) any later version.
> > + *
> > + * This program is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> > + * GNU General Public License for more details.
> > + *
> > + * You should have received a copy of the GNU General Public License
> > + * along with this program; if not, write to the Free Software
> > + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> > + * MA 02111-1307 USA
> > + */
> > +
> > +#ifndef _ASM_IC_SC520_PCI_H_
> > +#define _ASM_IC_SC520_PCI_H_ 1
> > +
> > +/* bus mapping constants (used for PCI core initialization) */
>
>
>
>
> /*
> bus mapping constants */
> > +#define SC520_REG_ADDR 0x00000cf8
> > +#define SC520_REG_DATA 0x00000cfc
> > +
> > +#define SC520_ISA_MEM_PHYS 0x00000000
> > +#define SC520_ISA_MEM_BUS 0x00000000
> > +#define SC520_ISA_MEM_SIZE 0x01000000
> > +
> > +#define SC520_ISA_IO_PHYS 0x00000000
> > +#define SC520_ISA_IO_BUS 0x00000000
> > +#define SC520_ISA_IO_SIZE 0x00001000
> > +
> > +/* PCI I/O space from 0x1000 to 0xdfff
> > + * (make 0xe000-0xfdff available for stuff like PCCard boot) */
> > +#define SC520_PCI_IO_PHYS 0x00001000
> > +#define SC520_PCI_IO_BUS 0x00001000
> > +#define SC520_PCI_IO_SIZE 0x0000d000
> > +
> > +/* system memory from 0x00000000 to 0x0fffffff */
> > +#define SC520_PCI_MEMORY_PHYS 0x00000000
> > +#define SC520_PCI_MEMORY_BUS 0x00000000
> > +#define SC520_PCI_MEMORY_SIZE 0x10000000
> > +
> > +/* PCI bus memory from 0x10000000 to 0x26ffffff
> > + * (make 0x27000000 - 0x27ffffff available for stuff like PCCard boot)
> */
> > +#define SC520_PCI_MEM_PHYS 0x10000000
> > +#define SC520_PCI_MEM_BUS 0x10000000
> > +#define SC520_PCI_MEM_SIZE 0x17000000
> > +
> > +/* pin number used for PCI interrupt mappings */
> > +#define SC520_PCI_INTA 0
> > +#define SC520_PCI_INTB 1
> > +#define SC520_PCI_INTC 2
> > +#define SC520_PCI_INTD 3
> > +#define SC520_PCI_GPIRQ0 4
> > +#define SC520_PCI_GPIRQ1 5
> > +#define SC520_PCI_GPIRQ2 6
> > +#define SC520_PCI_GPIRQ3 7
> > +#define SC520_PCI_GPIRQ4 8
> > +#define SC520_PCI_GPIRQ5 9
> > +#define SC520_PCI_GPIRQ6 10
> > +#define SC520_PCI_GPIRQ7 11
> > +#define SC520_PCI_GPIRQ8 12
> > +#define SC520_PCI_GPIRQ9 13
> > +#define SC520_PCI_GPIRQ10 14
> > +
> > +extern int sc520_pci_ints[];
> > +
> > +void pci_sc520_init(struct pci_controller *hose);
> > +int pci_set_regions(struct pci_controller *hose);
> > +int pci_sc520_set_irq(int pci_pin, int irq);
> > +
> > +#endif
>
>
^ permalink raw reply
* Re: infiniband.git back to kernel.org
From: Stephen Rothwell @ 2011-10-31 23:21 UTC (permalink / raw)
To: Roland Dreier; +Cc: linux-kernel, linux-rdma
In-Reply-To: <CAG4TOxPP3OQ=kScKCveySg_oeE4RUdpfHrPu5NiGejBbJv0r8g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
Hi Roland,
On Mon, 31 Oct 2011 11:01:48 -0700 Roland Dreier <roland@purestorage.com> wrote:
>
> I've reactivated my kernel.org tree, and my tree is once again at
>
> git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git
>
> Stephen, you can return to using the for-next branch of that tree
> as convenient for you.
I have switched to that from today.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: infiniband.git back to kernel.org
From: Stephen Rothwell @ 2011-10-31 23:21 UTC (permalink / raw)
To: Roland Dreier
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <CAG4TOxPP3OQ=kScKCveySg_oeE4RUdpfHrPu5NiGejBbJv0r8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
Hi Roland,
On Mon, 31 Oct 2011 11:01:48 -0700 Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org> wrote:
>
> I've reactivated my kernel.org tree, and my tree is once again at
>
> git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git
>
> Stephen, you can return to using the for-next branch of that tree
> as convenient for you.
I have switched to that from today.
--
Cheers,
Stephen Rothwell sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [RFC PATCH] freezer: revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too"
From: Rafael J. Wysocki @ 2011-10-31 23:24 UTC (permalink / raw)
To: Tejun Heo, Jeff Layton, Steve French
Cc: linux-kernel, Oleg Nesterov, linux-pm, linux-cifs,
J. Bruce Fields, Neil Brown
In-Reply-To: <20111031221743.GA18855@google.com>
On Monday, October 31, 2011, Tejun Heo wrote:
> Commit 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake
> TASK_KILLABLE tasks too" made freezer wake up tasks in TASK_KILLABLE
> sleep too citing non-interruptible but killable sleeps in cifs and
> nfs.
>
> I don't think we can do this. We should not send spurious unsolicited
> non-interruptible wakeups. Most synchornization constructs are built
> to cope with spurious wakeups and any INTERRUPTIBLE sleep must be able
> to handle spurious wakeups but that's not true for KILLABLE sleeps -
> KILLABLE condition cannot be cancelled.
>
> This is probably okay for most cases but circumventing fundamental
> wakeup condition like this is asking for trouble. Furthermore, I'm
> not sure the behavior change brought on by this change - breaking
> nfs/cifs uninterruptible operation guarantee - is correct. If such
> behavior is desirable, the right thing to do is using intr mount
> option, not circumventing it from PM layer.
Do you have any specific examples of breakage, or is it just that you _think_
it's not quite right?
One patch depending on that change has been merged already and I have two
more in the queue, so I'd like to clarify this ASAP. Jeff, Steve?
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Jeff Layton <jlayton@redhat.com>
> ---
> Neil, Steve, do the network filesystems need a way to indicate "I can
> either be killed or enter freezer"?
>
> Thanks.
>
> kernel/freezer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/freezer.c b/kernel/freezer.c
> index 66a594e..7b01de9 100644
> --- a/kernel/freezer.c
> +++ b/kernel/freezer.c
> @@ -67,7 +67,7 @@ static void fake_signal_wake_up(struct task_struct *p)
> unsigned long flags;
>
> spin_lock_irqsave(&p->sighand->siglock, flags);
> - signal_wake_up(p, 1);
> + signal_wake_up(p, 0);
> spin_unlock_irqrestore(&p->sighand->siglock, flags);
> }
Thanks,
Rafael
^ permalink raw reply
* Re: git tree URL for IEEE 1394 (FireWire) kernel subsystem
From: Stephen Rothwell @ 2011-10-31 23:19 UTC (permalink / raw)
To: Stefan Richter; +Cc: linux-next, linux1394-devel, linux-kernel
In-Reply-To: <20111031185701.5c8771c6@stein>
[-- Attachment #1: Type: text/plain, Size: 556 bytes --]
Hi Stefan,
On Mon, 31 Oct 2011 18:57:01 +0100 Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:
>
> please switch the ieee1394/for-next URL once more, now to
>
> git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git for-next
>
> which is meant to be permanent. (-2.6 suffix of the former name
> dropped). Current content is identical with my pull request to
> Linus today.
I have switched to that from today.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [RFC/PATCH 4/7] x86, mm: Wrap ZONE_DMA32 with CONFIG_ZONE_DMA32
From: Arun Sharma @ 2011-10-31 23:01 UTC (permalink / raw)
To: David Rientjes
Cc: Pekka Enberg, x86, linux-kernel, Tejun Heo, Yinghai Lu,
H. Peter Anvin
In-Reply-To: <alpine.DEB.2.00.1110311551290.22237@chino.kir.corp.google.com>
On 10/31/11 3:52 PM, David Rientjes wrote:
> On Fri, 28 Oct 2011, Pekka Enberg wrote:
>
>> In preparation for unifying 32-bit and 64-bit zone_sizes_init() make sure
>> ZONE_DMA32 is wrapped in CONFIG_ZONE_DMA32.
>>
>> Cc: Tejun Heo<tj@kernel.org>
>> Cc: Yinghai Lu<yinghai@kernel.org>
>> Cc: H. Peter Anvin<hpa@linux.intel.com>
>> Cc: David Rientjes<rientjes@google.com>
>> Signed-off-by: Pekka Enberg<penberg@kernel.org>
>
> Acked-by: David Rientjes<rientjes@google.com>
>
> Adding Arun Sharma to the cc, he was interested in disabling
> CONFIG_ZONE_DMA32 and I believe carries this patch internally (as we do).
>
Yes we do.
Acked-by: Arun Sharma <asharma@fb.com>
^ permalink raw reply
* Re: [RFC PATCH] freezer: revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too"
From: Tejun Heo @ 2011-10-31 23:17 UTC (permalink / raw)
To: Rafael J. Wysocki, Jeff Layton
Cc: linux-kernel, Oleg Nesterov, linux-pm, linux-cifs, Steve French,
J. Bruce Fields, Neil Brown
In-Reply-To: <20111031221743.GA18855@google.com>
On Mon, Oct 31, 2011 at 03:17:43PM -0700, Tejun Heo wrote:
> Commit 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake
> TASK_KILLABLE tasks too" made freezer wake up tasks in TASK_KILLABLE
> sleep too citing non-interruptible but killable sleeps in cifs and
> nfs.
>
> I don't think we can do this. We should not send spurious unsolicited
> non-interruptible wakeups. Most synchornization constructs are built
> to cope with spurious wakeups and any INTERRUPTIBLE sleep must be able
> to handle spurious wakeups but that's not true for KILLABLE sleeps -
> KILLABLE condition cannot be cancelled.
>
> This is probably okay for most cases but circumventing fundamental
> wakeup condition like this is asking for trouble. Furthermore, I'm
> not sure the behavior change brought on by this change - breaking
> nfs/cifs uninterruptible operation guarantee - is correct. If such
> behavior is desirable, the right thing to do is using intr mount
> option, not circumventing it from PM layer.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Jeff Layton <jlayton@redhat.com>
> ---
> Neil, Steve, do the network filesystems need a way to indicate "I can
> either be killed or enter freezer"?
Hmm... okay, so commit f06ac72e929 "cifs, freezer: add
wait_event_freezekillable and have cifs use it" added freezable &
killable sleep. If this is necessary, the right thing to do is adding
another waking state, not modifying existing one's behavior.
But, before going there, is this *really* necessary? Do we really
have to choose among different combinations of interruptible, killable
and freezable? If something doesn't want to be bothered than being
killed, assuming it doesn't want to go hibernating is kinda natural.
IOW, can we please update cifs, if it wants to allow hibernation, to
use interruptible sleep in wait_for_response() than trying to modify
basic sleep mechanism?
Thank you.
--
tejun
^ permalink raw reply
* Re: [RFC PATCH] freezer: revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too"
From: Tejun Heo @ 2011-10-31 23:17 UTC (permalink / raw)
To: Rafael J. Wysocki, Jeff Layton
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Oleg Nesterov,
linux-pm-u79uwXL29TY76Z2rM5mHXA,
linux-cifs-u79uwXL29TY76Z2rM5mHXA, Steve French, J. Bruce Fields,
Neil Brown
In-Reply-To: <20111031221743.GA18855-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
On Mon, Oct 31, 2011 at 03:17:43PM -0700, Tejun Heo wrote:
> Commit 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake
> TASK_KILLABLE tasks too" made freezer wake up tasks in TASK_KILLABLE
> sleep too citing non-interruptible but killable sleeps in cifs and
> nfs.
>
> I don't think we can do this. We should not send spurious unsolicited
> non-interruptible wakeups. Most synchornization constructs are built
> to cope with spurious wakeups and any INTERRUPTIBLE sleep must be able
> to handle spurious wakeups but that's not true for KILLABLE sleeps -
> KILLABLE condition cannot be cancelled.
>
> This is probably okay for most cases but circumventing fundamental
> wakeup condition like this is asking for trouble. Furthermore, I'm
> not sure the behavior change brought on by this change - breaking
> nfs/cifs uninterruptible operation guarantee - is correct. If such
> behavior is desirable, the right thing to do is using intr mount
> option, not circumventing it from PM layer.
>
> Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> Neil, Steve, do the network filesystems need a way to indicate "I can
> either be killed or enter freezer"?
Hmm... okay, so commit f06ac72e929 "cifs, freezer: add
wait_event_freezekillable and have cifs use it" added freezable &
killable sleep. If this is necessary, the right thing to do is adding
another waking state, not modifying existing one's behavior.
But, before going there, is this *really* necessary? Do we really
have to choose among different combinations of interruptible, killable
and freezable? If something doesn't want to be bothered than being
killed, assuming it doesn't want to go hibernating is kinda natural.
IOW, can we please update cifs, if it wants to allow hibernation, to
use interruptible sleep in wait_for_response() than trying to modify
basic sleep mechanism?
Thank you.
--
tejun
^ permalink raw reply
* [U-Boot] [PATCH 3/4] OneNAND: Add simple OneNAND SPL
From: Scott Wood @ 2011-10-31 23:15 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1320067393-18822-4-git-send-email-marek.vasut@gmail.com>
On 10/31/2011 08:23 AM, Marek Vasut wrote:
> +inline uint16_t onenand_readw(uint32_t addr)
> +{
> + return readw(CONFIG_SYS_ONENAND_BASE + addr);
> +}
> +
> +inline void onenand_writew(uint16_t value, uint32_t addr)
> +{
> + writew(value, CONFIG_SYS_ONENAND_BASE + addr);
> +}
static
> +#define onenand_block_address(block) (block)
> +#define onenand_sector_address(page) (page << 2)
> +#define onenand_buffer_address() ((1 << 3) << 8)
> +#define onenand_bufferram_address(block) (0)
Space rather than tab after #define
> +void spl_onenand_get_geometry(struct spl_onenand_data *data)
> +{
> + uint32_t tmp;
> + uint32_t dev_id, density;
> +
> + /* Default geometry -- 2048b page, 128k erase block. */
> + data->pagesize = 2048;
> + data->erasesize = 0x20000;
> +
> + tmp = onenand_readw(ONENAND_REG_TECHNOLOGY);
> + if (tmp)
> + goto dev_4k;
> +
> + dev_id = onenand_readw(ONENAND_REG_DEVICE_ID);
> + density = dev_id >> ONENAND_DEVICE_DENSITY_SHIFT;
> + density &= ONENAND_DEVICE_DENSITY_MASK;
> +
> + if (density < ONENAND_DEVICE_DENSITY_4Gb)
> + return;
> +
> + if (dev_id & ONENAND_DEVICE_IS_DDP)
> + return;
> +
> + /* 4k device geometry -- 4096b page, 256k erase block. */
> +dev_4k:
> + data->pagesize = 4096;
> + data->erasesize = 0x40000;
> +}
This seems like a gratuitous use of goto...
> +int spl_onenand_read_block(uint32_t block, uint8_t *buf, uint32_t *read)
> +{
> + struct spl_onenand_data data;
> + uint32_t page;
> + int ret;
> +
> + spl_onenand_get_geometry(&data);
> +
> + for (page = 0; page < ONENAND_PAGES_PER_BLOCK; page++) {
> + ret = spl_onenand_read_page(block, page, buf, data.pagesize);
> + if (ret)
> + return ret;
> + buf += data.pagesize;
> + }
Shouldn't this do bad block skipping rather than error on the first bad
block it sees? The current onenand IPL does this.
> + *read = ((block * ONENAND_PAGES_PER_BLOCK) + page) * data.pagesize;
We only read one block here, but we return the byte address of the next
block? A little odd, and if it's really what's intended, needs to be
documented.
> diff --git a/include/onenand_uboot.h b/include/onenand_uboot.h
> index 92279d5..66828ce 100644
> --- a/include/onenand_uboot.h
> +++ b/include/onenand_uboot.h
> @@ -16,6 +16,8 @@
>
> #include <linux/types.h>
>
> +#ifndef CONFIG_SPL_BUILD
> +
> /* Forward declarations */
> struct mtd_info;
> struct mtd_oob_ops;
> @@ -52,4 +54,20 @@ extern int flexonenand_set_boundary(struct mtd_info *mtd, int die,
> extern void s3c64xx_onenand_init(struct mtd_info *);
> extern void s3c64xx_set_width_regs(struct onenand_chip *);
>
> +#else
> +
> +#define ONENAND_PAGES_PER_BLOCK 64
> +
> +struct spl_onenand_data {
> + uint32_t pagesize;
> + uint32_t erasesize;
> +};
> +
> +void spl_onenand_get_geometry(struct spl_onenand_data *data);
> +int spl_onenand_read_page(uint32_t block, uint32_t page,
> + uint8_t *buf, int pagesize);
> +int spl_onenand_read_block(uint32_t block, uint8_t *buf, uint32_t *read);
> +
> +#endif
Do these really need to be #ifdeffed?
-Scott
^ permalink raw reply
* BUG: hid_add_device
From: Alon Bar-Lev @ 2011-10-31 23:15 UTC (permalink / raw)
To: linux-input
Hello,
While experimenting in bluetooth and DualShock3 controller and the
compat of bluez-4, I've found that only:
---
hidd --server --nocheck -n --nosdp
---
Reacts to the device, I don't know why the --nosdp has a difference,
but this is how far could go, in other cases, I get either:
---
Oct 31 23:39:11 localhost hidd[15164]: HID create error 4 (Interrupted
system call)
Oct 31 21:30:46 localhost hidd[26720]: HID create error 115 (Operation
now in progress)
---
However, while hidd tries to setup the device I get the fulling BUG:
(this I guess should not happen)
---
Oct 31 21:39:04 localhost hidd[8955]: Bluetooth HID daemon
Oct 31 21:39:17 localhost kernel: input: Bluetooth HID Boot Protocol
Device as /devices/pci0000:00/0000:00:1a.1/usb4/4-2/4-2:1.0/bluetooth/hci0/hci0:11/input15
Oct 31 21:39:17 localhost hidd[8955]: New HID device 00:26:5C:31:E2:79 ()
Oct 31 21:39:17 localhost kernel: BUG: unable to handle kernel paging
request at 0000000000001b00
Oct 31 21:39:17 localhost kernel: IP: [<ffffffffa03d7039>]
hid_add_device+0x9/0x200 [hid]
Oct 31 21:39:17 localhost kernel: PGD 0
Oct 31 21:39:17 localhost kernel: Oops: 0000 [#1] PREEMPT SMP
Oct 31 21:39:17 localhost kernel: CPU 1
Oct 31 21:39:17 localhost kernel: Modules linked in: uinput hidp hid
autofs4 bridge stp llc tun nf_nat_ftp nf_nat_irc nf_conntrack_ftp
nf_conntrack_irc ipt_MASQUERADE iptable_nat nf_nat ipt_REJECT
xt_tcpudp xt_state ipt_LOG xt_limit nf_conntrack_ipv4 nf_conntrack
nf_defrag_ipv4 iptable_filter ip_tables x_tables bnep ppp_generic slhc
cfq_iosched blk_cgroup ioatdma dca cpufreq_powersave cpufreq_ondemand
cpufreq_conservative acpi_cpufreq freq_table mperf coretemp fan
af_packet nls_cp1255 nls_iso8859_1 nls_utf8 rfcomm aes_x86_64
aes_generic ecb crypto_blkcipher btusb bluetooth uvcvideo videodev
cryptomgr aead arc4 crypto_algapi snd_hda_codec_conexant snd_hda_intel
snd_hda_codec iwlagn joydev thinkpad_acpi mac80211 snd_pcm snd_timer
uhci_hcd ehci_hcd sdhci_pci hwmon cfg80211 snd sdhci sr_mod battery
usbcore snd_page_alloc thermal psmouse pcspkr e1000e mmc_core
soundcore i2c_i801 cdrom processor ac rfkill rtc_cmos power_supply
nvram sg unix evdev ext4 crc16 jbd2 mbcache loop ahci libahci libata
sd_mod scsi_mod
Oct 31 21:39:17 localhost kernel:
Oct 31 21:39:17 localhost kernel: Pid: 8955, comm: hidd Not tainted
3.1.0-gentoo #1 LENOVO 406226U/406226U
Oct 31 21:39:17 localhost kernel: RIP: 0010:[<ffffffffa03d7039>]
[<ffffffffa03d7039>] hid_add_device+0x9/0x200 [hid]
Oct 31 21:39:17 localhost kernel: RSP: 0018:ffff8801358f3c48 EFLAGS: 00010296
Oct 31 21:39:17 localhost kernel: RAX: 0000000000000000 RBX:
0000000000000000 RCX: ffff88011a801368
Oct 31 21:39:17 localhost kernel: RDX: ffff88011a801368 RSI:
0000000000000212 RDI: 0000000000000000
Oct 31 21:39:17 localhost kernel: RBP: ffff88011a801360 R08:
0000000000000000 R09: 0000000000000000
Oct 31 21:39:17 localhost kernel: R10: 0000000000000000 R11:
0000000000000001 R12: ffff8801358f3c88
Oct 31 21:39:17 localhost kernel: R13: ffff880136f98000 R14:
ffff8801358f3ca0 R15: ffff880136f98000
Oct 31 21:39:17 localhost kernel: FS: 00007f18c7345700(0000)
GS:ffff88013bd00000(0000) knlGS:0000000000000000
Oct 31 21:39:17 localhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0:
000000008005003b
Oct 31 21:39:17 localhost kernel: CR2: 0000000000001b00 CR3:
000000011abc1000 CR4: 00000000000006e0
Oct 31 21:39:17 localhost kernel: DR0: 0000000000000000 DR1:
0000000000000000 DR2: 0000000000000000
Oct 31 21:39:17 localhost kernel: DR3: 0000000000000000 DR6:
00000000ffff0ff0 DR7: 0000000000000400
Oct 31 21:39:17 localhost kernel: Process hidd (pid: 8955, threadinfo
ffff8801358f2000, task ffff880136f98000)
Oct 31 21:39:17 localhost kernel: Stack:
Oct 31 21:39:17 localhost kernel: 0000000000000212 ffffffff8105dc5a
ffff88011a801200 ffff88011a801200
Oct 31 21:39:17 localhost kernel: ffff88011a801360 ffffffffa0308bc5
0000000000000000 ffff880127b89800
Oct 31 21:39:17 localhost kernel: 0000000000000000 ffff880136f98000
ffffffff8105db00 ffff8801358f3ca0
Oct 31 21:39:17 localhost kernel: Call Trace:
Oct 31 21:39:17 localhost kernel: [<ffffffff8105dc5a>] ? finish_wait+0x3a/0x90
Oct 31 21:39:17 localhost kernel: [<ffffffffa0308bc5>] ?
hidp_add_connection+0x395/0x8c0 [hidp]
Oct 31 21:39:17 localhost kernel: [<ffffffff8105db00>] ? wake_up_bit+0x40/0x40
Oct 31 21:39:17 localhost kernel: [<ffffffffa03095a1>] ?
hidp_sock_ioctl+0x221/0x2e0 [hidp]
Oct 31 21:39:17 localhost kernel: [<ffffffff8113cae4>] ? fsnotify+0x1c4/0x2e0
Oct 31 21:39:17 localhost kernel: [<ffffffff811b98c0>] ? n_tty_ioctl+0xc0/0xc0
Oct 31 21:39:17 localhost kernel: [<ffffffff812ecc52>] ?
sockfd_lookup_light+0x22/0x90
Oct 31 21:39:17 localhost kernel: [<ffffffff812ee7cc>] ? sys_sendto+0x13c/0x1a0
Oct 31 21:39:17 localhost kernel: [<ffffffff81104254>] ?
do_readv_writev+0x1c4/0x210
Oct 31 21:39:17 localhost kernel: [<ffffffff812ec139>] ? sock_ioctl+0x69/0x2a0
Oct 31 21:39:17 localhost kernel: [<ffffffff811152e6>] ? do_vfs_ioctl+0x96/0x500
Oct 31 21:39:17 localhost kernel: [<ffffffffa02d7931>] ?
l2cap_sock_getsockopt+0xa1/0x340 [bluetooth]
Oct 31 21:39:17 localhost kernel: [<ffffffff811157e8>] ? sys_ioctl+0x98/0xa0
Oct 31 21:39:17 localhost kernel: [<ffffffff8138333b>] ?
system_call_fastpath+0x16/0x1b
Oct 31 21:39:17 localhost kernel: Code: 00 00 48 89 ef 48 c7 c3 f4 ff
ff ff e8 e1 07 ee e0 eb b6 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00
00 55 53 48 89 fb 48 83 ec 18 <f6> 87 00 1b 00 00 01 0f 85 c1 01 00 00
8b af 08 1b 00 00 f7 c5
Oct 31 21:39:17 localhost kernel: RIP [<ffffffffa03d7039>]
hid_add_device+0x9/0x200 [hid]
Oct 31 21:39:17 localhost kernel: RSP <ffff8801358f3c48>
Oct 31 21:39:17 localhost kernel: CR2: 0000000000001b00
Oct 31 21:39:17 localhost kernel: ---[ end trace 326cc646c2b87b83 ]---
---
^ permalink raw reply
* Re: How to test multiusermount?
From: Steve French @ 2011-10-31 23:14 UTC (permalink / raw)
To: Stef Bon; +Cc: linux-cifs
In-Reply-To: <CANXojcwxf0aD=_18_6D6=WkG86F9Qx4PTf7F=2husGbASac6hA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Jeff has a writeup that explains it more nicely but don't have the
link in front of me. Note that it works best with Kerberos (sec=krb5
or sec=krb5i)
On Mon, Oct 31, 2011 at 6:12 PM, Stef Bon <stefbon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
> I would like to test the multiusermounts?
>
> I know to set:
>
> echo 1 > /proc/fs/cifs/MultiuserMount
>
> and add an option to the mount command, but I can remember/read somewhere
> that one have to add some mapping somehwere:
>
> local user : remote user
> ...
>
> Is this correct?
>
> Stef Bon
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Thanks,
Steve
^ permalink raw reply
* Re: Latency writing to an mlocked ext4 mapping
From: Andy Lutomirski @ 2011-10-31 23:14 UTC (permalink / raw)
To: Jan Kara
Cc: Andreas Dilger, linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-ext4@vger.kernel.org
In-Reply-To: <20111031231031.GD10107@quack.suse.cz>
On Mon, Oct 31, 2011 at 4:10 PM, Jan Kara <jack@suse.cz> wrote:
> On Fri 28-10-11 16:37:03, Andy Lutomirski wrote:
>> On Tue, Oct 25, 2011 at 5:26 AM, Jan Kara <jack@suse.cz> wrote:
>> >> - Why are we calling file_update_time at all? Presumably we also
>> >> update the time when the page is written back (if not, that sounds
>> >> like a bug, since the contents may be changed after something saw the
>> >> mtime update), and, if so, why bother updating it on the first write?
>> >> Anything that relies on this behavior is, I think, unreliable, because
>> >> the page could be made writable arbitrarily early by another program
>> >> that changes nothing.
>> > We don't update timestamp when the page is written back. I believe this
>> > is mostly because we don't know whether the data has been changed by a
>> > write syscall, which already updated the timestamp, or by mmap. That is
>> > also the reason why we update the timestamp at page fault time.
>> >
>> > The reason why file_update_time() blocks for you is probably that it
>> > needs to get access to buffer where inode is stored on disk and because a
>> > transaction including this buffer is committing at the moment, your thread
>> > has to wait until the transaction commit finishes. This is mostly a problem
>> > specific to how ext4 works so e.g. xfs shouldn't have it.
>> >
>> > Generally I believe the attempts to achieve any RT-like latencies when
>> > writing to a filesystem are rather hopeless. How much hopeless depends on
>> > the load of the filesystem (e.g., in your case of mostly idle filesystem I
>> > can imagine some tweaks could reduce your latencies to an acceptable level
>> > but once the disk gets loaded you'll be screwed). So I'd suggest that
>> > having RT thread just store log in memory (or write to a pipe) and have
>> > another non-RT thread write the data to disk would be a much more robust
>> > design.
>>
>> Windows seems to do pretty well at this, and I think it should be fixable on
>> Linux too. "All" that needs to be done is to remove the pte_wrprotect from
>> page_mkclean_one. The fallout from that might be unpleasant, though, but
>> it would probably speed up a number of workloads.
> Well, but Linux's mm pretty much depends the pte_wrprotect() so that's
> unlikely to go away in a forseeable future. The reason is that we need to
> reliably account the number of dirty pages so that we can throttle
> processes that dirty too much of memory and also protect agaist system
> going into out-of-memory problems when too many pages would be dirty (and
> thus hard to reclaim). Thus we create clean pages as write-protected, when
> they are first written to, we account them as dirtied and unprotect them.
> When pages are cleaned by writeback, we decrement number of dirty pages
> accordingly and write-protect them again.
What about skipping pte_wrprotect for mlocked pages and continuing to
account them dirty even if they're actually clean? This should be a
straightforward patch except for the effect on stable pages for
writeback. (It would also have unfortunate side effects on
ctime/mtime without my other patch to rearrange that code.)
>
>> Adding a whole separate process just to copy data from memory to disk sounds
>> a bit like a hack -- that's what mmap + mlock would do if it worked better.
> Well, always only guarantees you cannot hit major fault when accessing
> the page. And we keep that promise - we only hit a minor fault. But I agree
> that for your usecase this is impractical.
Not really true. We never fault in the page, but make_write can wait
for I/O (for hundreds of ms) which is just as bad.
>
> I can see as theoretically feasible for writeback to skip mlocked pages
> which would help your case. But practically, I do not see how to implement
> that efficiently (just skipping a dirty page when we find it's mlocked
> seems like a way to waste CPU needlessly).
>
>> Incidentally, pipes are no good. I haven't root-caused it yet, but both
>> reading to and writing from pipes, even if O_NONBLOCK, can block. I
>> haven't root-caused it yet.
> Interesting. I imagine they could block on memory allocation but I guess
> you don't put that much pressure on your system. So it might be interesting
> to know where else they block...
I'll figure it out in a couple of days, I imagine.
--Andy
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.