fs/smbfs/inode.c: fix warning message deprecating smbfs

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ed58f8027945f1cf415bfe3805e1fa3fe8ed9edf
Commit: ed58f8027945f1cf415bfe3805e1fa3fe8ed9edf
Parent: f1a5955d90981c602ab77a8a181a0aa0f4f12cd9
Author: Sergio Luis [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:30 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:19 2008 -0800

fs/smbfs/inode.c: fix warning message deprecating smbfs

Fix the warning message regarding smbfs to

smbfs is deprecated and will be removed from the 2.6.27 kernel. Please 
migrate to cifs

instead of

smbfs is deprecated and will be removedfrom the 2.6.27 kernel.  Please 
migrate to cifs

Signed-off-by: Sergio Luis [EMAIL PROTECTED]
Screwed-up-by: Andrew Morton [EMAIL PROTECTED]
Cc: Steven French [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/smbfs/inode.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c
index 4e5c22c..376ef3e 100644
--- a/fs/smbfs/inode.c
+++ b/fs/smbfs/inode.c
@@ -505,7 +505,7 @@ static int smb_fill_super(struct super_block *sb, void 
*raw_data, int silent)
if (warn_count  5) {
warn_count++;
printk(KERN_EMERG smbfs is deprecated and will be removed
-   from the 2.6.27 kernel.  Please migrate to cifs\n);
+from the 2.6.27 kernel. Please migrate to cifs\n);
}
 
if (!raw_data)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


xfs: convert beX_add to beX_add_cpu (new common API)

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=413d57c9907c72ed608df2be72ef8ed13a3eeb46
Commit: 413d57c9907c72ed608df2be72ef8ed13a3eeb46
Parent: 91d35dd93e14c34539a8005183ea500f25caad02
Author: Marcin Slusarz [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:29 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:19 2008 -0800

xfs: convert beX_add to beX_add_cpu (new common API)

remove beX_add functions and replace all uses with beX_add_cpu

Signed-off-by: Marcin Slusarz [EMAIL PROTECTED]
Cc: Mark Fasheh [EMAIL PROTECTED]
Reviewed-by: Dave Chinner [EMAIL PROTECTED]
Cc: Timothy Shimmin [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/xfs/quota/xfs_qm.c  |6 ++--
 fs/xfs/quota/xfs_trans_dquot.c |6 ++--
 fs/xfs/xfs_alloc.c |   16 +++---
 fs/xfs/xfs_alloc_btree.c   |   16 +++---
 fs/xfs/xfs_arch.h  |   15 -
 fs/xfs/xfs_attr_leaf.c |   46 
 fs/xfs/xfs_bmap_btree.c|   16 +++---
 fs/xfs/xfs_da_btree.c  |   14 ++--
 fs/xfs/xfs_dir2_block.c|8 +++---
 fs/xfs/xfs_dir2_data.c |4 +-
 fs/xfs/xfs_dir2_leaf.c |   16 +++---
 fs/xfs/xfs_dir2_node.c |   18 +++---
 fs/xfs/xfs_fsops.c |4 +-
 fs/xfs/xfs_ialloc.c|   12 +-
 fs/xfs/xfs_ialloc_btree.c  |   16 +++---
 fs/xfs/xfs_log.c   |6 ++--
 fs/xfs/xfs_trans.c |   24 ++--
 17 files changed, 114 insertions(+), 129 deletions(-)

diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 35582fe..1f3da5b 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -1648,14 +1648,14 @@ xfs_qm_quotacheck_dqadjust(
 * Adjust the inode count and the block count to reflect this inode's
 * resource usage.
 */
-   be64_add(dqp-q_core.d_icount, 1);
+   be64_add_cpu(dqp-q_core.d_icount, 1);
dqp-q_res_icount++;
if (nblks) {
-   be64_add(dqp-q_core.d_bcount, nblks);
+   be64_add_cpu(dqp-q_core.d_bcount, nblks);
dqp-q_res_bcount += nblks;
}
if (rtblks) {
-   be64_add(dqp-q_core.d_rtbcount, rtblks);
+   be64_add_cpu(dqp-q_core.d_rtbcount, rtblks);
dqp-q_res_rtbcount += rtblks;
}
 
diff --git a/fs/xfs/quota/xfs_trans_dquot.c b/fs/xfs/quota/xfs_trans_dquot.c
index 7de6874..f441f83 100644
--- a/fs/xfs/quota/xfs_trans_dquot.c
+++ b/fs/xfs/quota/xfs_trans_dquot.c
@@ -421,13 +421,13 @@ xfs_trans_apply_dquot_deltas(
   (xfs_qcnt_t) -qtrx-qt_icount_delta);
 #endif
if (totalbdelta)
-   be64_add(d-d_bcount, (xfs_qcnt_t)totalbdelta);
+   be64_add_cpu(d-d_bcount, 
(xfs_qcnt_t)totalbdelta);
 
if (qtrx-qt_icount_delta)
-   be64_add(d-d_icount, 
(xfs_qcnt_t)qtrx-qt_icount_delta);
+   be64_add_cpu(d-d_icount, 
(xfs_qcnt_t)qtrx-qt_icount_delta);
 
if (totalrtbdelta)
-   be64_add(d-d_rtbcount, 
(xfs_qcnt_t)totalrtbdelta);
+   be64_add_cpu(d-d_rtbcount, 
(xfs_qcnt_t)totalrtbdelta);
 
/*
 * Get any default limits in use.
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c
index ea6aa60..bdbfbbe 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -592,7 +592,7 @@ xfs_alloc_ag_vextent(
if (!(args-wasfromfl)) {
 
agf = XFS_BUF_TO_AGF(args-agbp);
-   be32_add(agf-agf_freeblks, -(args-len));
+   be32_add_cpu(agf-agf_freeblks, -(args-len));
xfs_trans_agblocks_delta(args-tp,
 -((long)(args-len)));
args-pag-pagf_freeblks -= args-len;
@@ -1720,7 +1720,7 @@ xfs_free_ag_extent(
 
agf = XFS_BUF_TO_AGF(agbp);
pag = mp-m_perag[agno];
-   be32_add(agf-agf_freeblks, len);
+   be32_add_cpu(agf-agf_freeblks, len);
xfs_trans_agblocks_delta(tp, len);
pag-pagf_freeblks += len;
XFS_WANT_CORRUPTED_GOTO(
@@ -2008,18 +2008,18 @@ xfs_alloc_get_freelist(
 * Get the block number and update the data structures.
 */
bno = be32_to_cpu(agfl-agfl_bno[be32_to_cpu(agf-agf_flfirst)]);
-   be32_add(agf-agf_flfirst, 1);
+   be32_add_cpu(agf-agf_flfirst, 1);
xfs_trans_brelse(tp, agflbp);
if (be32_to_cpu(agf-agf_flfirst) == 

docbook: sunrpc filenames and notation fixes

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=65b6e42cdc5b6a1ce2ada31cc294d7e60b22bb43
Commit: 65b6e42cdc5b6a1ce2ada31cc294d7e60b22bb43
Parent: 073b86dacc3c0fa79c71f3519169ea18d5521227
Author: Randy Dunlap [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:23 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:19 2008 -0800

docbook: sunrpc filenames and notation fixes

Use updated file list for docbook files and
fix kernel-doc warnings in sunrpc:
Warning(linux-2.6.24-git12//net/sunrpc/rpc_pipe.c:689): No description 
found for parameter 'rpc_client'
Warning(linux-2.6.24-git12//net/sunrpc/rpc_pipe.c:765): No description 
found for parameter 'flags'
Warning(linux-2.6.24-git12//net/sunrpc/clnt.c:584): No description found 
for parameter 'tk_ops'
Warning(linux-2.6.24-git12//net/sunrpc/clnt.c:618): No description found 
for parameter 'bufsize'

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
Cc: Trond Myklebust [EMAIL PROTECTED]
Cc: J. Bruce Fields [EMAIL PROTECTED]
Cc: Neil Brown [EMAIL PROTECTED]
Cc: David S. Miller [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/DocBook/kernel-api.tmpl |8 +++-
 net/sunrpc/clnt.c |   10 +-
 net/sunrpc/rpc_pipe.c |3 ++-
 net/sunrpc/xprt.c |2 +-
 4 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/Documentation/DocBook/kernel-api.tmpl 
b/Documentation/DocBook/kernel-api.tmpl
index 75e4ed1..6c0e5f0 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -231,8 +231,14 @@ X!Ilib/string.c
 !Dnet/sunrpc/sunrpc_syms.c
 --
 !Enet/sunrpc/xdr.c
-!Enet/sunrpc/svcsock.c
+!Enet/sunrpc/svc_xprt.c
+!Enet/sunrpc/xprt.c
 !Enet/sunrpc/sched.c
+!Enet/sunrpc/socklib.c
+!Enet/sunrpc/stats.c
+!Enet/sunrpc/rpc_pipe.c
+!Enet/sunrpc/rpcb_clnt.c
+!Enet/sunrpc/clnt.c
  /sect1
   /chapter
 
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 0998e6d..8c6a7f1 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -464,9 +464,9 @@ rpc_release_client(struct rpc_clnt *clnt)
 
 /**
  * rpc_bind_new_program - bind a new RPC program to an existing client
- * @old - old rpc_client
- * @program - rpc program to set
- * @vers - rpc program version
+ * @old: old rpc_client
+ * @program: rpc program to set
+ * @vers: rpc program version
  *
  * Clones the rpc client and sets up a new RPC program. This is mainly
  * of use for enabling different RPC programs to share the same transport.
@@ -575,7 +575,7 @@ EXPORT_SYMBOL_GPL(rpc_call_sync);
  * @clnt: pointer to RPC client
  * @msg: RPC call parameters
  * @flags: RPC call flags
- * @ops: RPC call ops
+ * @tk_ops: RPC call ops
  * @data: user call data
  */
 int
@@ -610,7 +610,7 @@ EXPORT_SYMBOL_GPL(rpc_call_start);
  * rpc_peeraddr - extract remote peer address from clnt's xprt
  * @clnt: RPC client structure
  * @buf: target buffer
- * @size: length of target buffer
+ * @bufsize: length of target buffer
  *
  * Returns the number of bytes that are actually in the stored address.
  */
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 7e19716..0e3ead7 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -677,7 +677,7 @@ rpc_lookup_negative(char *path, struct nameidata *nd)
 /**
  * rpc_mkdir - Create a new directory in rpc_pipefs
  * @path: path from the rpc_pipefs root to the new directory
- * @rpc_clnt: rpc client to associate with this directory
+ * @rpc_client: rpc client to associate with this directory
  *
  * This creates a directory at the given @path associated with
  * @rpc_clnt, which will contain a file named info with some basic
@@ -748,6 +748,7 @@ rpc_rmdir(struct dentry *dentry)
  * @private: private data to associate with the pipe, for the caller's use
  * @ops: operations defining the behavior of the pipe: upcall, downcall,
  * release_pipe, and destroy_msg.
+ * @flags: rpc_inode flags
  *
  * Data is made available for userspace to read by calls to
  * rpc_queue_upcall().  The actual reads will result in calls to
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index cfcade9..d5553b8 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -124,7 +124,7 @@ EXPORT_SYMBOL_GPL(xprt_register_transport);
 
 /**
  * xprt_unregister_transport - unregister a transport implementation
- * transport: transport to unregister
+ * @transport: transport to unregister
  *
  * Returns:
  * 0:  transport successfully unregistered
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


docbook: move pipe and splice to filesystems docbook

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=073b86dacc3c0fa79c71f3519169ea18d5521227
Commit: 073b86dacc3c0fa79c71f3519169ea18d5521227
Parent: b51d63c6d3078f47c26bcf7584b5c3ebea2defd0
Author: Randy Dunlap [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:23 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:19 2008 -0800

docbook: move pipe and splice to filesystems docbook

Move pipes and splice docbook to filesystems book.
kernel-api book is huge (10x most other books)  slow to process.

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
Cc: Jens Axboe [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/DocBook/filesystems.tmpl |   20 
 Documentation/DocBook/kernel-api.tmpl  |   20 
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/Documentation/DocBook/filesystems.tmpl 
b/Documentation/DocBook/filesystems.tmpl
index 5eaef87..5e87ad5 100644
--- a/Documentation/DocBook/filesystems.tmpl
+++ b/Documentation/DocBook/filesystems.tmpl
@@ -398,4 +398,24 @@ an example.
 
   /chapter
 
+  chapter id=splice
+  titlesplice API/title
+  para
+   splice is a method for moving blocks of data around inside the
+   kernel, without continually transferring them between the kernel
+   and user space.
+  /para
+!Ffs/splice.c
+  /chapter
+
+  chapter id=pipes
+  titlepipes API/title
+  para
+   Pipe interfaces are all for in-kernel (builtin image) use.
+   They are not exported for use by modules.
+  /para
+!Iinclude/linux/pipe_fs_i.h
+!Ffs/pipe.c
+  /chapter
+
 /book
diff --git a/Documentation/DocBook/kernel-api.tmpl 
b/Documentation/DocBook/kernel-api.tmpl
index 059aaf2..75e4ed1 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -712,24 +712,4 @@ X!Idrivers/video/console/fonts.c
 !Edrivers/i2c/i2c-core.c
   /chapter
 
-  chapter id=splice
-  titlesplice API/title
-  para
-   splice is a method for moving blocks of data around inside the
-   kernel, without continually transferring them between the kernel
-   and user space.
-  /para
-!Ffs/splice.c
-  /chapter
-
-  chapter id=pipes
-  titlepipes API/title
-  para
-   Pipe interfaces are all for in-kernel (builtin image) use.
-   They are not exported for use by modules.
-  /para
-!Iinclude/linux/pipe_fs_i.h
-!Ffs/pipe.c
-  /chapter
-
 /book
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


hugetlb: fix overcommit locking

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=064d9efe947542097be669581f82d6b097e81d1a
Commit: 064d9efe947542097be669581f82d6b097e81d1a
Parent: 2695a14d315c014474ccadbaed40b0169b00cb5b
Author: Nishanth Aravamudan [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:19 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:18 2008 -0800

hugetlb: fix overcommit locking

proc_doulongvec_minmax() calls copy_to_user()/copy_from_user(), so we can't
hold hugetlb_lock over the call.  Use a dummy variable to store the sysctl
result, like in hugetlb_sysctl_handler(), then grab the lock to update
nr_overcommit_huge_pages.

Signed-off-by: Nishanth Aravamudan [EMAIL PROTECTED]
Reported-by: Miles Lane [EMAIL PROTECTED]
Cc: Adam Litke [EMAIL PROTECTED]
Cc: David Gibson [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/hugetlb.h |2 +-
 kernel/sysctl.c |4 ++--
 mm/hugetlb.c|6 --
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 7ca198b..addca4c 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -33,8 +33,8 @@ int hugetlb_reserve_pages(struct inode *inode, long from, 
long to);
 void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed);
 
 extern unsigned long max_huge_pages;
+extern unsigned long sysctl_overcommit_huge_pages;
 extern unsigned long hugepages_treat_as_movable;
-extern unsigned long nr_overcommit_huge_pages;
 extern const unsigned long hugetlb_zero, hugetlb_infinity;
 extern int sysctl_hugetlb_shm_group;
 
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 924c674..8b7e954 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -978,8 +978,8 @@ static struct ctl_table vm_table[] = {
{
.ctl_name   = CTL_UNNUMBERED,
.procname   = nr_overcommit_hugepages,
-   .data   = nr_overcommit_huge_pages,
-   .maxlen = sizeof(nr_overcommit_huge_pages),
+   .data   = sysctl_overcommit_huge_pages,
+   .maxlen = sizeof(sysctl_overcommit_huge_pages),
.mode   = 0644,
.proc_handler   = hugetlb_overcommit_handler,
},
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index d9a3803..cb1b3a7 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -24,14 +24,15 @@
 const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL;
 static unsigned long nr_huge_pages, free_huge_pages, resv_huge_pages;
 static unsigned long surplus_huge_pages;
+static unsigned long nr_overcommit_huge_pages;
 unsigned long max_huge_pages;
+unsigned long sysctl_overcommit_huge_pages;
 static struct list_head hugepage_freelists[MAX_NUMNODES];
 static unsigned int nr_huge_pages_node[MAX_NUMNODES];
 static unsigned int free_huge_pages_node[MAX_NUMNODES];
 static unsigned int surplus_huge_pages_node[MAX_NUMNODES];
 static gfp_t htlb_alloc_mask = GFP_HIGHUSER;
 unsigned long hugepages_treat_as_movable;
-unsigned long nr_overcommit_huge_pages;
 static int hugetlb_next_nid;
 
 /*
@@ -609,8 +610,9 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int 
write,
struct file *file, void __user *buffer,
size_t *length, loff_t *ppos)
 {
-   spin_lock(hugetlb_lock);
proc_doulongvec_minmax(table, write, file, buffer, length, ppos);
+   spin_lock(hugetlb_lock);
+   nr_overcommit_huge_pages = sysctl_overcommit_huge_pages;
spin_unlock(hugetlb_lock);
return 0;
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


xtime_lock vs update_process_times

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aa02cd2d9bd1e24a230bd66a0a741b984d03915a
Commit: aa02cd2d9bd1e24a230bd66a0a741b984d03915a
Parent: 10270d4838bdc493781f5a1cf2e90e9c34c9142f
Author: Peter Zijlstra [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 21:33:16 2008 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 13:29:25 2008 -0800

xtime_lock vs update_process_times

Commit d3d74453c34f8fd87674a8cf5b8a327c68f22e99 (hrtimer: fixup the
HRTIMER_CB_IRQSAFE_NO_SOFTIRQ fallback) broke several archs, and since
only Russell bothered to merge the fix, and Greg to ACK his arch, I'm
sending this for merger.

I have confirmation that the Alpha bit results in a booting kernel.
That leaves: blackfin, frv, sh and sparc untested.

The deadlock in question was found by Russell:

  IRQ handle
- timer_tick() - xtime seqlock held for write
  - update_process_times()
- run_local_timers()
  - hrtimer_run_queues()
- hrtimer_get_softirq_time() - tries to get a read lock

Now, Thomas assures me the fix is trivial, only do_timer() needs to be
done under the xtime_lock, and update_process_times() can savely be
removed from under it.

Signed-off-by: Peter Zijlstra [EMAIL PROTECTED]
Acked-by: Greg Ungerer [EMAIL PROTECTED]
CC: Richard Henderson [EMAIL PROTECTED]
CC: Bryan Wu [EMAIL PROTECTED]
CC: David Howells [EMAIL PROTECTED]
CC: Paul Mundt [EMAIL PROTECTED]
CC: William Irwin [EMAIL PROTECTED]
Acked-by: Ingo Molnar [EMAIL PROTECTED]
Acked-by: Ivan Kokshaysky [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/alpha/kernel/time.c   |   15 ---
 arch/blackfin/kernel/time.c|8 +---
 arch/frv/kernel/time.c |6 --
 arch/m68knommu/kernel/time.c   |   12 +++-
 arch/sh/kernel/timers/timer-cmt.c  |9 -
 arch/sh/kernel/timers/timer-mtu2.c |2 --
 arch/sparc/kernel/pcic.c   |2 +-
 arch/sparc/kernel/time.c   |7 +++
 8 files changed, 28 insertions(+), 33 deletions(-)

diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index 1dd50d0..75480ca 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -119,13 +119,8 @@ irqreturn_t timer_interrupt(int irq, void *dev)
state.partial_tick = delta  ((1UL  FIX_SHIFT) - 1); 
nticks = delta  FIX_SHIFT;
 
-   while (nticks  0) {
-   do_timer(1);
-#ifndef CONFIG_SMP
-   update_process_times(user_mode(get_irq_regs()));
-#endif
-   nticks--;
-   }
+   if (nticks)
+   do_timer(nticks);
 
/*
 * If we have an externally synchronized Linux clock, then update
@@ -141,6 +136,12 @@ irqreturn_t timer_interrupt(int irq, void *dev)
}
 
write_sequnlock(xtime_lock);
+
+#ifndef CONFIG_SMP
+   while (nticks--)
+   update_process_times(user_mode(get_irq_regs()));
+#endif
+
return IRQ_HANDLED;
 }
 
diff --git a/arch/blackfin/kernel/time.c b/arch/blackfin/kernel/time.c
index 5bd64e3..9bdc8f9 100644
--- a/arch/blackfin/kernel/time.c
+++ b/arch/blackfin/kernel/time.c
@@ -137,9 +137,6 @@ irqreturn_t timer_interrupt(int irq, void *dummy)
 
do_timer(1);
 
-#ifndef CONFIG_SMP
-   update_process_times(user_mode(get_irq_regs()));
-#endif
profile_tick(CPU_PROFILING);
 
/*
@@ -161,6 +158,11 @@ irqreturn_t timer_interrupt(int irq, void *dummy)
last_rtc_update = xtime.tv_sec - 600;
}
write_sequnlock(xtime_lock);
+
+#ifndef CONFIG_SMP
+   update_process_times(user_mode(get_irq_regs()));
+#endif
+
return IRQ_HANDLED;
 }
 
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c
index 925fb01..69f6a4e 100644
--- a/arch/frv/kernel/time.c
+++ b/arch/frv/kernel/time.c
@@ -63,6 +63,7 @@ static irqreturn_t timer_interrupt(int irq, void *dummy)
/* last time the cmos clock got updated */
static long last_rtc_update = 0;
 
+   profile_tick(CPU_PROFILING);
/*
 * Here we are in the timer irq handler. We just have irqs locally
 * disabled but we don't know if the timer_bh is running on the other
@@ -73,8 +74,6 @@ static irqreturn_t timer_interrupt(int irq, void *dummy)
write_seqlock(xtime_lock);
 
do_timer(1);
-   update_process_times(user_mode(get_irq_regs()));
-   profile_tick(CPU_PROFILING);
 
/*
 * If we have an externally synchronized Linux clock, then update
@@ -99,6 +98,9 @@ static irqreturn_t timer_interrupt(int irq, void *dummy)
 #endif /* CONFIG_HEARTBEAT */
 
write_sequnlock(xtime_lock);
+
+   update_process_times(user_mode(get_irq_regs()));
+
return IRQ_HANDLED;
 }
 
diff --git a/arch/m68knommu/kernel/time.c 

include/linux: Remove all users of FASTCALL() macro

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b3c97528689619fc66569b30bf83d09d9929521a
Commit: b3c97528689619fc66569b30bf83d09d9929521a
Parent: aa02cd2d9bd1e24a230bd66a0a741b984d03915a
Author: Harvey Harrison [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:15 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:18 2008 -0800

include/linux: Remove all users of FASTCALL() macro

FASTCALL() is always expanded to empty, remove it.

[EMAIL PROTECTED]: coding-style fixes]
Signed-off-by: Harvey Harrison [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/aio.h|   20 ++--
 include/linux/buffer_head.h|6 +++---
 include/linux/file.h   |   16 
 include/linux/gfp.h|   15 +++
 include/linux/interrupt.h  |8 
 include/linux/mm.h |4 ++--
 include/linux/mutex-debug.h|2 +-
 include/linux/namei.h  |6 +++---
 include/linux/netdevice.h  |2 +-
 include/linux/pagemap.h|   10 +-
 include/linux/pid.h|   21 ++---
 include/linux/rwsem-spinlock.h |   16 
 include/linux/sched.h  |   14 +++---
 include/linux/swap.h   |8 
 include/linux/wait.h   |   34 --
 include/linux/workqueue.h  |   13 ++---
 16 files changed, 95 insertions(+), 100 deletions(-)

diff --git a/include/linux/aio.h b/include/linux/aio.h
index 7ef8de6..a9931e2 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -206,21 +206,21 @@ struct kioctx {
 /* prototypes */
 extern unsigned aio_max_size;
 
-extern ssize_t FASTCALL(wait_on_sync_kiocb(struct kiocb *iocb));
-extern int FASTCALL(aio_put_req(struct kiocb *iocb));
-extern void FASTCALL(kick_iocb(struct kiocb *iocb));
-extern int FASTCALL(aio_complete(struct kiocb *iocb, long res, long res2));
-extern void FASTCALL(__put_ioctx(struct kioctx *ctx));
+extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
+extern int aio_put_req(struct kiocb *iocb);
+extern void kick_iocb(struct kiocb *iocb);
+extern int aio_complete(struct kiocb *iocb, long res, long res2);
+extern void __put_ioctx(struct kioctx *ctx);
 struct mm_struct;
-extern void FASTCALL(exit_aio(struct mm_struct *mm));
+extern void exit_aio(struct mm_struct *mm);
 extern struct kioctx *lookup_ioctx(unsigned long ctx_id);
-extern int FASTCALL(io_submit_one(struct kioctx *ctx,
-   struct iocb __user *user_iocb, struct iocb *iocb));
+extern int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
+struct iocb *iocb);
 
 /* semi private, but used by the 32bit emulations: */
 struct kioctx *lookup_ioctx(unsigned long ctx_id);
-int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
- struct iocb *iocb));
+int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
+ struct iocb *iocb);
 
 #define get_ioctx(kioctx) do { \
BUG_ON(atomic_read((kioctx)-users) = 0); \
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index e98801f..932eb02 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -144,7 +144,7 @@ BUFFER_FNS(Unwritten, unwritten)
  * Declarations
  */
 
-void FASTCALL(mark_buffer_dirty(struct buffer_head *bh));
+void mark_buffer_dirty(struct buffer_head *bh);
 void init_buffer(struct buffer_head *, bh_end_io_t *, void *);
 void set_bh_page(struct buffer_head *bh,
struct page *page, unsigned long offset);
@@ -185,8 +185,8 @@ struct buffer_head *__bread(struct block_device *, sector_t 
block, unsigned size
 void invalidate_bh_lrus(void);
 struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
 void free_buffer_head(struct buffer_head * bh);
-void FASTCALL(unlock_buffer(struct buffer_head *bh));
-void FASTCALL(__lock_buffer(struct buffer_head *bh));
+void unlock_buffer(struct buffer_head *bh);
+void __lock_buffer(struct buffer_head *bh);
 void ll_rw_block(int, int, struct buffer_head * bh[]);
 int sync_dirty_buffer(struct buffer_head *bh);
 int submit_bh(int, struct buffer_head *);
diff --git a/include/linux/file.h b/include/linux/file.h
index 56023c7..7239baa 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -59,8 +59,8 @@ struct files_struct {
 
 extern struct kmem_cache *filp_cachep;
 
-extern void FASTCALL(__fput(struct file *));
-extern void FASTCALL(fput(struct file *));
+extern void __fput(struct file *);
+extern void fput(struct file *);
 
 struct file_operations;
 struct vfsmount;
@@ -77,13 +77,13 @@ static inline void fput_light(struct file *file, int 
fput_needed)

remove final fastcall users

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b5606c2d4447e80b1d72406af4e78af1eda611d4
Commit: b5606c2d4447e80b1d72406af4e78af1eda611d4
Parent: fbf6bfca76d50abef478ba902b8597ecbadfd390
Author: Harvey Harrison [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:16 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:18 2008 -0800

remove final fastcall users

fastcall always expands to empty, remove it.

Signed-off-by: Harvey Harrison [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/RCU/NMI-RCU.txt |2 +-
 Documentation/kprobes.txt |   11 +--
 kernel/signal.c   |2 +-
 mm/filemap.c  |2 +-
 net/bluetooth/rfcomm/core.c   |4 ++--
 net/core/dev.c|2 +-
 net/core/sock.c   |4 ++--
 7 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/Documentation/RCU/NMI-RCU.txt b/Documentation/RCU/NMI-RCU.txt
index d0634a5..c64158e 100644
--- a/Documentation/RCU/NMI-RCU.txt
+++ b/Documentation/RCU/NMI-RCU.txt
@@ -25,7 +25,7 @@ the NMI handler to take the default machine-specific action.
 This nmi_callback variable is a global function pointer to the current
 NMI handler.
 
-   fastcall void do_nmi(struct pt_regs * regs, long error_code)
+   void do_nmi(struct pt_regs * regs, long error_code)
{
int cpu;
 
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index 30c1017..83f515c 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -92,9 +92,8 @@ handler has run.  Up to MAX_STACK_SIZE bytes are copied -- 
e.g.,
 64 bytes on i386.
 
 Note that the probed function's args may be passed on the stack
-or in registers (e.g., for x86_64 or for an i386 fastcall function).
-The jprobe will work in either case, so long as the handler's
-prototype matches that of the probed function.
+or in registers.  The jprobe will work in either case, so long as the
+handler's prototype matches that of the probed function.
 
 1.3 Return Probes
 
@@ -270,9 +269,9 @@ Kprobes runs the handler whose address is jp-entry.
 The handler should have the same arg list and return type as the probed
 function; and just before it returns, it must call jprobe_return().
 (The handler never actually returns, since jprobe_return() returns
-control to Kprobes.)  If the probed function is declared asmlinkage,
-fastcall, or anything else that affects how args are passed, the
-handler's declaration must match.
+control to Kprobes.)  If the probed function is declared asmlinkage
+or anything else that affects how args are passed, the handler's
+declaration must match.
 
 register_jprobe() returns 0 on success, or a negative errno otherwise.
 
diff --git a/kernel/signal.c b/kernel/signal.c
index 2c1f08d..84917fe 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -972,7 +972,7 @@ void zap_other_threads(struct task_struct *p)
}
 }
 
-int fastcall __fatal_signal_pending(struct task_struct *tsk)
+int __fatal_signal_pending(struct task_struct *tsk)
 {
return sigismember(tsk-pending.signal, SIGKILL);
 }
diff --git a/mm/filemap.c b/mm/filemap.c
index b7b1be6..5c74b68 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -604,7 +604,7 @@ void __lock_page(struct page *page)
 }
 EXPORT_SYMBOL(__lock_page);
 
-int fastcall __lock_page_killable(struct page *page)
+int __lock_page_killable(struct page *page)
 {
DEFINE_WAIT_BIT(wait, page-flags, PG_locked);
 
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index d3e4e18..0c2c937 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -465,7 +465,7 @@ int rfcomm_dlc_send(struct rfcomm_dlc *d, struct sk_buff 
*skb)
return len;
 }
 
-void fastcall __rfcomm_dlc_throttle(struct rfcomm_dlc *d)
+void __rfcomm_dlc_throttle(struct rfcomm_dlc *d)
 {
BT_DBG(dlc %p state %ld, d, d-state);
 
@@ -476,7 +476,7 @@ void fastcall __rfcomm_dlc_throttle(struct rfcomm_dlc *d)
rfcomm_schedule(RFCOMM_SCHED_TX);
 }
 
-void fastcall __rfcomm_dlc_unthrottle(struct rfcomm_dlc *d)
+void __rfcomm_dlc_unthrottle(struct rfcomm_dlc *d)
 {
BT_DBG(dlc %p state %ld, d, d-state);
 
diff --git a/net/core/dev.c b/net/core/dev.c
index 9549417..b2f6cb5 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2143,7 +2143,7 @@ static int process_backlog(struct napi_struct *napi, int 
quota)
  *
  * The entry's receive function will be scheduled to run
  */
-void fastcall __napi_schedule(struct napi_struct *n)
+void __napi_schedule(struct napi_struct *n)
 {
unsigned long flags;
 
diff --git a/net/core/sock.c b/net/core/sock.c
index 433715f..09cb3a7 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1731,7 +1731,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
atomic_set(sk-sk_drops, 0);
 }
 

Final removal of FASTCALL()/fastcall

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21534301ea1801783bd88fba2a2e617ee4d2bd28
Commit: 21534301ea1801783bd88fba2a2e617ee4d2bd28
Parent: b5606c2d4447e80b1d72406af4e78af1eda611d4
Author: Harvey Harrison [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:17 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:18 2008 -0800

Final removal of FASTCALL()/fastcall

All users are gone, remove definitions and comments referring
to them.

Signed-off-by: Harvey Harrison [EMAIL PROTECTED]
Acked-by: David Howells [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/drm/i830_dma.c   |2 +-
 include/asm-mn10300/highmem.h |4 ++--
 include/asm-mn10300/linkage.h |2 --
 include/linux/irq.h   |1 -
 include/linux/linkage.h   |5 -
 5 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c
index 379cbda..9df0810 100644
--- a/drivers/char/drm/i830_dma.c
+++ b/drivers/char/drm/i830_dma.c
@@ -36,7 +36,7 @@
 #include i830_drm.h
 #include i830_drv.h
 #include linux/interrupt.h   /* For task queue support */
-#include linux/pagemap.h /* For FASTCALL on unlock_page() */
+#include linux/pagemap.h
 #include linux/delay.h
 #include asm/uaccess.h
 
diff --git a/include/asm-mn10300/highmem.h b/include/asm-mn10300/highmem.h
index 383c0c4..5256854 100644
--- a/include/asm-mn10300/highmem.h
+++ b/include/asm-mn10300/highmem.h
@@ -42,8 +42,8 @@ extern void __init kmap_init(void);
 #define PKMAP_NR(virt)  ((virt - PKMAP_BASE)  PAGE_SHIFT)
 #define PKMAP_ADDR(nr)  (PKMAP_BASE + ((nr)  PAGE_SHIFT))
 
-extern unsigned long __fastcall kmap_high(struct page *page);
-extern void __fastcall kunmap_high(struct page *page);
+extern unsigned long kmap_high(struct page *page);
+extern void kunmap_high(struct page *page);
 
 static inline unsigned long kmap(struct page *page)
 {
diff --git a/include/asm-mn10300/linkage.h b/include/asm-mn10300/linkage.h
index 29a32e4..dda3002 100644
--- a/include/asm-mn10300/linkage.h
+++ b/include/asm-mn10300/linkage.h
@@ -13,8 +13,6 @@
 
 /* don't override anything */
 #define asmlinkage
-#define FASTCALL(x) x
-#define fastcall
 
 #define __ALIGN.align 4,0xcb
 #define __ALIGN_STR.align 4,0xcb
diff --git a/include/linux/irq.h b/include/linux/irq.h
index bfd9efb..176e5e7 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -285,7 +285,6 @@ extern void handle_bad_irq(unsigned int irq, struct 
irq_desc *desc);
 
 /*
  * Monolithic do_IRQ implementation.
- * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly)
  */
 #ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
 extern unsigned int __do_IRQ(unsigned int irq);
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 3faf599..0592936 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -73,9 +73,4 @@
 #define ATTRIB_NORET  __attribute__((noreturn))
 #define NORET_AND noreturn,
 
-#ifndef FASTCALL
-#define FASTCALL(x)x
-#define fastcall
-#endif
-
 #endif
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SC26XX: missing PORT define in serial_core.h

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2695a14d315c014474ccadbaed40b0169b00cb5b
Commit: 2695a14d315c014474ccadbaed40b0169b00cb5b
Parent: 21534301ea1801783bd88fba2a2e617ee4d2bd28
Author: Thomas Bogendoerfer [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:17 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:18 2008 -0800

SC26XX: missing PORT define in serial_core.h

When submitting the driver for inclusion to 2.6.25 I've missed the change to
serial_core.h. This patch fixes this.

Signed-off-by: Thomas Bogendoerfer [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/serial_core.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 1a0b6cf..289942f 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -149,6 +149,8 @@
 /* Freescale ColdFire */
 #define PORT_MCF   78
 
+#define PORT_SC26XX79
+
 
 /* MN10300 on-chip UART numbers */
 #define PORT_MN10300   80
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Documentation: prune redundant SubmitChecklist items

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df24d9a6a9014010513d6af1105f4de05c504a4b
Commit: df24d9a6a9014010513d6af1105f4de05c504a4b
Parent: 064d9efe947542097be669581f82d6b097e81d1a
Author: J. Bruce Fields [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:20 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:18 2008 -0800

Documentation: prune redundant SubmitChecklist items

Kernel style is mentioned twice, and the git apply trick is a bit redundant
given the checkpatch.pl recommendation (which also checks for bad
whitespace).

Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
Cc: Randy.Dunlap [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/SubmitChecklist |   16 +---
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist
index 34e06d2..da10e07 100644
--- a/Documentation/SubmitChecklist
+++ b/Documentation/SubmitChecklist
@@ -20,7 +20,11 @@ kernel patches.
 4: ppc64 is a good architecture for cross-compilation checking because it
tends to use `unsigned long' for 64-bit quantities.
 
-5: Matches kernel coding style(!)
+5: Check your patch for general style as detailed in
+   Documentation/CodingStyle.  Check for trivial violations with the
+   patch style checker prior to submission (scripts/checkpatch.pl).
+   You should be able to justify all violations that remain in
+   your patch.
 
 6: Any new or modified CONFIG options don't muck up the config menu.
 
@@ -79,13 +83,3 @@ kernel patches.
 23: Tested after it has been merged into the -mm patchset to make sure
 that it still works with all of the other queued patches and various
 changes in the VM, VFS, and other subsystems.
-
-24: Avoid whitespace damage such as indenting with spaces or whitespace
-at the end of lines.  You can test this by feeding the patch to
-git apply --check --whitespace=error-all
-
-25: Check your patch for general style as detailed in
-Documentation/CodingStyle.  Check for trivial violations with the
-patch style checker prior to submission (scripts/checkpatch.pl).
-You should be able to justify all violations that remain in
-your patch.
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


parport: section fixup

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=55265b00ad423898bb743bce515f073c3f290bdb
Commit: 55265b00ad423898bb743bce515f073c3f290bdb
Parent: df24d9a6a9014010513d6af1105f4de05c504a4b
Author: David Brownell [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:21 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:19 2008 -0800

parport: section fixup

Fix section warning for parport_ECP_supported(); it's called from a routine
exported to modules, so it can't be removed with __devinit section pruning.

Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/parport/parport_pc.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 238628d..d76d37b 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -1768,7 +1768,7 @@ static int parport_PS2_supported(struct parport *pb)
 }
 
 #ifdef CONFIG_PARPORT_PC_FIFO
-static int __devinit parport_ECP_supported(struct parport *pb)
+static int parport_ECP_supported(struct parport *pb)
 {
int i;
int config, configb;
@@ -1992,7 +1992,7 @@ static int parport_ECPEPP_supported(struct parport *pb)
 /* Don't bother probing for modes we know we won't use. */
 static int __devinit parport_PS2_supported(struct parport *pb) { return 0; }
 #ifdef CONFIG_PARPORT_PC_FIFO
-static int __devinit parport_ECP_supported(struct parport *pb) { return 0; }
+static int parport_ECP_supported(struct parport *pb) { return 0; }
 #endif
 static int __devinit parport_EPP_supported(struct parport *pb) { return 0; }
 static int __devinit parport_ECPEPP_supported(struct parport *pb){return 0;}
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kernel-doc: fix fs/pipe.c notation

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b51d63c6d3078f47c26bcf7584b5c3ebea2defd0
Commit: b51d63c6d3078f47c26bcf7584b5c3ebea2defd0
Parent: 55265b00ad423898bb743bce515f073c3f290bdb
Author: Randy Dunlap [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:22 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:19 2008 -0800

kernel-doc: fix fs/pipe.c notation

Fix several kernel-doc notation errors in fs/pipe.c.

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
Cc: Jens Axboe [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/pipe.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/pipe.c b/fs/pipe.c
index a07e9a5..3c185b6 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -171,7 +171,7 @@ static void anon_pipe_buf_release(struct pipe_inode_info 
*pipe,
  *
  * Description:
  * This function returns a kernel virtual address mapping for the
- * passed in @pipe_buffer. If @atomic is set, an atomic map is provided
+ * pipe_buffer passed in @buf. If @atomic is set, an atomic map is provided
  * and the caller has to be careful not to fault before calling
  * the unmap function.
  *
@@ -208,15 +208,15 @@ void generic_pipe_buf_unmap(struct pipe_inode_info *pipe,
 }
 
 /**
- * generic_pipe_buf_steal - attempt to take ownership of a @pipe_buffer
+ * generic_pipe_buf_steal - attempt to take ownership of a pipe_buffer
  * @pipe:  the pipe that the buffer belongs to
  * @buf:   the buffer to attempt to steal
  *
  * Description:
- * This function attempts to steal the @struct page attached to
+ * This function attempts to steal the struct page attached to
  * @buf. If successful, this function returns 0 and returns with
  * the page locked. The caller may then reuse the page for whatever
- * he wishes, the typical use is insertion into a different file
+ * he wishes; the typical use is insertion into a different file
  * page cache.
  */
 int generic_pipe_buf_steal(struct pipe_inode_info *pipe,
@@ -238,7 +238,7 @@ int generic_pipe_buf_steal(struct pipe_inode_info *pipe,
 }
 
 /**
- * generic_pipe_buf_get - get a reference to a @struct pipe_buffer
+ * generic_pipe_buf_get - get a reference to a struct pipe_buffer
  * @pipe:  the pipe that the buffer belongs to
  * @buf:   the buffer to get a reference to
  *
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


docbook: make a networking book and fix a few errors

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bc2cda1ebd4430f55deb60f0193a3e3b835499a2
Commit: bc2cda1ebd4430f55deb60f0193a3e3b835499a2
Parent: 65b6e42cdc5b6a1ce2ada31cc294d7e60b22bb43
Author: Randy Dunlap [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:25 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:19 2008 -0800

docbook: make a networking book and fix a few errors

Move networking (core and drivers) docbook to its own networking book.
Fix a few kernel-doc errors in header and source files.

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
Cc: Trond Myklebust [EMAIL PROTECTED]
Cc: J. Bruce Fields [EMAIL PROTECTED]
Cc: Neil Brown [EMAIL PROTECTED]
Cc: David S. Miller [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/DocBook/Makefile|2 +-
 Documentation/DocBook/kernel-api.tmpl |   65 
 Documentation/DocBook/networking.tmpl |  106 +
 include/linux/etherdevice.h   |3 +-
 net/core/dev.c|3 +-
 net/core/skbuff.c |4 +-
 6 files changed, 111 insertions(+), 72 deletions(-)

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 6a0ad47..300e170 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -8,7 +8,7 @@
 
 DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
-   procfs-guide.xml writing_usb_driver.xml \
+   procfs-guide.xml writing_usb_driver.xml networking.xml \
kernel-api.xml filesystems.xml lsm.xml usb.xml \
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml
diff --git a/Documentation/DocBook/kernel-api.tmpl 
b/Documentation/DocBook/kernel-api.tmpl
index 6c0e5f0..7e054c9 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -204,71 +204,6 @@ X!Ilib/string.c
  /sect1
   /chapter
 
-  chapter id=netcore
- titleLinux Networking/title
- sect1titleNetworking Base Types/title
-!Iinclude/linux/net.h
- /sect1
- sect1titleSocket Buffer Functions/title
-!Iinclude/linux/skbuff.h
-!Iinclude/net/sock.h
-!Enet/socket.c
-!Enet/core/skbuff.c
-!Enet/core/sock.c
-!Enet/core/datagram.c
-!Enet/core/stream.c
- /sect1
- sect1titleSocket Filter/title
-!Enet/core/filter.c
- /sect1
- sect1titleGeneric Network Statistics/title
-!Iinclude/linux/gen_stats.h
-!Enet/core/gen_stats.c
-!Enet/core/gen_estimator.c
- /sect1
- sect1titleSUN RPC subsystem/title
-!-- The !D functionality is not perfect, garbage has to be protected by 
comments
-!Dnet/sunrpc/sunrpc_syms.c
---
-!Enet/sunrpc/xdr.c
-!Enet/sunrpc/svc_xprt.c
-!Enet/sunrpc/xprt.c
-!Enet/sunrpc/sched.c
-!Enet/sunrpc/socklib.c
-!Enet/sunrpc/stats.c
-!Enet/sunrpc/rpc_pipe.c
-!Enet/sunrpc/rpcb_clnt.c
-!Enet/sunrpc/clnt.c
- /sect1
-  /chapter
-
-  chapter id=netdev
- titleNetwork device support/title
- sect1titleDriver Support/title
-!Enet/core/dev.c
-!Enet/ethernet/eth.c
-!Enet/sched/sch_generic.c
-!Iinclude/linux/etherdevice.h
-!Iinclude/linux/netdevice.h
- /sect1
- sect1titlePHY Support/title
-!Edrivers/net/phy/phy.c
-!Idrivers/net/phy/phy.c
-!Edrivers/net/phy/phy_device.c
-!Idrivers/net/phy/phy_device.c
-!Edrivers/net/phy/mdio_bus.c
-!Idrivers/net/phy/mdio_bus.c
- /sect1
-!-- FIXME: Removed for now since no structured comments in source
- sect1titleWireless/title
-X!Enet/core/wireless.c
- /sect1
---
- sect1titleSynchronous PPP/title
-!Edrivers/net/wan/syncppp.c
- /sect1
-  /chapter
-
   chapter id=modload
  titleModule Support/title
  sect1titleModule Loading/title
diff --git a/Documentation/DocBook/networking.tmpl 
b/Documentation/DocBook/networking.tmpl
new file mode 100644
index 000..f24f9e8
--- /dev/null
+++ b/Documentation/DocBook/networking.tmpl
@@ -0,0 +1,106 @@
+?xml version=1.0 encoding=UTF-8?
+!DOCTYPE book PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN
+   http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd; []
+
+book id=LinuxNetworking
+ bookinfo
+  titleLinux Networking and Network Devices APIs/title
+
+  legalnotice
+   para
+ This documentation 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.
+   /para
+
+   para
+ 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 

moduleparam: fix alpha, ia64 and ppc64 compile failures

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=91d35dd93e14c34539a8005183ea500f25caad02
Commit: 91d35dd93e14c34539a8005183ea500f25caad02
Parent: bc2cda1ebd4430f55deb60f0193a3e3b835499a2
Author: Ivan Kokshaysky [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:26 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:19 2008 -0800

moduleparam: fix alpha, ia64 and ppc64 compile failures

On alpha, ia64 and ppc64 only relocations to local data can go into
read-only sections. The vast majority of module parameters use the global
generic param_set_*/param_get_* functions, so the 'const' attribute for
struct kernel_param is not only useless, but it also causes compile
failures due to 'section type conflict' in those rare cases where
param_set/get are local functions.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=8964

Signed-off-by: Ivan Kokshaysky [EMAIL PROTECTED]
Cc: Richard Henderson [EMAIL PROTECTED]
Cc: Luck, Tony [EMAIL PROTECTED]
Cc: Anton Blanchard [EMAIL PROTECTED]
Cc: Paul Mackerras [EMAIL PROTECTED]
Cc: Adrian Bunk [EMAIL PROTECTED]
Cc: Kamalesh Babulal [EMAIL PROTECTED]
Cc: Rusty Russell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/moduleparam.h |   12 +++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index 8126e55..ec62438 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -62,6 +62,16 @@ struct kparam_array
void *elem;
 };
 
+/* On alpha, ia64 and ppc64 relocations to global data cannot go into
+   read-only sections (which is part of respective UNIX ABI on these
+   platforms). So 'const' makes no sense and even causes compile failures
+   with some compilers. */
+#if defined(CONFIG_ALPHA) || defined(CONFIG_IA64) || defined(CONFIG_PPC64)
+#define __moduleparam_const
+#else
+#define __moduleparam_const const
+#endif
+
 /* This is the fundamental function for registering boot/module
parameters.  perm sets the visibility in sysfs: 000 means it's
not there, read bits mean it's readable, write bits mean it's
@@ -71,7 +81,7 @@ struct kparam_array
static int __param_perm_check_##name __attribute__((unused)) =  \
BUILD_BUG_ON_ZERO((perm)  0 || (perm)  0777 || ((perm)  2)); \
static const char __param_str_##name[] = prefix #name;  \
-   static struct kernel_param const __param_##name \
+   static struct kernel_param __moduleparam_const __param_##name   \
__used  \
 __attribute__ ((unused,__section__ (__param),aligned(sizeof(void * \
= { __param_str_##name, perm, set, get, { arg } }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


docbook: drop z85230 library from kernel-api

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f1a5955d90981c602ab77a8a181a0aa0f4f12cd9
Commit: f1a5955d90981c602ab77a8a181a0aa0f4f12cd9
Parent: 413d57c9907c72ed608df2be72ef8ed13a3eeb46
Author: Randy Dunlap [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:29 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:19 2008 -0800

docbook: drop z85230 library from kernel-api

Drop z85230 support library info from kernel-api since it's duplicated in
the Z85230 book.

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
Acked-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/DocBook/kernel-api.tmpl |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/Documentation/DocBook/kernel-api.tmpl 
b/Documentation/DocBook/kernel-api.tmpl
index 7e054c9..f31601e 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -449,11 +449,6 @@ X!Isound/sound_firmware.c
 !Edrivers/serial/8250.c
   /chapter
 
-  chapter id=z85230
- titleZ85230 Support Library/title
-!Edrivers/net/wan/z85230.c
-  /chapter
-
   chapter id=fbdev
  titleFrame Buffer Library/title
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Documentation: sysctl/kernel.txt: fix documentation reference

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ac76cff2ecd73944473a437cd87770f812635025
Commit: ac76cff2ecd73944473a437cd87770f812635025
Parent: ed58f8027945f1cf415bfe3805e1fa3fe8ed9edf
Author: Michael Opdenacker [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:32 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:20 2008 -0800

Documentation: sysctl/kernel.txt: fix documentation reference

This patch fixes a reference to Documentation/kmod.txt
which was apparently renamed to Documentation/debugging-modules.txt

Signed-off-by: Michael Opdenacker [EMAIL PROTECTED]
Cc: Randy.Dunlap [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/sysctl/kernel.txt |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index dc8801d..276a7e6 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -29,7 +29,7 @@ show up in /proc/sys/kernel:
 - java-interpreter[ binfmt_java, obsolete ]
 - kstack_depth_to_print   [ X86 only ]
 - l2cr[ PPC only ]
-- modprobe== Documentation/kmod.txt
+- modprobe== Documentation/debugging-modules.txt
 - msgmax
 - msgmnb
 - msgmni
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


udf: fix directory offset handling

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e28d80f18211e5d49e450ba0f07b8fdca6dfb83b
Commit: e28d80f18211e5d49e450ba0f07b8fdca6dfb83b
Parent: ac76cff2ecd73944473a437cd87770f812635025
Author: Jan Kara [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:33 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:20 2008 -0800

udf: fix directory offset handling

Patch cleaning up UDF directory offset handling missed modifications in 
dir.c
(because I've submitted an old version :(). Fix it.

Signed-off-by: Jan Kara [EMAIL PROTECTED]
Reported-by: Marcin Slusarz [EMAIL PROTECTED]
Tested-by: Marcin Slusarz [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/udf/dir.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/udf/dir.c b/fs/udf/dir.c
index 4b44e23..8d8643a 100644
--- a/fs/udf/dir.c
+++ b/fs/udf/dir.c
@@ -43,13 +43,13 @@ static int do_udf_readdir(struct inode *dir, struct file 
*filp,
struct fileIdentDesc *fi = NULL;
struct fileIdentDesc cfi;
int block, iblock;
-   loff_t nf_pos = filp-f_pos - 1;
+   loff_t nf_pos = (filp-f_pos - 1)  2;
int flen;
char fname[UDF_NAME_LEN];
char *nameptr;
uint16_t liu;
uint8_t lfi;
-   loff_t size = (udf_ext0_offset(dir) + dir-i_size)  2;
+   loff_t size = udf_ext0_offset(dir) + dir-i_size;
struct buffer_head *tmp, *bha[16];
kernel_lb_addr eloc;
uint32_t elen;
@@ -63,13 +63,13 @@ static int do_udf_readdir(struct inode *dir, struct file 
*filp,
return 0;
 
if (nf_pos == 0)
-   nf_pos = (udf_ext0_offset(dir)  2);
+   nf_pos = udf_ext0_offset(dir);
 
-   fibh.soffset = fibh.eoffset = (nf_pos  ((dir-i_sb-s_blocksize - 1) 
 2))  2;
+   fibh.soffset = fibh.eoffset = nf_pos  (dir-i_sb-s_blocksize - 1);
iinfo = UDF_I(dir);
if (iinfo-i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) {
fibh.sbh = fibh.ebh = NULL;
-   } else if (inode_bmap(dir, nf_pos  (dir-i_sb-s_blocksize_bits - 2),
+   } else if (inode_bmap(dir, nf_pos  dir-i_sb-s_blocksize_bits,
  epos, eloc, elen, offset) == 
(EXT_RECORDED_ALLOCATED  30)) {
block = udf_get_lb_pblock(dir-i_sb, eloc, offset);
if ((++offset  dir-i_sb-s_blocksize_bits)  elen) {
@@ -111,7 +111,7 @@ static int do_udf_readdir(struct inode *dir, struct file 
*filp,
}
 
while (nf_pos  size) {
-   filp-f_pos = nf_pos + 1;
+   filp-f_pos = (nf_pos  2) + 1;
 
fi = udf_fileident_read(dir, nf_pos, fibh, cfi, epos, eloc,
elen, offset);
@@ -178,7 +178,7 @@ static int do_udf_readdir(struct inode *dir, struct file 
*filp,
}
} /* end while */
 
-   filp-f_pos = nf_pos + 1;
+   filp-f_pos = (nf_pos  2) + 1;
 
if (fibh.sbh != fibh.ebh)
brelse(fibh.ebh);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pcmcia: ipwireless depends on NETDEVICES

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9170d2f6e1dc4d79650fbf492d1cd45291c66504
Commit: 9170d2f6e1dc4d79650fbf492d1cd45291c66504
Parent: 2e1d146a19f2941aec08f60ca67fb2763baad595
Author: Paul Mundt [EMAIL PROTECTED]
AuthorDate: Wed Feb 13 15:03:36 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Wed Feb 13 16:21:20 2008 -0800

pcmcia: ipwireless depends on NETDEVICES

ipwireless (added by 099dc4fb62653f6019d78db55fba7a18ef02d65b) is clearly
a net device:

drivers/built-in.o: In function `ipwireless_ppp_start_xmit':

/home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:165: 
undefined reference to `skb_under_panic'

/home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:165: 
undefined reference to `kfree_skb'
drivers/built-in.o: In function `ipwireless_network_packet_received':

/home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:377: 
undefined reference to `__alloc_skb'

/home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:377: 
undefined reference to `skb_over_panic'
drivers/built-in.o: In function `ppp_shutdown_interface':
/home/pmundt/devel/git/sh-2.6.25/drivers/net/ppp_generic.c:2517: undefined 
reference to `unregister_netdev'
/home/pmundt/devel/git/sh-2.6.25/drivers/net/ppp_generic.c:2517: undefined 
reference to `free_netdev'
[ ... and many more ... ]

select strikes again. ipwireless selects PPP which in turn tries to select
SLHC, both of which are technically protected by an if NETDEVICES
in drivers/net/Kconfig. This leads to .config hilarity, with net suddenly
ending up in the SCSI menu:

#
# SCSI device support
#
# CONFIG_SCSI_DMA is not set
# CONFIG_SCSI_NETLINK is not set
CONFIG_PPP=y
# CONFIG_PHONE is not set

Curiously the SLHC select from PPP doesn't seem to happen, as there's no
CONFIG_SLHC=y (only CONFIG_PPP=y gets set) -- Kconfig bug? Caught with a
randconfig.

Signed-off-by: Paul Mundt [EMAIL PROTECTED]
Acked-by: Jiri Kosina [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/pcmcia/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/pcmcia/Kconfig b/drivers/char/pcmcia/Kconfig
index 00b8a84..ffa0efc 100644
--- a/drivers/char/pcmcia/Kconfig
+++ b/drivers/char/pcmcia/Kconfig
@@ -45,7 +45,7 @@ config CARDMAN_4040
 
 config IPWIRELESS
tristate IPWireless 3G UMTS PCMCIA card support
-   depends on PCMCIA
+   depends on PCMCIA  NETDEVICES
select PPP
help
  This is a driver for 3G UMTS PCMCIA card from IPWireless company. In
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SCSI] ses: fix memory leaks

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7c46c20aef185c3782d28c5111dcf1df88bbab32
Commit: 7c46c20aef185c3782d28c5111dcf1df88bbab32
Parent: 95f6fb578970c9dbfcaa436ff98d2f3c6bdea953
Author: Yinghai Lu [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 23:25:25 2008 -0800
Committer:  James Bottomley [EMAIL PROTECTED]
CommitDate: Mon Feb 11 11:00:48 2008 -0600

[SCSI] ses: fix memory leaks

fix leaking with scomp leaking when failing. Also free page10 on
driver removal and remove one extra space.

Signed-off-by: Yinghai Lu [EMAIL PROTECTED]
Signed-off-by: James Bottomley [EMAIL PROTECTED]
---
 drivers/scsi/ses.c |   23 ++-
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 2a6e4f4..a57fed4 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -416,11 +416,11 @@ static int ses_intf_add(struct class_device *cdev,
int i, j, types, len, components = 0;
int err = -ENOMEM;
struct enclosure_device *edev;
-   struct ses_component *scomp;
+   struct ses_component *scomp = NULL;
 
if (!scsi_device_enclosure(sdev)) {
/* not an enclosure, but might be in one */
-   edev =  enclosure_find(sdev-host-shost_gendev);
+   edev = enclosure_find(sdev-host-shost_gendev);
if (edev) {
ses_match_to_enclosure(edev, sdev);
class_device_put(edev-cdev);
@@ -456,9 +456,6 @@ static int ses_intf_add(struct class_device *cdev,
if (!buf)
goto err_free;
 
-   ses_dev-page1 = buf;
-   ses_dev-page1_len = len;
-
result = ses_recv_diag(sdev, 1, buf, len);
if (result)
goto recv_failed;
@@ -473,6 +470,9 @@ static int ses_intf_add(struct class_device *cdev,
type_ptr[0] == ENCLOSURE_COMPONENT_ARRAY_DEVICE)
components += type_ptr[1];
}
+   ses_dev-page1 = buf;
+   ses_dev-page1_len = len;
+   buf = NULL;
 
result = ses_recv_diag(sdev, 2, hdr_buf, INIT_ALLOC_SIZE);
if (result)
@@ -489,6 +489,7 @@ static int ses_intf_add(struct class_device *cdev,
goto recv_failed;
ses_dev-page2 = buf;
ses_dev-page2_len = len;
+   buf = NULL;
 
/* The additional information page --- allows us
 * to match up the devices */
@@ -506,11 +507,12 @@ static int ses_intf_add(struct class_device *cdev,
goto recv_failed;
ses_dev-page10 = buf;
ses_dev-page10_len = len;
+   buf = NULL;
 
  no_page10:
-   scomp = kmalloc(sizeof(struct ses_component) * components, GFP_KERNEL);
+   scomp = kzalloc(sizeof(struct ses_component) * components, GFP_KERNEL);
if (!scomp)
-   goto  err_free;
+   goto err_free;
 
edev = enclosure_register(cdev-dev, sdev-sdev_gendev.bus_id,
  components, ses_enclosure_callbacks);
@@ -521,10 +523,9 @@ static int ses_intf_add(struct class_device *cdev,
 
edev-scratch = ses_dev;
for (i = 0; i  components; i++)
-   edev-component[i].scratch = scomp++;
+   edev-component[i].scratch = scomp + i;
 
/* Page 7 for the descriptors is optional */
-   buf = NULL;
result = ses_recv_diag(sdev, 7, hdr_buf, INIT_ALLOC_SIZE);
if (result)
goto simple_populate;
@@ -532,6 +533,8 @@ static int ses_intf_add(struct class_device *cdev,
len = (hdr_buf[2]  8) + hdr_buf[3] + 4;
/* add 1 for trailing '\0' we'll use */
buf = kzalloc(len + 1, GFP_KERNEL);
+   if (!buf)
+   goto simple_populate;
result = ses_recv_diag(sdev, 7, buf, len);
if (result) {
  simple_populate:
@@ -598,6 +601,7 @@ static int ses_intf_add(struct class_device *cdev,
err = -ENODEV;
  err_free:
kfree(buf);
+   kfree(scomp);
kfree(ses_dev-page10);
kfree(ses_dev-page2);
kfree(ses_dev-page1);
@@ -630,6 +634,7 @@ static void ses_intf_remove(struct class_device *cdev,
ses_dev = edev-scratch;
edev-scratch = NULL;
 
+   kfree(ses_dev-page10);
kfree(ses_dev-page1);
kfree(ses_dev-page2);
kfree(ses_dev);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SCSI] fas216: Use scsi_eh API for REQUEST_SENSE invocation

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ccf9ea91aba0d3b8145900ec02f6edf03dda708c
Commit: ccf9ea91aba0d3b8145900ec02f6edf03dda708c
Parent: 7c46c20aef185c3782d28c5111dcf1df88bbab32
Author: Boaz Harrosh [EMAIL PROTECTED]
AuthorDate: Mon Sep 10 22:39:11 2007 +0300
Committer:  James Bottomley [EMAIL PROTECTED]
CommitDate: Mon Feb 11 12:43:12 2008 -0600

[SCSI] fas216: Use scsi_eh API for REQUEST_SENSE invocation

Use new scsi_eh_prep/restor_cmnd() for synchronous REQUEST_SENSE
invocation.  This also converts the driver to the new accessor based
scatterlist implementation.

Signed-off-by: Boaz Harrosh [EMAIL PROTECTED]
Tested-by: Russell King [EMAIL PROTECTED]
Signed-off-by: James Bottomley [EMAIL PROTECTED]
---
 drivers/scsi/arm/fas216.c |   16 +++-
 drivers/scsi/arm/fas216.h |3 +++
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c
index fb5f202..a715632 100644
--- a/drivers/scsi/arm/fas216.c
+++ b/drivers/scsi/arm/fas216.c
@@ -2018,6 +2018,7 @@ static void fas216_rq_sns_done(FAS216_Info *info, struct 
scsi_cmnd *SCpnt,
 * the upper layers to process.  This would have been set
 * correctly by fas216_std_done.
 */
+   scsi_eh_restore_cmnd(SCpnt, info-ses);
SCpnt-scsi_done(SCpnt);
 }
 
@@ -2103,23 +2104,12 @@ request_sense:
if (SCpnt-cmnd[0] == REQUEST_SENSE)
goto done;
 
+   scsi_eh_prep_cmnd(SCpnt, info-ses, NULL, 0, ~0);
fas216_log_target(info, LOG_CONNECT, SCpnt-device-id,
  requesting sense);
-   memset(SCpnt-cmnd, 0, sizeof (SCpnt-cmnd));
-   SCpnt-cmnd[0] = REQUEST_SENSE;
-   SCpnt-cmnd[1] = SCpnt-device-lun  5;
-   SCpnt-cmnd[4] = sizeof(SCpnt-sense_buffer);
-   SCpnt-cmd_len = COMMAND_SIZE(SCpnt-cmnd[0]);
-   SCpnt-SCp.buffer = NULL;
-   SCpnt-SCp.buffers_residual = 0;
-   SCpnt-SCp.ptr = (char *)SCpnt-sense_buffer;
-   SCpnt-SCp.this_residual = sizeof(SCpnt-sense_buffer);
-   SCpnt-SCp.phase = sizeof(SCpnt-sense_buffer);
+   init_SCp(SCpnt);
SCpnt-SCp.Message = 0;
SCpnt-SCp.Status = 0;
-   SCpnt-request_bufflen = sizeof(SCpnt-sense_buffer);
-   SCpnt-sc_data_direction = DMA_FROM_DEVICE;
-   SCpnt-use_sg = 0;
SCpnt-tag = 0;
SCpnt-host_scribble = (void *)fas216_rq_sns_done;
 
diff --git a/drivers/scsi/arm/fas216.h b/drivers/scsi/arm/fas216.h
index 00e5f05..3e73e26 100644
--- a/drivers/scsi/arm/fas216.h
+++ b/drivers/scsi/arm/fas216.h
@@ -16,6 +16,8 @@
 #define NO_IRQ 255
 #endif
 
+#include scsi/scsi_eh.h
+
 #include queue.h
 #include msgqueue.h
 
@@ -311,6 +313,7 @@ typedef struct {
 
/* miscellaneous */
int internal_done;  /* flag to indicate 
request done */
+   struct scsi_eh_save *ses;   /* holds request sense restore 
info */
unsigned long   magic_end;
 } FAS216_Info;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SCSI] aic94xx: fix ABORT_TASK define conflict

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90b0c41829450d60da388edcd346c5b31371e7be
Commit: 90b0c41829450d60da388edcd346c5b31371e7be
Parent: ccf9ea91aba0d3b8145900ec02f6edf03dda708c
Author: Boaz Harrosh [EMAIL PROTECTED]
AuthorDate: Wed Feb 6 15:38:33 2008 +0200
Committer:  James Bottomley [EMAIL PROTECTED]
CommitDate: Mon Feb 11 13:36:31 2008 -0600

[SCSI] aic94xx: fix ABORT_TASK define conflict

include/scsi/scsi.h as a definition:
#define ABORT_TASK  0x0d

on the other hand drivers/scsi/aic94xx/aic94xx_sas.h has:
#define ABORT_TASK  0x03

rename the latter to SCB_ABORT_TASK

Signed-off-by: Boaz Harrosh [EMAIL PROTECTED]
Signed-off-by: James Bottomley [EMAIL PROTECTED]
---
 drivers/scsi/aic94xx/aic94xx_sas.h |2 +-
 drivers/scsi/aic94xx/aic94xx_tmf.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/aic94xx/aic94xx_sas.h 
b/drivers/scsi/aic94xx/aic94xx_sas.h
index fa7c529..912e6b7 100644
--- a/drivers/scsi/aic94xx/aic94xx_sas.h
+++ b/drivers/scsi/aic94xx/aic94xx_sas.h
@@ -292,7 +292,7 @@ struct scb_header {
 #define INITIATE_SSP_TASK   0x00
 #define INITIATE_LONG_SSP_TASK  0x01
 #define INITIATE_BIDIR_SSP_TASK 0x02
-#define ABORT_TASK  0x03
+#define SCB_ABORT_TASK  0x03
 #define INITIATE_SSP_TMF0x04
 #define SSP_TARG_GET_DATA   0x05
 #define SSP_TARG_GET_DATA_GOOD  0x06
diff --git a/drivers/scsi/aic94xx/aic94xx_tmf.c 
b/drivers/scsi/aic94xx/aic94xx_tmf.c
index 87b2f6e..b52124f 100644
--- a/drivers/scsi/aic94xx/aic94xx_tmf.c
+++ b/drivers/scsi/aic94xx/aic94xx_tmf.c
@@ -369,7 +369,7 @@ int asd_abort_task(struct sas_task *task)
return -ENOMEM;
scb = ascb-scb;
 
-   scb-header.opcode = ABORT_TASK;
+   scb-header.opcode = SCB_ABORT_TASK;
 
switch (task-task_proto) {
case SAS_PROTOCOL_SATA:
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SCSI] update SG_ALL to avoid causing chaining

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4660c8ed5aaed99d82785499f034a8cc9199866d
Commit: 4660c8ed5aaed99d82785499f034a8cc9199866d
Parent: 90b0c41829450d60da388edcd346c5b31371e7be
Author: James Bottomley [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 09:42:46 2008 -0600
Committer:  James Bottomley [EMAIL PROTECTED]
CommitDate: Mon Feb 11 13:40:13 2008 -0600

[SCSI] update SG_ALL to avoid causing chaining

Since the sg chaining patches went in, our current value of 255 for
SG_ALL excites chaining on some drivers which cannot support it (and
would thus oops).  Redefine SG_ALL to mean no sg table size
preference, but use the single allocation (non chained) limit.  This
also helps for drivers that use it to size an internal table.

We'll do an opt in system later where truly chaining supporting
drivers can define their sg_tablesize to be anything up to
SCSI_MAX_SG_CHAIN_ELEMENTS.

Signed-off-by: James Bottomley [EMAIL PROTECTED]
---
 include/scsi/scsi_host.h |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index d1299e9..530ff4c 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -6,6 +6,7 @@
 #include linux/types.h
 #include linux/workqueue.h
 #include linux/mutex.h
+#include scsi/scsi.h
 
 struct request_queue;
 struct block_device;
@@ -25,12 +26,15 @@ struct blk_queue_tags;
  * NONE: Self evident. Host adapter is not capable of scatter-gather.
  * ALL: Means that the host adapter module can do scatter-gather,
  *  and that there is no limit to the size of the table to which
- *  we scatter/gather data.
+ *  we scatter/gather data.  The value we set here is the maximum
+ *  single element sglist.  To use chained sglists, the adapter
+ *  has to set a value beyond ALL (and correctly use the chain
+ *  handling API.
  * Anything else:  Indicates the maximum number of chains that can be
  *  used in one scatter-gather request.
  */
 #define SG_NONE 0
-#define SG_ALL 0xff
+#define SG_ALL SCSI_MAX_SG_SEGMENTS
 
 #define MODE_UNKNOWN 0x00
 #define MODE_INITIATOR 0x01
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SCSI] lpfc 8.2.5 : Miscellaneous Fixes

2008-02-13 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1b32f6aa9935ab88eac0d608a4b06369f5d9064a
Commit: 1b32f6aa9935ab88eac0d608a4b06369f5d9064a
Parent: e47c9093531d3406a8ae38acca4ce207ef70cc0e
Author: James Smart [EMAIL PROTECTED]
AuthorDate: Fri Feb 8 18:49:39 2008 -0500
Committer:  James Bottomley [EMAIL PROTECTED]
CommitDate: Mon Feb 11 17:52:57 2008 -0600

[SCSI] lpfc 8.2.5 : Miscellaneous Fixes

Miscellaneous fixes:
- Fix ERRATT flag which was overlapping
- Allow RESTART mbx commands through when stopped.
- Accept incoming PLOGI when connected to an N_Port.
- Fix NPort to NPort pt2pt problems: ADISC and reg_vpi issues
- Fix vport unloading error that erroneously cleaned up RSCN buffers
- Fix memory leak during repeated unloads - in mbox handling
- Fix link bounce vs FLOGI race conditions

Signed-off-by: James Smart [EMAIL PROTECTED]
Signed-off-by: James Bottomley [EMAIL PROTECTED]
---
 drivers/scsi/lpfc/lpfc.h   |4 ++--
 drivers/scsi/lpfc/lpfc_attr.c  |8 +---
 drivers/scsi/lpfc/lpfc_els.c   |   14 +++---
 drivers/scsi/lpfc/lpfc_hbadisc.c   |   15 ++-
 drivers/scsi/lpfc/lpfc_init.c  |   13 +++--
 drivers/scsi/lpfc/lpfc_nportdisc.c |   16 +---
 drivers/scsi/lpfc/lpfc_sli.c   |4 +---
 7 files changed, 41 insertions(+), 33 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 572c525..cbe07d7 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -1,7 +1,7 @@
 /***
  * This file is part of the Emulex Linux Device Driver for *
  * Fibre Channel Host Bus Adapters.*
- * Copyright (C) 2004-2007 Emulex.  All rights reserved.   *
+ * Copyright (C) 2004-2008 Emulex.  All rights reserved.   *
  * EMULEX and SLI are trademarks of Emulex.*
  * www.emulex.com  *
  * Portions Copyright (C) 2004-2005 Christoph Hellwig  *
@@ -409,7 +409,7 @@ struct lpfc_hba {
/* This flag is set while issuing */
/* INIT_LINK mailbox command */
 #define LS_NPIV_FAB_SUPPORTED 0x2  /* Fabric supports NPIV */
-#define LS_IGNORE_ERATT   0x3  /* intr handler should ignore ERATT */
+#define LS_IGNORE_ERATT   0x4  /* intr handler should ignore ERATT */
 
struct lpfc_sli2_slim *slim2p;
struct lpfc_dmabuf hbqslimp;
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index ef061d9..fc48e40 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -1946,11 +1946,13 @@ sysfs_mbox_read(struct kobject *kobj, struct 
bin_attribute *bin_attr,
}
 
/* If HBA encountered an error attention, allow only DUMP
-* mailbox command until the HBA is restarted.
+* or RESTART mailbox commands until the HBA is restarted.
 */
if ((phba-pport-stopped) 
-   (phba-sysfs_mbox.mbox-mb.mbxCommand
-   != MBX_DUMP_MEMORY)) {
+   (phba-sysfs_mbox.mbox-mb.mbxCommand !=
+   MBX_DUMP_MEMORY 
+phba-sysfs_mbox.mbox-mb.mbxCommand !=
+   MBX_RESTART)) {
sysfs_mbox_idle(phba);
spin_unlock_irq(phba-hbalock);
return -EPERM;
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 39268e6..60afc80 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -2046,7 +2046,8 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq 
*cmdiocb,
retry = 1;
 
if ((cmd == ELS_CMD_FLOGI) 
-   (phba-fc_topology != TOPOLOGY_LOOP)) {
+   (phba-fc_topology != TOPOLOGY_LOOP) 
+   !lpfc_error_lost_link(irsp)) {
/* FLOGI retry policy */
retry = 1;
maxretry = 48;
@@ -4091,8 +4092,15 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct 
lpfc_sli_ring *pring,
ndlp = lpfc_plogi_confirm_nport(phba, payload, ndlp);
 
if (vport-port_state  LPFC_DISC_AUTH) {
-   rjt_err = LSRJT_UNABLE_TPC;
-   break;
+   if (!(phba-pport-fc_flag  FC_PT2PT) ||
+   (phba-pport-fc_flag  FC_PT2PT_PLOGI)) {
+   rjt_err = LSRJT_UNABLE_TPC;
+   break;
+   }
+   /* We get here, and drop thru, if we are PT2PT with
+* another NPort and the other side has initiated
+ 

Prevent IDE boot ops on NUMA system

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1f07e988290fc45932f5028c9e2a862c37a57336
Commit: 1f07e988290fc45932f5028c9e2a862c37a57336
Parent: 0c0d61ca93d111c521182c0909e478fa709e05c6
Author: Andi Kleen [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 01:35:20 2008 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Feb 11 09:20:50 2008 -0800

Prevent IDE boot ops on NUMA system

Without this patch a Opteron test system here oopses at boot with
current git.

Calling to_pci_dev() on a NULL pointer gives a negative value so the
following NULL pointer check never triggers and then an illegal address
is referenced.  Check the unadjusted original device pointer for NULL
instead.

Signed-off-by: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/ide.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/ide.h b/include/linux/ide.h
index 23fad89..a3b69c1 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1295,7 +1295,7 @@ static inline void ide_dump_identify(u8 *id)
 static inline int hwif_to_node(ide_hwif_t *hwif)
 {
struct pci_dev *dev = to_pci_dev(hwif-dev);
-   return dev ? pcibus_to_node(dev-bus) : -1;
+   return hwif-dev ? pcibus_to_node(dev-bus) : -1;
 }
 
 static inline ide_drive_t *ide_get_paired_drive(ide_drive_t *drive)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


nfsd: clean up svc_reserve_auth()

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fbb7878c1a2ee40a1e983bf20f3dd3a80255dcf2
Commit: fbb7878c1a2ee40a1e983bf20f3dd3a80255dcf2
Parent: c64e80d55db81df22a7f25b75ab4ba4c55db4749
Author: J. Bruce Fields [EMAIL PROTECTED]
AuthorDate: Thu Feb 7 23:10:21 2008 -0500
Committer:  J. Bruce Fields [EMAIL PROTECTED]
CommitDate: Sun Feb 10 18:11:16 2008 -0500

nfsd: clean up svc_reserve_auth()

This is a void function attempting to return the return value from
another void function, which seems harmless but extremely weird, and
apparently makes some compilers complain.

While we're there, clean up a little (e.g. the switch statement had a
minor style problem and seemed overkill as long as there's only one
case).

Thanks to Trond for noticing this.

Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
Cc: Trond Myklebust [EMAIL PROTECTED]
---
 include/linux/sunrpc/svc.h |   13 +
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 64c7710..64c9755 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -409,16 +409,13 @@ char *   svc_print_addr(struct svc_rqst *, 
char *, size_t);
  * for all cases without actually generating the checksum, so we just use a
  * static value.
  */
-static inline void
-svc_reserve_auth(struct svc_rqst *rqstp, int space)
+static inline void svc_reserve_auth(struct svc_rqst *rqstp, int space)
 {
-   int added_space = 0;
+   int added_space = 0;
 
-   switch(rqstp-rq_authop-flavour) {
-   case RPC_AUTH_GSS:
-   added_space = RPC_MAX_AUTH_SIZE;
-   }
-   return svc_reserve(rqstp, space + added_space);
+   if (rqstp-rq_authop-flavour)
+   added_space = RPC_MAX_AUTH_SIZE;
+   svc_reserve(rqstp, space + added_space);
 }
 
 #endif /* SUNRPC_SVC_H */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


NLM: don't reattempt GRANT_MSG when there is already an RPC in flight

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9706501e43a80ce48b319214a0a9e562deded35b
Commit: 9706501e43a80ce48b319214a0a9e562deded35b
Parent: 90bd17c87821fe0e055e0f9a7446c2875f31eb4c
Author: Jeff Layton [EMAIL PROTECTED]
AuthorDate: Wed Feb 6 11:34:12 2008 -0500
Committer:  J. Bruce Fields [EMAIL PROTECTED]
CommitDate: Sun Feb 10 18:09:36 2008 -0500

NLM: don't reattempt GRANT_MSG when there is already an RPC in flight

With the current scheme in nlmsvc_grant_blocked, we can end up with more
than one GRANT_MSG callback for a block in flight. Right now, we requeue
the block unconditionally so that a GRANT_MSG callback is done again in
30s. If the client is unresponsive, it can take more than 30s for the
call already in flight to time out.

There's no benefit to having more than one GRANT_MSG RPC queued up at a
time, so put it on the list with a timeout of NLM_NEVER before doing the
RPC call. If the RPC call submission fails, we requeue it with a short
timeout. If it works, then nlmsvc_grant_callback will end up requeueing
it with a shorter timeout after it completes.

Signed-off-by: Jeff Layton [EMAIL PROTECTED]
Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
---
 fs/lockd/svclock.c |   17 +
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 2f4d8fa..82db7b3 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -763,11 +763,20 @@ callback:
dprintk(lockd: GRANTing blocked lock.\n);
block-b_granted = 1;
 
-   /* Schedule next grant callback in 30 seconds */
-   nlmsvc_insert_block(block, 30 * HZ);
+   /* keep block on the list, but don't reattempt until the RPC
+* completes or the submission fails
+*/
+   nlmsvc_insert_block(block, NLM_NEVER);
 
-   /* Call the client */
-   nlm_async_call(block-b_call, NLMPROC_GRANTED_MSG, nlmsvc_grant_ops);
+   /* Call the client -- use a soft RPC task since nlmsvc_retry_blocked
+* will queue up a new one if this one times out
+*/
+   error = nlm_async_call(block-b_call, NLMPROC_GRANTED_MSG,
+   nlmsvc_grant_ops);
+
+   /* RPC submission failed, wait a bit and retry */
+   if (error  0)
+   nlmsvc_insert_block(block, 10 * HZ);
 }
 
 /*
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


NLM: set RPC_CLNT_CREATE_NOPING for NLM RPC clients

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=031fd3aa20fcf6d1862ea7814ee8b2caf36c0d78
Commit: 031fd3aa20fcf6d1862ea7814ee8b2caf36c0d78
Parent: 551e4fb2465b87de9d4aa1669b27d624435443bb
Author: Jeff Layton [EMAIL PROTECTED]
AuthorDate: Wed Feb 6 11:34:10 2008 -0500
Committer:  J. Bruce Fields [EMAIL PROTECTED]
CommitDate: Sun Feb 10 18:09:36 2008 -0500

NLM: set RPC_CLNT_CREATE_NOPING for NLM RPC clients

It's currently possible for an unresponsive NLM client to completely
lock up a server's lockd. The scenario is something like this:

1) client1 (or a process on the server) takes a lock on a file
2) client2 tries to take a blocking lock on the same file and
   awaits the callback
3) client2 goes unresponsive (plug pulled, network partition, etc)
4) client1 releases the lock

...at that point the server's lockd will try to queue up a GRANT_MSG
callback for client2, but first it requeues the block with a timeout of
30s. nlm_async_call will attempt to bind the RPC client to client2 and
will call rpc_ping. rpc_ping entails a sync RPC call and if client2 is
unresponsive it will take around 60s for that to time out. Once it times
out, it's already time to retry the block and the whole process repeats.

Once in this situation, nlmsvc_retry_blocked will never return until
the host starts responding again. lockd won't service new calls.

Fix this by skipping the RPC ping on NLM RPC clients. This makes
nlm_async_call return quickly when called.

Signed-off-by: Jeff Layton [EMAIL PROTECTED]
Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
---
 fs/lockd/host.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index ca6b16f..00063ee 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -244,6 +244,7 @@ nlm_bind_host(struct nlm_host *host)
.version= host-h_version,
.authflavor = RPC_AUTH_UNIX,
.flags  = (RPC_CLNT_CREATE_HARDRTRY |
+  RPC_CLNT_CREATE_NOPING |
   RPC_CLNT_CREATE_AUTOBIND),
};
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ide: remove stale comment from ide-lib.c

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=467390a2a50493332ddc21eb806094b1829c1161
Commit: 467390a2a50493332ddc21eb806094b1829c1161
Parent: e1771e20c8be601d1cc9364d45f907a0433dbbd5
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:15 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:15 2008 +0100

ide: remove stale comment from ide-lib.c

Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/ide-lib.c |9 -
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index 1ff676c..29e2c97 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -21,15 +21,6 @@
 #include asm/uaccess.h
 #include asm/io.h
 
-/*
- * IDE library routines. These are plug in code that most 
- * drivers can use but occasionally may be weird enough
- * to want to do their own thing with
- *
- * Add common non I/O op stuff here. Make sure it has proper
- * kernel-doc function headers or your patch will be rejected
- */
-
 static const char *udma_str[] =
 { UDMA/16, UDMA/25,  UDMA/33,  UDMA/44,
   UDMA/66, UDMA/100, UDMA/133, UDMA7 };
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ide: fix comment in init_irq()

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e1771e20c8be601d1cc9364d45f907a0433dbbd5
Commit: e1771e20c8be601d1cc9364d45f907a0433dbbd5
Parent: 428009422584cb8ded31397740ade88a36fc8172
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:15 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:15 2008 +0100

ide: fix comment in init_irq()

APUS support is gone...

Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/ide-probe.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index d6d3330..4a2cb28 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1051,7 +1051,7 @@ static int init_irq (ide_hwif_t *hwif)
int sa = 0;
 #if defined(__mc68000__)
sa = IRQF_SHARED;
-#endif /* __mc68000__ || CONFIG_APUS */
+#endif /* __mc68000__ */
 
if (IDE_CHIPSET_IS_PCI(hwif-chipset))
sa = IRQF_SHARED;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ide: introduce CONFIG_BLK_DEV_IDEDMA_SFF option

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8e882ba111bb52fbb42c34a265afb97ddd4fcea1
Commit: 8e882ba111bb52fbb42c34a265afb97ddd4fcea1
Parent: 7b56a937a17d21a266dd0a24053f951f3a92e428
Author: Sergei Shtylyov [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:14 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:14 2008 +0100

ide: introduce CONFIG_BLK_DEV_IDEDMA_SFF option

Introduce new option CONFIG_BLK_DEV_IDEDMA_SFF for non-PCI SFF-8038i 
compatible
bus mastering IDE controllers (which there are a few known), thus fixing a 
hack
made for Palmchip BK3710 controller...

Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]
Cc: Anton Salnikov [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/Kconfig   |9 +++--
 drivers/ide/ide-dma.c |   14 +++---
 include/linux/ide.h   |9 -
 3 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index d2c4f06..df752e6 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -378,6 +378,9 @@ config BLK_DEV_IDEPNP
  would like the kernel to automatically detect and activate
  it, say Y here.
 
+config BLK_DEV_IDEDMA_SFF
+   bool
+
 if PCI
 
 comment PCI IDE chipsets support
@@ -459,6 +462,7 @@ config BLK_DEV_RZ1000
 config BLK_DEV_IDEDMA_PCI
bool
select BLK_DEV_IDEPCI
+   select BLK_DEV_IDEDMA_SFF
 
 config BLK_DEV_AEC62XX
tristate AEC62XX chipset support
@@ -999,7 +1003,7 @@ config BLK_DEV_Q40IDE
 config BLK_DEV_PALMCHIP_BK3710
tristate Palmchip bk3710 IDE controller support
depends on ARCH_DAVINCI
-   select BLK_DEV_IDEDMA_PCI
+   select BLK_DEV_IDEDMA_SFF
help
  Say Y here if you want to support the onchip IDE controller on the
  TI DaVinci SoC
@@ -1107,7 +,8 @@ config BLK_DEV_UMC8672
 endif
 
 config BLK_DEV_IDEDMA
-   def_bool BLK_DEV_IDEDMA_PCI || BLK_DEV_IDEDMA_PMAC || 
BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
+   def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \
+BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
 
 config IDE_ARCH_OBSOLETE_INIT
def_bool ALPHA || (ARM  !ARCH_L7200) || BLACKFIN || X86 || IA64 || 
M32R || MIPS || PARISC || PPC || (SUPERH64  BLK_DEV_IDEPCI) || SPARC
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index a4bb328..d0e7b53 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -198,7 +198,7 @@ int ide_build_sglist(ide_drive_t *drive, struct request *rq)
 
 EXPORT_SYMBOL_GPL(ide_build_sglist);
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
+#ifdef CONFIG_BLK_DEV_IDEDMA_SFF
 /**
  * ide_build_dmatable  -   build IDE DMA table
  *
@@ -316,7 +316,7 @@ void ide_destroy_dmatable (ide_drive_t *drive)
 
 EXPORT_SYMBOL_GPL(ide_destroy_dmatable);
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
+#ifdef CONFIG_BLK_DEV_IDEDMA_SFF
 /**
  * config_drive_for_dma-   attempt to activate IDE DMA
  * @drive: the drive to place in DMA mode
@@ -424,7 +424,7 @@ void ide_dma_host_set(ide_drive_t *drive, int on)
 }
 
 EXPORT_SYMBOL_GPL(ide_dma_host_set);
-#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
+#endif /* CONFIG_BLK_DEV_IDEDMA_SFF  */
 
 /**
  * ide_dma_off_quietly -   Generic DMA kill
@@ -474,7 +474,7 @@ void ide_dma_on(ide_drive_t *drive)
drive-hwif-dma_host_set(drive, 1);
 }
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
+#ifdef CONFIG_BLK_DEV_IDEDMA_SFF
 /**
  * ide_dma_setup   -   begin a DMA phase
  * @drive: target device
@@ -591,7 +591,7 @@ static int __ide_dma_test_irq(ide_drive_t *drive)
 }
 #else
 static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; }
-#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
+#endif /* CONFIG_BLK_DEV_IDEDMA_SFF */
 
 int __ide_dma_bad_drive (ide_drive_t *drive)
 {
@@ -840,7 +840,7 @@ void ide_check_dma_crc(ide_drive_t *drive)
ide_dma_on(drive);
 }
 
-#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
+#ifdef CONFIG_BLK_DEV_IDEDMA_SFF
 void ide_dma_lost_irq (ide_drive_t *drive)
 {
printk(%s: DMA interrupt recovery\n, drive-name);
@@ -1002,4 +1002,4 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
 }
 
 EXPORT_SYMBOL_GPL(ide_setup_dma);
-#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
+#endif /* CONFIG_BLK_DEV_IDEDMA_SFF */
diff --git a/include/linux/ide.h b/include/linux/ide.h
index acec99d..40a01c3 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -998,8 +998,7 @@ extern int __ide_pci_register_driver(struct pci_driver 
*driver, struct module *o
 void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, 
u8 *);
 void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *);
 
-/* FIXME: palm_bk3710 uses BLK_DEV_IDEDMA_PCI without BLK_DEV_IDEPCI! */
-#if defined(CONFIG_BLK_DEV_IDEPCI)  defined(CONFIG_BLK_DEV_IDEDMA_PCI)

ide: fix ide/legacy/gayle.c compilation

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=56efa7b0e437808d367a92f7820b3aba930c230d
Commit: 56efa7b0e437808d367a92f7820b3aba930c230d
Parent: 7eb43fd2fa4a55faee97d4c84b336d2138075926
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:14 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:14 2008 +0100

ide: fix ide/legacy/gayle.c compilation

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Cc: Geert Uytterhoeven [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/legacy/gayle.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c
index 9d3851d..b7d8109 100644
--- a/drivers/ide/legacy/gayle.c
+++ b/drivers/ide/legacy/gayle.c
@@ -94,7 +94,7 @@ static int gayle_ack_intr_a1200(ide_hwif_t *hwif)
 
 static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base,
 unsigned long ctl, unsigned long irq_port,
-ide_ack_intr_t *ack_intr);
+ide_ack_intr_t *ack_intr)
 {
int i;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ide-cd: replace ntohs with generic byteorder macro be16_to_cpu

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7eb43fd2fa4a55faee97d4c84b336d2138075926
Commit: 7eb43fd2fa4a55faee97d4c84b336d2138075926
Parent: eba8ff946177ca38dfde0bf1d8ce0703c45c49b9
Author: Borislav Petkov [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:13 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:13 2008 +0100

ide-cd: replace ntohs with generic byteorder macro be16_to_cpu

Signed-off-by: Borislav Petkov [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/ide-cd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 5e42c19..354c91d 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1555,7 +1555,7 @@ int ide_cd_read_toc(ide_drive_t *drive, struct 
request_sense *sense)
if (stat)
return stat;
 
-   toc-hdr.toc_length = ntohs (toc-hdr.toc_length);
+   toc-hdr.toc_length = be16_to_cpu(toc-hdr.toc_length);
 
if (info-cd_flags  IDE_CD_FLAG_TOCTRACKS_AS_BCD) {
toc-hdr.first_track = BCD2BIN(toc-hdr.first_track);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pdc202xx_old: always enable burst mode

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cfa2771bc511017159ea076965fe385101e03798
Commit: cfa2771bc511017159ea076965fe385101e03798
Parent: c79b60ddf6ff0e884c09cecbbddd656f7bf277a3
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:13 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:13 2008 +0100

pdc202xx_old: always enable burst mode

Alan has noticed that distros always enabled burst mode
(+ datasheet confirms that it is the right thing to do).

Thus fix pdc202xx_old host driver to do it unconditionally
and remove no longer needed CONFIG_PDC202XX_BURST option.

Cc: Alan Cox [EMAIL PROTECTED]
Acked-by: Sergei Shtylyov [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/Kconfig|   17 -
 drivers/ide/pci/pdc202xx_old.c |   22 --
 2 files changed, 0 insertions(+), 39 deletions(-)

diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index 043c34a..d2c4f06 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -688,23 +688,6 @@ config BLK_DEV_PDC202XX_OLD
 
  If unsure, say N.
 
-config PDC202XX_BURST
-   bool Special UDMA Feature
-   depends on BLK_DEV_PDC202XX_OLD
-   help
- This option causes the pdc202xx driver to enable UDMA modes on the
- PDC202xx even when the PDC202xx BIOS has not done so.
-
- It was originally designed for the PDC20246/Ultra33, whose BIOS will
- only setup UDMA on the first two PDC20246 cards.  It has also been
- used successfully on a PDC20265/Ultra100, allowing use of UDMA modes
- when the PDC20265 BIOS has been disabled (for faster boot up).
-
- Please read the comments at the top of
- file:drivers/ide/pci/pdc202xx_old.c.
-
- If unsure, say N.
-
 config BLK_DEV_PDC202XX_NEW
tristate PROMISE PDC202{68|69|70|71|75|76|77} support
select BLK_DEV_IDEDMA_PCI
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index da43297..150422e 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -3,26 +3,6 @@
  *  Copyright (C) 2006-2007MontaVista Software, Inc.
  *  Copyright (C) 2007 Bartlomiej Zolnierkiewicz
  *
- *  Promise Ultra33 cards with BIOS v1.20 through 1.28 will need this
- *  compiled into the kernel if you have more than one card installed.
- *  Note that BIOS v1.29 is reported to fix the problem.  Since this is
- *  safe chipset tuning, including this support is harmless
- *
- *  Promise Ultra66 cards with BIOS v1.11 this
- *  compiled into the kernel if you have more than one card installed.
- *
- *  Promise Ultra100 cards.
- *
- *  The latest chipset code will support the following ::
- *  Three Ultra33 controllers and 12 drives.
- *  8 are UDMA supported and 4 are limited to DMA mode 2 multi-word.
- *  The 8/4 ratio is a BIOS code limit by promise.
- *
- *  UNLESS you enable CONFIG_PDC202XX_BURST
- *
- */
-
-/*
  *  Portions Copyright (C) 1999 Promise Technology, Inc.
  *  Author: Frank Tiernan ([EMAIL PROTECTED])
  *  Released under terms of General Public License
@@ -344,7 +324,6 @@ static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, 
unsigned long dmabase)
(primary_mode  1) ? MASTER : PCI,
(secondary_mode  1) ? MASTER : PCI );
 
-#ifdef CONFIG_PDC202XX_BURST
if (!(udma_speed_flag  1)) {
printk(KERN_INFO %s: FORCING BURST BIT 0x%02x-0x%02x ,
hwif-cds-name, udma_speed_flag,
@@ -352,7 +331,6 @@ static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, 
unsigned long dmabase)
outb(udma_speed_flag | 1, dmabase | 0x1f);
printk(%sACTIVE\n, (inb(dmabase | 0x1f)  1) ?  : IN);
}
-#endif /* CONFIG_PDC202XX_BURST */
 
ide_setup_dma(hwif, dmabase);
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


palm_bk3710: use struct ide_port_info

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c79b60ddf6ff0e884c09cecbbddd656f7bf277a3
Commit: c79b60ddf6ff0e884c09cecbbddd656f7bf277a3
Parent: c92a7f1d8254fabd99df33af59094935fc2cfe32
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:13 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:13 2008 +0100

palm_bk3710: use struct ide_port_info

* Factor out cable detection to palm_bk3710_cable_detect().

* Add palm_bk3710_init_hwif() (-init_hwif method implementation).

* Remove needless -quirkproc initialization.

* Add missing -pio_mask initialization.

* Use ATA_* defines for setting -{ultra,mwdma}_mask.

* Add 'struct ide_port_info palm_bk3710_port_info' and pass it to
  ide_device_add().  Then remove open-coded 'hwif' initialization.

Cc: Anton Salnikov [EMAIL PROTECTED]
Acked-by: Sergei Shtylyov [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/arm/palm_bk3710.c |   33 +++--
 1 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c
index 8e40bdb..8e1f6bd 100644
--- a/drivers/ide/arm/palm_bk3710.c
+++ b/drivers/ide/arm/palm_bk3710.c
@@ -311,6 +311,28 @@ static void __devinit palm_bk3710_chipinit(void __iomem 
*base)
palm_bk3710_setpiomode(base, NULL, 0, 600, 0);
palm_bk3710_setpiomode(base, NULL, 1, 600, 0);
 }
+
+static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif)
+{
+   return ATA_CBL_PATA80;
+}
+
+static void __devinit palm_bk3710_init_hwif(ide_hwif_t *hwif)
+{
+   hwif-set_pio_mode = palm_bk3710_set_pio_mode;
+   hwif-set_dma_mode = palm_bk3710_set_dma_mode;
+
+   hwif-cable_detect = palm_bk3710_cable_detect;
+}
+
+static const struct ide_port_info __devinitdata palm_bk3710_port_info = {
+   .init_hwif  = palm_bk3710_init_hwif,
+   .host_flags = IDE_HFLAG_NO_DMA, /* hack (no PCI) */
+   .pio_mask   = ATA_PIO4,
+   .udma_mask  = ATA_UDMA4,/* (input clk 99MHz) */
+   .mwdma_mask = ATA_MWDMA2,
+};
+
 static int __devinit palm_bk3710_probe(struct platform_device *pdev)
 {
struct clk *clkp;
@@ -368,24 +390,15 @@ static int __devinit palm_bk3710_probe(struct 
platform_device *pdev)
ide_init_port_data(hwif, i);
 
ide_init_port_hw(hwif, hw);
-   hwif-quirkproc = NULL;
 
-   hwif-set_pio_mode = palm_bk3710_set_pio_mode;
-   hwif-set_dma_mode = palm_bk3710_set_dma_mode;
hwif-mmio = 1;
default_hwif_mmiops(hwif);
-   hwif-cbl = ATA_CBL_PATA80;
-   hwif-ultra_mask = 0x1f;/* Ultra DMA Mode 4 Max
-   (input clk 99MHz) */
-   hwif-mwdma_mask = 0x7;
-   hwif-drives[0].autotune = 1;
-   hwif-drives[1].autotune = 1;
 
ide_setup_dma(hwif, mem-start);
 
idx[0] = i;
 
-   ide_device_add(idx, NULL);
+   ide_device_add(idx, palm_bk3710_port_info);
 
if (!hwif-present)
goto out;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


cs5520: remove stale comment

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb777922c3a15ccbea4c02bed401e030f195aaea
Commit: cb777922c3a15ccbea4c02bed401e030f195aaea
Parent: 3b0e044d5a881c937293a045158149514b86783c
Author: Benjamin Herrenschmidt [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:12 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:12 2008 +0100

cs5520: remove stale comment

Remove stale comment from the cs5520 IDE driver.

Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/pci/cs5520.c |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index 0be1a82..1c163e4 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -147,11 +147,6 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, 
const struct pci_devic
 
/* We must not grab the entire device, it has 'ISA' space in its
 * BARS too and we will freak out other bits of the kernel
-*
-* pci_enable_device_bars() is going away. I replaced it with
-* IO only enable for now but I'll need confirmation this is
-* allright for that device. If not, it will need some kind of
-* quirk. --BenH.
 */
if (pci_enable_device_io(dev)) {
printk(KERN_WARNING %s: Unable to enable 55x0.\n, d-name);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Use proper abstractions in quirk_intel_irqbalance

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9585ca02f8f9e844b64e7ff4d167ccc1390a99ab
Commit: 9585ca02f8f9e844b64e7ff4d167ccc1390a99ab
Parent: 19af35546de68c872dcb687613e0902a602cb20e
Author: Matthew Wilcox [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 23:18:15 2008 -0500
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Feb 11 08:15:03 2008 -0800

Use proper abstractions in quirk_intel_irqbalance

Since we may not have a pci_dev for the device we need to access, we can't
use pci_read_config_word.  But raw_pci_read is an internal implementation
detail; it's better to use the architected pci_bus_read_config_word
interface.  Using PCI_DEVFN instead of a mysterious constant helps
reassure everyone that we really do intend to access device 8.

[ Thanks to Grant Grundler for pointing out to me that this is exactly
  what the write immediately above this is doing -- enabling device 8 to
  respond to config space cycles.
- Matthew

  Grant also says:

Can you also add a comment which points at the Intel
 documentation?

 The 'Intel E7320 Memory Controller Hub (MCH) Datasheet' at

  http://download.intel.com/design/chipsets/datashts/30300702.pdf

 Page 69 documents register F4h (DEVPRES1).

 And I just doubled checked that the 0xf4 register value is
 restored later in the quirk (obvious when you look at the code
 but not from the patch

  so here it is.
 - Linus ]

Signed-off-by: Matthew Wilcox [EMAIL PROTECTED]
Acked-by: Grant Grundler [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/x86/kernel/quirks.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index 1941482..c47208f 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -11,7 +11,7 @@
 static void __devinit quirk_intel_irqbalance(struct pci_dev *dev)
 {
u8 config, rev;
-   u32 word;
+   u16 word;
 
/* BIOS may enable hardware IRQ balancing for
 * E7520/E7320/E7525(revision ID 0x9 and below)
@@ -26,8 +26,11 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev 
*dev)
pci_read_config_byte(dev, 0xf4, config);
pci_write_config_byte(dev, 0xf4, config|0x2);
 
-   /* read xTPR register */
-   raw_pci_read(0, 0, 0x40, 0x4c, 2, word);
+   /*
+* read xTPR register.  We may not have a pci_dev for device 8
+* because it might be hidden until the above write.
+*/
+   pci_bus_read_config_word(dev-bus, PCI_DEVFN(8, 0), 0x4c, word);
 
if (!(word  (1  13))) {
dev_info(dev-dev, Intel E7520/7320/7525 detected; 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


WMI: initialize wmi_blocks.list even if ACPI is disabled

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=96b5a46e2a72dc1829370c87053e0cd558d58bc0
Commit: 96b5a46e2a72dc1829370c87053e0cd558d58bc0
Parent: 2c1582699872d38682b136b1446953ee351bc7e1
Author: Linus Torvalds [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 20:52:01 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Feb 11 20:52:01 2008 -0800

WMI: initialize wmi_blocks.list even if ACPI is disabled

Even if we don't want to register the WMI driver, we should initialize
the wmi_blocks list to be empty, since we don't want the wmi helper
functions to oops just because that basic list has not even been set up.

With this, find_guid() will happily return not found rather than
oopsing all over the place, and the callers will then just automatically
return false or AE_NOT_FOUND as appropriate.

Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/acpi/wmi.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c
index 36b84ab..457ed3d 100644
--- a/drivers/acpi/wmi.c
+++ b/drivers/acpi/wmi.c
@@ -673,11 +673,11 @@ static int __init acpi_wmi_init(void)
 {
acpi_status result;
 
+   INIT_LIST_HEAD(wmi_blocks.list);
+
if (acpi_disabled)
return -ENODEV;
 
-   INIT_LIST_HEAD(wmi_blocks.list);
-
result = acpi_bus_register_driver(acpi_wmi_driver);
 
if (result  0) {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


x86: vdso_install fix

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2c1582699872d38682b136b1446953ee351bc7e1
Commit: 2c1582699872d38682b136b1446953ee351bc7e1
Parent: 31f1de46b90ad360a16e7af3e277d104961df923
Author: Roland McGrath [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 14:38:51 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Feb 11 20:50:09 2008 -0800

x86: vdso_install fix

The makefile magic for installing the 32-bit vdso images on disk had a
little error.  A single-line change would fix that bug, but this does a
little more to reduce the error-prone duplication of this bit of
makefile variable magic.

Signed-off-by: Roland McGrath [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/x86/vdso/Makefile |   22 --
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index d28dda5..f385a4b 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -7,7 +7,7 @@ VDSO32-$(CONFIG_X86_32) := y
 VDSO32-$(CONFIG_COMPAT):= y
 
 vdso-install-$(VDSO64-y)   += vdso.so
-vdso-install-$(VDSO32-y)   += $(vdso32-y:=.so)
+vdso-install-$(VDSO32-y)   += $(vdso32-images)
 
 
 # files to link into the vdso
@@ -63,6 +63,8 @@ vdso32.so-$(CONFIG_X86_32)+= int80
 vdso32.so-$(CONFIG_COMPAT) += syscall
 vdso32.so-$(VDSO32-y)  += sysenter
 
+vdso32-images  = $(vdso32.so-y:%=vdso32-%.so)
+
 CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
 VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1
 
@@ -71,21 +73,21 @@ VDSO_LDFLAGS_vdso32.lds = -m elf_i386 
-Wl,-soname=linux-gate.so.1
 override obj-dirs = $(dir $(obj)) $(obj)/vdso32/
 
 targets += vdso32/vdso32.lds
-targets += $(vdso32.so-y:%=vdso32-%.so.dbg) $(vdso32.so-y:%=vdso32-%.so)
+targets += $(vdso32-images) $(vdso32-images:=.dbg)
 targets += vdso32/note.o $(vdso32.so-y:%=vdso32/%.o)
 
-extra-y+= $(vdso32.so-y:%=vdso32-%.so)
+extra-y+= $(vdso32-images)
 
-$(obj)/vdso32.o: $(vdso32.so-y:%=$(obj)/vdso32-%.so)
+$(obj)/vdso32.o: $(vdso32-images:%=$(obj)/%)
 
 KBUILD_AFLAGS_32 := $(filter-out -m64,$(KBUILD_AFLAGS))
-$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32)
-$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): asflags-$(CONFIG_X86_64) += -m32
+$(vdso32-images:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32)
+$(vdso32-images:%=$(obj)/%.dbg): asflags-$(CONFIG_X86_64) += -m32
 
-$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): $(obj)/vdso32-%.so.dbg: FORCE \
-$(obj)/vdso32/vdso32.lds \
-$(obj)/vdso32/note.o \
-$(obj)/vdso32/%.o
+$(vdso32-images:%=$(obj)/%.dbg): $(obj)/vdso32-%.so.dbg: FORCE \
+$(obj)/vdso32/vdso32.lds \
+$(obj)/vdso32/note.o \
+$(obj)/vdso32/%.o
$(call if_changed,vdso)
 
 # Make vdso32-*-syms.lds from each image, and then make sure they match.
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


mempolicy: silently restrict nodemask to allowed nodes

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=31f1de46b90ad360a16e7af3e277d104961df923
Commit: 31f1de46b90ad360a16e7af3e277d104961df923
Parent: 1a510089849ff9f70b654659bf976a6baf3a4833
Author: KOSAKI Motohiro [EMAIL PROTECTED]
AuthorDate: Tue Feb 12 13:30:22 2008 +0900
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Feb 11 20:48:29 2008 -0800

mempolicy: silently restrict nodemask to allowed nodes

Kosaki Motohito noted that numactl --interleave=all ... failed in the
presence of memoryless nodes.  This patch attempts to fix that problem.

Some background:

numactl --interleave=all calls set_mempolicy(2) with a fully populated
[out to MAXNUMNODES] nodemask.  set_mempolicy() [in do_set_mempolicy()]
calls contextualize_policy() which requires that the nodemask be a
subset of the current task's mems_allowed; else EINVAL will be returned.

A task's mems_allowed will always be a subset of node_states[N_HIGH_MEMORY]
i.e., nodes with memory.  So, a fully populated nodemask will be
declared invalid if it includes memoryless nodes.

  NOTE:  the same thing will occur when running in a cpuset
 with restricted mem_allowed--for the same reason:
 node mask contains dis-allowed nodes.

mbind(2), on the other hand, just masks off any nodes in the nodemask
that are not included in the caller's mems_allowed.

In each case [mbind() and set_mempolicy()], mpol_check_policy() will
complain [again, resulting in EINVAL] if the nodemask contains any
memoryless nodes.  This is somewhat redundant as mpol_new() will remove
memoryless nodes for interleave policy, as will bind_zonelist()--called
by mpol_new() for BIND policy.

Proposed fix:

1) modify contextualize_policy logic to:
   a) remember whether the incoming node mask is empty.
   b) if not, restrict the nodemask to allowed nodes, as is
  currently done in-line for mbind().  This guarantees
  that the resulting mask includes only nodes with memory.

  NOTE:  this is a [benign, IMO] change in behavior for
 set_mempolicy().  Dis-allowed nodes will be
 silently ignored, rather than returning an error.

   c) fold this code into mpol_check_policy(), replace 2 calls to
  contextualize_policy() to call mpol_check_policy() directly
  and remove contextualize_policy().

2) In existing mpol_check_policy() logic, after contextualization:
   a) MPOL_DEFAULT:  require that in coming mask was_empty
   b) MPOL_{BIND|INTERLEAVE}:  require that contextualized nodemask
  contains at least one node.
   c) add a case for MPOL_PREFERRED:  if in coming was not empty
  and resulting mask IS empty, user specified invalid nodes.
  Return EINVAL.
   c) remove the now redundant check for memoryless nodes

3) remove the now redundant masking of policy nodes for interleave
   policy from mpol_new().

4) Now that mpol_check_policy() contextualizes the nodemask, remove
   the in-line nodes_and() from sys_mbind().  I believe that this
   restores mbind() to the behavior before the memoryless-nodes
   patch series.  E.g., we'll no longer treat an invalid nodemask
   with MPOL_PREFERRED as local allocation.

[ Patch history:

  v1 - v2:
   - Communicate whether or not incoming node mask was empty to
 mpol_check_policy() for better error checking.
   - As suggested by David Rientjes, remove the now unused
 cpuset_nodes_subset_current_mems_allowed() from cpuset.h

  v2 - v3:
   - As suggested by Kosaki Motohito, fold the contextualization
 of policy nodemask into mpol_check_policy().  Looks a little
 cleaner. ]

Signed-off-by:  Lee Schermerhorn [EMAIL PROTECTED]
Signed-off-by:  KOSAKI Motohiro [EMAIL PROTECTED]
Tested-by:  KOSAKI Motohiro [EMAIL PROTECTED]
Acked-by:   David Rientjes [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/cpuset.h |3 --
 mm/mempolicy.c |   61 ---
 2 files changed, 36 insertions(+), 28 deletions(-)

diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index f8c9a27..0a26be3 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -26,8 +26,6 @@ extern nodemask_t cpuset_mems_allowed(struct task_struct *p);
 #define cpuset_current_mems_allowed (current-mems_allowed)
 void cpuset_init_current_mems_allowed(void);
 void cpuset_update_task_memory_state(void);
-#define cpuset_nodes_subset_current_mems_allowed(nodes) \
-   nodes_subset((nodes), current-mems_allowed)
 int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl);
 
 extern int __cpuset_zone_allowed_softwall(struct zone *z, 

Be more robust about bad arguments in get_user_pages()

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=900cf086fd2fbad07f72f4575449e0d0958f860f
Commit: 900cf086fd2fbad07f72f4575449e0d0958f860f
Parent: b1292b17dc03fcd90f3301974cea1b7c61371ba5
Author: Jonathan Corbet [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 16:17:33 2008 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Feb 11 20:44:44 2008 -0800

Be more robust about bad arguments in get_user_pages()

So I spent a while pounding my head against my monitor trying to figure
out the vmsplice() vulnerability - how could a failure to check for
*read* access turn into a root exploit? It turns out that it's a buffer
overflow problem which is made easy by the way get_user_pages() is
coded.

In particular, len is a signed int, and it is only checked at the
*end* of a do {} while() loop.  So, if it is passed in as zero, the loop
will execute once and decrement len to -1.  At that point, the loop will
proceed until the next invalid address is found; in the process, it will
likely overflow the pages array passed in to get_user_pages().

I think that, if get_user_pages() has been asked to grab zero pages,
that's what it should do.  Thus this patch; it is, among other things,
enough to block the (already fixed) root exploit and any others which
might be lurking in similar code.  I also think that the number of pages
should be unsigned, but changing the prototype of this function probably
requires some more careful review.

Signed-off-by: Jonathan Corbet [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 mm/memory.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index e5628a5..717aa0e 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -989,6 +989,8 @@ int get_user_pages(struct task_struct *tsk, struct 
mm_struct *mm,
int i;
unsigned int vm_flags;
 
+   if (len = 0)
+   return 0;
/* 
 * Require read or write permissions.
 * If 'force' is set, we only require the MAY flags.
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


mlx4_core: Fix build break (missing include)

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=29c271123dc7895a9f77d3e61e747b2a052d0a2a
Commit: 29c271123dc7895a9f77d3e61e747b2a052d0a2a
Parent: cc13e442952a347f7e217eeaee4778485394f1be
Author: Olof Johansson [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 20:22:57 2008 -0600
Committer:  Roland Dreier [EMAIL PROTECTED]
CommitDate: Mon Feb 11 14:19:42 2008 -0800

mlx4_core: Fix build break (missing include)

Commit 313abe55 (mlx4_core: For 64-bit systems, vmap() kernel queue
buffers) caused this to pop up on powerpc allyesconfig, looks like a
missing include file:

drivers/net/mlx4/alloc.c: In function 'mlx4_buf_alloc':
drivers/net/mlx4/alloc.c:162: error: implicit declaration of function 
'vmap'
drivers/net/mlx4/alloc.c:162: error: 'VM_MAP' undeclared (first use in 
this function)
drivers/net/mlx4/alloc.c:162: error: (Each undeclared identifier is 
reported only once
drivers/net/mlx4/alloc.c:162: error: for each function it appears in.)
drivers/net/mlx4/alloc.c:162: warning: assignment makes pointer from 
integer without a cast
drivers/net/mlx4/alloc.c: In function 'mlx4_buf_free':
drivers/net/mlx4/alloc.c:187: error: implicit declaration of function 
'vunmap'

Signed-off-by: Olof Johansson [EMAIL PROTECTED]
Signed-off-by: Roland Dreier [EMAIL PROTECTED]
---
 drivers/net/mlx4/alloc.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/mlx4/alloc.c b/drivers/net/mlx4/alloc.c
index 521dc03..75ef9d0 100644
--- a/drivers/net/mlx4/alloc.c
+++ b/drivers/net/mlx4/alloc.c
@@ -34,6 +34,7 @@
 #include linux/slab.h
 #include linux/bitmap.h
 #include linux/dma-mapping.h
+#include linux/vmalloc.h
 
 #include mlx4.h
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Add Matt to MAINTAINERS as a SLAB allocator maintainer

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c76d118ecc5fcac7c823fb428676860dba0fdd20
Commit: c76d118ecc5fcac7c823fb428676860dba0fdd20
Parent: a17b7a398d5c20ccbcb11f98dc2a76a6f07934ad
Author: Pekka Enberg [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 23:52:47 2008 +0200
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Feb 11 20:42:49 2008 -0800

Add Matt to MAINTAINERS as a SLAB allocator maintainer

Matt is already the maintainer of SLOB which is one of the SLAB 
allocators in
the kernel so add him to MAINTAINERS.

Signed-off-by: Pekka Enberg [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 MAINTAINERS |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index c40f0ae..6680ec4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3561,6 +3561,8 @@ P:Christoph Lameter
 M: [EMAIL PROTECTED]
 P: Pekka Enberg
 M: [EMAIL PROTECTED]
+P: Matt Mackall
+M: [EMAIL PROTECTED]
 L: [EMAIL PROTECTED]
 S: Maintained
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sata_mv: platform driver allocs dma without create

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fbf14e2f2d674e6a2ff0fb2aa569e7f6687483a3
Commit: fbf14e2f2d674e6a2ff0fb2aa569e7f6687483a3
Parent: 4194645079ca15679bf7e5b00e71561cf6864761
Author: Byron Bradley [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 21:17:30 2008 +
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Mon Feb 11 14:30:10 2008 -0500

sata_mv: platform driver allocs dma without create

When the sata_mv driver is used as a platform driver,
mv_create_dma_pools() is never called so it fails when trying
to alloc in mv_pool_start().

Signed-off-by: Byron Bradley [EMAIL PROTECTED]
Acked-by: Mark Lord [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/sata_mv.c |   44 
 1 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index f5333ce..04b5717 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -2881,6 +2881,26 @@ done:
return rc;
 }
 
+static int mv_create_dma_pools(struct mv_host_priv *hpriv, struct device *dev)
+{
+   hpriv-crqb_pool   = dmam_pool_create(crqb_q, dev, MV_CRQB_Q_SZ,
+MV_CRQB_Q_SZ, 0);
+   if (!hpriv-crqb_pool)
+   return -ENOMEM;
+
+   hpriv-crpb_pool   = dmam_pool_create(crpb_q, dev, MV_CRPB_Q_SZ,
+MV_CRPB_Q_SZ, 0);
+   if (!hpriv-crpb_pool)
+   return -ENOMEM;
+
+   hpriv-sg_tbl_pool = dmam_pool_create(sg_tbl, dev, MV_SG_TBL_SZ,
+MV_SG_TBL_SZ, 0);
+   if (!hpriv-sg_tbl_pool)
+   return -ENOMEM;
+
+   return 0;
+}
+
 /**
  *  mv_platform_probe - handle a positive probe of an soc Marvell
  *  host
@@ -2934,6 +2954,10 @@ static int mv_platform_probe(struct platform_device 
*pdev)
hpriv-base = ioremap(res-start, res-end - res-start + 1);
hpriv-base -= MV_SATAHC0_REG_BASE;
 
+   rc = mv_create_dma_pools(hpriv, pdev-dev);
+   if (rc)
+   return rc;
+
/* initialize adapter */
rc = mv_init_host(host, chip_soc);
if (rc)
@@ -3070,26 +3094,6 @@ static void mv_print_info(struct ata_host *host)
   scc_s, (MV_HP_FLAG_MSI  hpriv-hp_flags) ? MSI : INTx);
 }
 
-static int mv_create_dma_pools(struct mv_host_priv *hpriv, struct device *dev)
-{
-   hpriv-crqb_pool   = dmam_pool_create(crqb_q, dev, MV_CRQB_Q_SZ,
-MV_CRQB_Q_SZ, 0);
-   if (!hpriv-crqb_pool)
-   return -ENOMEM;
-
-   hpriv-crpb_pool   = dmam_pool_create(crpb_q, dev, MV_CRPB_Q_SZ,
-MV_CRPB_Q_SZ, 0);
-   if (!hpriv-crpb_pool)
-   return -ENOMEM;
-
-   hpriv-sg_tbl_pool = dmam_pool_create(sg_tbl, dev, MV_SG_TBL_SZ,
-MV_SG_TBL_SZ, 0);
-   if (!hpriv-sg_tbl_pool)
-   return -ENOMEM;
-
-   return 0;
-}
-
 /**
  *  mv_pci_init_one - handle a positive probe of a PCI Marvell host
  *  @pdev: PCI device found
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pata_amd: Note in the module description it handles Nvidia

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c9544bcb4c7df07555e4b22d297c5705738da09d
Commit: c9544bcb4c7df07555e4b22d297c5705738da09d
Parent: 8f71efe25f8718200027b547a3e749ae3300fe60
Author: Alan Cox [EMAIL PROTECTED]
AuthorDate: Fri Feb 8 15:22:39 2008 +
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Mon Feb 11 14:30:04 2008 -0500

pata_amd: Note in the module description it handles Nvidia

This has confused a few people so fix it

Signed-off-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/pata_amd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 761a666..ea567e2 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -772,7 +772,7 @@ static void __exit amd_exit(void)
 }
 
 MODULE_AUTHOR(Alan Cox);
-MODULE_DESCRIPTION(low-level driver for AMD PATA IDE);
+MODULE_DESCRIPTION(low-level driver for AMD and Nvidia PATA IDE);
 MODULE_LICENSE(GPL);
 MODULE_DEVICE_TABLE(pci, amd);
 MODULE_VERSION(DRV_VERSION);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pata_via: fix SATA cable detection on cx700

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7585eb1b7cf4bbace37ce18500809140c8eeccc3
Commit: 7585eb1b7cf4bbace37ce18500809140c8eeccc3
Parent: 19af35546de68c872dcb687613e0902a602cb20e
Author: Tejun Heo [EMAIL PROTECTED]
AuthorDate: Thu Feb 7 10:18:53 2008 +0900
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Mon Feb 11 14:29:42 2008 -0500

pata_via: fix SATA cable detection on cx700

The first port of cx700 is SATA.  Fix cable detection.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/pata_via.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 39627ab..d119a68 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -84,6 +84,7 @@ enum {
VIA_BAD_ID  = 0x100, /* Has wrong vendor ID (0x1107) */
VIA_BAD_AST = 0x200, /* Don't touch Address Setup Timing */
VIA_NO_ENABLES  = 0x400, /* Has no enablebits */
+   VIA_SATA_PATA   = 0x800, /* SATA/PATA combined configuration */
 };
 
 /*
@@ -100,7 +101,7 @@ static const struct via_isa_bridge {
{ vx800,  PCI_DEVICE_ID_VIA_VX800,0x00, 0x2f, VIA_UDMA_133 | 
VIA_BAD_AST },
{ vt8237s,PCI_DEVICE_ID_VIA_8237S,0x00, 0x2f, VIA_UDMA_133 | 
VIA_BAD_AST },
{ vt8251, PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | 
VIA_BAD_AST },
-   { cx700,  PCI_DEVICE_ID_VIA_CX700,0x00, 0x2f, VIA_UDMA_133 | 
VIA_BAD_AST },
+   { cx700,  PCI_DEVICE_ID_VIA_CX700,0x00, 0x2f, VIA_UDMA_133 | 
VIA_BAD_AST | VIA_SATA_PATA },
{ vt6410, PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | 
VIA_BAD_AST | VIA_NO_ENABLES},
{ vt8237a,PCI_DEVICE_ID_VIA_8237A,0x00, 0x2f, VIA_UDMA_133 | 
VIA_BAD_AST },
{ vt8237, PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | 
VIA_BAD_AST },
@@ -172,6 +173,9 @@ static int via_cable_detect(struct ata_port *ap) {
if (via_cable_override(pdev))
return ATA_CBL_PATA40_SHORT;
 
+   if ((config-flags  VIA_SATA_PATA)  ap-port_no == 0)
+   return ATA_CBL_SATA;
+
/* Early chips are 40 wire */
if ((config-flags  VIA_UDMA)  VIA_UDMA_66)
return ATA_CBL_PATA40;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


x86: remove over noisy debug printk

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=81772fea4110f7ce8083d52503c9c4ddaa50f75b
Commit: 81772fea4110f7ce8083d52503c9c4ddaa50f75b
Parent: cc13e442952a347f7e217eeaee4778485394f1be
Author: Thomas Gleixner [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 23:57:36 2008 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Feb 11 11:24:24 2008 -0800

x86: remove over noisy debug printk

pageattr-test.c contains a noisy debug printk that people reported.
The condition under which it prints (randomly tapping into a mem_map[]
hole and not being able to c_p_a() there) is valid behavior and not
interesting to report.

Remove it.

Signed-off-by: Thomas Gleixner [EMAIL PROTECTED]
Acked-by: Ingo Molnar [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/x86/mm/pageattr-test.c |7 ---
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c
index ed82016..75f1b10 100644
--- a/arch/x86/mm/pageattr-test.c
+++ b/arch/x86/mm/pageattr-test.c
@@ -40,7 +40,6 @@ struct split_state {
 static int print_split(struct split_state *s)
 {
long i, expected, missed = 0;
-   int printed = 0;
int err = 0;
 
s-lpg = s-gpg = s-spg = s-exec = 0;
@@ -53,12 +52,6 @@ static int print_split(struct split_state *s)
 
pte = lookup_address(addr, level);
if (!pte) {
-   if (!printed) {
-   dump_pagetable(addr);
-   printk(KERN_INFO CPA %lx no pte level %d\n,
-   addr, level);
-   printed = 1;
-   }
missed++;
i++;
continue;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kbuild: fix make V=1

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fab1e310d3f97bb9403ac68e181fd3e654a755c7
Commit: fab1e310d3f97bb9403ac68e181fd3e654a755c7
Parent: 19af35546de68c872dcb687613e0902a602cb20e
Author: Sam Ravnborg [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 14:26:26 2008 +0100
Committer:  Sam Ravnborg [EMAIL PROTECTED]
CommitDate: Mon Feb 11 17:43:54 2008 +0100

kbuild: fix make V=1

When make -s support were added to filechk to
combination created with make V=1 were not
covered.
Fix it by explicitly cover this case too.

Signed-off-by: Sam Ravnborg [EMAIL PROTECTED]
Cc: Mike Frysinger [EMAIL PROTECTED]
---
 init/Makefile  |1 +
 scripts/Kbuild.include |3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/init/Makefile b/init/Makefile
index c5f157c..4a243df 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -27,6 +27,7 @@ $(obj)/version.o: include/linux/compile.h
 # mkcompile_h will make sure to only update the
 # actual file if its content has changed.
 
+   chk_compile.h = :
  quiet_chk_compile.h = echo '  CHK $@'
 silent_chk_compile.h = :
 include/linux/compile.h: FORCE
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index da3559e..d64e6ba 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -39,10 +39,13 @@ escsq = $(subst $(squote),'\$(squote)',$1)
 # - If they are equal no change, and no timestamp update
 # - stdin is piped in from the first prerequisite ($) so one has
 #   to specify a valid file as first prerequisite (often the kbuild file)
+   chk_filechk = :
  quiet_chk_filechk = echo '  CHK $@'
 silent_chk_filechk = :
+   upd_filechk = :
  quiet_upd_filechk = echo '  UPD $@'
 silent_upd_filechk = :
+
 define filechk
$(Q)set -e; \
$($(quiet)chk_filechk); \
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


selinux: support 64-bit capabilities

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b68e418c445e8a468634d0a7ca2fb63bbaa74028
Commit: b68e418c445e8a468634d0a7ca2fb63bbaa74028
Parent: 19af35546de68c872dcb687613e0902a602cb20e
Author: Stephen Smalley [EMAIL PROTECTED]
AuthorDate: Thu Feb 7 11:21:04 2008 -0500
Committer:  James Morris [EMAIL PROTECTED]
CommitDate: Mon Feb 11 20:30:02 2008 +1100

selinux: support 64-bit capabilities

Fix SELinux to handle 64-bit capabilities correctly, and to catch
future extensions of capabilities beyond 64 bits to ensure that SELinux
is properly updated.

Signed-off-by:  Stephen Smalley [EMAIL PROTECTED]
Signed-off-by: James Morris [EMAIL PROTECTED]
---
 security/selinux/hooks.c |   21 +++--
 security/selinux/include/av_perm_to_string.h |3 +++
 security/selinux/include/av_permissions.h|3 +++
 security/selinux/include/class_to_string.h   |1 +
 security/selinux/include/flask.h |1 +
 5 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index e5ed075..44f16d9 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1272,12 +1272,18 @@ static int task_has_perm(struct task_struct *tsk1,
SECCLASS_PROCESS, perms, NULL);
 }
 
+#if CAP_LAST_CAP  63
+#error Fix SELinux to handle capabilities  63.
+#endif
+
 /* Check whether a task is allowed to use a capability. */
 static int task_has_capability(struct task_struct *tsk,
   int cap)
 {
struct task_security_struct *tsec;
struct avc_audit_data ad;
+   u16 sclass;
+   u32 av = CAP_TO_MASK(cap);
 
tsec = tsk-security;
 
@@ -1285,8 +1291,19 @@ static int task_has_capability(struct task_struct *tsk,
ad.tsk = tsk;
ad.u.cap = cap;
 
-   return avc_has_perm(tsec-sid, tsec-sid,
-   SECCLASS_CAPABILITY, CAP_TO_MASK(cap), ad);
+   switch (CAP_TO_INDEX(cap)) {
+   case 0:
+   sclass = SECCLASS_CAPABILITY;
+   break;
+   case 1:
+   sclass = SECCLASS_CAPABILITY2;
+   break;
+   default:
+   printk(KERN_ERR
+  SELinux:  out of range capability %d\n, cap);
+   BUG();
+   }
+   return avc_has_perm(tsec-sid, tsec-sid, sclass, av, ad);
 }
 
 /* Check whether a task is allowed to use a system operation. */
diff --git a/security/selinux/include/av_perm_to_string.h 
b/security/selinux/include/av_perm_to_string.h
index 399f868..d569669 100644
--- a/security/selinux/include/av_perm_to_string.h
+++ b/security/selinux/include/av_perm_to_string.h
@@ -132,6 +132,9 @@
S_(SECCLASS_CAPABILITY, CAPABILITY__LEASE, lease)
S_(SECCLASS_CAPABILITY, CAPABILITY__AUDIT_WRITE, audit_write)
S_(SECCLASS_CAPABILITY, CAPABILITY__AUDIT_CONTROL, audit_control)
+   S_(SECCLASS_CAPABILITY, CAPABILITY__SETFCAP, setfcap)
+   S_(SECCLASS_CAPABILITY2, CAPABILITY2__MAC_OVERRIDE, mac_override)
+   S_(SECCLASS_CAPABILITY2, CAPABILITY2__MAC_ADMIN, mac_admin)
S_(SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_READ, 
nlmsg_read)
S_(SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_WRITE, 
nlmsg_write)
S_(SECCLASS_NETLINK_FIREWALL_SOCKET, NETLINK_FIREWALL_SOCKET__NLMSG_READ, 
nlmsg_read)
diff --git a/security/selinux/include/av_permissions.h 
b/security/selinux/include/av_permissions.h
index 84c9abc..75b4131 100644
--- a/security/selinux/include/av_permissions.h
+++ b/security/selinux/include/av_permissions.h
@@ -533,6 +533,9 @@
 #define CAPABILITY__LEASE 0x1000UL
 #define CAPABILITY__AUDIT_WRITE   0x2000UL
 #define CAPABILITY__AUDIT_CONTROL 0x4000UL
+#define CAPABILITY__SETFCAP   0x8000UL
+#define CAPABILITY2__MAC_OVERRIDE 0x0001UL
+#define CAPABILITY2__MAC_ADMIN0x0002UL
 #define NETLINK_ROUTE_SOCKET__IOCTL   0x0001UL
 #define NETLINK_ROUTE_SOCKET__READ0x0002UL
 #define NETLINK_ROUTE_SOCKET__WRITE   0x0004UL
diff --git a/security/selinux/include/class_to_string.h 
b/security/selinux/include/class_to_string.h
index b1b0d1d..bd813c3 100644
--- a/security/selinux/include/class_to_string.h
+++ b/security/selinux/include/class_to_string.h
@@ -71,3 +71,4 @@
 S_(NULL)
 S_(NULL)
 S_(peer)
+S_(capability2)
diff --git a/security/selinux/include/flask.h b/security/selinux/include/flask.h
index 09e9dd2..febf886 100644
--- a/security/selinux/include/flask.h
+++ b/security/selinux/include/flask.h
@@ -51,6 +51,7 @@
 #define SECCLASS_DCCP_SOCKET 60
 #define SECCLASS_MEMPROTECT  61
 #define SECCLASS_PEER68
+#define SECCLASS_CAPABILITY2

SUNPRC: Fix printk format warning

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bb50c8012cbd85b8e105584b32e4d5a2d335dcef
Commit: bb50c8012cbd85b8e105584b32e4d5a2d335dcef
Parent: fbb7878c1a2ee40a1e983bf20f3dd3a80255dcf2
Author: Roland Dreier [EMAIL PROTECTED]
AuthorDate: Fri Feb 8 16:02:04 2008 -0800
Committer:  J. Bruce Fields [EMAIL PROTECTED]
CommitDate: Sun Feb 10 18:11:22 2008 -0500

SUNPRC: Fix printk format warning

net/sunrpc/xprtrdma/svc_rdma_sendto.c:160: warning: format '%llx'
expects type 'long long unsigned int', but argument 3 has type 'u64'

Signed-off-by: Roland Dreier [EMAIL PROTECTED]
Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
---
 net/sunrpc/xprtrdma/svc_rdma_sendto.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c 
b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
index 3e32194..0598b22 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
@@ -159,7 +159,8 @@ static int send_write(struct svcxprt_rdma *xprt, struct 
svc_rqst *rqstp,
BUG_ON(sge_count = 32);
dprintk(svcrdma: RDMA_WRITE rmr=%x, to=%llx, xdr_off=%d, 
write_len=%d, xdr_sge=%p, sge_count=%d\n,
-   rmr, to, xdr_off, write_len, xdr_sge, sge_count);
+   rmr, (unsigned long long)to, xdr_off,
+   write_len, xdr_sge, sge_count);
 
ctxt = svc_rdma_get_context(xprt);
ctxt-count = 0;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ide: ide_init_port() bugfix

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=428009422584cb8ded31397740ade88a36fc8172
Commit: 428009422584cb8ded31397740ade88a36fc8172
Parent: 395d8ef5bebe547a80737692f9789d2e36da16f2
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:15 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:15 2008 +0100

ide: ide_init_port() bugfix

On Sunday 10 February 2008, Atsushi Nemoto wrote:
 On Sun, 06 Jan 2008 18:03:10 +0100, Bartlomiej Zolnierkiewicz [EMAIL 
PROTECTED] wrote:
  +   /* reset DMA masks only for SFF-style DMA controllers */
  +   if ((d-host_flags  IDE_HFLAG_NO_DMA) == 0  hwif-dma_base 
== 0)
  +   hwif-swdma_mask = hwif-mwdma_mask = hwif-ultra_mask 
= 0;

 It might be too late, but host_flags  IDE_HFLAGS_NO_DMA seems
 wrong for me.

Fix regression caused by commmit c413b9b94d9a8e7548cc4b2e04b7df0439ce76fd
(ide: add struct ide_port_info instances to legacy host drivers).

Reported-by: Atsushi Nemoto [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/ide-probe.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 6daea89..d6d3330 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1355,7 +1355,7 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int 
port,
hwif-ultra_mask = d-udma_mask;
 
/* reset DMA masks only for SFF-style DMA controllers */
-   if ((d-host_flags  IDE_HFLAG_NO_DMA) == 0  hwif-dma_base == 0)
+   if ((d-host_flags  IDE_HFLAG_NO_DMA) == 0  hwif-dma_base == 0)
hwif-swdma_mask = hwif-mwdma_mask = hwif-ultra_mask = 0;
 
if (d-host_flags  IDE_HFLAG_RQSIZE_256)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ide-disk: fix flush requests (take 2)

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=395d8ef5bebe547a80737692f9789d2e36da16f2
Commit: 395d8ef5bebe547a80737692f9789d2e36da16f2
Parent: 8e882ba111bb52fbb42c34a265afb97ddd4fcea1
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:14 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:14 2008 +0100

ide-disk: fix flush requests (take 2)

commit 813a0eb233ee67d7166241a8b389b6a76f2247f9
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
Date:   Fri Jan 25 22:17:10 2008 +0100

ide: switch idedisk_prepare_flush() to use REQ_TYPE_ATA_TASKFILE 
requests

...

broke flush requests.

Allocating IDE command structure on the stack for flush requests is not
a very brilliant idea:

- idedisk_prepare_flush() only prepares the request and it doesn't wait
  for it to be completed

- there are can be multiple flush requests queued in the queue

Fix the problem (per hints from James Bottomley) by:
- dynamically allocating ide_task_t instance using kmalloc(..., GFP_ATOMIC)
- adding new taskfile flag (IDE_TFLAG_DYN)
- calling kfree() in ide_end_drive_command() if IDE_TFLAG_DYN is set
  (while at it rename 'args' to 'task' and fix whitespace damage)

[ This will be fixed properly before 2.6.25 but this bug is rather
  critical and the proper solution requires some more work + testing. ]

Thanks to Sebastian Siewior and Christoph Hellwig for reporting the
problem and testing patches (extra thanks to Sebastian for bisecting
it to the guilty commmit).

Tested-by: Sebastian Siewior [EMAIL PROTECTED]
Cc: Christoph Hellwig [EMAIL PROTECTED]
Cc: James Bottomley [EMAIL PROTECTED]
Cc: Jens Axboe [EMAIL PROTECTED]
Cc: Tejun Heo [EMAIL PROTECTED]
Cc: Sergei Shtylyov [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/ide-disk.c |   18 +++---
 drivers/ide/ide-io.c   |   16 ++--
 include/linux/ide.h|2 ++
 3 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 3c69822..aed8b31 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -590,20 +590,24 @@ static ide_proc_entry_t idedisk_proc[] = {
 static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
 {
ide_drive_t *drive = q-queuedata;
-   ide_task_t task;
+   ide_task_t *task = kmalloc(sizeof(*task), GFP_ATOMIC);
 
-   memset(task, 0, sizeof(task));
+   /* FIXME: map struct ide_taskfile on rq-cmd[] */
+   BUG_ON(task == NULL);
+
+   memset(task, 0, sizeof(*task));
if (ide_id_has_flush_cache_ext(drive-id) 
(drive-capacity64 = (1UL  28)))
-   task.tf.command = WIN_FLUSH_CACHE_EXT;
+   task-tf.command = WIN_FLUSH_CACHE_EXT;
else
-   task.tf.command = WIN_FLUSH_CACHE;
-   task.tf_flags   = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE;
-   task.data_phase = TASKFILE_NO_DATA;
+   task-tf.command = WIN_FLUSH_CACHE;
+   task-tf_flags   = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE |
+  IDE_TFLAG_DYN;
+   task-data_phase = TASKFILE_NO_DATA;
 
rq-cmd_type = REQ_TYPE_ATA_TASKFILE;
rq-cmd_flags |= REQ_SOFTBARRIER;
-   rq-special = task;
+   rq-special = task;
 }
 
 /*
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index e41383f..7153796 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -361,17 +361,21 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 
err)
spin_unlock_irqrestore(ide_lock, flags);
 
if (rq-cmd_type == REQ_TYPE_ATA_TASKFILE) {
-   ide_task_t *args = (ide_task_t *) rq-special;
+   ide_task_t *task = (ide_task_t *)rq-special;
+
if (rq-errors == 0)
-   rq-errors = !OK_STAT(stat,READY_STAT,BAD_STAT);
-   
-   if (args) {
-   struct ide_taskfile *tf = args-tf;
+   rq-errors = !OK_STAT(stat, READY_STAT, BAD_STAT);
+
+   if (task) {
+   struct ide_taskfile *tf = task-tf;
 
tf-error = err;
tf-status = stat;
 
-   ide_tf_read(drive, args);
+   ide_tf_read(drive, task);
+
+   if (task-tf_flags  IDE_TFLAG_DYN)
+   kfree(task);
}
} else if (blk_pm_request(rq)) {
struct request_pm_state *pm = rq-data;
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 40a01c3..23fad89 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -906,6 +906,8 @@ enum {
 

bast-ide: build fix

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b56a937a17d21a266dd0a24053f951f3a92e428
Commit: 7b56a937a17d21a266dd0a24053f951f3a92e428
Parent: 31cb2120270cb43403428de67d8cb5caeb58dfd2
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:14 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:14 2008 +0100

bast-ide: build fix

On Saturday 09 February 2008, Adrian Bunk wrote:
 Commit 9e016a719209d95338e314b46c3012cc7feaaeec causes the following
 compile error:

 --  snip  --

 ...
   CC  drivers/ide/arm/bast-ide.o
 /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/ide/arm/bast-ide.c: In 
function 'bastide_register':
 /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/ide/arm/bast-ide.c:31: 
error: 'hwif' redeclared as different kind of symbol
 /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/ide/arm/bast-ide.c:29: 
error: previous definition of 'hwif' was here
 make[4]: *** [drivers/ide/arm/bast-ide.o] Error 1

 --  snip  --

Remove 'ide_hwif_t **hwif' argument from bastide_register()
(together with write-only ifs[]).

Cc: Adrian Bunk [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Acked-by: Sergei Shtylyov [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/arm/bast-ide.c |   12 
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c
index 0e7574c..161d30c 100644
--- a/drivers/ide/arm/bast-ide.c
+++ b/drivers/ide/arm/bast-ide.c
@@ -21,12 +21,7 @@
 #include asm/arch/bast-map.h
 #include asm/arch/bast-irq.h
 
-/* list of registered interfaces */
-static ide_hwif_t *ifs[2];
-
-static int __init
-bastide_register(unsigned int base, unsigned int aux, int irq,
-ide_hwif_t **hwif)
+static int __init bastide_register(unsigned int base, unsigned int aux, int 
irq)
 {
ide_hwif_t *hwif;
hw_regs_t hw;
@@ -76,8 +71,9 @@ static int __init bastide_init(void)
 
printk(BAST: IDE driver, (c) 2003-2004 Simtec Electronics\n);
 
-   bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0, ifs[0]);
-   bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1, ifs[1]);
+   bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0);
+   bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1);
+
return 0;
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


palm_bk3710: port initialization/probing bugfix

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c92a7f1d8254fabd99df33af59094935fc2cfe32
Commit: c92a7f1d8254fabd99df33af59094935fc2cfe32
Parent: d4452be757b5b94b2d39c5c254743caee913915e
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:13 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:13 2008 +0100

palm_bk3710: port initialization/probing bugfix

Probe port _after_ it is fully initialized.

Cc: Anton Salnikov [EMAIL PROTECTED]
Acked-by: Sergei Shtylyov [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/arm/palm_bk3710.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c
index 0ce95c1..8e40bdb 100644
--- a/drivers/ide/arm/palm_bk3710.c
+++ b/drivers/ide/arm/palm_bk3710.c
@@ -370,13 +370,6 @@ static int __devinit palm_bk3710_probe(struct 
platform_device *pdev)
ide_init_port_hw(hwif, hw);
hwif-quirkproc = NULL;
 
-   idx[0] = i;
-
-   ide_device_add(idx, NULL);
-
-   if (!hwif-present)
-   goto out;
-
hwif-set_pio_mode = palm_bk3710_set_pio_mode;
hwif-set_dma_mode = palm_bk3710_set_dma_mode;
hwif-mmio = 1;
@@ -390,6 +383,13 @@ static int __devinit palm_bk3710_probe(struct 
platform_device *pdev)
 
ide_setup_dma(hwif, mem-start);
 
+   idx[0] = i;
+
+   ide_device_add(idx, NULL);
+
+   if (!hwif-present)
+   goto out;
+
return 0;
 out:
printk(KERN_WARNING Palm Chip BK3710 IDE Register Fail\n);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


palm_bk3710: fix ide_unregister() usage

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d4452be757b5b94b2d39c5c254743caee913915e
Commit: d4452be757b5b94b2d39c5c254743caee913915e
Parent: 7824bc6b474caca6d74489498d9c2c2dfcc86d10
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:12 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:12 2008 +0100

palm_bk3710: fix ide_unregister() usage

Don't set 'restore' flag for ide_unregister() when initializing new
interface.

[ identical change as done to bast-ide/ide-cs/delkin_cb host drivers
  by commit 909f4369bca30f9a186316a3bf2b4a9c1e702a25 ]

Cc: Anton Salnikov [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/arm/palm_bk3710.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c
index 0802966..0ce95c1 100644
--- a/drivers/ide/arm/palm_bk3710.c
+++ b/drivers/ide/arm/palm_bk3710.c
@@ -363,7 +363,7 @@ static int __devinit palm_bk3710_probe(struct 
platform_device *pdev)
i = hwif-index;
 
if (hwif-present)
-   ide_unregister(i, 0, 1);
+   ide_unregister(i, 0, 0);
else if (!hwif-hold)
ide_init_port_data(hwif, i);
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ide: another possible ide panic fix for blk-end-request

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b0e044d5a881c937293a045158149514b86783c
Commit: 3b0e044d5a881c937293a045158149514b86783c
Parent: 0eccf60bfa9190d1588b2bf07d23d7b9b3a19d9e
Author: Kiyoshi Ueda [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:11 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:11 2008 +0100

ide: another possible ide panic fix for blk-end-request

I have reviewed all blk-end-request patches again to confirm whether
there are any similar problems with the last week's ide-cd panic:
http://lkml.org/lkml/2008/1/29/140

And I found a possible similar bug in ide-io change:
ide_end_drive_cmd() could be called for blk_pc_request() which could
have bios.  To complete such requests correctly, we need to pass
the actual size of the request.
Otherwise, __blk_end_request() returns 1 because the request still has
bios, and the system will BUG() unnecessarily.

The following patch fixes the bug and should be applied on top of
Linus' git.

Signed-off-by: Kiyoshi Ueda [EMAIL PROTECTED]
Signed-off-by: Jun'ichi Nomura [EMAIL PROTECTED]
Cc: Borislav Petkov [EMAIL PROTECTED]
Cc: Jens Axboe [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/ide-io.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 3addbe4..e41383f 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -388,7 +388,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
spin_lock_irqsave(ide_lock, flags);
HWGROUP(drive)-rq = NULL;
rq-errors = err;
-   if (__blk_end_request(rq, (rq-errors ? -EIO : 0), 0))
+   if (unlikely(__blk_end_request(rq, (rq-errors ? -EIO : 0),
+  blk_rq_bytes(rq
BUG();
spin_unlock_irqrestore(ide_lock, flags);
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IA64] Fix build for sim_defconfig

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10d0aa3c0a03dd04227ab3a4958563d84276d02e
Commit: 10d0aa3c0a03dd04227ab3a4958563d84276d02e
Parent: 19af35546de68c872dcb687613e0902a602cb20e
Author: Tony Luck [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 13:23:46 2008 -0800
Committer:  Tony Luck [EMAIL PROTECTED]
CommitDate: Mon Feb 11 13:23:46 2008 -0800

[IA64] Fix build for sim_defconfig

Commit bdc807871d58285737d50dc6163d0feb72cb0dc2 broke the build
for this config because the sim_defconfig selects CONFIG_HZ=250
but include/asm-ia64/param.h has an ifdef for the simulator to
force HZ to 32.  So we ended up with a kernel/timeconst.h set
for HZ=250 ... which then failed the check for the right HZ
value and died with:

Drop the #ifdef magic from param.h and make force CONFIG_HZ=32
directly for the simulator.

Signed-off-by: Tony Luck [EMAIL PROTECTED]
---
 arch/ia64/Kconfig|7 +++
 include/asm-ia64/param.h |   10 +-
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 2d4fcd0..dff9edf 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -232,7 +232,14 @@ config PGTABLE_4
 
 endchoice
 
+if IA64_HP_SIM
+config HZ
+   default 32
+endif
+
+if !IA64_HP_SIM
 source kernel/Kconfig.hz
+endif
 
 config IA64_BRL_EMU
bool
diff --git a/include/asm-ia64/param.h b/include/asm-ia64/param.h
index 49c62dd..0964c32 100644
--- a/include/asm-ia64/param.h
+++ b/include/asm-ia64/param.h
@@ -19,15 +19,7 @@
 #define MAXHOSTNAMELEN 64  /* max length of hostname */
 
 #ifdef __KERNEL__
-# ifdef CONFIG_IA64_HP_SIM
-  /*
-   * Yeah, simulating stuff is slow, so let us catch some breath between
-   * timer interrupts...
-   */
-#  define HZ 32
-# else
-#  define HZ   CONFIG_HZ
-# endif
+# define HZCONFIG_HZ
 # define USER_HZ   HZ
 # define CLOCKS_PER_SECHZ  /* frequency at which times() counts */
 #else
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pata_ninja32: setup changes

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4194645079ca15679bf7e5b00e71561cf6864761
Commit: 4194645079ca15679bf7e5b00e71561cf6864761
Parent: 8397248d4662d77296889529c911e2182151afa9
Author: Alan Cox [EMAIL PROTECTED]
AuthorDate: Fri Feb 8 15:25:10 2008 +
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Mon Feb 11 14:30:07 2008 -0500

pata_ninja32: setup changes

Forcibly set more of the configuration at init time. This seems to fix at
least one problem reported. We don't know what most of these bits do, but
we do know what windows stuffs there.

Signed-off-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/pata_ninja32.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c
index 1c1b835..15dd649 100644
--- a/drivers/ata/pata_ninja32.c
+++ b/drivers/ata/pata_ninja32.c
@@ -17,6 +17,7 @@
  * Base + 0x00 IRQ Status
  * Base + 0x01 IRQ control
  * Base + 0x02 Chipset control
+ * Base + 0x03 Unknown
  * Base + 0x04 VDMA and reset control + wait bits
  * Base + 0x08 BMIMBA
  * Base + 0x0C DMA Length
@@ -174,8 +175,12 @@ static int ninja32_init_one(struct pci_dev *dev, const 
struct pci_device_id *id)
ata_std_ports(ap-ioaddr);
 
iowrite8(0x05, base + 0x01);/* Enable interrupt lines */
-   iowrite8(0xB3, base + 0x02);/* Burst, ?? setup */
-   iowrite8(0x00, base + 0x04);/* WAIT0 ? */
+   iowrite8(0xBE, base + 0x02);/* Burst, ?? setup */
+   iowrite8(0x01, base + 0x03);/* Unknown */
+   iowrite8(0x20, base + 0x04);/* WAIT0 */
+   iowrite8(0x8f, base + 0x05);/* Unknown */
+   iowrite8(0xa4, base + 0x1c);/* Unknown */
+   iowrite8(0x83, base + 0x1d);/* BMDMA control: WAIT0 */
/* FIXME: Should we disable them at remove ? */
return ata_host_activate(host, dev-irq, ata_interrupt,
 IRQF_SHARED, ninja32_sht);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pata_legacy: typo fix

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8397248d4662d77296889529c911e2182151afa9
Commit: 8397248d4662d77296889529c911e2182151afa9
Parent: c9544bcb4c7df07555e4b22d297c5705738da09d
Author: Alan Cox [EMAIL PROTECTED]
AuthorDate: Fri Feb 8 15:23:38 2008 +
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Mon Feb 11 14:30:06 2008 -0500

pata_legacy: typo fix

Signed-off-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/pata_legacy.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 333dc15..6c59969 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -127,7 +127,7 @@ static int opti82c611a; /* Opti82c611A on 
primary 1, sec 2, both 3 */
 static int opti82c46x; /* Opti 82c465MV present(pri/sec autodetect) */
 static int qdi;/* Set to probe QDI controllers */
 static int winbond;/* Set to probe Winbond controllers,
-   give I/O port if non stdanard */
+   give I/O port if non standard */
 static int autospeed;  /* Chip present which snoops speed changes */
 static int pio_mask = 0x1F;/* PIO range for autospeed devices */
 static int iordy_mask = 0x;/* Use iordy if available */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


libata: ignore deverr on SETXFER if mode is configured

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4055dee7f525a702a060ea08a3fb9f045317355f
Commit: 4055dee7f525a702a060ea08a3fb9f045317355f
Parent: 7585eb1b7cf4bbace37ce18500809140c8eeccc3
Author: Tejun Heo [EMAIL PROTECTED]
AuthorDate: Thu Feb 7 10:34:08 2008 +0900
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Mon Feb 11 14:29:47 2008 -0500

libata: ignore deverr on SETXFER if mode is configured

Some controllers (VIA CX700) raise device error on SETXFER even after
mode configuration succeeded.  Update ata_dev_set_mode() such that
device error is ignored if transfer mode is configured correctly.  To
implement this, device is revalidated even after device error on
SETXFER.

This fixes kernel bugzilla bug 8563.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/libata-core.c |   48 ++--
 1 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3011919..004dae4 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3048,6 +3048,8 @@ int ata_down_xfermask_limit(struct ata_device *dev, 
unsigned int sel)
 static int ata_dev_set_mode(struct ata_device *dev)
 {
struct ata_eh_context *ehc = dev-link-eh_context;
+   const char *dev_err_whine = ;
+   int ign_dev_err = 0;
unsigned int err_mask;
int rc;
 
@@ -3057,41 +3059,57 @@ static int ata_dev_set_mode(struct ata_device *dev)
 
err_mask = ata_dev_set_xfermode(dev);
 
+   if (err_mask  ~AC_ERR_DEV)
+   goto fail;
+
+   /* revalidate */
+   ehc-i.flags |= ATA_EHI_POST_SETMODE;
+   rc = ata_dev_revalidate(dev, ATA_DEV_UNKNOWN, 0);
+   ehc-i.flags = ~ATA_EHI_POST_SETMODE;
+   if (rc)
+   return rc;
+
/* Old CFA may refuse this command, which is just fine */
if (dev-xfer_shift == ATA_SHIFT_PIO  ata_id_is_cfa(dev-id))
-   err_mask = ~AC_ERR_DEV;
+   ign_dev_err = 1;
 
/* Some very old devices and some bad newer ones fail any kind of
   SET_XFERMODE request but support PIO0-2 timings and no IORDY */
if (dev-xfer_shift == ATA_SHIFT_PIO  !ata_id_has_iordy(dev-id) 
dev-pio_mode = XFER_PIO_2)
-   err_mask = ~AC_ERR_DEV;
+   ign_dev_err = 1;
 
/* Early MWDMA devices do DMA but don't allow DMA mode setting.
   Don't fail an MWDMA0 set IFF the device indicates it is in MWDMA0 */
if (dev-xfer_shift == ATA_SHIFT_MWDMA 
dev-dma_mode == XFER_MW_DMA_0 
(dev-id[63]  8)  1)
-   err_mask = ~AC_ERR_DEV;
+   ign_dev_err = 1;
 
-   if (err_mask) {
-   ata_dev_printk(dev, KERN_ERR, failed to set xfermode 
-  (err_mask=0x%x)\n, err_mask);
-   return -EIO;
-   }
+   /* if the device is actually configured correctly, ignore dev err */
+   if (dev-xfer_mode == ata_xfer_mask2mode(ata_id_xfermask(dev-id)))
+   ign_dev_err = 1;
 
-   ehc-i.flags |= ATA_EHI_POST_SETMODE;
-   rc = ata_dev_revalidate(dev, ATA_DEV_UNKNOWN, 0);
-   ehc-i.flags = ~ATA_EHI_POST_SETMODE;
-   if (rc)
-   return rc;
+   if (err_mask  AC_ERR_DEV) {
+   if (!ign_dev_err)
+   goto fail;
+   else
+   dev_err_whine =  (device error ignored);
+   }
 
DPRINTK(xfer_shift=%u, xfer_mode=0x%x\n,
dev-xfer_shift, (int)dev-xfer_mode);
 
-   ata_dev_printk(dev, KERN_INFO, configured for %s\n,
-  ata_mode_string(ata_xfer_mode2mask(dev-xfer_mode)));
+   ata_dev_printk(dev, KERN_INFO, configured for %s%s\n,
+  ata_mode_string(ata_xfer_mode2mask(dev-xfer_mode)),
+  dev_err_whine);
+
return 0;
+
+ fail:
+   ata_dev_printk(dev, KERN_ERR, failed to set xfermode 
+  (err_mask=0x%x)\n, err_mask);
+   return -EIO;
 }
 
 /**
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Make topology fallback macros reference their arguments.

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=271cad6d7e91ff8eea18976311692f99cd667ad3
Commit: 271cad6d7e91ff8eea18976311692f99cd667ad3
Parent: 81772fea4110f7ce8083d52503c9c4ddaa50f75b
Author: Andi Kleen [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 20:03:17 2008 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Feb 11 20:37:29 2008 -0800

Make topology fallback macros reference their arguments.

This avoids warnings with unreferenced variables in the !NUMA case.

Signed-off-by: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-generic/topology.h |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
index 5d9d70c..342a2a0 100644
--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -30,19 +30,19 @@
 /* Other architectures wishing to use this simple topology API should fill
in the below functions as appropriate in their own asm/topology.h file. */
 #ifndef cpu_to_node
-#define cpu_to_node(cpu)   (0)
+#define cpu_to_node(cpu)   ((void)(cpu),0)
 #endif
 #ifndef parent_node
-#define parent_node(node)  (0)
+#define parent_node(node)  ((void)(node),0)
 #endif
 #ifndef node_to_cpumask
-#define node_to_cpumask(node)  (cpu_online_map)
+#define node_to_cpumask(node)  ((void)node, cpu_online_map)
 #endif
 #ifndef node_to_first_cpu
-#define node_to_first_cpu(node)(0)
+#define node_to_first_cpu(node)((void)(node),0)
 #endif
 #ifndef pcibus_to_node
-#define pcibus_to_node(node)   (-1)
+#define pcibus_to_node(bus)((void)(bus), -1)
 #endif
 
 #ifndef pcibus_to_cpumask
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


NLM: don't requeue block if it was invalidated while GRANT_MSG was in flight

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c64e80d55db81df22a7f25b75ab4ba4c55db4749
Commit: c64e80d55db81df22a7f25b75ab4ba4c55db4749
Parent: 9706501e43a80ce48b319214a0a9e562deded35b
Author: Jeff Layton [EMAIL PROTECTED]
AuthorDate: Wed Feb 6 11:34:13 2008 -0500
Committer:  J. Bruce Fields [EMAIL PROTECTED]
CommitDate: Sun Feb 10 18:09:36 2008 -0500

NLM: don't requeue block if it was invalidated while GRANT_MSG was in flight

It's possible for lockd to catch a SIGKILL while a GRANT_MSG callback
is in flight. If this happens we don't want lockd to insert the block
back into the nlm_blocked list.

This helps that situation, but there's still a possible race. Fixing
that will mean adding real locking for nlm_blocked.

Signed-off-by: Jeff Layton [EMAIL PROTECTED]
Signed-off-by: J. Bruce Fields [EMAIL PROTECTED]
---
 fs/lockd/svclock.c |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 82db7b3..fe9bdb4 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -795,6 +795,17 @@ static void nlmsvc_grant_callback(struct rpc_task *task, 
void *data)
 
dprintk(lockd: GRANT_MSG RPC callback\n);
 
+   /* if the block is not on a list at this point then it has
+* been invalidated. Don't try to requeue it.
+*
+* FIXME: it's possible that the block is removed from the list
+* after this check but before the nlmsvc_insert_block. In that
+* case it will be added back. Perhaps we need better locking
+* for nlm_blocked?
+*/
+   if (list_empty(block-b_list))
+   return;
+
/* Technically, we should down the file semaphore here. Since we
 * move the block towards the head of the queue only, no harm
 * can be done, though. */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


palm_bk3710: ide_register_hw() - ide_device_add()

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7824bc6b474caca6d74489498d9c2c2dfcc86d10
Commit: 7824bc6b474caca6d74489498d9c2c2dfcc86d10
Parent: d30a426dc5fd8801dbd05485788a001de623d487
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:12 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:12 2008 +0100

palm_bk3710: ide_register_hw() - ide_device_add()

* Convert palm_bk3710 host driver to use ide_device_add() instead of
  ide_register_hw() (while at it drop doing ide_unregister() loop which
  tries to unregister _all_ IDE interfaces if useable ide_hwifs[] slot
  cannot be find).

  [ identical change as done to bast-ide/ide-cs/delkin_cb host drivers
by commit 9e016a719209d95338e314b46c3012cc7feaaeec ]

* Rename 'ide_ctlr_info' to 'hw' and 'index' to 'i' while at it.

Cc: Anton Salnikov [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/arm/palm_bk3710.c |   45 +---
 1 files changed, 32 insertions(+), 13 deletions(-)

diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c
index c306997..0802966 100644
--- a/drivers/ide/arm/palm_bk3710.c
+++ b/drivers/ide/arm/palm_bk3710.c
@@ -313,13 +313,13 @@ static void __devinit palm_bk3710_chipinit(void __iomem 
*base)
 }
 static int __devinit palm_bk3710_probe(struct platform_device *pdev)
 {
-   hw_regs_t ide_ctlr_info;
-   int index = 0;
-   int pribase;
struct clk *clkp;
struct resource *mem, *irq;
ide_hwif_t *hwif;
void __iomem *base;
+   int pribase, i;
+   hw_regs_t hw;
+   u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
 
clkp = clk_get(NULL, IDECLK);
if (IS_ERR(clkp))
@@ -330,7 +330,7 @@ static int __devinit palm_bk3710_probe(struct 
platform_device *pdev)
ide_palm_clk = clk_get_rate(ideclkp)/10;
ide_palm_clk = (1/ide_palm_clk) + 1;
/* Register the IDE interface with Linux ATA Interface */
-   memset(ide_ctlr_info, 0, sizeof(ide_ctlr_info));
+   memset(hw, 0, sizeof(hw));
 
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (mem == NULL) {
@@ -349,17 +349,33 @@ static int __devinit palm_bk3710_probe(struct 
platform_device *pdev)
palm_bk3710_chipinit(base);
 
pribase = mem-start + IDE_PALM_ATA_PRI_REG_OFFSET;
-   for (index = 0; index  IDE_NR_PORTS - 2; index++)
-   ide_ctlr_info.io_ports[index] = pribase + index;
-   ide_ctlr_info.io_ports[IDE_CONTROL_OFFSET] = mem-start +
+   for (i = 0; i  IDE_NR_PORTS - 2; i++)
+   hw.io_ports[i] = pribase + i;
+   hw.io_ports[IDE_CONTROL_OFFSET] = mem-start +
IDE_PALM_ATA_PRI_CTL_OFFSET;
-   ide_ctlr_info.irq = irq-start;
-   ide_ctlr_info.chipset = ide_palm3710;
+   hw.irq = irq-start;
+   hw.chipset = ide_palm3710;
 
-   if (ide_register_hw(ide_ctlr_info, NULL, hwif)  0) {
-   printk(KERN_WARNING Palm Chip BK3710 IDE Register Fail\n);
-   return -ENODEV;
-   }
+   hwif = ide_deprecated_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+   if (hwif == NULL)
+   goto out;
+
+   i = hwif-index;
+
+   if (hwif-present)
+   ide_unregister(i, 0, 1);
+   else if (!hwif-hold)
+   ide_init_port_data(hwif, i);
+
+   ide_init_port_hw(hwif, hw);
+   hwif-quirkproc = NULL;
+
+   idx[0] = i;
+
+   ide_device_add(idx, NULL);
+
+   if (!hwif-present)
+   goto out;
 
hwif-set_pio_mode = palm_bk3710_set_pio_mode;
hwif-set_dma_mode = palm_bk3710_set_dma_mode;
@@ -375,6 +391,9 @@ static int __devinit palm_bk3710_probe(struct 
platform_device *pdev)
ide_setup_dma(hwif, mem-start);
 
return 0;
+out:
+   printk(KERN_WARNING Palm Chip BK3710 IDE Register Fail\n);
+   return -ENODEV;
 }
 
 static struct platform_driver platform_bk_driver = {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ide: remove stale version number

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=eba8ff946177ca38dfde0bf1d8ce0703c45c49b9
Commit: eba8ff946177ca38dfde0bf1d8ce0703c45c49b9
Parent: cfa2771bc511017159ea076965fe385101e03798
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:13 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:13 2008 +0100

ide: remove stale version number

On Thursday 03 January 2008, Robert Hancock wrote:

[...]

 How about getting rid of this stupid thing in drivers/ide/ide.c:

 #define   REVISIONRevision: 7.00alpha2

 which is used in:

 printk(KERN_INFO Uniform Multi-Platform E-IDE driver  REVISION \n);

 It's been 7.00alpha2 for god knows how long, so clearly this version
 number is not useful..

Cc: Robert Hancock [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/ide.c |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index ad0e995..4a8952a 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -44,8 +44,6 @@
  *  inspiration from lots of linux users, esp.  [EMAIL PROTECTED]
  */
 
-#defineREVISIONRevision: 7.00alpha2
-
 #define _IDE_C /* Tell ide.h it's really us */
 
 #include linux/module.h
@@ -1618,7 +1616,7 @@ static int __init ide_init(void)
 {
int ret;
 
-   printk(KERN_INFO Uniform Multi-Platform E-IDE driver  REVISION \n);
+   printk(KERN_INFO Uniform Multi-Platform E-IDE driver\n);
system_bus_speed = ide_system_bus_speed();
 
printk(KERN_INFO ide: Assuming %dMHz system bus speed 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ide-tape: remove never executed code

2008-02-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=31cb2120270cb43403428de67d8cb5caeb58dfd2
Commit: 31cb2120270cb43403428de67d8cb5caeb58dfd2
Parent: 56efa7b0e437808d367a92f7820b3aba930c230d
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Feb 11 00:32:14 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Feb 11 00:32:14 2008 +0100

ide-tape: remove never executed code

rq-cmd[0] is never set to REQ_IDETAPE_READ_BUFFER so remove
REQ_IDETAPE_READ_BUFFER handling from idetape_create_write_cmd()
and the define itself.

Then remove no longer used idetape_create_read_buffer_cmd()
and IDETAPE_RETRIEVE_FAULTY_BLOCK define.

There should be no functional changes caused by this patch.

Cc: Borislav Petkov [EMAIL PROTECTED]
Acked-by: Sergei Shtylyov [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/ide-tape.c |   34 --
 1 files changed, 0 insertions(+), 34 deletions(-)

diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 49dd2e7..0598ecf 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -466,9 +466,6 @@ static void ide_tape_put(struct ide_tape_obj *tape)
 /* 0 = no tape is loaded, so we don't rewind after ejecting */
 #define IDETAPE_MEDIUM_PRESENT 9
 
-/* A define for the READ BUFFER command */
-#define IDETAPE_RETRIEVE_FAULTY_BLOCK  6
-
 /* Some defines for the SPACE command */
 #define IDETAPE_SPACE_OVER_FILEMARK1
 #define IDETAPE_SPACE_TO_EOD   3
@@ -490,7 +487,6 @@ enum {
REQ_IDETAPE_PC2 = (1  1), /* packet command (second stage) */
REQ_IDETAPE_READ= (1  2),
REQ_IDETAPE_WRITE   = (1  3),
-   REQ_IDETAPE_READ_BUFFER = (1  4),
 };
 
 /* Error codes returned in rq-errors to the higher part of the driver. */
@@ -1523,29 +1519,6 @@ static void idetape_create_read_cmd(idetape_tape_t 
*tape, idetape_pc_t *pc,
set_bit(PC_DMA_RECOMMENDED, pc-flags);
 }
 
-static void idetape_create_read_buffer_cmd(idetape_tape_t *tape,
-   idetape_pc_t *pc, struct idetape_bh *bh)
-{
-   int size = 32768;
-   struct idetape_bh *p = bh;
-
-   idetape_init_pc(pc);
-   pc-c[0] = READ_BUFFER;
-   pc-c[1] = IDETAPE_RETRIEVE_FAULTY_BLOCK;
-   pc-c[7] = size  8;
-   pc-c[8] = size  0xff;
-   pc-callback = idetape_pc_callback;
-   pc-bh = bh;
-   atomic_set(bh-b_count, 0);
-   pc-buffer = NULL;
-   while (p) {
-   atomic_set(p-b_count, 0);
-   p = p-b_reqnext;
-   }
-   pc-request_transfer = size;
-   pc-buffer_size = size;
-}
-
 static void idetape_create_write_cmd(idetape_tape_t *tape, idetape_pc_t *pc,
unsigned int length, struct idetape_bh *bh)
 {
@@ -1655,13 +1628,6 @@ static ide_startstop_t idetape_do_request(ide_drive_t 
*drive,
 (struct idetape_bh *)rq-special);
goto out;
}
-   if (rq-cmd[0]  REQ_IDETAPE_READ_BUFFER) {
-   tape-postpone_cnt = 0;
-   pc = idetape_next_pc_storage(drive);
-   idetape_create_read_buffer_cmd(tape, pc,
-   (struct idetape_bh *)rq-special);
-   goto out;
-   }
if (rq-cmd[0]  REQ_IDETAPE_PC1) {
pc = (idetape_pc_t *) rq-buffer;
rq-cmd[0] = ~(REQ_IDETAPE_PC1);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


x25_asy.c: silence compiler warning

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=91a0736531c3c8a6ce49ac2a0dec0c83125936e1
Commit: 91a0736531c3c8a6ce49ac2a0dec0c83125936e1
Parent: 531021f2ca681faf58f926771f85bb5c76f13eba
Author: S.Çağlar Onur [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 05:06:25 2008 +0200
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Sat Feb 9 23:27:01 2008 -0800

x25_asy.c: silence compiler warning

Commit 11b0cc3a4af65413ca3bb5698769e091486e0b22 (x25_asy: Fix ref count
rule violation) introduced the warning

  drivers/net/wan/x25_asy.c: In function `x25_asy_open_tty':
  drivers/net/wan/x25_asy.c:557: warning: unused variable `ld'

Signed-off-by: S.Çağlar Onur [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/net/wan/x25_asy.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 5e2d763..0f8aca8 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -554,7 +554,6 @@ static void x25_asy_receive_buf(struct tty_struct *tty, 
const unsigned char *cp,
 static int x25_asy_open_tty(struct tty_struct *tty)
 {
struct x25_asy *sl = (struct x25_asy *) tty-disc_data;
-   struct tty_ldisc *ld;
int err;
 
/* First make sure we're not already connected. */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


rtc-r9701.c: silence compiler warning

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9820380a387b1135eace699270e795e3f51fc5dd
Commit: 9820380a387b1135eace699270e795e3f51fc5dd
Parent: 91a0736531c3c8a6ce49ac2a0dec0c83125936e1
Author: S.Çağlar Onur [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 05:10:48 2008 +0200
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Sat Feb 9 23:27:01 2008 -0800

rtc-r9701.c: silence compiler warning

Commit 75b6102257874a4ea796af686de2f72cfa0452f9 (rtc: add support for
Epson RTC-9701JE V4) introduced the warning

  drivers/rtc/rtc-r9701.c: In function `r9701_get_datetime':
  drivers/rtc/rtc-r9701.c:74: warning: unused variable `time'

Signed-off-by: S.Çağlar Onur [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/rtc/rtc-r9701.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c
index a64626a..b35f9bf 100644
--- a/drivers/rtc/rtc-r9701.c
+++ b/drivers/rtc/rtc-r9701.c
@@ -71,7 +71,6 @@ static int read_regs(struct device *dev, unsigned char *regs, 
int no_regs)
 
 static int r9701_get_datetime(struct device *dev, struct rtc_time *dt)
 {
-   unsigned long time;
int ret;
unsigned char buf[] = { RSECCNT, RMINCNT, RHRCNT,
RDAYCNT, RMONCNT, RYRCNT };
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Update arch/x86/boot/.gitignore with new auto-generated files

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b3563297341a7abd60566fce67c96a71e785200
Commit: 3b3563297341a7abd60566fce67c96a71e785200
Parent: 9820380a387b1135eace699270e795e3f51fc5dd
Author: S.Çağlar Onur [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 05:18:08 2008 +0200
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Sat Feb 9 23:27:01 2008 -0800

Update arch/x86/boot/.gitignore with new auto-generated files

Signed-off-by: S.Çağlar Onur [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/x86/boot/.gitignore |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/boot/.gitignore b/arch/x86/boot/.gitignore
index 1846514..b1bdc4c 100644
--- a/arch/x86/boot/.gitignore
+++ b/arch/x86/boot/.gitignore
@@ -3,3 +3,5 @@ bzImage
 setup
 setup.bin
 setup.elf
+cpustr.h
+mkcpustr
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Update kernel/.gitignore with new auto-generated files

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c1cb795338b17f12f3a966a74f199f640714a69d
Commit: c1cb795338b17f12f3a966a74f199f640714a69d
Parent: 3b3563297341a7abd60566fce67c96a71e785200
Author: S.Çağlar Onur [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 05:19:03 2008 +0200
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Sat Feb 9 23:27:01 2008 -0800

Update kernel/.gitignore with new auto-generated files

Signed-off-by: S.Çağlar Onur [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/.gitignore |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/.gitignore b/kernel/.gitignore
index f2ab700..ab4f109 100644
--- a/kernel/.gitignore
+++ b/kernel/.gitignore
@@ -3,3 +3,4 @@
 #
 config_data.h
 config_data.gz
+timeconst.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


drivers/media/video/em28xx/: Fix undefined symbol error with CONFIG_SND=N

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=95a940e9e1d63c2bff170fcd59ab4e1b5c4c602d
Commit: 95a940e9e1d63c2bff170fcd59ab4e1b5c4c602d
Parent: c1cb795338b17f12f3a966a74f199f640714a69d
Author: S.Çağlar Onur [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 05:27:23 2008 +0200
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Sat Feb 9 23:27:01 2008 -0800

drivers/media/video/em28xx/: Fix undefined symbol error with CONFIG_SND=N

Without this you get undefined symbol errors with CONFIG_SND=N:

  ERROR: snd_pcm_period_elapsed 
[drivers/media/video/em28xx/em28xx-alsa.ko] undefined!
  ERROR: snd_pcm_hw_constraint_integer 
[drivers/media/video/em28xx/em28xx-alsa.ko] undefined!
  ERROR: snd_pcm_set_ops [drivers/media/video/em28xx/em28xx-alsa.ko] 
undefined!
  ERROR: snd_pcm_lib_ioctl [drivers/media/video/em28xx/em28xx-alsa.ko] 
undefined!
  ERROR: snd_card_new [drivers/media/video/em28xx/em28xx-alsa.ko] 
undefined!
  ERROR: snd_card_free [drivers/media/video/em28xx/em28xx-alsa.ko] 
undefined!
  ERROR: snd_card_register [drivers/media/video/em28xx/em28xx-alsa.ko] 
undefined!
  ERROR: snd_pcm_new [drivers/media/video/em28xx/em28xx-alsa.ko] 
undefined!

Signed-off-by: S.Çağlar Onur [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/media/video/em28xx/Kconfig |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/em28xx/Kconfig 
b/drivers/media/video/em28xx/Kconfig
index abbd38c..0f7a0bd 100644
--- a/drivers/media/video/em28xx/Kconfig
+++ b/drivers/media/video/em28xx/Kconfig
@@ -13,7 +13,8 @@ config VIDEO_EM28XX
  module will be called em28xx
 
 config VIDEO_EM28XX_ALSA
-   depends on VIDEO_EM28XX
+   depends on VIDEO_EM28XX  SND
+   select SND_PCM
tristate Empia EM28xx ALSA audio module
---help---
  This is an ALSA driver for some Empia 28xx based TV cards.
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


jbd2: Add error check to journal_wait_on_commit_record to avoid oops

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b048d8462652159c5314d19b191220b0ec384edb
Commit: b048d8462652159c5314d19b191220b0ec384edb
Parent: 531021f2ca681faf58f926771f85bb5c76f13eba
Author: Mingming Cao [EMAIL PROTECTED]
AuthorDate: Tue Feb 5 08:52:45 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Tue Feb 5 08:52:45 2008 -0500

jbd2: Add error check to journal_wait_on_commit_record to avoid oops

The buffer head pointer passed to journal_wait_on_commit_record() could
be NULL if the previous journal_submit_commit_record() failed or journal
has already aborted.

Looking at the jbd2 debug messages, before the oops happened, the jbd2
is aborted due to trying to access the next log block beyond the end
of device. This might be caused by using a corrupted image.

We need to check the error returns from journal_submit_commit_record()
and avoid calling journal_wait_on_commit_record() in the failure case.

This addresses Kernel Bugzilla #9849

Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Signed-off-by: Theodore Ts'o [EMAIL PROTECTED]
---
 fs/jbd2/commit.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 4f302d2..48b3cb8 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -872,7 +872,8 @@ wait_for_iobuf:
if (err)
__jbd2_journal_abort_hard(journal);
}
-   err = journal_wait_on_commit_record(cbh);
+   if (!err  !is_journal_aborted(journal))
+   err = journal_wait_on_commit_record(cbh);
 
if (err)
jbd2_journal_abort(journal, err);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


jbd2: Fix reference counting on the journal commit block's buffer head

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c4b8e635f525441b9cb0bab428b527858d977e8f
Commit: c4b8e635f525441b9cb0bab428b527858d977e8f
Parent: 5315217efea54a07950758005686adedb8e8e680
Author: Aneesh Kumar K.V [EMAIL PROTECTED]
AuthorDate: Tue Feb 5 10:55:26 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Tue Feb 5 10:55:26 2008 -0500

jbd2: Fix reference counting on the journal commit block's buffer head

With journal checksum patch we added asynchronous commits of journal
commit headers, and accidentally dropped taking a reference on the
buffer head.

(Before the change, sync_dirty_buffer did the get_bh(). The associative
put_bh is done by journal_wait_on_commit_record().)

Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Signed-off-by: Theodore Ts'o [EMAIL PROTECTED]
---
 fs/jbd2/commit.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 48b3cb8..d6ea623 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -136,7 +136,7 @@ static int journal_submit_commit_record(journal_t *journal,
 
JBUFFER_TRACE(descriptor, submit commit block);
lock_buffer(bh);
-
+   get_bh(bh);
set_buffer_dirty(bh);
set_buffer_uptodate(bh);
bh-b_end_io = journal_end_buffer_io_sync;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] jbd: Remove useless loop when writing commit record

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5315217efea54a07950758005686adedb8e8e680
Commit: 5315217efea54a07950758005686adedb8e8e680
Parent: b048d8462652159c5314d19b191220b0ec384edb
Author: Jan Kara [EMAIL PROTECTED]
AuthorDate: Fri Feb 1 08:26:46 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Fri Feb 1 08:26:46 2008 -0500

[PATCH] jbd: Remove useless loop when writing commit record

Commit block was intended to have several copies of the header. But
due to a bug it never had them and actually, nobody checks that. So
just remove the useless loop.

Signed-off-by: Jan Kara [EMAIL PROTECTED]
Signed-off-by: Theodore Ts'o [EMAIL PROTECTED]
---
 fs/jbd/commit.c |   14 ++
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
index 8e08efc..a38c718 100644
--- a/fs/jbd/commit.c
+++ b/fs/jbd/commit.c
@@ -104,7 +104,8 @@ static int journal_write_commit_record(journal_t *journal,
 {
struct journal_head *descriptor;
struct buffer_head *bh;
-   int i, ret;
+   journal_header_t *header;
+   int ret;
int barrier_done = 0;
 
if (is_journal_aborted(journal))
@@ -116,13 +117,10 @@ static int journal_write_commit_record(journal_t *journal,
 
bh = jh2bh(descriptor);
 
-   /* AKPM: buglet - add `i' to tmp! */
-   for (i = 0; i  bh-b_size; i += 512) {
-   journal_header_t *tmp = (journal_header_t*)bh-b_data;
-   tmp-h_magic = cpu_to_be32(JFS_MAGIC_NUMBER);
-   tmp-h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK);
-   tmp-h_sequence = cpu_to_be32(commit_transaction-t_tid);
-   }
+   header = (journal_header_t *)(bh-b_data);
+   header-h_magic = cpu_to_be32(JFS_MAGIC_NUMBER);
+   header-h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK);
+   header-h_sequence = cpu_to_be32(commit_transaction-t_tid);
 
JBUFFER_TRACE(descriptor, write commit block);
set_buffer_dirty(bh);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


JBD2: Use the incompat macro for testing the incompat feature.

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4d605179723a3fb8ba594d9516897426e6629a5b
Commit: 4d605179723a3fb8ba594d9516897426e6629a5b
Parent: c4b8e635f525441b9cb0bab428b527858d977e8f
Author: Aneesh Kumar K.V [EMAIL PROTECTED]
AuthorDate: Tue Feb 5 10:56:15 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Tue Feb 5 10:56:15 2008 -0500

JBD2: Use the incompat macro for testing the incompat feature.

JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT needs to be checked with
JBD2_HAS_INCOMPAT_FEATURE

Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Signed-off-by: Theodore Ts'o [EMAIL PROTECTED]
---
 fs/jbd2/commit.c   |2 +-
 fs/jbd2/recovery.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index d6ea623..c35bf16 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -142,7 +142,7 @@ static int journal_submit_commit_record(journal_t *journal,
bh-b_end_io = journal_end_buffer_io_sync;
 
if (journal-j_flags  JBD2_BARRIER 
-   !JBD2_HAS_COMPAT_FEATURE(journal,
+   !JBD2_HAS_INCOMPAT_FEATURE(journal,
 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)) {
set_buffer_ordered(bh);
barrier_done = 1;
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index d36356f..1464113 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -641,7 +641,7 @@ static int do_one_pass(journal_t *journal,
if (chksum_err) {
info-end_transaction = next_commit_ID;
 
-   if (!JBD2_HAS_COMPAT_FEATURE(journal,
+   if (!JBD2_HAS_INCOMPAT_FEATURE(journal,
   JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)){
printk(KERN_ERR
   JBD: Transaction %u 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ext4: Don't set EXTENTS_FL flag for fast symlinks

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b8356c465b42c162f34b5fd4102a6c27cec36f43
Commit: b8356c465b42c162f34b5fd4102a6c27cec36f43
Parent: 4d605179723a3fb8ba594d9516897426e6629a5b
Author: Valerie Clement [EMAIL PROTECTED]
AuthorDate: Tue Feb 5 10:56:37 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Tue Feb 5 10:56:37 2008 -0500

ext4: Don't set EXTENTS_FL flag for fast symlinks

For fast symbolic links, the file content is stored in the i_block[]
array, which is not compatible with the new file extents format.
e2fsck reports error on such files because EXTENTS_FL is set.
Don't set the EXTENTS_FL flag when creating fast symlinks.

In the case of file migration, skip fast symbolic links.

Signed-off-by: Valerie Clement [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Signed-off-by: Theodore Ts'o [EMAIL PROTECTED]
---
 fs/ext4/migrate.c |6 ++
 fs/ext4/namei.c   |1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index 3ebc233..9ee1f7c 100644
--- a/fs/ext4/migrate.c
+++ b/fs/ext4/migrate.c
@@ -414,6 +414,12 @@ int ext4_ext_migrate(struct inode *inode, struct file 
*filp,
if ((EXT4_I(inode)-i_flags  EXT4_EXTENTS_FL))
return -EINVAL;
 
+   if (S_ISLNK(inode-i_mode)  inode-i_blocks == 0)
+   /*
+* don't migrate fast symlink
+*/
+   return retval;
+
down_write(EXT4_I(inode)-i_data_sem);
handle = ext4_journal_start(inode,
EXT4_DATA_TRANS_BLOCKS(inode-i_sb) +
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index d153bb5..a9347fb 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2223,6 +2223,7 @@ retry:
inode-i_op = ext4_fast_symlink_inode_operations;
memcpy((char*)EXT4_I(inode)-i_data,symname,l);
inode-i_size = l-1;
+   EXT4_I(inode)-i_flags = ~EXT4_EXTENTS_FL;
}
EXT4_I(inode)-i_disksize = inode-i_size;
err = ext4_add_nondir(handle, dentry, inode);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ext4: Fix null bh pointer dereference in mballoc

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=42a10add852e6291a7544afd8a286622a3e6ae76
Commit: 42a10add852e6291a7544afd8a286622a3e6ae76
Parent: b8356c465b42c162f34b5fd4102a6c27cec36f43
Author: Aneesh Kumar K.V [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 01:07:28 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Sun Feb 10 01:07:28 2008 -0500

ext4: Fix null bh pointer dereference in mballoc

Repoted by Adrian Bunk [EMAIL PROTECTED]:

The Coverity checker spotted the following NULL dereference:

static int ext4_mb_mark_diskspace_used
{
...
if (!bitmap_bh)
goto out_err;
...
out_err:
sb-s_dirt = 1;
put_bh(bitmap_bh);
...

Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
---
 fs/ext4/mballoc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 76e5fed..06d1f52 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -3069,7 +3069,7 @@ static int ext4_mb_mark_diskspace_used(struct 
ext4_allocation_context *ac,
 
 out_err:
sb-s_dirt = 1;
-   put_bh(bitmap_bh);
+   brelse(bitmap_bh);
return err;
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


allow in-inode EAs on ext4 root inode

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0040d9875dcccfcb2131417b10fbd9841bc5f05b
Commit: 0040d9875dcccfcb2131417b10fbd9841bc5f05b
Parent: 42a10add852e6291a7544afd8a286622a3e6ae76
Author: Eric Sandeen [EMAIL PROTECTED]
AuthorDate: Tue Feb 5 22:36:43 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Tue Feb 5 22:36:43 2008 -0500

allow in-inode EAs on ext4 root inode

The ext3 root inode was treated specially with respect
to in-inode extended attributes, for reasons detailed
in the removed comment below.  The first mkfs-created
inodes would not get extra_i_size or the EXT3_STATE_XATTR
flag set in ext3_read_inode, which disallowed reading or
setting in-inode EAs on the root.

However, in ext4, ext4_mark_inode_dirty calls
ext4_expand_extra_isize for all inodes; once this is done
EAs may be placed in the root ext4 inode body.

But for reasons above, it won't be found after a reboot.

testcase:

setfattr -n user.name -v value mntpt/
setfattr -n user.name2 -v value2 mntpt/
umount mntpt/; remount mntpt/
getfattr -d mntpt/

name2/value2 has gone missing; debugfs shows it in the
inode body, but it is not found there by getattr.

The following fixes it up; newer mkfs appears to properly
zero the inodes, so this workaround isn't needed for ext4.

Signed-off-by: Eric Sandeen [EMAIL PROTECTED]
Signed-off-by: Theodore Ts'o [EMAIL PROTECTED]
---
 fs/ext4/inode.c |8 +---
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index f4e3874..bbfabf8 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2758,13 +2758,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned 
long ino)
ei-i_data[block] = raw_inode-i_block[block];
INIT_LIST_HEAD(ei-i_orphan);
 
-   if (inode-i_ino = EXT4_FIRST_INO(inode-i_sb) + 1 
-   EXT4_INODE_SIZE(inode-i_sb)  EXT4_GOOD_OLD_INODE_SIZE) {
-   /*
-* When mke2fs creates big inodes it does not zero out
-* the unused bytes above EXT4_GOOD_OLD_INODE_SIZE,
-* so ignore those first few inodes.
-*/
+   if (EXT4_INODE_SIZE(inode-i_sb)  EXT4_GOOD_OLD_INODE_SIZE) {
ei-i_extra_isize = le16_to_cpu(raw_inode-i_extra_isize);
if (EXT4_GOOD_OLD_INODE_SIZE + ei-i_extra_isize 
EXT4_INODE_SIZE(inode-i_sb)) {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ext4: Fix circular locking dependency with migrate and rm.

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8009f9fb3067fef6c2ca0c16f6bac786ae28639d
Commit: 8009f9fb3067fef6c2ca0c16f6bac786ae28639d
Parent: 0040d9875dcccfcb2131417b10fbd9841bc5f05b
Author: Aneesh Kumar K.V [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 01:20:05 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Sun Feb 10 01:20:05 2008 -0500

ext4: Fix circular locking dependency with migrate and rm.

In order to prevent a circular locking dependency when an unlink
operation is racing with an ext4 migration, we delay taking i_data_sem
until just before switch the inode format, and use i_mutex to prevent
writes and truncates during the first part of the migration operation.

Acked-by: Jan Kara [EMAIL PROTECTED]
Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Signed-off-by: Theodore Ts'o [EMAIL PROTECTED]
---
 fs/ext4/migrate.c |  117 +---
 1 files changed, 74 insertions(+), 43 deletions(-)

diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index 9ee1f7c..8c6c685 100644
--- a/fs/ext4/migrate.c
+++ b/fs/ext4/migrate.c
@@ -61,10 +61,9 @@ static int finish_range(handle_t *handle, struct inode 
*inode,
retval = ext4_journal_restart(handle, needed);
if (retval)
goto err_out;
-   }
-   if (needed) {
+   } else if (needed) {
retval = ext4_journal_extend(handle, needed);
-   if (retval != 0) {
+   if (retval) {
/*
 * IF not able to extend the journal restart the journal
 */
@@ -220,6 +219,26 @@ static int update_tind_extent_range(handle_t *handle, 
struct inode *inode,
 
 }
 
+static int extend_credit_for_blkdel(handle_t *handle, struct inode *inode)
+{
+   int retval = 0, needed;
+
+   if (handle-h_buffer_credits  EXT4_RESERVE_TRANS_BLOCKS)
+   return 0;
+   /*
+* We are freeing a blocks. During this we touch
+* superblock, group descriptor and block bitmap.
+* So allocate a credit of 3. We may update
+* quota (user and group).
+*/
+   needed = 3 + 2*EXT4_QUOTA_TRANS_BLOCKS(inode-i_sb);
+
+   if (ext4_journal_extend(handle, needed) != 0)
+   retval = ext4_journal_restart(handle, needed);
+
+   return retval;
+}
+
 static int free_dind_blocks(handle_t *handle,
struct inode *inode, __le32 i_data)
 {
@@ -234,11 +253,14 @@ static int free_dind_blocks(handle_t *handle,
 
tmp_idata = (__le32 *)bh-b_data;
for (i = 0; i  max_entries; i++) {
-   if (tmp_idata[i])
+   if (tmp_idata[i]) {
+   extend_credit_for_blkdel(handle, inode);
ext4_free_blocks(handle, inode,
le32_to_cpu(tmp_idata[i]), 1, 1);
+   }
}
put_bh(bh);
+   extend_credit_for_blkdel(handle, inode);
ext4_free_blocks(handle, inode, le32_to_cpu(i_data), 1, 1);
return 0;
 }
@@ -267,29 +289,32 @@ static int free_tind_blocks(handle_t *handle,
}
}
put_bh(bh);
+   extend_credit_for_blkdel(handle, inode);
ext4_free_blocks(handle, inode, le32_to_cpu(i_data), 1, 1);
return 0;
 }
 
-static int free_ind_block(handle_t *handle, struct inode *inode)
+static int free_ind_block(handle_t *handle, struct inode *inode, __le32 
*i_data)
 {
int retval;
-   struct ext4_inode_info *ei = EXT4_I(inode);
 
-   if (ei-i_data[EXT4_IND_BLOCK])
+   /* ei-i_data[EXT4_IND_BLOCK] */
+   if (i_data[0]) {
+   extend_credit_for_blkdel(handle, inode);
ext4_free_blocks(handle, inode,
-   le32_to_cpu(ei-i_data[EXT4_IND_BLOCK]), 1, 1);
+   le32_to_cpu(i_data[0]), 1, 1);
+   }
 
-   if (ei-i_data[EXT4_DIND_BLOCK]) {
-   retval = free_dind_blocks(handle, inode,
-   ei-i_data[EXT4_DIND_BLOCK]);
+   /* ei-i_data[EXT4_DIND_BLOCK] */
+   if (i_data[1]) {
+   retval = free_dind_blocks(handle, inode, i_data[1]);
if (retval)
return retval;
}
 
-   if (ei-i_data[EXT4_TIND_BLOCK]) {
-   retval = free_tind_blocks(handle, inode,
-   ei-i_data[EXT4_TIND_BLOCK]);
+   /* ei-i_data[EXT4_TIND_BLOCK] */
+   if (i_data[2]) {
+   retval = free_tind_blocks(handle, inode, i_data[2]);
if (retval)
return retval;
}
@@ -297,15 +322,13 @@ static int free_ind_block(handle_t *handle, struct inode 
*inode)
 }
 
 static int 

ext4: Fix Direct I/O locking

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7fb5409df092589b86cc9412d926879cb572b7f0
Commit: 7fb5409df092589b86cc9412d926879cb572b7f0
Parent: 8009f9fb3067fef6c2ca0c16f6bac786ae28639d
Author: Jan Kara [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 01:08:38 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Sun Feb 10 01:08:38 2008 -0500

ext4: Fix Direct I/O locking

We cannot start transaction in ext4_direct_IO() and just let it last
during the whole write because dio_get_page() acquires mmap_sem which
ranks above transaction start (e.g. because we have dependency chain
mmap_sem-PageLock-journal_start, or because we update atime while
holding mmap_sem) and thus deadlocks could happen. We solve the problem
by starting a transaction separately for each ext4_get_block() call.

We *could* have a problem that we allocate a block and before its data
are written out the machine crashes and thus we expose stale data. But
that does not happen because for hole-filling generic code falls back to
buffered writes and for file extension, we add inode to orphan list and
thus in case of crash, journal replay will truncate inode back to the
original size.

Signed-off-by: Jan Kara [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Signed-off-by: Theodore Ts'o [EMAIL PROTECTED]
---
 fs/ext4/inode.c |  107 +++
 1 files changed, 53 insertions(+), 54 deletions(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index bbfabf8..7dd9b50 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -892,7 +892,16 @@ out:
return err;
 }
 
-#define DIO_CREDITS (EXT4_RESERVE_TRANS_BLOCKS + 32)
+/* Maximum number of blocks we map for direct IO at once. */
+#define DIO_MAX_BLOCKS 4096
+/*
+ * Number of credits we need for writing DIO_MAX_BLOCKS:
+ * We need sb + group descriptor + bitmap + inode - 4
+ * For B blocks with A block pointers per block we need:
+ * 1 (triple ind.) + (B/A/A + 2) (doubly ind.) + (B/A + 2) (indirect).
+ * If we plug in 4096 for B and 256 for A (for 1KB block size), we get 25.
+ */
+#define DIO_CREDITS 25
 
 int ext4_get_blocks_wrap(handle_t *handle, struct inode *inode, sector_t block,
unsigned long max_blocks, struct buffer_head *bh,
@@ -939,49 +948,31 @@ static int ext4_get_block(struct inode *inode, sector_t 
iblock,
struct buffer_head *bh_result, int create)
 {
handle_t *handle = ext4_journal_current_handle();
-   int ret = 0;
+   int ret = 0, started = 0;
unsigned max_blocks = bh_result-b_size  inode-i_blkbits;
 
-   if (!create)
-   goto get_block; /* A read */
-
-   if (max_blocks == 1)
-   goto get_block; /* A single block get */
-
-   if (handle-h_transaction-t_state == T_LOCKED) {
-   /*
-* Huge direct-io writes can hold off commits for long
-* periods of time.  Let this commit run.
-*/
-   ext4_journal_stop(handle);
-   handle = ext4_journal_start(inode, DIO_CREDITS);
-   if (IS_ERR(handle))
+   if (create  !handle) {
+   /* Direct IO write... */
+   if (max_blocks  DIO_MAX_BLOCKS)
+   max_blocks = DIO_MAX_BLOCKS;
+   handle = ext4_journal_start(inode, DIO_CREDITS +
+ 2 * EXT4_QUOTA_TRANS_BLOCKS(inode-i_sb));
+   if (IS_ERR(handle)) {
ret = PTR_ERR(handle);
-   goto get_block;
-   }
-
-   if (handle-h_buffer_credits = EXT4_RESERVE_TRANS_BLOCKS) {
-   /*
-* Getting low on buffer credits...
-*/
-   ret = ext4_journal_extend(handle, DIO_CREDITS);
-   if (ret  0) {
-   /*
-* Couldn't extend the transaction.  Start a new one.
-*/
-   ret = ext4_journal_restart(handle, DIO_CREDITS);
+   goto out;
}
+   started = 1;
}
 
-get_block:
-   if (ret == 0) {
-   ret = ext4_get_blocks_wrap(handle, inode, iblock,
+   ret = ext4_get_blocks_wrap(handle, inode, iblock,
max_blocks, bh_result, create, 0);
-   if (ret  0) {
-   bh_result-b_size = (ret  inode-i_blkbits);
-   ret = 0;
-   }
+   if (ret  0) {
+   bh_result-b_size = (ret  inode-i_blkbits);
+   ret = 0;
}
+   if (started)
+   ext4_journal_stop(handle);
+out:
return ret;
 }
 
@@ -1671,7 +1662,8 @@ static int ext4_releasepage(struct page *page, gfp_t wait)
  * if the machine crashes during the write.
  *
  * 

JBD2: Clear buffer_ordered flag for barried IO request on success

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c4e35e07af162ea4d642b1c6ffacbb63c3ed1804
Commit: c4e35e07af162ea4d642b1c6ffacbb63c3ed1804
Parent: 7fb5409df092589b86cc9412d926879cb572b7f0
Author: Dave Kleikamp [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 01:09:32 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Sun Feb 10 01:09:32 2008 -0500

JBD2:  Clear buffer_ordered flag for barried IO request on success

In JBD2 jbd2_journal_write_commit_record(), clear the buffer_ordered
flag for the bh after barried IO has succeed. This prevents later, if
the same buffer head were submitted to the underlying device, which has
been reconfigured to not support barrier request, the JBD2 commit code
could treat it as a normal IO (without barrier).

This is a port from JBD/ext3 fix from Neil Brown.

More details from Neil:

Some devices - notably dm and md - can change their behaviour in
response to BIO_RW_BARRIER requests.  They might start out accepting
such requests but on reconfiguration, they find out that they cannot
any more. JBD2 deal with this by always testing if BIO_RW_BARRIER
requests fail with EOPNOTSUPP, and retrying the write
requests without the barrier (probably after waiting for any pending
writes to complete).

However there is a bug in the handling this in JBD2 for ext4 .

When ext4/JBD2 to submit a BIO_RW_BARRIER request,
it sets the buffer_ordered flag on the buffer head.
If the request completes successfully, the flag STAYS SET.

Other code might then write the same buffer_head after the device has
been reconfigured to not accept barriers.  This write will then fail,
but the other code is not ready to handle EOPNOTSUPP errors and the
error will be treated as fatal.

Cc:  Neil Brown [EMAIL PROTECTED]
Signed-off-by: Dave Kleikamp [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Signed-off-by: Theodore Ts'o [EMAIL PROTECTED]
---
 fs/jbd2/commit.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index c35bf16..a817308 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -148,6 +148,8 @@ static int journal_submit_commit_record(journal_t *journal,
barrier_done = 1;
}
ret = submit_bh(WRITE, bh);
+   if (barrier_done)
+   clear_buffer_ordered(bh);
 
/* is it possible for another commit to fail at roughly
 * the same time as this one?  If so, we don't want to
@@ -166,7 +168,6 @@ static int journal_submit_commit_record(journal_t *journal,
spin_unlock(journal-j_state_lock);
 
/* And try again, without the barrier */
-   clear_buffer_ordered(bh);
set_buffer_uptodate(bh);
set_buffer_dirty(bh);
ret = submit_bh(WRITE, bh);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ext4: allocate struct ext4_allocation_context from a kmem cache

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=256bdb497c6f562462f1e89fc8e1409f61ef40cb
Commit: 256bdb497c6f562462f1e89fc8e1409f61ef40cb
Parent: c4e35e07af162ea4d642b1c6ffacbb63c3ed1804
Author: Eric Sandeen [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 01:13:33 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Sun Feb 10 01:13:33 2008 -0500

ext4: allocate struct ext4_allocation_context from a kmem cache

struct ext4_allocation_context is rather large, and this bloats
the stack of many functions which use it.  Allocating it from
a named slab cache will alleviate this.

For example, with this change (on top of the noinline patch sent earlier):

-ext4_mb_new_blocks 200
+ext4_mb_new_blocks  40

-ext4_mb_free_blocks344
+ext4_mb_free_blocks168

-ext4_mb_release_inode_pa   216
+ext4_mb_release_inode_pa40

-ext4_mb_release_group_pa   192
+ext4_mb_release_group_pa24

Most of these stack-allocated structs are actually used only for
mballoc history; and in those cases often a smaller struct would do.
So changing that may be another way around it, at least for those
functions, if preferred.  For now, in those cases where the ac
is only for history, an allocation failure simply skips the history
recording, and does not cause any other failures.


Signed-off-by: Eric Sandeen [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Signed-off-by: Theodore Ts'o [EMAIL PROTECTED]
---
 fs/ext4/mballoc.c |  127 ++---
 1 files changed, 82 insertions(+), 45 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 06d1f52..5e3c351 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -420,6 +420,7 @@
 #define MB_DEFAULT_GROUP_PREALLOC  512
 
 static struct kmem_cache *ext4_pspace_cachep;
+static struct kmem_cache *ext4_ac_cachep;
 
 #ifdef EXT4_BB_MAX_BLOCKS
 #undef EXT4_BB_MAX_BLOCKS
@@ -2959,12 +2960,19 @@ int __init init_ext4_mballoc(void)
if (ext4_pspace_cachep == NULL)
return -ENOMEM;
 
+   ext4_ac_cachep =
+   kmem_cache_create(ext4_alloc_context,
+sizeof(struct ext4_allocation_context),
+0, SLAB_RECLAIM_ACCOUNT, NULL);
+   if (ext4_ac_cachep == NULL) {
+   kmem_cache_destroy(ext4_pspace_cachep);
+   return -ENOMEM;
+   }
 #ifdef CONFIG_PROC_FS
proc_root_ext4 = proc_mkdir(EXT4_ROOT, proc_root_fs);
if (proc_root_ext4 == NULL)
printk(KERN_ERR EXT4-fs: Unable to create %s\n, EXT4_ROOT);
 #endif
-
return 0;
 }
 
@@ -2972,6 +2980,7 @@ void exit_ext4_mballoc(void)
 {
/* XXX: synchronize_rcu(); */
kmem_cache_destroy(ext4_pspace_cachep);
+   kmem_cache_destroy(ext4_ac_cachep);
 #ifdef CONFIG_PROC_FS
remove_proc_entry(EXT4_ROOT, proc_root_fs);
 #endif
@@ -3699,7 +3708,7 @@ static int ext4_mb_release_inode_pa(struct ext4_buddy 
*e4b,
struct buffer_head *bitmap_bh,
struct ext4_prealloc_space *pa)
 {
-   struct ext4_allocation_context ac;
+   struct ext4_allocation_context *ac;
struct super_block *sb = e4b-bd_sb;
struct ext4_sb_info *sbi = EXT4_SB(sb);
unsigned long end;
@@ -3715,9 +3724,13 @@ static int ext4_mb_release_inode_pa(struct ext4_buddy 
*e4b,
BUG_ON(group != e4b-bd_group  pa-pa_len != 0);
end = bit + pa-pa_len;
 
-   ac.ac_sb = sb;
-   ac.ac_inode = pa-pa_inode;
-   ac.ac_op = EXT4_MB_HISTORY_DISCARD;
+   ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS);
+
+   if (ac) {
+   ac-ac_sb = sb;
+   ac-ac_inode = pa-pa_inode;
+   ac-ac_op = EXT4_MB_HISTORY_DISCARD;
+   }
 
while (bit  end) {
bit = ext4_find_next_zero_bit(bitmap_bh-b_data, end, bit);
@@ -3733,11 +3746,13 @@ static int ext4_mb_release_inode_pa(struct ext4_buddy 
*e4b,
(unsigned) group);
free += next - bit;
 
-   ac.ac_b_ex.fe_group = group;
-   ac.ac_b_ex.fe_start = bit;
-   ac.ac_b_ex.fe_len = next - bit;
-   ac.ac_b_ex.fe_logical = 0;
-   ext4_mb_store_history(ac);
+   if (ac) {
+   ac-ac_b_ex.fe_group = group;
+   ac-ac_b_ex.fe_start = bit;
+   ac-ac_b_ex.fe_len = next - bit;
+   ac-ac_b_ex.fe_logical = 0;
+   ext4_mb_store_history(ac);
+   }
 
mb_free_blocks(pa-pa_inode, e4b, bit, next - bit);
bit = next + 1;
@@ -3751,6 +3766,8 @@ static int ext4_mb_release_inode_pa(struct 

ext4: Don't panic in case of corrupt bitmap

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=26346ff681cb42c1436ed09c44dcae4809470dab
Commit: 26346ff681cb42c1436ed09c44dcae4809470dab
Parent: 256bdb497c6f562462f1e89fc8e1409f61ef40cb
Author: Aneesh Kumar K.V [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 01:10:04 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Sun Feb 10 01:10:04 2008 -0500

ext4: Don't panic in case of corrupt bitmap

Multiblock allocator calls BUG_ON in many case if the free and used
blocks count obtained looking at the bitmap is different from what
the allocator internally accounted for. Use ext4_error in such case
and don't panic the system.

Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Signed-off-by: Theodore Ts'o [EMAIL PROTECTED]
---
 fs/ext4/mballoc.c |   35 +--
 1 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 5e3c351..dd0fcfc 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -681,7 +681,6 @@ static void *mb_find_buddy(struct ext4_buddy *e4b, int 
order, int *max)
 {
char *bb;
 
-   /* FIXME!! is this needed */
BUG_ON(EXT4_MB_BITMAP(e4b) == EXT4_MB_BUDDY(e4b));
BUG_ON(max == NULL);
 
@@ -965,7 +964,7 @@ static void ext4_mb_generate_buddy(struct super_block *sb,
grp-bb_fragments = fragments;
 
if (free != grp-bb_free) {
-   printk(KERN_DEBUG
+   ext4_error(sb, __FUNCTION__,
EXT4-fs: group %lu: %u blocks in bitmap, %u in gd\n,
group, free, grp-bb_free);
grp-bb_free = free;
@@ -1822,13 +1821,24 @@ static void ext4_mb_complex_scan_group(struct 
ext4_allocation_context *ac,
i = ext4_find_next_zero_bit(bitmap,
EXT4_BLOCKS_PER_GROUP(sb), i);
if (i = EXT4_BLOCKS_PER_GROUP(sb)) {
-   BUG_ON(free != 0);
+   /*
+* IF we corrupt the bitmap  we won't find any
+* free blocks even though group info says we
+* we have free blocks
+*/
+   ext4_error(sb, __FUNCTION__, %d free blocks as per 
+   group info. But bitmap says 0\n,
+   free);
break;
}
 
mb_find_extent(e4b, 0, i, ac-ac_g_ex.fe_len, ex);
BUG_ON(ex.fe_len = 0);
-   BUG_ON(free  ex.fe_len);
+   if (free  ex.fe_len) {
+   ext4_error(sb, __FUNCTION__, %d free blocks as per 
+   group info. But got %d blocks\n,
+   free, ex.fe_len);
+   }
 
ext4_mb_measure_extent(ac, ex, e4b);
 
@@ -3363,13 +3373,10 @@ static void ext4_mb_use_group_pa(struct 
ext4_allocation_context *ac,
ac-ac_pa = pa;
 
/* we don't correct pa_pstart or pa_plen here to avoid
-* possible race when tte group is being loaded concurrently
+* possible race when the group is being loaded concurrently
 * instead we correct pa later, after blocks are marked
-* in on-disk bitmap -- see ext4_mb_release_context() */
-   /*
-* FIXME!! but the other CPUs can look at this particular
-* pa and think that it have enought free blocks if we
-* don't update pa_free here right ?
+* in on-disk bitmap -- see ext4_mb_release_context()
+* Other CPUs are prevented from allocating from this pa by lg_mutex
 */
mb_debug(use %u/%u from group pa %p\n, pa-pa_lstart-len, len, pa);
 }
@@ -3758,13 +3765,13 @@ static int ext4_mb_release_inode_pa(struct ext4_buddy 
*e4b,
bit = next + 1;
}
if (free != pa-pa_free) {
-   printk(KERN_ERR pa %p: logic %lu, phys. %lu, len %lu\n,
+   printk(KERN_CRIT pa %p: logic %lu, phys. %lu, len %lu\n,
pa, (unsigned long) pa-pa_lstart,
(unsigned long) pa-pa_pstart,
(unsigned long) pa-pa_len);
-   printk(KERN_ERR free %u, pa_free %u\n, free, pa-pa_free);
+   ext4_error(sb, __FUNCTION__, free %u, pa_free %u\n,
+   free, pa-pa_free);
}
-   BUG_ON(free != pa-pa_free);
atomic_add(free, sbi-s_mb_discarded);
if (ac)
kmem_cache_free(ext4_ac_cachep, ac);
@@ -4435,7 +4442,7 @@ void ext4_mb_free_blocks(handle_t *handle, struct inode 
*inode,
unsigned long block, unsigned long count,
int metadata, unsigned long *freed)
 {
-   struct buffer_head 

ext4: Add new development flag to the ext4 filesystem

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=469108ff3dcbc00313699d620c47f3ee1e7d19c6
Commit: 469108ff3dcbc00313699d620c47f3ee1e7d19c6
Parent: 26346ff681cb42c1436ed09c44dcae4809470dab
Author: Theodore Tso [EMAIL PROTECTED]
AuthorDate: Sun Feb 10 01:11:44 2008 -0500
Committer:  Theodore Ts'o [EMAIL PROTECTED]
CommitDate: Sun Feb 10 01:11:44 2008 -0500

ext4: Add new development flag to the ext4 filesystem

This flag is simply a generic this is a crash/burn test filesystem
marker.  If it is set, then filesystem code which is in development
will be allowed to mount the filesystem.  Filesystem code which is not
considered ready for prime-time will check for this flag, and if it is
not set, it will refuse to touch the filesystem.

As we start rolling ext4 out to distro's like Fedora, et. al, this makes
it less likely that a user might accidentally start using ext4 on a
production filesystem; a bad thing, since that will essentially make it
be unfsckable until e2fsprogs catches up.

Signed-off-by: Theodore Tso [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
---
 fs/ext4/super.c |   11 +++
 include/linux/ext4_fs.h |7 +++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 93beb86..0072da7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1919,6 +1919,17 @@ static int ext4_fill_super (struct super_block *sb, void 
*data, int silent)
printk(KERN_WARNING
   EXT4-fs warning: feature flags set on rev 0 fs, 
   running e2fsck is recommended\n);
+
+   /*
+* Since ext4 is still considered development code, we require
+* that the TEST_FILESYS flag in s-flags be set.
+*/
+   if (!(le32_to_cpu(es-s_flags)  EXT2_FLAGS_TEST_FILESYS)) {
+   printk(KERN_WARNING EXT4-fs: %s: not marked 
+  OK to use with test code.\n, sb-s_id);
+   goto failed_mount;
+   }
+
/*
 * Check feature flags regardless of the revision level, since we
 * previously didn't change the revision level when setting the flags,
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h
index c4f635a..2500325 100644
--- a/include/linux/ext4_fs.h
+++ b/include/linux/ext4_fs.h
@@ -490,6 +490,13 @@ do {   
   \
 #defineEXT4_ORPHAN_FS  0x0004  /* Orphans being 
recovered */
 
 /*
+ * Misc. filesystem flags
+ */
+#define EXT2_FLAGS_SIGNED_HASH 0x0001  /* Signed dirhash in use */
+#define EXT2_FLAGS_UNSIGNED_HASH   0x0002  /* Unsigned dirhash in use */
+#define EXT2_FLAGS_TEST_FILESYS0x0004  /* to test development 
code */
+
+/*
  * Mount flags
  */
 #define EXT4_MOUNT_CHECK   0x1 /* Do mount-time checks */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC64]: Remove unused declarations from iommu_common.h

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0507468a8055fc9a51b40a59e6b4eb6081f23aad
Commit: 0507468a8055fc9a51b40a59e6b4eb6081f23aad
Parent: b1d0e4f535e10775cffde922208b49629169aeaa
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Feb 8 02:02:39 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 03:15:03 2008 -0800

[SPARC64]: Remove unused declarations from iommu_common.h

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 arch/sparc64/kernel/iommu_common.h |   19 ---
 1 files changed, 0 insertions(+), 19 deletions(-)

diff --git a/arch/sparc64/kernel/iommu_common.h 
b/arch/sparc64/kernel/iommu_common.h
index 4b5cafa..4199237 100644
--- a/arch/sparc64/kernel/iommu_common.h
+++ b/arch/sparc64/kernel/iommu_common.h
@@ -55,22 +55,3 @@ static inline unsigned long calc_npages(struct scatterlist 
*sglist, int nelems)
 
return npages;
 }
-
-/* You are _strongly_ advised to enable the following debugging code
- * any time you make changes to the sg code below, run it for a while
- * with filesystems mounted read-only before buying the farm... -DaveM
- */
-#undef VERIFY_SG
-
-#ifdef VERIFY_SG
-extern void verify_sglist(struct scatterlist *sg, int nents, iopte_t *iopte, 
int npages);
-#endif
-
-/* Two addresses are virtually contiguous if and only if:
- * 1) They are equal, or...
- * 2) They are both on a page boundary
- */
-#define VCONTIG(__X, __Y)  (((__X) == (__Y)) || \
-(((__X) | (__Y))  (64UL - PAGE_SHIFT)) == 
0UL)
-
-extern unsigned long prepare_sg(struct device *dev, struct scatterlist *sg, 
int nents);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC64]: iommu_common.h tidy ups...

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=19814ea24e9d80583504e336340ab4590841b0b1
Commit: 19814ea24e9d80583504e336340ab4590841b0b1
Parent: 0507468a8055fc9a51b40a59e6b4eb6081f23aad
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Feb 8 02:09:40 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 03:15:04 2008 -0800

[SPARC64]: iommu_common.h tidy ups...

Add missing multiple-include guards and update copyright.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 arch/sparc64/kernel/iommu_common.h |   10 +++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/sparc64/kernel/iommu_common.h 
b/arch/sparc64/kernel/iommu_common.h
index 4199237..8390f04 100644
--- a/arch/sparc64/kernel/iommu_common.h
+++ b/arch/sparc64/kernel/iommu_common.h
@@ -1,9 +1,11 @@
-/* $Id: iommu_common.h,v 1.5 2001/12/11 09:41:01 davem Exp $
- * iommu_common.h: UltraSparc SBUS/PCI common iommu declarations.
+/* iommu_common.h: UltraSparc SBUS/PCI common iommu declarations.
  *
- * Copyright (C) 1999 David S. Miller ([EMAIL PROTECTED])
+ * Copyright (C) 1999, 2008 David S. Miller ([EMAIL PROTECTED])
  */
 
+#ifndef _IOMMU_COMMON_H
+#define _IOMMU_COMMON_H
+
 #include linux/kernel.h
 #include linux/types.h
 #include linux/sched.h
@@ -55,3 +57,5 @@ static inline unsigned long calc_npages(struct scatterlist 
*sglist, int nelems)
 
return npages;
 }
+
+#endif /* _IOMMU_COMMON_H */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC64]: IOMMU allocations using iommu-helper layer.

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d284142cbad66832d5072a0aebeca7bd9ca841b7
Commit: d284142cbad66832d5072a0aebeca7bd9ca841b7
Parent: 19814ea24e9d80583504e336340ab4590841b0b1
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Feb 8 18:05:46 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 03:15:04 2008 -0800

[SPARC64]: IOMMU allocations using iommu-helper layer.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 arch/sparc64/Kconfig   |4 +
 arch/sparc64/kernel/iommu.c|  125 +++-
 arch/sparc64/kernel/iommu_common.h |8 ++
 arch/sparc64/kernel/pci_sun4v.c|   84 +---
 include/asm-sparc64/iommu.h|1 +
 5 files changed, 112 insertions(+), 110 deletions(-)

diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index b810f2b..4ac22f4 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -40,6 +40,10 @@ config MMU
bool
default y
 
+config IOMMU_HELPER
+   bool
+   default y
+
 config QUICKLIST
bool
default y
diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c
index 5623a4d..90a5907 100644
--- a/arch/sparc64/kernel/iommu.c
+++ b/arch/sparc64/kernel/iommu.c
@@ -1,6 +1,6 @@
 /* iommu.c: Generic sparc64 IOMMU support.
  *
- * Copyright (C) 1999, 2007 David S. Miller ([EMAIL PROTECTED])
+ * Copyright (C) 1999, 2007, 2008 David S. Miller ([EMAIL PROTECTED])
  * Copyright (C) 1999, 2000 Jakub Jelinek ([EMAIL PROTECTED])
  */
 
@@ -10,6 +10,7 @@
 #include linux/device.h
 #include linux/dma-mapping.h
 #include linux/errno.h
+#include linux/iommu-helper.h
 
 #ifdef CONFIG_PCI
 #include linux/pci.h
@@ -41,7 +42,7 @@
   i (ASI_PHYS_BYPASS_EC_E))
 
 /* Must be invoked under the IOMMU lock. */
-static void __iommu_flushall(struct iommu *iommu)
+static void iommu_flushall(struct iommu *iommu)
 {
if (iommu-iommu_flushinv) {
iommu_write(iommu-iommu_flushinv, ~(u64)0);
@@ -83,54 +84,91 @@ static inline void iopte_make_dummy(struct iommu *iommu, 
iopte_t *iopte)
iopte_val(*iopte) = val;
 }
 
-/* Based largely upon the ppc64 iommu allocator.  */
-static long arena_alloc(struct iommu *iommu, unsigned long npages)
+/* Based almost entirely upon the ppc64 iommu allocator.  If you use the 
'handle'
+ * facility it must all be done in one pass while under the iommu lock.
+ *
+ * On sun4u platforms, we only flush the IOMMU once every time we've passed
+ * over the entire page table doing allocations.  Therefore we only ever 
advance
+ * the hint and cannot backtrack it.
+ */
+unsigned long iommu_range_alloc(struct device *dev,
+   struct iommu *iommu,
+   unsigned long npages,
+   unsigned long *handle)
 {
+   unsigned long n, end, start, limit, boundary_size;
struct iommu_arena *arena = iommu-arena;
-   unsigned long n, i, start, end, limit;
-   int pass;
+   int pass = 0;
+
+   /* This allocator was derived from x86_64's bit string search */
+
+   /* Sanity check */
+   if (unlikely(npages == 0)) {
+   if (printk_ratelimit())
+   WARN_ON(1);
+   return DMA_ERROR_CODE;
+   }
+
+   if (handle  *handle)
+   start = *handle;
+   else
+   start = arena-hint;
 
limit = arena-limit;
-   start = arena-hint;
-   pass = 0;
 
-again:
-   n = find_next_zero_bit(arena-map, limit, start);
-   end = n + npages;
-   if (unlikely(end = limit)) {
+   /* The case below can happen if we have a small segment appended
+* to a large, or when the previous alloc was at the very end of
+* the available space. If so, go back to the beginning and flush.
+*/
+   if (start = limit) {
+   start = 0;
+   if (iommu-flush_all)
+   iommu-flush_all(iommu);
+   }
+
+ again:
+
+   if (dev)
+   boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1,
+ 1  IO_PAGE_SHIFT);
+   else
+   boundary_size = ALIGN(1UL  32, 1  IO_PAGE_SHIFT);
+
+   n = iommu_area_alloc(arena-map, limit, start, npages, 0,
+boundary_size  IO_PAGE_SHIFT, 0);
+   if (n == -1) {
if (likely(pass  1)) {
-   limit = start;
+   /* First failure, rescan from the beginning.  */
start = 0;
-   __iommu_flushall(iommu);
+   if (iommu-flush_all)
+   iommu-flush_all(iommu);
pass++;
goto again;
} else {
-   /* Scanned the whole thing, give up. */
- 

[SPARC64]: Add SG merging support back into IOMMU code.

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=13fa14e185614066d96f90f09da08eebe58cbc8f
Commit: 13fa14e185614066d96f90f09da08eebe58cbc8f
Parent: d284142cbad66832d5072a0aebeca7bd9ca841b7
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Sat Feb 9 03:11:01 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 03:15:36 2008 -0800

[SPARC64]: Add SG merging support back into IOMMU code.

Mimicks almost perfectly the powerpc IOMMU code, except that it
doesn't have the IOMMU_PAGE_SIZE != PAGE_SIZE handling, and it also
lacks the device dma mask support bits.

I'll add that later as time permits, but this gets us at least back to
where we were beforehand.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 arch/sparc64/kernel/iommu.c |  231 ++
 arch/sparc64/kernel/pci_sun4v.c |  206 ++-
 include/asm-sparc64/io.h|2 +-
 3 files changed, 291 insertions(+), 148 deletions(-)

diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c
index 90a5907..d3276eb 100644
--- a/arch/sparc64/kernel/iommu.c
+++ b/arch/sparc64/kernel/iommu.c
@@ -512,124 +512,209 @@ static void dma_4u_unmap_single(struct device *dev, 
dma_addr_t bus_addr,
 static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist,
 int nelems, enum dma_data_direction direction)
 {
-   unsigned long flags, ctx, i, npages, iopte_protection;
-   struct scatterlist *sg;
+   struct scatterlist *s, *outs, *segstart;
+   unsigned long flags, handle, prot, ctx;
+   dma_addr_t dma_next = 0, dma_addr;
+   unsigned int max_seg_size;
+   int outcount, incount, i;
struct strbuf *strbuf;
struct iommu *iommu;
-   iopte_t *base;
-   u32 dma_base;
-
-   /* Fast path single entry scatterlists. */
-   if (nelems == 1) {
-   sglist-dma_address =
-   dma_4u_map_single(dev, sg_virt(sglist),
- sglist-length, direction);
-   if (unlikely(sglist-dma_address == DMA_ERROR_CODE))
-   return 0;
-   sglist-dma_length = sglist-length;
-   return 1;
-   }
+
+   BUG_ON(direction == DMA_NONE);
 
iommu = dev-archdata.iommu;
strbuf = dev-archdata.stc;
-
-   if (unlikely(direction == DMA_NONE))
-   goto bad_no_ctx;
-
-   npages = calc_npages(sglist, nelems);
+   if (nelems == 0 || !iommu)
+   return 0;
 
spin_lock_irqsave(iommu-lock, flags);
 
-   base = alloc_npages(dev, iommu, npages);
ctx = 0;
if (iommu-iommu_ctxflush)
ctx = iommu_alloc_ctx(iommu);
 
-   spin_unlock_irqrestore(iommu-lock, flags);
-
-   if (base == NULL)
-   goto bad;
-
-   dma_base = iommu-page_table_map_base +
-   ((base - iommu-page_table)  IO_PAGE_SHIFT);
-
if (strbuf-strbuf_enabled)
-   iopte_protection = IOPTE_STREAMING(ctx);
+   prot = IOPTE_STREAMING(ctx);
else
-   iopte_protection = IOPTE_CONSISTENT(ctx);
+   prot = IOPTE_CONSISTENT(ctx);
if (direction != DMA_TO_DEVICE)
-   iopte_protection |= IOPTE_WRITE;
-
-   for_each_sg(sglist, sg, nelems, i) {
-   unsigned long paddr = SG_ENT_PHYS_ADDRESS(sg);
-   unsigned long slen = sg-length;
-   unsigned long this_npages;
+   prot |= IOPTE_WRITE;
+
+   outs = s = segstart = sglist[0];
+   outcount = 1;
+   incount = nelems;
+   handle = 0;
+
+   /* Init first segment length for backout at failure */
+   outs-dma_length = 0;
+
+   max_seg_size = dma_get_max_seg_size(dev);
+   for_each_sg(sglist, s, nelems, i) {
+   unsigned long paddr, npages, entry, slen;
+   iopte_t *base;
+
+   slen = s-length;
+   /* Sanity check */
+   if (slen == 0) {
+   dma_next = 0;
+   continue;
+   }
+   /* Allocate iommu entries for that segment */
+   paddr = (unsigned long) SG_ENT_PHYS_ADDRESS(s);
+   npages = iommu_num_pages(paddr, slen);
+   entry = iommu_range_alloc(dev, iommu, npages, handle);
+
+   /* Handle failure */
+   if (unlikely(entry == DMA_ERROR_CODE)) {
+   if (printk_ratelimit())
+   printk(KERN_INFO iommu_alloc failed, iommu %p 
paddr %lx
+   npages %lx\n, iommu, paddr, npages);
+   goto iommu_map_failed;
+   }
 
-   this_npages = iommu_num_pages(paddr, slen);
+   base = iommu-page_table + entry;
 
-   

[SPARC64]: Add kretprobe support.

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d38f1220666a2bd89c4f62d286723a3417b34b9e
Commit: d38f1220666a2bd89c4f62d286723a3417b34b9e
Parent: 13fa14e185614066d96f90f09da08eebe58cbc8f
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Sat Feb 9 03:40:55 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 03:42:22 2008 -0800

[SPARC64]: Add kretprobe support.

Passes the smoke tests at least, powerpc implementation was used
as a guide.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 arch/sparc64/kernel/kprobes.c |  113 -
 include/asm-sparc64/kprobes.h |4 ++
 2 files changed, 115 insertions(+), 2 deletions(-)

diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c
index d94f901..34fc3dd 100644
--- a/arch/sparc64/kernel/kprobes.c
+++ b/arch/sparc64/kernel/kprobes.c
@@ -480,8 +480,117 @@ int __kprobes longjmp_break_handler(struct kprobe *p, 
struct pt_regs *regs)
return 0;
 }
 
-/* architecture specific initialization */
-int arch_init_kprobes(void)
+/* Called with kretprobe_lock held.  The value stored in the return
+ * address register is actually 2 instructions before where the
+ * callee will return to.  Sequences usually look something like this
+ *
+ * callsome_function   --- return register points here
+ *  nop--- call delay slot
+ * whatever--- where callee returns to
+ *
+ * To keep trampoline_probe_handler logic simpler, we normalize the
+ * value kept in ri-ret_addr so we don't need to keep adjusting it
+ * back and forth.
+ */
+void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
+ struct pt_regs *regs)
+{
+   ri-ret_addr = (kprobe_opcode_t *)(regs-u_regs[UREG_RETPC] + 8);
+
+   /* Replace the return addr with trampoline addr */
+   regs-u_regs[UREG_RETPC] =
+   ((unsigned long)kretprobe_trampoline) - 8;
+}
+
+/*
+ * Called when the probe at kretprobe trampoline is hit
+ */
+int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
+{
+   struct kretprobe_instance *ri = NULL;
+   struct hlist_head *head, empty_rp;
+   struct hlist_node *node, *tmp;
+   unsigned long flags, orig_ret_address = 0;
+   unsigned long trampoline_address =(unsigned long)kretprobe_trampoline;
+
+   INIT_HLIST_HEAD(empty_rp);
+   spin_lock_irqsave(kretprobe_lock, flags);
+   head = kretprobe_inst_table_head(current);
+
+   /*
+* It is possible to have multiple instances associated with a given
+* task either because an multiple functions in the call path
+* have a return probe installed on them, and/or more then one return
+* return probe was registered for a target function.
+*
+* We can handle this because:
+* - instances are always inserted at the head of the list
+* - when multiple return probes are registered for the same
+*   function, the first instance's ret_addr will point to the
+*   real return address, and all the rest will point to
+*   kretprobe_trampoline
+*/
+   hlist_for_each_entry_safe(ri, node, tmp, head, hlist) {
+   if (ri-task != current)
+   /* another task is sharing our hash bucket */
+   continue;
+
+   if (ri-rp  ri-rp-handler)
+   ri-rp-handler(ri, regs);
+
+   orig_ret_address = (unsigned long)ri-ret_addr;
+   recycle_rp_inst(ri, empty_rp);
+
+   if (orig_ret_address != trampoline_address)
+   /*
+* This is the real return address. Any other
+* instances associated with this task are for
+* other calls deeper on the call stack
+*/
+   break;
+   }
+
+   kretprobe_assert(ri, orig_ret_address, trampoline_address);
+   regs-tpc = orig_ret_address;
+   regs-tnpc = orig_ret_address + 4;
+
+   reset_current_kprobe();
+   spin_unlock_irqrestore(kretprobe_lock, flags);
+   preempt_enable_no_resched();
+
+   hlist_for_each_entry_safe(ri, node, tmp, empty_rp, hlist) {
+   hlist_del(ri-hlist);
+   kfree(ri);
+   }
+   /*
+* By returning a non-zero value, we are telling
+* kprobe_handler() that we don't want the post_handler
+* to run (and have re-enabled preemption)
+*/
+   return 1;
+}
+
+void kretprobe_trampoline_holder(void)
+{
+   asm volatile(.global kretprobe_trampoline\n
+kretprobe_trampoline:\n
+\tnop\n
+\tnop\n);
+}
+static struct kprobe trampoline_p = {
+   .addr = 

[SPARC]: Remove of_platform_device_create

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b98ac24ef7df8701aa4b15a640c15a9eca5
Commit: 7b98ac24ef7df8701aa4b15a640c15a9eca5
Parent: d38f1220666a2bd89c4f62d286723a3417b34b9e
Author: Stephen Rothwell [EMAIL PROTECTED]
AuthorDate: Thu Jan 17 01:18:43 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 03:49:58 2008 -0800

[SPARC]: Remove of_platform_device_create

There are no callers of this on the Sparc platforms.

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 arch/sparc/kernel/of_device.c |   27 ---
 arch/sparc64/kernel/of_device.c   |   26 --
 include/asm-sparc/of_platform.h   |5 -
 include/asm-sparc64/of_platform.h |5 -
 4 files changed, 0 insertions(+), 63 deletions(-)

diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index 3ea000d..cc4c235 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -584,30 +584,3 @@ static int __init of_debug(char *str)
 }
 
 __setup(of_debug=, of_debug);
-
-struct of_device* of_platform_device_create(struct device_node *np,
-   const char *bus_id,
-   struct device *parent,
-   struct bus_type *bus)
-{
-   struct of_device *dev;
-
-   dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-   if (!dev)
-   return NULL;
-
-   dev-dev.parent = parent;
-   dev-dev.bus = bus;
-   dev-dev.release = of_release_dev;
-
-   strlcpy(dev-dev.bus_id, bus_id, BUS_ID_SIZE);
-
-   if (of_device_register(dev) != 0) {
-   kfree(dev);
-   return NULL;
-   }
-
-   return dev;
-}
-
-EXPORT_SYMBOL(of_platform_device_create);
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index fc5c0cc..0fd9db9 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -868,29 +868,3 @@ static int __init of_debug(char *str)
 }
 
 __setup(of_debug=, of_debug);
-
-struct of_device* of_platform_device_create(struct device_node *np,
-   const char *bus_id,
-   struct device *parent,
-   struct bus_type *bus)
-{
-   struct of_device *dev;
-
-   dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-   if (!dev)
-   return NULL;
-
-   dev-dev.parent = parent;
-   dev-dev.bus = bus;
-   dev-dev.release = of_release_dev;
-
-   strlcpy(dev-dev.bus_id, bus_id, BUS_ID_SIZE);
-
-   if (of_device_register(dev) != 0) {
-   kfree(dev);
-   return NULL;
-   }
-
-   return dev;
-}
-EXPORT_SYMBOL(of_platform_device_create);
diff --git a/include/asm-sparc/of_platform.h b/include/asm-sparc/of_platform.h
index d638737..3833435 100644
--- a/include/asm-sparc/of_platform.h
+++ b/include/asm-sparc/of_platform.h
@@ -21,9 +21,4 @@ extern struct bus_type sbus_bus_type;
 
 #define of_bus_typeof_platform_bus_type/* for compatibility */
 
-extern struct of_device *of_platform_device_create(struct device_node *np,
-  const char *bus_id,
-  struct device *parent,
-  struct bus_type *bus);
-
 #endif /* _ASM_SPARC_OF_PLATFORM_H */
diff --git a/include/asm-sparc64/of_platform.h 
b/include/asm-sparc64/of_platform.h
index f15cfa7..78aa032 100644
--- a/include/asm-sparc64/of_platform.h
+++ b/include/asm-sparc64/of_platform.h
@@ -22,9 +22,4 @@ extern struct bus_type sbus_bus_type;
 
 #define of_bus_typeof_platform_bus_type/* for compatibility */
 
-extern struct of_device *of_platform_device_create(struct device_node *np,
-  const char *bus_id,
-  struct device *parent,
-  struct bus_type *bus);
-
 #endif /* _ASM_SPARC64_OF_PLATFORM_H */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC]: Merge include/asm-sparc{,64}/prom.h

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=97b4872c8db766b37c9b75095e386da7c4eb967d
Commit: 97b4872c8db766b37c9b75095e386da7c4eb967d
Parent: 7b98ac24ef7df8701aa4b15a640c15a9eca5
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Nov 16 00:54:35 2007 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 03:56:20 2008 -0800

[SPARC]: Merge include/asm-sparc{,64}/prom.h

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/asm-sparc/prom.h   |   11 -
 include/asm-sparc64/prom.h |  104 +---
 2 files changed, 11 insertions(+), 104 deletions(-)

diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h
index 71f2a19..df5dc44 100644
--- a/include/asm-sparc/prom.h
+++ b/include/asm-sparc/prom.h
@@ -9,7 +9,7 @@
  * Copyright (C) 1996-2005 Paul Mackerras.
  *
  * Updates for PPC64 by Peter Bergner  David Engebretsen, IBM Corp.
- * Updates for SPARC32 by David S. Miller
+ * Updates for SPARC by David S. Miller
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -39,6 +39,7 @@ struct property {
unsigned int unique_id;
 };
 
+struct of_irq_controller;
 struct device_node {
const char  *name;
const char  *type;
@@ -58,11 +59,19 @@ struct device_node {
unsigned long _flags;
void*data;
unsigned int unique_id;
+
+   struct of_irq_controller *irq_trans;
+};
+
+struct of_irq_controller {
+   unsigned int(*irq_build)(struct device_node *, unsigned int, void 
*);
+   void*data;
 };
 
 #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, x-_flags)
 #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, x-_flags)
 
+extern struct device_node *of_find_node_by_cpuid(int cpuid);
 extern int of_set_property(struct device_node *node, const char *name, void 
*val, int len);
 extern int of_getintprop_default(struct device_node *np,
 const char *name,
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h
dissimilarity index 100%
index 07843f9..5fa166e 100644
--- a/include/asm-sparc64/prom.h
+++ b/include/asm-sparc64/prom.h
@@ -1,103 +1 @@
-#ifndef _SPARC64_PROM_H
-#define _SPARC64_PROM_H
-#ifdef __KERNEL__
-
-/*
- * Definitions for talking to the Open Firmware PROM on
- * Power Macintosh computers.
- *
- * Copyright (C) 1996-2005 Paul Mackerras.
- *
- * Updates for PPC64 by Peter Bergner  David Engebretsen, IBM Corp.
- * Updates for SPARC64 by David S. Miller
- *
- * 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/types.h
-#include linux/proc_fs.h
-#include asm/atomic.h
-
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT2
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT1
-
-#define of_compat_cmp(s1, s2, l)   strncmp((s1), (s2), (l))
-#define of_prop_cmp(s1, s2)strcasecmp((s1), (s2))
-#define of_node_cmp(s1, s2)strcmp((s1), (s2))
-
-typedef u32 phandle;
-typedef u32 ihandle;
-
-struct property {
-   char*name;
-   int length;
-   void*value;
-   struct property *next;
-   unsigned long _flags;
-   unsigned int unique_id;
-};
-
-struct of_irq_controller;
-struct device_node {
-   const char  *name;
-   const char  *type;
-   phandle node;
-   char*path_component_name;
-   char*full_name;
-
-   struct  property *properties;
-   struct  property *deadprops; /* removed properties */
-   struct  device_node *parent;
-   struct  device_node *child;
-   struct  device_node *sibling;
-   struct  device_node *next;  /* next device of same type */
-   struct  device_node *allnext;   /* next in list of all nodes */
-   struct  proc_dir_entry *pde;/* this node's proc directory */
-   struct  kref kref;
-   unsigned long _flags;
-   void*data;
-   unsigned int unique_id;
-
-   struct of_irq_controller *irq_trans;
-};
-
-struct of_irq_controller {
-   unsigned int(*irq_build)(struct device_node *, unsigned int, void 
*);
-   void*data;
-};
-
-#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, x-_flags)
-#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, x-_flags)
-
-extern struct device_node *of_find_node_by_cpuid(int cpuid);
-extern int of_set_property(struct device_node *node, const char *name, void 
*val, int len);
-extern int of_getintprop_default(struct device_node *np,
-const char *name,
-int def);
-extern int of_find_in_proplist(const char *list, const char *match, int len);
-
-extern void prom_build_devicetree(void);
-

[SPARC]: Merge include/asm-sparc{,64}/of_device.h

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=75b2a0254da8f51c39593ab5841ba53766316730
Commit: 75b2a0254da8f51c39593ab5841ba53766316730
Parent: 97b4872c8db766b37c9b75095e386da7c4eb967d
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Nov 16 00:55:52 2007 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 03:58:32 2008 -0800

[SPARC]: Merge include/asm-sparc{,64}/of_device.h

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/asm-sparc64/of_device.h |   39 +--
 1 files changed, 1 insertions(+), 38 deletions(-)

diff --git a/include/asm-sparc64/of_device.h b/include/asm-sparc64/of_device.h
dissimilarity index 100%
index 46d69b3..a769fdb 100644
--- a/include/asm-sparc64/of_device.h
+++ b/include/asm-sparc64/of_device.h
@@ -1,38 +1 @@
-#ifndef _ASM_SPARC64_OF_DEVICE_H
-#define _ASM_SPARC64_OF_DEVICE_H
-#ifdef __KERNEL__
-
-#include linux/device.h
-#include linux/of.h
-#include linux/mod_devicetable.h
-#include asm/openprom.h
-
-/*
- * The of_device is a kind of base class that is a superset of
- * struct device for use by devices attached to an OF node and
- * probed using OF properties.
- */
-struct of_device
-{
-   struct device_node  *node;
-   struct device   dev;
-   struct resource resource[PROMREG_MAX];
-   unsigned intirqs[PROMINTR_MAX];
-   int num_irqs;
-
-   void*sysdata;
-
-   int slot;
-   int portid;
-   int clock_freq;
-};
-
-extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, 
unsigned long size, char *name);
-extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long 
size);
-
-/* These are just here during the transition */
-#include linux/of_device.h
-#include linux/of_platform.h
-
-#endif /* __KERNEL__ */
-#endif /* _ASM_SPARC64_OF_DEVICE_H */
+#include asm-sparc/of_device.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC]: Merge include/asm-sparc{,64}/auxvec.h

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ab8273606f1767c8ea900ac299cb42457b00323
Commit: 9ab8273606f1767c8ea900ac299cb42457b00323
Parent: 75b2a0254da8f51c39593ab5841ba53766316730
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Nov 16 02:42:29 2007 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 04:00:03 2008 -0800

[SPARC]: Merge include/asm-sparc{,64}/auxvec.h

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/asm-sparc64/auxvec.h |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/include/asm-sparc64/auxvec.h b/include/asm-sparc64/auxvec.h
index 436a291..1f45c67 100644
--- a/include/asm-sparc64/auxvec.h
+++ b/include/asm-sparc64/auxvec.h
@@ -1,4 +1 @@
-#ifndef __ASM_SPARC64_AUXVEC_H
-#define __ASM_SPARC64_AUXVEC_H
-
-#endif /* !(__ASM_SPARC64_AUXVEC_H) */
+#include asm-sparc/auxvec.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC]: Merge asm-sparc{,64}/bpp.h

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ff99b923e6317f8b600620ffb936b13130266d99
Commit: ff99b923e6317f8b600620ffb936b13130266d99
Parent: 9ab8273606f1767c8ea900ac299cb42457b00323
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Nov 16 02:45:01 2007 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 04:00:12 2008 -0800

[SPARC]: Merge asm-sparc{,64}/bpp.h

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/asm-sparc/bpp.h   |2 +-
 include/asm-sparc64/bpp.h |   74 +
 2 files changed, 2 insertions(+), 74 deletions(-)

diff --git a/include/asm-sparc/bpp.h b/include/asm-sparc/bpp.h
index 3578ac1..31f515e 100644
--- a/include/asm-sparc/bpp.h
+++ b/include/asm-sparc/bpp.h
@@ -17,7 +17,7 @@
  * with compliant or compatible devices. It will use whatever features
  * the device supports, prefering those that are typically faster.
  *
- * When the device is opened, it is left in COMPATABILITY mode, and
+ * When the device is opened, it is left in COMPATIBILITY mode, and
  * writes work like any printer device. The driver only attempt to
  * negotiate 1284 modes when needed so that plugs can be pulled,
  * switch boxes switched, etc., without disrupting things. It will
diff --git a/include/asm-sparc64/bpp.h b/include/asm-sparc64/bpp.h
dissimilarity index 100%
index abe163a..514eee2 100644
--- a/include/asm-sparc64/bpp.h
+++ b/include/asm-sparc64/bpp.h
@@ -1,73 +1 @@
-#ifndef _SPARC64_BPP_H
-#define _SPARC64_BPP_H
-
-/*
- * Copyright (c) 1995 Picture Elements
- * Stephen Williams
- * Gus Baldauf
- *
- * Linux/SPARC port by Peter Zaitcev.
- * Integration into SPARC tree by Tom Dyas.
- */
-
-#include  linux/ioctl.h
-
-/*
- * This is a driver that supports IEEE Std 1284-1994 communications
- * with compliant or compatible devices. It will use whatever features
- * the device supports, prefering those that are typically faster.
- *
- * When the device is opened, it is left in COMPATIBILITY mode, and
- * writes work like any printer device. The driver only attempt to
- * negotiate 1284 modes when needed so that plugs can be pulled,
- * switch boxes switched, etc., without disrupting things. It will
- * also leave the device in compatibility mode when closed.
- */
-
-
-
-/*
- * This driver also supplies ioctls to manually manipulate the
- * pins. This is great for testing devices, or writing code to deal
- * with bizzarro-mode of the ACME Special TurboThingy Plus.
- *
- * NOTE: These ioctl currently do not interact well with
- * read/write. Caveat emptor.
- *
- * PUT_PINS allows us to assign the sense of all the pins, including
- * the data pins if being driven by the host. The GET_PINS returns the
- * pins that the peripheral drives, including data if appropriate.
- */
-
-# define BPP_PUT_PINS _IOW('B', 1, int)
-# define BPP_GET_PINS _IOR('B', 2, char) /* that's bogus - should've been _IO 
*/
-# define BPP_PUT_DATA _IOW('B', 3, int)
-# define BPP_GET_DATA _IOR('B', 4, char) /* ditto */
-
-/*
- * Set the data bus to input mode. Disengage the data bin driver and
- * be prepared to read values from the peripheral. If the arg is 0,
- * then revert the bus to output mode.
- */
-# define BPP_SET_INPUT _IOW('B', 5, int)
-
-/*
- * These bits apply to the PUT operation...
- */
-# define BPP_PP_nStrobe   0x0001
-# define BPP_PP_nAutoFd   0x0002
-# define BPP_PP_nInit 0x0004
-# define BPP_PP_nSelectIn 0x0008
-
-/*
- * These apply to the GET operation, which also reads the current value
- * of the previously put values. A bit mask of these will be returned
- * as a bit mask in the return code of the ioctl().
- */
-# define BPP_GP_nAck   0x0100
-# define BPP_GP_Busy   0x0200
-# define BPP_GP_PError 0x0400
-# define BPP_GP_Select 0x0800
-# define BPP_GP_nFault 0x1000
-
-#endif
+#include asm-sparc/bpp.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC]: Kill BSD errno translation table and header files.

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c79ca3f841aeb31aeadd6348f132780b6f658c22
Commit: c79ca3f841aeb31aeadd6348f132780b6f658c22
Parent: ff99b923e6317f8b600620ffb936b13130266d99
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Nov 16 02:49:00 2007 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 04:00:22 2008 -0800

[SPARC]: Kill BSD errno translation table and header files.

Completely unused.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 arch/sparc/kernel/errtbls.c|  144 ++--
 include/asm-sparc/bsderrno.h   |   94 --
 include/asm-sparc64/bsderrno.h |   94 --
 3 files changed, 6 insertions(+), 326 deletions(-)

diff --git a/arch/sparc/kernel/errtbls.c b/arch/sparc/kernel/errtbls.c
index bb36f6e..ed14df7 100644
--- a/arch/sparc/kernel/errtbls.c
+++ b/arch/sparc/kernel/errtbls.c
@@ -1,21 +1,18 @@
-/* $Id: errtbls.c,v 1.2 1995/11/25 00:57:55 davem Exp $
- * errtbls.c: Error number conversion tables between various syscall
- *OS semantics.
+/* errtbls.c: Error number conversion tables.
  *
- * Copyright (C) 1995 David S. Miller ([EMAIL PROTECTED])
+ * Copyright (C) 1995, 2007 David S. Miller ([EMAIL PROTECTED])
  *
  * Based upon preliminary work which is:
  *
  * Copyright (C) 1995 Adrian M. Rodriguez ([EMAIL PROTECTED])
  */
 
-#include asm/bsderrno.h/* NetBSD (bsd4.4) errnos */
 #include asm/solerrno.h/* Solaris errnos */
 
-/* Here are tables which convert between Linux/SunOS error number
- * values to the equivalent in other OSs.  Note that since the Linux
- * ones have been set up to match exactly those of SunOS, no
- * translation table is needed for that OS.
+/* Here is the table which converts between Linux error number values
+ * to the equivalent under Solaris.  Note that since the Linux ones
+ * have been set up to match exactly those of SunOS, no translation
+ * table is needed for that OS.
  */
 
 int solaris_errno[] = {
@@ -145,132 +142,3 @@ int solaris_errno[] = {
SOL_ELIBMAX,
SOL_ELIBSCN,
 };
-
-int netbsd_errno[] = {
-   0,
-   BSD_EPERM,
-   BSD_ENOENT,
-   BSD_ESRCH,
-   BSD_EINTR,
-   BSD_EIO,
-   BSD_ENXIO,
-   BSD_E2BIG,
-   BSD_ENOEXEC,
-   BSD_EBADF,
-   BSD_ECHILD,
-   BSD_EAGAIN,
-   BSD_ENOMEM,
-   BSD_EACCES,
-   BSD_EFAULT,
-   BSD_NOTBLK,
-   BSD_EBUSY,
-   BSD_EEXIST,
-   BSD_EXDEV,
-   BSD_ENODEV,
-   BSD_ENOTDIR,
-   BSD_EISDIR,
-   BSD_EINVAL,
-   BSD_ENFILE,
-   BSD_EMFILE,
-   BSD_ENOTTY,
-   BSD_ETXTBSY,
-   BSD_EFBIG,
-   BSD_ENOSPC,
-   BSD_ESPIPE,
-   BSD_EROFS,
-   BSD_EMLINK,
-   BSD_EPIPE,
-   BSD_EDOM,
-   BSD_ERANGE,
-   BSD_EWOULDBLOCK,
-   BSD_EINPROGRESS,
-   BSD_EALREADY,
-   BSD_ENOTSOCK,
-   BSD_EDESTADDRREQ,
-   BSD_EMSGSIZE,
-   BSD_EPROTOTYPE,
-   BSD_ENOPROTOOPT,
-   BSD_EPROTONOSUPPORT,
-   BSD_ESOCKTNOSUPPORT,
-   BSD_EOPNOTSUPP,
-   BSD_EPFNOSUPPORT,
-   BSD_EAFNOSUPPORT,
-   BSD_EADDRINUSE,
-   BSD_EADDRNOTAVAIL,
-   BSD_ENETDOWN,
-   BSD_ENETUNREACH,
-   BSD_ENETRESET,
-   BSD_ECONNABORTED,
-   BSD_ECONNRESET,
-   BSD_ENOBUFS,
-   BSD_EISCONN,
-   BSD_ENOTONN,
-   BSD_ESHUTDOWN,
-   BSD_ETOOMANYREFS,
-   BSD_ETIMEDOUT,
-   BSD_ECONNREFUSED,
-   BSD_ELOOP,
-   BSD_ENAMETOOLONG,
-   BSD_EHOSTDOWN,
-   BSD_EHOSTUNREACH,
-   BSD_ENOTEMPTY,
-   BSD_EPROCLIM,
-   BSD_EUSERS,
-   BSD_EDQUOT,
-   BSD_ESTALE,
-   BSD_EREMOTE,
-   BSD_ENOSTR,
-   BSD_ETIME,
-   BSD_ENOSR,
-   BSD_ENOMSG,
-   BSD_EBADMSG,
-   BSD_IDRM,
-   BSD_EDEADLK,
-   BSD_ENOLCK,
-   BSD_ENONET,
-   BSD_ERREMOTE,
-   BSD_ENOLINK,
-   BSD_EADV,
-   BSD_ESRMNT,
-   BSD_ECOMM,
-   BSD_EPROTO,
-   BSD_EMULTIHOP,
-   BSD_EINVAL,/* EDOTDOT XXX??? */
-   BSD_REMCHG,
-   BSD_NOSYS,
-   BSD_STRPIPE,
-   BSD_EOVERFLOW,
-   BSD_EBADFD,
-   BSD_ECHRNG,
-   BSD_EL2NSYNC,
-   BSD_EL3HLT,
-   BSD_EL3RST,
-   BSD_NRNG,
-   BSD_EUNATCH,
-   BSD_ENOCSI,
-   BSD_EL2HLT,
-   BSD_EBADE,
-   BSD_EBADR,
-   BSD_EXFULL,
-   BSD_ENOANO,
-   BSD_EBADRQC,
-   BSD_EBADSLT,
-   BSD_EDEADLOCK,
-   BSD_EBFONT,
-   BSD_ELIBEXEC,
-   BSD_ENODATA,
-   BSD_ELIBBAD,
-   BSD_ENOPKG,
-   BSD_ELIBACC,
-   BSD_ENOTUNIQ,
-   BSD_ERESTART,
-   BSD_EUCLEAN,
-   BSD_ENOTNAM,
-   BSD_ENAVAIL,
-   BSD_EISNAM,
-   BSD_EREMOTEIO,
-   BSD_EILSEQ,
-   BSD_ELIBMAX,
-   BSD_ELIBSCN,
-};
-
diff --git a/include/asm-sparc/bsderrno.h b/include/asm-sparc/bsderrno.h
deleted file mode 100644

[SPARC]: Merge asm-sparc{,64}/bug.h

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e10195c232d426b5e960038e10b0df8f75d86309
Commit: e10195c232d426b5e960038e10b0df8f75d86309
Parent: c79ca3f841aeb31aeadd6348f132780b6f658c22
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Nov 16 02:53:50 2007 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 04:00:32 2008 -0800

[SPARC]: Merge asm-sparc{,64}/bug.h

Note that because of minimum compiler version enforcement in
linux/compiler.h these days the check for sparc32 buggy
__builtin_trap() can be safely removed.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/asm-sparc/bug.h   |   56 +---
 include/asm-sparc64/bug.h |   23 +-
 2 files changed, 23 insertions(+), 56 deletions(-)

diff --git a/include/asm-sparc/bug.h b/include/asm-sparc/bug.h
dissimilarity index 60%
index 0415120..8a59e5a 100644
--- a/include/asm-sparc/bug.h
+++ b/include/asm-sparc/bug.h
@@ -1,34 +1,22 @@
-#ifndef _SPARC_BUG_H
-#define _SPARC_BUG_H
-
-#ifdef CONFIG_BUG
-/* Only use the inline asm until a gcc release that can handle __builtin_trap
- * -rob 2003-06-25
- *
- * gcc-3.3.1 and later will be OK -DaveM
- */
-#if (__GNUC__  3) || \
-(__GNUC__ == 3  __GNUC_MINOR__  3) || \
-(__GNUC__ == 3  __GNUC_MINOR__ == 3  __GNUC_PATCHLEVEL__ = 4)
-#define __bug_trap()   __builtin_trap()
-#else
-#define __bug_trap()   \
-   __asm__ __volatile__ (t 0x5\n\t : : )
-#endif
-
-#ifdef CONFIG_DEBUG_BUGVERBOSE
-extern void do_BUG(const char *file, int line);
-#define BUG() do { \
-   do_BUG(__FILE__, __LINE__); \
-   __bug_trap();   \
-} while (0)
-#else
-#define BUG()  __bug_trap()
-#endif
-
-#define HAVE_ARCH_BUG
-#endif
-
-#include asm-generic/bug.h
-
-#endif
+#ifndef _SPARC_BUG_H
+#define _SPARC_BUG_H
+
+#ifdef CONFIG_BUG
+#include linux/compiler.h
+
+#ifdef CONFIG_DEBUG_BUGVERBOSE
+extern void do_BUG(const char *file, int line);
+#define BUG() do { \
+   do_BUG(__FILE__, __LINE__); \
+   __builtin_trap();   \
+} while (0)
+#else
+#define BUG()  __builtin_trap()
+#endif
+
+#define HAVE_ARCH_BUG
+#endif
+
+#include asm-generic/bug.h
+
+#endif
diff --git a/include/asm-sparc64/bug.h b/include/asm-sparc64/bug.h
index 516bb27..3433737 100644
--- a/include/asm-sparc64/bug.h
+++ b/include/asm-sparc64/bug.h
@@ -1,22 +1 @@
-#ifndef _SPARC64_BUG_H
-#define _SPARC64_BUG_H
-
-#ifdef CONFIG_BUG
-#include linux/compiler.h
-
-#ifdef CONFIG_DEBUG_BUGVERBOSE
-extern void do_BUG(const char *file, int line);
-#define BUG() do { \
-   do_BUG(__FILE__, __LINE__); \
-   __builtin_trap();   \
-} while (0)
-#else
-#define BUG()  __builtin_trap()
-#endif
-
-#define HAVE_ARCH_BUG
-#endif
-
-#include asm-generic/bug.h
-
-#endif
+#include asm-sparc/bug.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC]: Merge asm-sparc{,64}/byteorder.h

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f610bbc6accaacdf46501208178ff77c4422587a
Commit: f610bbc6accaacdf46501208178ff77c4422587a
Parent: 145dea009828df7b091e7f7f24497ceb12dbbb3d
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Nov 16 02:59:58 2007 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 04:17:28 2008 -0800

[SPARC]: Merge asm-sparc{,64}/byteorder.h

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/asm-sparc/byteorder.h   |   51 +++---
 include/asm-sparc64/byteorder.h |   50 +-
 2 files changed, 48 insertions(+), 53 deletions(-)

diff --git a/include/asm-sparc/byteorder.h b/include/asm-sparc/byteorder.h
index a2949ae..bcd83aa 100644
--- a/include/asm-sparc/byteorder.h
+++ b/include/asm-sparc/byteorder.h
@@ -1,12 +1,55 @@
-/* $Id: byteorder.h,v 1.15 1997/12/16 19:20:44 davem Exp $ */
 #ifndef _SPARC_BYTEORDER_H
 #define _SPARC_BYTEORDER_H
 
 #include asm/types.h
+#include asm/asi.h
+
+#ifdef __GNUC__
+
+#ifdef CONFIG_SPARC32
+#define __SWAB_64_THRU_32__
+#endif
+
+#ifdef CONFIG_SPARC64
+
+static inline __u16 ___arch__swab16p(const __u16 *addr)
+{
+   __u16 ret;
+
+   __asm__ __volatile__ (lduha [%1] %2, %0
+ : =r (ret)
+ : r (addr), i (ASI_PL));
+   return ret;
+}
+
+static inline __u32 ___arch__swab32p(const __u32 *addr)
+{
+   __u32 ret;
+
+   __asm__ __volatile__ (lduwa [%1] %2, %0
+ : =r (ret)
+ : r (addr), i (ASI_PL));
+   return ret;
+}
+
+static inline __u64 ___arch__swab64p(const __u64 *addr)
+{
+   __u64 ret;
+
+   __asm__ __volatile__ (ldxa [%1] %2, %0
+ : =r (ret)
+ : r (addr), i (ASI_PL));
+   return ret;
+}
+
+#define __arch__swab16p(x) ___arch__swab16p(x)
+#define __arch__swab32p(x) ___arch__swab32p(x)
+#define __arch__swab64p(x) ___arch__swab64p(x)
+
+#endif /* CONFIG_SPARC64 */
+
+#define __BYTEORDER_HAS_U64__
 
-#if defined(__GNUC__)  !defined(__STRICT_ANSI__) || defined(__KERNEL__)
-#  define __BYTEORDER_HAS_U64__
-#  define __SWAB_64_THRU_32__
 #endif
 
 #include linux/byteorder/big_endian.h
diff --git a/include/asm-sparc64/byteorder.h b/include/asm-sparc64/byteorder.h
dissimilarity index 100%
index 3943022..f672855 100644
--- a/include/asm-sparc64/byteorder.h
+++ b/include/asm-sparc64/byteorder.h
@@ -1,49 +1 @@
-#ifndef _SPARC64_BYTEORDER_H
-#define _SPARC64_BYTEORDER_H
-
-#include asm/types.h
-#include asm/asi.h
-
-#ifdef __GNUC__
-
-static inline __u16 ___arch__swab16p(const __u16 *addr)
-{
-   __u16 ret;
-
-   __asm__ __volatile__ (lduha [%1] %2, %0
- : =r (ret)
- : r (addr), i (ASI_PL));
-   return ret;
-}
-
-static inline __u32 ___arch__swab32p(const __u32 *addr)
-{
-   __u32 ret;
-
-   __asm__ __volatile__ (lduwa [%1] %2, %0
- : =r (ret)
- : r (addr), i (ASI_PL));
-   return ret;
-}
-
-static inline __u64 ___arch__swab64p(const __u64 *addr)
-{
-   __u64 ret;
-
-   __asm__ __volatile__ (ldxa [%1] %2, %0
- : =r (ret)
- : r (addr), i (ASI_PL));
-   return ret;
-}
-
-#define __arch__swab16p(x) ___arch__swab16p(x)
-#define __arch__swab32p(x) ___arch__swab32p(x)
-#define __arch__swab64p(x) ___arch__swab64p(x)
-
-#define __BYTEORDER_HAS_U64__
-
-#endif /* __GNUC__ */
-
-#include linux/byteorder/big_endian.h
-
-#endif /* _SPARC64_BYTEORDER_H */
+#include asm-sparc/byteorder.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC]: Merge asm-sparc{,64}/cache.h

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d113fcd9cf807045e38998a60b4f4577c927c300
Commit: d113fcd9cf807045e38998a60b4f4577c927c300
Parent: f610bbc6accaacdf46501208178ff77c4422587a
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Nov 16 03:06:07 2007 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 04:17:37 2008 -0800

[SPARC]: Merge asm-sparc{,64}/cache.h

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 arch/sparc/kernel/vmlinux.lds.S |4 
 include/asm-sparc/cache.h   |   21 +++--
 include/asm-sparc64/cache.h |   19 +--
 3 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index 216147d..b1002c6 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -89,6 +89,10 @@ SECTIONS
.data.cacheline_aligned : {
*(.data.cacheline_aligned)
}
+   . = ALIGN(32);
+   .data.read_mostly : {
+   *(.data.read_mostly)
+   }
 
__bss_start = .;
.sbss : {
diff --git a/include/asm-sparc/cache.h b/include/asm-sparc/cache.h
index cb971e8..41f85ae 100644
--- a/include/asm-sparc/cache.h
+++ b/include/asm-sparc/cache.h
@@ -1,20 +1,28 @@
-/* $Id: cache.h,v 1.9 1999/08/14 03:51:58 anton Exp $
- * cache.h:  Cache specific code for the Sparc.  These include flushing
+/* cache.h:  Cache specific code for the Sparc.  These include flushing
  *   and direct tag/data line access.
  *
- * Copyright (C) 1995 David S. Miller ([EMAIL PROTECTED])
+ * Copyright (C) 1995, 2007 David S. Miller ([EMAIL PROTECTED])
  */
 
 #ifndef _SPARC_CACHE_H
 #define _SPARC_CACHE_H
 
-#include asm/asi.h
-
 #define L1_CACHE_SHIFT 5
 #define L1_CACHE_BYTES 32
 #define L1_CACHE_ALIGN(x) x)+(L1_CACHE_BYTES-1))~(L1_CACHE_BYTES-1)))
 
-#define SMP_CACHE_BYTES 32
+#ifdef CONFIG_SPARC32
+#define SMP_CACHE_BYTES_SHIFT 5
+#else
+#define SMP_CACHE_BYTES_SHIFT 6
+#endif
+
+#define SMP_CACHE_BYTES (1  SMP_CACHE_BYTES_SHIFT)
+
+#define __read_mostly __attribute__((__section__(.data.read_mostly)))
+
+#ifdef CONFIG_SPARC32
+#include asm/asi.h
 
 /* Direct access to the instruction cache is provided through and
  * alternate address space.  The IDC bit must be off in the ICCR on
@@ -125,5 +133,6 @@ static inline void flush_ei_user(unsigned int addr)
 r (addr), i (ASI_M_FLUSH_USER) :
 memory);
 }
+#endif /* CONFIG_SPARC32 */
 
 #endif /* !(_SPARC_CACHE_H) */
diff --git a/include/asm-sparc64/cache.h b/include/asm-sparc64/cache.h
dissimilarity index 100%
index e9df17a..fa9de5c 100644
--- a/include/asm-sparc64/cache.h
+++ b/include/asm-sparc64/cache.h
@@ -1,18 +1 @@
-/*
- * include/asm-sparc64/cache.h
- */
-#ifndef __ARCH_SPARC64_CACHE_H
-#define __ARCH_SPARC64_CACHE_H
-
-/* bytes per L1 cache line */
-#defineL1_CACHE_SHIFT  5
-#defineL1_CACHE_BYTES  32 /* Two 16-byte sub-blocks per line. */
-
-#defineL1_CACHE_ALIGN(x)   
(((x)+(L1_CACHE_BYTES-1))~(L1_CACHE_BYTES-1))
-
-#defineSMP_CACHE_BYTES_SHIFT   6
-#defineSMP_CACHE_BYTES (1  SMP_CACHE_BYTES_SHIFT) /* L2 
cache line size. */
-
-#define __read_mostly __attribute__((__section__(.data.read_mostly)))
-
-#endif
+#include asm-sparc/cache.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC]: Merge asm-sparc{,64}/current.h

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ba89f59ab825d4c9dee652ce0ca53e033a05d5ec
Commit: ba89f59ab825d4c9dee652ce0ca53e033a05d5ec
Parent: cec6dc5d732c649e5f477c21c93d99eb25edae1e
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Nov 16 03:12:56 2007 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 04:17:54 2008 -0800

[SPARC]: Merge asm-sparc{,64}/current.h

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/asm-sparc/current.h   |   31 +--
 include/asm-sparc64/current.h |9 +
 2 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/include/asm-sparc/current.h b/include/asm-sparc/current.h
index 8fe7c82..8a1d9d6 100644
--- a/include/asm-sparc/current.h
+++ b/include/asm-sparc/current.h
@@ -1,31 +1,34 @@
-/*
- *  include/asm-sparc/current.h
+/* include/asm-sparc/current.h
  *
  * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
  * Copyright (C) 2002 Pete Zaitcev ([EMAIL PROTECTED])
+ * Copyright (C) 2007 David S. Miller ([EMAIL PROTECTED])
  *
  *  Derived from include/asm-s390/current.h by
  *  Martin Schwidefsky ([EMAIL PROTECTED])
  *  Derived from include/asm-i386/current.h
- */
-#ifndef _ASM_CURRENT_H
-#define _ASM_CURRENT_H
-
-/*
- * At the sparc64 DaveM keeps current_thread_info in %g4.
- * We might want to consider doing the same to shave a few cycles.
- */
+*/
+#ifndef _SPARC_CURRENT_H
+#define _SPARC_CURRENT_H
 
 #include linux/thread_info.h
 
-struct task_struct;
+#ifdef CONFIG_SPARC64
+register struct task_struct *current asm(g4);
+#endif
 
-/* Two stage process (inline + #define) for type-checking. */
-/* We also obfuscate get_current() to check if anyone used that by mistake. */
+#ifdef CONFIG_SPARC32
+/* We might want to consider using %g4 like sparc64 to shave a few cycles.
+ *
+ * Two stage process (inline + #define) for type-checking.
+ * We also obfuscate get_current() to check if anyone used that by mistake.
+ */
+struct task_struct;
 static inline struct task_struct *__get_current(void)
 {
return current_thread_info()-task;
 }
 #define current __get_current()
+#endif
 
-#endif /* !(_ASM_CURRENT_H) */
+#endif /* !(_SPARC_CURRENT_H) */
diff --git a/include/asm-sparc64/current.h b/include/asm-sparc64/current.h
index 6c21e4e..a7904a7 100644
--- a/include/asm-sparc64/current.h
+++ b/include/asm-sparc64/current.h
@@ -1,8 +1 @@
-#ifndef _SPARC64_CURRENT_H
-#define _SPARC64_CURRENT_H
-
-#include linux/thread_info.h
-
-register struct task_struct *current asm(g4);
-
-#endif /* !(_SPARC64_CURRENT_H) */
+#include asm-sparc/current.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC]: Merge asm-sparc{,64}/div64.h

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4b9b77916fc11f03321079063a6fe2b3733559bb
Commit: 4b9b77916fc11f03321079063a6fe2b3733559bb
Parent: 04c3ddf965ab46f7e24c2399dc85deca2f08ef5b
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Nov 16 03:16:00 2007 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 04:18:08 2008 -0800

[SPARC]: Merge asm-sparc{,64}/div64.h

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/asm-sparc64/div64.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-sparc64/div64.h b/include/asm-sparc64/div64.h
index 6cd978c..928c94f 100644
--- a/include/asm-sparc64/div64.h
+++ b/include/asm-sparc64/div64.h
@@ -1 +1 @@
-#include asm-generic/div64.h
+#include asm-sparc/div64.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC]: Merge asm-sparc{,64}/emergency-restart.h

2008-02-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f11fa82708df824612929d3290ce29d8b3c368fc
Commit: f11fa82708df824612929d3290ce29d8b3c368fc
Parent: 4b9b77916fc11f03321079063a6fe2b3733559bb
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Nov 16 03:21:15 2007 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sat Feb 9 04:18:14 2008 -0800

[SPARC]: Merge asm-sparc{,64}/emergency-restart.h

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/asm-sparc64/emergency-restart.h |7 +--
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/include/asm-sparc64/emergency-restart.h 
b/include/asm-sparc64/emergency-restart.h
index 108d8c4..2cac7b6 100644
--- a/include/asm-sparc64/emergency-restart.h
+++ b/include/asm-sparc64/emergency-restart.h
@@ -1,6 +1 @@
-#ifndef _ASM_EMERGENCY_RESTART_H
-#define _ASM_EMERGENCY_RESTART_H
-
-#include asm-generic/emergency-restart.h
-
-#endif /* _ASM_EMERGENCY_RESTART_H */
+#include asm-sparc/emergency-restart.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


<    4   5   6   7   8   9   10   11   12   13   >