linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <amwang@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Cong Wang <amwang@redhat.com>,
	Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>,
	"David S. Miller" <davem@davemloft.net>,
	rds-devel@oss.oracle.com, netdev@vger.kernel.org
Subject: [PATCH 52/60] rds: remove the second argument of k[un]map_atomic()
Date: Fri, 10 Feb 2012 13:40:13 +0800	[thread overview]
Message-ID: <1328852421-19678-53-git-send-email-amwang@redhat.com> (raw)
In-Reply-To: <1328852421-19678-1-git-send-email-amwang@redhat.com>

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
 net/rds/ib_recv.c  |    7 +++----
 net/rds/info.c     |    6 +++---
 net/rds/iw_recv.c  |    7 +++----
 net/rds/loop.c     |    2 +-
 net/rds/rds.h      |    2 +-
 net/rds/recv.c     |    2 +-
 net/rds/tcp_recv.c |   11 ++++-------
 7 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index e29e0ca..744a00d 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -763,7 +763,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
 		to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off);
 		BUG_ON(to_copy & 7); /* Must be 64bit aligned. */
 
-		addr = kmap_atomic(sg_page(&frag->f_sg), KM_SOFTIRQ0);
+		addr = kmap_atomic(sg_page(&frag->f_sg));
 
 		src = addr + frag_off;
 		dst = (void *)map->m_page_addrs[map_page] + map_off;
@@ -773,7 +773,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
 			uncongested |= ~(*src) & *dst;
 			*dst++ = *src++;
 		}
-		kunmap_atomic(addr, KM_SOFTIRQ0);
+		kunmap_atomic(addr);
 
 		copied += to_copy;
 
@@ -919,8 +919,7 @@ static void rds_ib_process_recv(struct rds_connection *conn,
 			rds_ib_cong_recv(conn, ibinc);
 		else {
 			rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr,
-					  &ibinc->ii_inc, GFP_ATOMIC,
-					  KM_SOFTIRQ0);
+					  &ibinc->ii_inc, GFP_ATOMIC);
 			state->ack_next = be64_to_cpu(hdr->h_sequence);
 			state->ack_next_valid = 1;
 		}
diff --git a/net/rds/info.c b/net/rds/info.c
index f1c016c..9a6b4f6 100644
--- a/net/rds/info.c
+++ b/net/rds/info.c
@@ -104,7 +104,7 @@ EXPORT_SYMBOL_GPL(rds_info_deregister_func);
 void rds_info_iter_unmap(struct rds_info_iterator *iter)
 {
 	if (iter->addr) {
-		kunmap_atomic(iter->addr, KM_USER0);
+		kunmap_atomic(iter->addr);
 		iter->addr = NULL;
 	}
 }
@@ -119,7 +119,7 @@ void rds_info_copy(struct rds_info_iterator *iter, void *data,
 
 	while (bytes) {
 		if (!iter->addr)
-			iter->addr = kmap_atomic(*iter->pages, KM_USER0);
+			iter->addr = kmap_atomic(*iter->pages);
 
 		this = min(bytes, PAGE_SIZE - iter->offset);
 
@@ -134,7 +134,7 @@ void rds_info_copy(struct rds_info_iterator *iter, void *data,
 		iter->offset += this;
 
 		if (iter->offset == PAGE_SIZE) {
-			kunmap_atomic(iter->addr, KM_USER0);
+			kunmap_atomic(iter->addr);
 			iter->addr = NULL;
 			iter->offset = 0;
 			iter->pages++;
diff --git a/net/rds/iw_recv.c b/net/rds/iw_recv.c
index 5e57347..0bd9b5e 100644
--- a/net/rds/iw_recv.c
+++ b/net/rds/iw_recv.c
@@ -598,7 +598,7 @@ static void rds_iw_cong_recv(struct rds_connection *conn,
 		to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off);
 		BUG_ON(to_copy & 7); /* Must be 64bit aligned. */
 
-		addr = kmap_atomic(frag->f_page, KM_SOFTIRQ0);
+		addr = kmap_atomic(frag->f_page);
 
 		src = addr + frag_off;
 		dst = (void *)map->m_page_addrs[map_page] + map_off;
@@ -608,7 +608,7 @@ static void rds_iw_cong_recv(struct rds_connection *conn,
 			uncongested |= ~(*src) & *dst;
 			*dst++ = *src++;
 		}
-		kunmap_atomic(addr, KM_SOFTIRQ0);
+		kunmap_atomic(addr);
 
 		copied += to_copy;
 
@@ -754,8 +754,7 @@ static void rds_iw_process_recv(struct rds_connection *conn,
 			rds_iw_cong_recv(conn, iwinc);
 		else {
 			rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr,
-					  &iwinc->ii_inc, GFP_ATOMIC,
-					  KM_SOFTIRQ0);
+					  &iwinc->ii_inc, GFP_ATOMIC);
 			state->ack_next = be64_to_cpu(hdr->h_sequence);
 			state->ack_next_valid = 1;
 		}
diff --git a/net/rds/loop.c b/net/rds/loop.c
index bca6761..87ff2a8 100644
--- a/net/rds/loop.c
+++ b/net/rds/loop.c
@@ -79,7 +79,7 @@ static int rds_loop_xmit(struct rds_connection *conn, struct rds_message *rm,
 	rds_message_addref(rm);
 
 	rds_recv_incoming(conn, conn->c_laddr, conn->c_faddr, &rm->m_inc,
-			  GFP_KERNEL, KM_USER0);
+			  GFP_KERNEL);
 
 	rds_send_drop_acked(conn, be64_to_cpu(rm->m_inc.i_hdr.h_sequence),
 			    NULL);
diff --git a/net/rds/rds.h b/net/rds/rds.h
index 7eaba18..ec1d731 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -704,7 +704,7 @@ void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn,
 		  __be32 saddr);
 void rds_inc_put(struct rds_incoming *inc);
 void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
-		       struct rds_incoming *inc, gfp_t gfp, enum km_type km);
+		       struct rds_incoming *inc, gfp_t gfp);
 int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
 		size_t size, int msg_flags);
 void rds_clear_recv_queue(struct rds_sock *rs);
diff --git a/net/rds/recv.c b/net/rds/recv.c
index bc3f8cd..5c6e9f1 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -155,7 +155,7 @@ static void rds_recv_incoming_exthdrs(struct rds_incoming *inc, struct rds_sock
  * tell us which roles the addrs in the conn are playing for this message.
  */
 void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
-		       struct rds_incoming *inc, gfp_t gfp, enum km_type km)
+		       struct rds_incoming *inc, gfp_t gfp)
 {
 	struct rds_sock *rs = NULL;
 	struct sock *sk;
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c
index 78205e2..6243258 100644
--- a/net/rds/tcp_recv.c
+++ b/net/rds/tcp_recv.c
@@ -169,7 +169,6 @@ static void rds_tcp_cong_recv(struct rds_connection *conn,
 struct rds_tcp_desc_arg {
 	struct rds_connection *conn;
 	gfp_t gfp;
-	enum km_type km;
 };
 
 static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb,
@@ -255,7 +254,7 @@ static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb,
 			else
 				rds_recv_incoming(conn, conn->c_faddr,
 						  conn->c_laddr, &tinc->ti_inc,
-						  arg->gfp, arg->km);
+						  arg->gfp);
 
 			tc->t_tinc_hdr_rem = sizeof(struct rds_header);
 			tc->t_tinc_data_rem = 0;
@@ -272,8 +271,7 @@ out:
 }
 
 /* the caller has to hold the sock lock */
-static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp,
-			     enum km_type km)
+static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp)
 {
 	struct rds_tcp_connection *tc = conn->c_transport_data;
 	struct socket *sock = tc->t_sock;
@@ -283,7 +281,6 @@ static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp,
 	/* It's like glib in the kernel! */
 	arg.conn = conn;
 	arg.gfp = gfp;
-	arg.km = km;
 	desc.arg.data = &arg;
 	desc.error = 0;
 	desc.count = 1; /* give more than one skb per call */
@@ -311,7 +308,7 @@ int rds_tcp_recv(struct rds_connection *conn)
 	rdsdebug("recv worker conn %p tc %p sock %p\n", conn, tc, sock);
 
 	lock_sock(sock->sk);
-	ret = rds_tcp_read_sock(conn, GFP_KERNEL, KM_USER0);
+	ret = rds_tcp_read_sock(conn, GFP_KERNEL);
 	release_sock(sock->sk);
 
 	return ret;
@@ -336,7 +333,7 @@ void rds_tcp_data_ready(struct sock *sk, int bytes)
 	ready = tc->t_orig_data_ready;
 	rds_tcp_stats_inc(s_tcp_data_ready_calls);
 
-	if (rds_tcp_read_sock(conn, GFP_ATOMIC, KM_SOFTIRQ0) == -ENOMEM)
+	if (rds_tcp_read_sock(conn, GFP_ATOMIC) == -ENOMEM)
 		queue_delayed_work(rds_wq, &conn->c_recv_w, 0);
 out:
 	read_unlock_bh(&sk->sk_callback_lock);
-- 
1.7.7.6


  parent reply	other threads:[~2012-02-10  5:47 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10  5:39 [Resend PATCH 00/60] highmem: remove the second argument of k[un]map_atomic() Cong Wang
2012-02-10  5:39 ` [PATCH 01/60] highmem: mark k[un]map_atomic() with two arguments as deprecated Cong Wang
2012-02-17 23:59   ` Andrew Morton
2012-02-19 14:57     ` Cong Wang
2012-02-10  5:39 ` [PATCH 02/60] include/linux/highmem.h: remove the second argument of k[un]map_atomic() Cong Wang
2012-02-10  5:39 ` [PATCH 03/60] arm: " Cong Wang
2012-02-10  5:39 ` [PATCH 04/60] mips: " Cong Wang
2012-02-10  5:39 ` [PATCH 05/60] powerpc: " Cong Wang
2012-02-10  5:39 ` [PATCH 06/60] sh: " Cong Wang
2012-02-10  5:39 ` [PATCH 07/60] um: " Cong Wang
2012-02-10  5:39 ` [PATCH 08/60] x86: " Cong Wang
2012-02-10  5:39 ` [PATCH 09/60] crypto: " Cong Wang
2012-02-10  5:39 ` [PATCH 10/60] ata: " Cong Wang
2012-02-10  5:39 ` [PATCH 11/60] block: " Cong Wang
2012-02-10  5:39 ` [PATCH 12/60] crypto: " Cong Wang
2012-02-10  5:39 ` [PATCH 13/60] edac: " Cong Wang
2012-02-10  5:39 ` [PATCH 14/60] drm: " Cong Wang
2012-02-10  7:05   ` Thomas Hellstrom
2012-02-10  5:39 ` [PATCH 15/60] ide: " Cong Wang
2012-02-10  5:39 ` [PATCH 16/60] infiniband: " Cong Wang
2012-02-10  5:39 ` [PATCH 17/60] md: " Cong Wang
2012-02-10  5:39 ` [PATCH 18/60] media: " Cong Wang
2012-02-10  5:39 ` [PATCH 19/60] memstick: " Cong Wang
2012-02-10  5:39 ` [PATCH 20/60] net: " Cong Wang
2012-02-10  5:39 ` [PATCH 22/60] hv: " Cong Wang
2012-02-10  5:39 ` [PATCH 23/60] rtl8192u: " Cong Wang
2012-02-10  5:39 ` [PATCH 24/60] zram: " Cong Wang
2012-02-10  5:39 ` [PATCH 25/60] target: " Cong Wang
2012-02-10 22:18   ` Nicholas A. Bellinger
2012-02-13  7:44     ` Cong Wang
2012-02-10  5:39 ` [PATCH 26/60] vhost: " Cong Wang
2012-02-10  5:39 ` [PATCH 27/60] fs: " Cong Wang
2012-02-10  5:39 ` [PATCH 28/60] btrfs: " Cong Wang
2012-02-10  5:39 ` [PATCH 29/60] ecryptfs: " Cong Wang
2012-02-10 20:16   ` Tyler Hicks
2012-02-13  7:46     ` Cong Wang
2012-02-10  5:39 ` [PATCH 30/60] afs: " Cong Wang
2012-02-10  5:39 ` [PATCH 31/60] exofs: " Cong Wang
2012-02-10  5:39 ` [PATCH 32/60] ext2: " Cong Wang
2012-02-10  5:39 ` [PATCH 33/60] fuse: " Cong Wang
2012-02-10  5:39 ` [PATCH 34/60] gfs2: " Cong Wang
2012-02-10  5:39 ` [PATCH 35/60] jbd: " Cong Wang
2012-02-10  5:39 ` [PATCH 36/60] jbd2: " Cong Wang
2012-02-10  5:39 ` [PATCH 37/60] logfs: " Cong Wang
2012-02-10  5:39 ` [PATCH 38/60] minix: " Cong Wang
2012-02-10  5:40 ` [PATCH 39/60] nfs: " Cong Wang
2012-02-10  5:40 ` [PATCH 40/60] nilfs2: " Cong Wang
2012-02-10  5:40 ` [PATCH 41/60] ntfs: " Cong Wang
2012-02-10  5:40 ` [PATCH 42/60] ocfs2: " Cong Wang
2012-02-10  5:40 ` [PATCH 43/60] reiserfs: " Cong Wang
2012-02-10  5:40 ` [PATCH 44/60] squashfs: " Cong Wang
2012-02-10  5:40 ` [PATCH 45/60] ubifs: " Cong Wang
2012-02-10  5:40 ` [PATCH 46/60] udf: " Cong Wang
2012-02-10  5:40 ` [PATCH 47/60] kdb: " Cong Wang
2012-02-10  5:40 ` [PATCH 48/60] power: " Cong Wang
2012-02-10  5:40 ` [PATCH 49/60] lib: " Cong Wang
2012-02-10  5:40 ` [PATCH 50/60] mm: " Cong Wang
2012-02-10  5:40 ` [PATCH 51/60] net: " Cong Wang
2012-02-10  5:40 ` Cong Wang [this message]
2012-02-10  5:40 ` [PATCH 53/60] sunrpc: " Cong Wang
2012-02-10  5:40 ` [PATCH 54/60] tomoyo: " Cong Wang
2012-02-10  5:40 ` [PATCH 55/60] dm: " Cong Wang
2012-02-10  5:40 ` [PATCH 56/60] gma500: " Cong Wang
2012-02-10  5:40 ` [PATCH 57/60] zcache: " Cong Wang
2012-02-10  5:40 ` [PATCH 58/60] drbd: " Cong Wang
     [not found]   ` <CA+xKNSgdt7mc2NYTbprFspE54R_4T4PTzyGKyKESqBRyaNCPJg@mail.gmail.com>
2012-02-13  7:43     ` [Drbd-dev] " Cong Wang
2012-02-10  5:40 ` [PATCH 60/60] feature-removal-schedule.txt: schedule the deprecated form of kmap_atomic() for removal Cong Wang
     [not found] ` <1328852421-19678-60-git-send-email-amwang@redhat.com>
2012-02-10 13:05   ` [PATCH 59/60] highmem: kill all __kmap_atomic() [swarren@nvidia.com: highmem: Fix ARM build break due to __kmap_atomic rename] Chris Metcalf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1328852421-19678-53-git-send-email-amwang@redhat.com \
    --to=amwang@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rds-devel@oss.oracle.com \
    --cc=venkat.x.venkatsubra@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).