* Re: [PATCH 02/10] [SG] Update block layer to use sg helpers
[not found] ` <1193076664-13652-3-git-send-email-jens.axboe@oracle.com>
@ 2007-10-23 5:13 ` Heiko Carstens
2007-10-23 5:16 ` Jens Axboe
0 siblings, 1 reply; 8+ messages in thread
From: Heiko Carstens @ 2007-10-23 5:13 UTC (permalink / raw)
To: Jens Axboe; +Cc: torvalds, linux-kernel, mingo, Martin Schwidefsky, linux-s390
On Mon, Oct 22, 2007 at 08:10:56PM +0200, Jens Axboe wrote:
> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> ---
> block/ll_rw_blk.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
> index 8025d64..61c2e39 100644
> --- a/block/ll_rw_blk.c
> +++ b/block/ll_rw_blk.c
> @@ -1354,8 +1354,9 @@ new_segment:
> else
> sg = sg_next(sg);
>
> - memset(sg, 0, sizeof(*sg));
> - sg->page = bvec->bv_page;
> + sg_dma_len(sg) = 0;
> + sg_dma_address(sg) = 0;
> + sg_set_page(sg, bvec->bv_page);
> sg->length = nbytes;
> sg->offset = bvec->bv_offset;
> nsegs++;
> @@ -1363,6 +1364,9 @@ new_segment:
> bvprv = bvec;
> } /* segments in rq */
>
> + if (sg)
> + __sg_mark_end(sg);
> +
> return nsegs;
> }
Hmm.... this breaks s390:
CC block/ll_rw_blk.o
block/ll_rw_blk.c: In function 'blk_rq_map_sg':
block/ll_rw_blk.c:1357: error: implicit declaration of function 'sg_dma_len'
block/ll_rw_blk.c:1357: error: lvalue required as left operand of assignment
block/ll_rw_blk.c:1358: error: implicit declaration of function 'sg_dma_address'
block/ll_rw_blk.c:1358: error: lvalue required as left operand of assignment
make[1]: *** [block/ll_rw_blk.o] Error 1
Missing macros and no appropriate members in struct scatterlist since we
don't have DMA. How to fix?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 02/10] [SG] Update block layer to use sg helpers
2007-10-23 5:13 ` [PATCH 02/10] [SG] Update block layer to use sg helpers Heiko Carstens
@ 2007-10-23 5:16 ` Jens Axboe
2007-10-23 5:42 ` [PATCH] fix ll_rw_blk.c build on s390 Heiko Carstens
2007-10-23 5:44 ` [PATCH] net: fix xfrm build - missing scatterlist.h include Heiko Carstens
0 siblings, 2 replies; 8+ messages in thread
From: Jens Axboe @ 2007-10-23 5:16 UTC (permalink / raw)
To: Heiko Carstens
Cc: torvalds, linux-kernel, mingo, Martin Schwidefsky, linux-s390
On Tue, Oct 23 2007, Heiko Carstens wrote:
> On Mon, Oct 22, 2007 at 08:10:56PM +0200, Jens Axboe wrote:
> > Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> > ---
> > block/ll_rw_blk.c | 8 ++++++--
> > 1 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
> > index 8025d64..61c2e39 100644
> > --- a/block/ll_rw_blk.c
> > +++ b/block/ll_rw_blk.c
> > @@ -1354,8 +1354,9 @@ new_segment:
> > else
> > sg = sg_next(sg);
> >
> > - memset(sg, 0, sizeof(*sg));
> > - sg->page = bvec->bv_page;
> > + sg_dma_len(sg) = 0;
> > + sg_dma_address(sg) = 0;
> > + sg_set_page(sg, bvec->bv_page);
> > sg->length = nbytes;
> > sg->offset = bvec->bv_offset;
> > nsegs++;
> > @@ -1363,6 +1364,9 @@ new_segment:
> > bvprv = bvec;
> > } /* segments in rq */
> >
> > + if (sg)
> > + __sg_mark_end(sg);
> > +
> > return nsegs;
> > }
>
> Hmm.... this breaks s390:
>
> CC block/ll_rw_blk.o
> block/ll_rw_blk.c: In function 'blk_rq_map_sg':
> block/ll_rw_blk.c:1357: error: implicit declaration of function 'sg_dma_len'
> block/ll_rw_blk.c:1357: error: lvalue required as left operand of assignment
> block/ll_rw_blk.c:1358: error: implicit declaration of function 'sg_dma_address'
> block/ll_rw_blk.c:1358: error: lvalue required as left operand of assignment
> make[1]: *** [block/ll_rw_blk.o] Error 1
>
> Missing macros and no appropriate members in struct scatterlist since we
> don't have DMA. How to fix?
Just remove the two lines here, there are actually not required.
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] fix ll_rw_blk.c build on s390
2007-10-23 5:16 ` Jens Axboe
@ 2007-10-23 5:42 ` Heiko Carstens
2007-10-23 5:44 ` [PATCH] net: fix xfrm build - missing scatterlist.h include Heiko Carstens
1 sibling, 0 replies; 8+ messages in thread
From: Heiko Carstens @ 2007-10-23 5:42 UTC (permalink / raw)
To: Jens Axboe
Cc: torvalds, linux-kernel, mingo, Martin Schwidefsky, linux-s390,
Andrew Morton
From: Heiko Carstens <heiko.carstens@de.ibm.com>
CC block/ll_rw_blk.o
block/ll_rw_blk.c: In function 'blk_rq_map_sg':
block/ll_rw_blk.c:1357: error: implicit declaration of function 'sg_dma_len'
block/ll_rw_blk.c:1357: error: lvalue required as left operand of assignment
block/ll_rw_blk.c:1358: error: implicit declaration of function 'sg_dma_address'
block/ll_rw_blk.c:1358: error: lvalue required as left operand of assignment
make[1]: *** [block/ll_rw_blk.o] Error 1
make: *** [block] Error 2
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
block/ll_rw_blk.c | 2 --
1 file changed, 2 deletions(-)
Index: linux-2.6/block/ll_rw_blk.c
===================================================================
--- linux-2.6.orig/block/ll_rw_blk.c
+++ linux-2.6/block/ll_rw_blk.c
@@ -1354,8 +1354,6 @@ new_segment:
else
sg = sg_next(sg);
- sg_dma_len(sg) = 0;
- sg_dma_address(sg) = 0;
sg_set_page(sg, bvec->bv_page);
sg->length = nbytes;
sg->offset = bvec->bv_offset;
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] net: fix xfrm build - missing scatterlist.h include
2007-10-23 5:16 ` Jens Axboe
2007-10-23 5:42 ` [PATCH] fix ll_rw_blk.c build on s390 Heiko Carstens
@ 2007-10-23 5:44 ` Heiko Carstens
2007-10-23 7:28 ` Jens Axboe
1 sibling, 1 reply; 8+ messages in thread
From: Heiko Carstens @ 2007-10-23 5:44 UTC (permalink / raw)
To: Jens Axboe
Cc: torvalds, linux-kernel, mingo, Martin Schwidefsky, linux-s390,
David Miller, Andrew Morton
From: Heiko Carstens <heiko.carstens@de.ibm.com>
net/xfrm/xfrm_algo.c: In function 'skb_icv_walk':
net/xfrm/xfrm_algo.c:555: error: implicit declaration of function 'sg_set_page'
make[2]: *** [net/xfrm/xfrm_algo.o] Error 1
Cc: David Miller <davem@davemloft.net>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
net/xfrm/xfrm_algo.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6/net/xfrm/xfrm_algo.c
===================================================================
--- linux-2.6.orig/net/xfrm/xfrm_algo.c
+++ linux-2.6/net/xfrm/xfrm_algo.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/pfkeyv2.h>
#include <linux/crypto.h>
+#include <linux/scatterlist.h>
#include <net/xfrm.h>
#if defined(CONFIG_INET_AH) || defined(CONFIG_INET_AH_MODULE) || defined(CONFIG_INET6_AH) || defined(CONFIG_INET6_AH_MODULE)
#include <net/ah.h>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 04/10] [SG] Update drivers to use sg helpers
[not found] ` <1193076664-13652-5-git-send-email-jens.axboe@oracle.com>
@ 2007-10-23 6:28 ` Heiko Carstens
2007-10-23 7:14 ` Jens Axboe
0 siblings, 1 reply; 8+ messages in thread
From: Heiko Carstens @ 2007-10-23 6:28 UTC (permalink / raw)
To: Jens Axboe
Cc: torvalds, linux-kernel, mingo, Christoph Schmitt, Swen Schillig,
Martin Schwidefsky, linux-s390
On Mon, Oct 22, 2007 at 08:10:58PM +0200, Jens Axboe wrote:
> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> ---
You forgot s390's zfcp driver. But unfortunately the trivial fix below
doesn't work. No more I/O possible. Swen and/or Christof could you
provide a correct fix for this please? Thanks!
---
drivers/s390/scsi/zfcp_def.h | 4 ++--
drivers/s390/scsi/zfcp_erp.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
Index: linux-2.6/drivers/s390/scsi/zfcp_def.h
===================================================================
--- linux-2.6.orig/drivers/s390/scsi/zfcp_def.h
+++ linux-2.6/drivers/s390/scsi/zfcp_def.h
@@ -63,7 +63,7 @@
static inline void *
zfcp_sg_to_address(struct scatterlist *list)
{
- return (void *) (page_address(list->page) + list->offset);
+ return (void *) (page_address(sg_page(list) + list->offset));
}
/**
@@ -74,7 +74,7 @@ zfcp_sg_to_address(struct scatterlist *l
static inline void
zfcp_address_to_sg(void *address, struct scatterlist *list)
{
- list->page = virt_to_page(address);
+ sg_set_page(list, virt_to_page(address));
list->offset = ((unsigned long) address) & (PAGE_SIZE - 1);
}
Index: linux-2.6/drivers/s390/scsi/zfcp_erp.c
===================================================================
--- linux-2.6.orig/drivers/s390/scsi/zfcp_erp.c
+++ linux-2.6/drivers/s390/scsi/zfcp_erp.c
@@ -363,7 +363,7 @@ zfcp_erp_adisc(struct zfcp_port *port)
retval = -ENOMEM;
freemem:
if (address != NULL)
- __free_pages(send_els->req->page, 0);
+ __free_pages(sg_page(send_els->req), 0);
if (send_els != NULL) {
kfree(send_els->req);
kfree(send_els->resp);
@@ -437,7 +437,7 @@ zfcp_erp_adisc_handler(unsigned long dat
out:
zfcp_port_put(port);
- __free_pages(send_els->req->page, 0);
+ __free_pages(sg_page(send_els->req), 0);
kfree(send_els->req);
kfree(send_els->resp);
kfree(send_els);
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 04/10] [SG] Update drivers to use sg helpers
2007-10-23 6:28 ` [PATCH 04/10] [SG] Update drivers to use sg helpers Heiko Carstens
@ 2007-10-23 7:14 ` Jens Axboe
2007-10-23 7:16 ` Heiko Carstens
0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2007-10-23 7:14 UTC (permalink / raw)
To: Heiko Carstens
Cc: torvalds, linux-kernel, mingo, Christoph Schmitt, Swen Schillig,
Martin Schwidefsky, linux-s390
On Tue, Oct 23 2007, Heiko Carstens wrote:
> On Mon, Oct 22, 2007 at 08:10:58PM +0200, Jens Axboe wrote:
> > Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> > ---
>
> You forgot s390's zfcp driver. But unfortunately the trivial fix below
> doesn't work. No more I/O possible. Swen and/or Christof could you
> provide a correct fix for this please? Thanks!
>
> ---
> drivers/s390/scsi/zfcp_def.h | 4 ++--
> drivers/s390/scsi/zfcp_erp.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> Index: linux-2.6/drivers/s390/scsi/zfcp_def.h
> ===================================================================
> --- linux-2.6.orig/drivers/s390/scsi/zfcp_def.h
> +++ linux-2.6/drivers/s390/scsi/zfcp_def.h
> @@ -63,7 +63,7 @@
> static inline void *
> zfcp_sg_to_address(struct scatterlist *list)
> {
> - return (void *) (page_address(list->page) + list->offset);
> + return (void *) (page_address(sg_page(list) + list->offset));
> }
return sg_virt(list); would be better.
I'll fix up the driver, no worries.
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 04/10] [SG] Update drivers to use sg helpers
2007-10-23 7:14 ` Jens Axboe
@ 2007-10-23 7:16 ` Heiko Carstens
0 siblings, 0 replies; 8+ messages in thread
From: Heiko Carstens @ 2007-10-23 7:16 UTC (permalink / raw)
To: Jens Axboe
Cc: torvalds, linux-kernel, mingo, Christoph Schmitt, Swen Schillig,
Martin Schwidefsky, linux-s390
On Tue, Oct 23, 2007 at 09:14:07AM +0200, Jens Axboe wrote:
> On Tue, Oct 23 2007, Heiko Carstens wrote:
> > On Mon, Oct 22, 2007 at 08:10:58PM +0200, Jens Axboe wrote:
> > > Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> > > ---
> >
> > You forgot s390's zfcp driver. But unfortunately the trivial fix below
> > doesn't work. No more I/O possible. Swen and/or Christof could you
> > provide a correct fix for this please? Thanks!
> >
> > ---
> > drivers/s390/scsi/zfcp_def.h | 4 ++--
> > drivers/s390/scsi/zfcp_erp.c | 4 ++--
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > Index: linux-2.6/drivers/s390/scsi/zfcp_def.h
> > ===================================================================
> > --- linux-2.6.orig/drivers/s390/scsi/zfcp_def.h
> > +++ linux-2.6/drivers/s390/scsi/zfcp_def.h
> > @@ -63,7 +63,7 @@
> > static inline void *
> > zfcp_sg_to_address(struct scatterlist *list)
> > {
> > - return (void *) (page_address(list->page) + list->offset);
> > + return (void *) (page_address(sg_page(list) + list->offset));
> > }
>
> return sg_virt(list); would be better.
>
> I'll fix up the driver, no worries.
ok, thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: fix xfrm build - missing scatterlist.h include
2007-10-23 5:44 ` [PATCH] net: fix xfrm build - missing scatterlist.h include Heiko Carstens
@ 2007-10-23 7:28 ` Jens Axboe
0 siblings, 0 replies; 8+ messages in thread
From: Jens Axboe @ 2007-10-23 7:28 UTC (permalink / raw)
To: Heiko Carstens
Cc: torvalds, linux-kernel, mingo, Martin Schwidefsky, linux-s390,
David Miller, Andrew Morton
On Tue, Oct 23 2007, Heiko Carstens wrote:
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
>
> net/xfrm/xfrm_algo.c: In function 'skb_icv_walk':
> net/xfrm/xfrm_algo.c:555: error: implicit declaration of function 'sg_set_page'
> make[2]: *** [net/xfrm/xfrm_algo.o] Error 1
Thanks, arch fallout... Applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-10-23 7:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1193076664-13652-1-git-send-email-jens.axboe@oracle.com>
[not found] ` <1193076664-13652-3-git-send-email-jens.axboe@oracle.com>
2007-10-23 5:13 ` [PATCH 02/10] [SG] Update block layer to use sg helpers Heiko Carstens
2007-10-23 5:16 ` Jens Axboe
2007-10-23 5:42 ` [PATCH] fix ll_rw_blk.c build on s390 Heiko Carstens
2007-10-23 5:44 ` [PATCH] net: fix xfrm build - missing scatterlist.h include Heiko Carstens
2007-10-23 7:28 ` Jens Axboe
[not found] ` <1193076664-13652-5-git-send-email-jens.axboe@oracle.com>
2007-10-23 6:28 ` [PATCH 04/10] [SG] Update drivers to use sg helpers Heiko Carstens
2007-10-23 7:14 ` Jens Axboe
2007-10-23 7:16 ` Heiko Carstens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox