Frans Pop | 31 Jul 2009 14:46
Picon

nfs: __setup_str_nfs_root_setup causes a section type conflict

While compiling v2.6.31-rc4-294-gf5886c7 for parisc (64-bits) I ran into 
the following compilation error:

/home/fjp/projects/kernel/linux-2.6/fs/nfs/nfsroot.c:403:
    error: __setup_str_nfs_root_setup causes a section type conflict
make[7]: *** [fs/nfs/nfsroot.o] Error 1

Cheers,
FJP

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.31-rc4
# Fri Jul 31 14:37:41 2009
#
CONFIG_PARISC=y
CONFIG_MMU=y
CONFIG_STACK_GROWSUP=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_TIME=y
CONFIG_TIME_LOW_RES=y
CONFIG_GENERIC_HARDIRQS=y
(Continue reading)

Guy Martin | 16 Jul 2008 19:58
Picon
Favicon

64bit kernel not booting with CONFIG_PRINTK_TIME=y


Hi all,

I've been trying several times to boot a 64bit kernel with
CONFIG_PRINTK_TIME=y and each time it failed.

This is the output of my L2000 when trying to do so :

Information: No console specified on kernel command line. This is
normal. PALO will choose the console currently used by firmware
(serial). Command line for kernel: 'root=/dev/md1 console=ttyS0
palo_kernel=2/vmlinux' Selected kernel: /vmlinux from partition 2
ELF64 executable
Entry 00100000 first 00100000 n 2
Segment 0 load 00100000 size 4997120 mediaptr 0x1000
Segment 1 load 00634000 size 640576 mediaptr 0x4c5000
Branching to kernel entry point 0x00100000.  If this is the last
message you see, you may need to switch your console.  This is
a common symptom -- search the FAQ and mailing list at parisc-linux.org

************* SYSTEM ALERT **************
SYSTEM NAME: uninitialized
DATE: 07/16/2008 TIME: 17:47:39
ALERT LEVEL: 7 = reserved

REASON FOR ALERT
SOURCE: 0 = unknown, no source stated
SOURCE DETAIL: 0 = unknown, no source stated   SOURCE ID: FF
PROBLEM DETAIL: 0 = no problem detail

(Continue reading)

Frans Pop | 27 Nov 2007 10:47
Picon

[parisc] 2.6.24-rc3 (64-bit, smp) fails to boot on 9000/785/J5600

(resending as address for port list was incorrect)

v2.6.24-rc3-19-g2ffbb83 fails very early in the boot procedure.
2.6.23 compiled with similar config boots fine.

System is running Debian unstable; kernel was compiled using gcc 4.1.2.

Cheers,
Frans Pop

Boot messages for 2.6.24
------------------------
Command line for kernel: 'root=/dev/sda5 HOME=/ console=ttyS0 TERM=vt102 
palo_kernel='
Selected kernel: /vmlinuz-2.6.24-rc3 from partition 2
Selected ramdisk: /initrd.img-2.6.24-rc3 from partition 2
ELF64 executable
Entry 00100000 first 00100000 n 2
Segment 0 load 00100000 size 4648960 mediaptr 0x1000
Segment 1 load 005c4000 size 689216 mediaptr 0x470000
Loading ramdisk 3078237 bytes  <at>  3fcff000...
Branching to kernel entry point 0x00100000.  If this is the last
message you see, you may need to switch your console.  This is
a common symptom -- search the FAQ and mailing list at parisc-linux.org

Linux version 2.6.24-rc3 (root <at> treebeard) (gcc version 4.1.3 20071019 
(prerelease) (D7
FP[0] enabled: Rev 1 Model 16
The 64-bit Kernel has started...
console [ttyB0] enabled
(Continue reading)

Frans Pop | 27 Nov 2007 10:26
Picon

[parisc] 2.6.24-rc3 (64-bit, smp) fails to boot on 9000/785/J5600

v2.6.24-rc3-19-g2ffbb83 fails very early in the boot procedure.
2.6.23 compiled with similar config boots fine.

System is running Debian unstable; kernel was compiled using gcc 4.1.2.

Cheers,
Frans Pop

Boot messages for 2.6.24
------------------------
Command line for kernel: 'root=/dev/sda5 HOME=/ console=ttyS0 TERM=vt102 palo_kernel='
Selected kernel: /vmlinuz-2.6.24-rc3 from partition 2
Selected ramdisk: /initrd.img-2.6.24-rc3 from partition 2
ELF64 executable
Entry 00100000 first 00100000 n 2
Segment 0 load 00100000 size 4648960 mediaptr 0x1000
Segment 1 load 005c4000 size 689216 mediaptr 0x470000
Loading ramdisk 3078237 bytes  <at>  3fcff000...
Branching to kernel entry point 0x00100000.  If this is the last
message you see, you may need to switch your console.  This is
a common symptom -- search the FAQ and mailing list at parisc-linux.org

Linux version 2.6.24-rc3 (root <at> treebeard) (gcc version 4.1.3 20071019 (prerelease) (D7
FP[0] enabled: Rev 1 Model 16
The 64-bit Kernel has started...
console [ttyB0] enabled
Initialized PDC Console for debugging.
Determining PDC firmware type: System Map.
model 00005d10 00000491 00000000 00000002 778fe5fc 100000f0 00000008 000000b2 000000b2
vers  00000300
(Continue reading)

程模建 | 3 Nov 2007 04:26

unsubscribe

unsubscribe

_______________________________________________
parisc-linux mailing list
parisc-linux <at> lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
程模建 | 3 Nov 2007 04:21

(no subject)

unsubscribe

_______________________________________________
parisc-linux mailing list
parisc-linux <at> lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
Jesse Dougherty | 25 Oct 2007 18:07

<Plug> HP Visualize Workstations for sale - PA-Risc HP-UX

Hi All... We have the HP-UX Visualize series RISC workstations in stock and
listed below. Feel free to call or email if interested in any of the
following boxes, we have several of each type in stock. We can custom
configure these boxes to your specifications. All boxes come plug and play
with hp-ux OS pre-loaded, 60-day warranty, and basic HP-UX set-up support.

C8000 workstation - 1 x 1GHz CPU, 4GB Memory, 147GB disk, FireGL Graphics -
$3,800.00

J6750 workstation - 2 x 875MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
$500.00
J6700 workstation - 2 x 750MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
$350.00
J6000 workstation - 2 x 552MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
$450.00
J5600 workstation - 2 x 552MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
$475.00
J5000 workstation - 2 x 440MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
$425.00

C3750 workstation - 1 x 875MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
$450.00
C3700 workstation - 1 x 750MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
$350.00
C3650 workstation - 1 x 625MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
$300.00
C3600 workstation - 1 x 552MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
call for availability
C3000 workstation - 1 x 400MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
$400.00

B2600 workstation - 1 x 500MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
call for availability
B2000 workstation - 1 x 400MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
$325.00
B1000 workstation - 1 x 300MHz CPU, 1GB Memory, 73GB disk, FX10 Graphics -
$325.00

We also sell classic HP-UX workstations such as the following, feel free to
call or email to get any HP pricing or any HP-UX hardware solutions.

J2240 workstation - 2 x 236MHz CPU
J282 workstation - 1/2 x 180MHz CPU
J280 workstation - 1 x 180MHz CPU
J210 workstation - 1/2 x 120MHz CPU
J210XC workstation - 1/2 x 120MHz CPU
J200 workstation - 1/2 x 100MHz CPU

C360 workstation - 1 x 367MHz CPU
C240 workstation - 1 x 236MHz CPU
C200 workstation - 1 x 200MHz CPU
C180 workstation - 1 x 180MHz CPU
C180XP workstation - 1 x 180MHz CPU
C160L workstation - 1 x 160MHz CPU
C160 workstation - 1 x 160MHz CPU
C132L workstation - 1 x 132MHz CPU
C110 workstation - 1 x 120MHz CPU
C100 workstation - 1 x 100MHz CPU

B180L workstation - 1 x 180MHz CPU
B160L workstation - 1 x 160MHz CPU
B132L workstation - 1 x 132MHz CPU
B132L+ workstation - 1 x 132MHz CPU

705 workstation - 1 x 35MHz CPU
710 workstation - 1 x 50MHz CPU
712-60 workstation - 1 x 60MHz CPU
712-80 workstation - 1 x 80MHz CPU
712-100 workstation - 1 x 100MHz CPU
715-33 workstation - 1 x 33MHz CPU
715-50 workstation - 1 x 50MHz CPU
715-64 workstation - 1 x 64MHz CPU
715-75 workstation - 1 x 75MHz CPU
715-80 workstation - 1 x 80MHz CPU
715-100 workstation - 1 x 100MHz CPU
715-100XC workstation - 1 x 100MHz CPU
720 workstation - 1 x 50MHz CPU
725-50 workstation - 1 x 50MHz CPU
725-75 workstation - 1 x 75MHz CPU
725-100 workstation - 1 x 100MHz CPU
730 workstation - 1 x 66MHz CPU
735-99 workstation - 1 x 99MHz CPU
735-125 workstation - 1 x 125MHz CPU
745i-50 workstation - 1 x 50MHz CPU
745i-100 workstation - 1 x 100MHz CPU
747i-50 workstation - 1 x 50MHz CPU
747i-100 workstation - 1 x 100MHz CPU
748i-64 workstation - 1 x 64MHz CPU
748i-100 workstation - 1 x 100MHz CPU
748-132L workstation - 1 x 132MHz CPU
748-165L workstation - 1 x 165MHz CPU
745-132L workstation - 1 x 165MHz CPU
745-165L workstation - 1 x 165MHz CPU
750 workstation - 1 x 66MHz CPU
755-99 workstation - 1 x 99MHz CPU
755-125 workstation - 1 x 125MHz CPU

300 Series Workstations and controllers

Thanks
Jesse Dougherty
Cypress Technology, Inc
Re-Sellers of HP 3000/9000 products
8565A Somerset Drive
Largo, FL 33773
727-557-0911 / fax 727-557-0121
jesse <at> cypress-tech.com
www.cypress-tech.com
Joel Soete | 25 Oct 2007 09:13
Picon
Favicon

Re: [patch 2/2] backport of sba sg list management to ccio-dma

> On Tue, Oct 23, 2007 at 06:15:34PM +0200, Joel Soete wrote:
> ...
> > This seems to be better fls then ffs like:
> > int get_iovp_order_faster(unsigned long size)
> > {
> > 	return fls((size - 1) >> (IOVP_SHIFT));
> > }
> 
> Yes, I didn't really think about fls() vs ffs().
> But you figured it out. :)
> 
> I just wanted the asm() version that's 10x faster than looping through
> and testing each bit.
> 
I attached 2 test files (GetOrder-o.c using the original kernel get_iovp_order
 routine and GetOrder-f.c using supposed faster release) and here are some
results:
# gcc -O2 -o GetOrder-o GetOrder-o.c 
# gcc -O2 -o GetOrder-f GetOrder-f.c 

# time ./GetOrder-o

real    0m40.576s
user    0m39.990s
sys     0m0.004s

# time ./GetOrder-f

real    0m1.401s
user    0m1.348s
sys     0m0.008s

# gcc -o GetOrder-o GetOrder-o.c 
# gcc -o GetOrder-f GetOrder-f.c 

# time ./GetOrder-o

real    4m54.438s
user    4m48.486s
sys     0m0.044s

# time ./GetOrder-f

real    1m22.989s
user    1m21.317s
sys     0m0.016s

I didn't check in more details the difference of results between not-optimized
and optimized (-O2) compile but it's clear it's faster ;-)

(why not push this in upstream? [I mean ./include/asm-generic/page.h])

> 
> > Even thought following test seems to be ok:
> > 	unsigned int a;
> > 	unsigned long ul;
> > 
> > 	/* for proof of concept
> > 	*/
> > 	for (ul=0; ul<536870914; ul++) {
> > 		if ( get_iovp_order(ul) != get_iovp_order_faster(ul) ) {
> > 			printf("get_iovp_order(%ld) = %ld (0x%x)\n\n", ul, a =
get_iovp_order(ul), a);
> > 			printf("get_iovp_order_faster(%ld) = %ld (0x%x)\n\n", ul, a =
> > get_iovp_order_faster(ul), a);
> > 			exit (1);
> > 		}
> > 	}
> > 
> > But what would give the kernel generic (include/asm-generic/page.h: this is
> > what get_iovp_order() is if IOVP_SHIFT==PAGE_SHIFT) get_order(0): 0?
> > the answer is 20 for paric and ia32?
> 
> I don't know offhand.
> I'm not sure we have to handle that case...or if we do, make sure it's
handled correctly in get_iovp_order().
> 
I just hope so that linux check to never call get_order(0) ;-)

> > > ...
> > > +#ifdef CCIO_MAP_STATS
> > > +		ioc->usg_pages += sg_dma_len(sglist) >> IOVP_SHIFT;
> > > +		ioc->usingle_calls--;   /* kluge since call is unmap_sg() */
> > > +#endif
> > >
> > > I wouldn't add MAP_STATS here.
> > > They aren't enabled in SBA becuase they impact performance too much.
> > > I expect that will always be true and would seriously consider removing
> > > MAP_STATS code from SBA as well. Timing the bitmap search is
> > > probably the only critical bit of info that really matters.
> > > And that's for developement/testing only.
> > >
> > mmm, I would so let stay here but with just additional comment to prevent to
> > activate it outside this development/testing context?
> 
> That's fine too.

In fact it would be useless as the begining of the src this #define was
already commented this way ;-)

> Just making a suggestion here since stats are alot less
> useful when stats interfere with the actual performance measurements.
> Reducing the stats only measuring the search time would make more sense
> to me.
> 
understand. (I will remove this too so, even thought tbh I didn't yet test
this feature)

> cheers,
> grant
> 
> 
Many tx,
    J.

PS: I play a bit with this stuff and surprisingly with latest git grab of
2.6.23, the narrow s-e disk (on LASI ncr53c710 hba) seems to be usable: I
reach to update an debian unstable installation not updated since a year
(about 430 upgrade) with just few and harmless "Bus Reset ..." and "failing
command because of reset, ..." 
---
Pack Scarlet One, ADSL 6 Mbps + Telephonie, a partir de EUR 29,95...
http://www.scarlet.be/
Attachment (GetOrder-o.c): application/octet-stream, 1199 bytes
Attachment (GetOrder-f.c): application/octet-stream, 1731 bytes
_______________________________________________
parisc-linux mailing list
parisc-linux <at> lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
Emil Medve | 23 Oct 2007 18:14
Favicon

[PATCH] Use the new sg_page() helper

Fix build error messages such as this:

In file included from include/linux/dma-mapping.h:52,
                 from include/linux/dmaengine.h:29,
                 from include/linux/skbuff.h:29,
                 from include/linux/netlink.h:155,
                 from include/linux/genetlink.h:4,
                 from include/net/genetlink.h:4,
                 from include/linux/taskstats_kern.h:12,
                 from init/main.c:46:
include/asm/dma-mapping.h: In function 'dma_map_sg':
include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page'
include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page'
include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page'
include/asm/dma-mapping.h:290: error: 'struct scatterlist' has no member named 'page'

This change in the struct scatterlist was introduced by this commit: 18dabf473e15850c0dbc8ff13ac1e2806d542c15

Signed-off-by: Emil Medve <Emilian.Medve <at> Freescale.com>
---

linux-2.6> scripts/checkpatch.pl 0001-Use-the-new-sg_page-helper.patch 
Your patch has no obvious style problems and is ready for submission.

 drivers/mmc/host/mmci.h           |    4 ++--
 drivers/pci/intel-iommu.c         |    2 +-
 include/asm-arm/dma-mapping.h     |    8 ++++----
 include/asm-parisc/scatterlist.h  |    3 ++-
 include/asm-powerpc/dma-mapping.h |   10 +++++-----
 include/asm-xtensa/dma-mapping.h  |   10 +++++-----
 6 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h
index 000e6a9..de3c223 100644
--- a/drivers/mmc/host/mmci.h
+++ b/drivers/mmc/host/mmci.h
 <at>  <at>  -112,7 +112,7  <at>  <at> 
  * The size of the FIFO in bytes.
  */
 #define MCI_FIFOSIZE	(16*4)
-	
+
 #define MCI_FIFOHALFSIZE (MCI_FIFOSIZE / 2)

 #define NR_SG		16
 <at>  <at>  -169,7 +169,7  <at>  <at>  static inline char *mmci_kmap_atomic(struct mmci_host *host, unsigned long *flag
 	struct scatterlist *sg = host->sg_ptr;

 	local_irq_save(*flags);
-	return kmap_atomic(sg->page, KM_BIO_SRC_IRQ) + sg->offset;
+	return kmap_atomic(sg_page(sg), KM_BIO_SRC_IRQ) + sg->offset;
 }

 static inline void mmci_kunmap_atomic(struct mmci_host *host, void *buffer, unsigned long *flags)
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index b3d7031..347948c 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
 <at>  <at>  -2010,7 +2010,7  <at>  <at>  static int intel_nontranslate_map_sg(struct device *hddev,
 	struct scatterlist *sg;

 	for_each_sg(sglist, sg, nelems, i) {
-		BUG_ON(!sg->page);
+		BUG_ON(!sg_page(sg));
 		sg->dma_address = virt_to_bus(SG_ENT_VIRT_ADDRESS(sg));
 		sg->dma_length = sg->length;
 	}
diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h
index 1eb8aac..08afd5a 100644
--- a/include/asm-arm/dma-mapping.h
+++ b/include/asm-arm/dma-mapping.h
 <at>  <at>  -274,8 +274,8  <at>  <at>  dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
 	for (i = 0; i < nents; i++, sg++) {
 		char *virt;

-		sg->dma_address = page_to_dma(dev, sg->page) + sg->offset;
-		virt = page_address(sg->page) + sg->offset;
+		sg->dma_address = page_to_dma(dev, sg_page(sg)) + sg->offset;
+		virt = page_address(sg_page(sg)) + sg->offset;

 		if (!arch_is_coherent())
 			dma_cache_maint(virt, sg->length, dir);
 <at>  <at>  -371,7 +371,7  <at>  <at>  dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
 	int i;

 	for (i = 0; i < nents; i++, sg++) {
-		char *virt = page_address(sg->page) + sg->offset;
+		char *virt = page_address(sg_page(sg)) + sg->offset;
 		if (!arch_is_coherent())
 			dma_cache_maint(virt, sg->length, dir);
 	}
 <at>  <at>  -384,7 +384,7  <at>  <at>  dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
 	int i;

 	for (i = 0; i < nents; i++, sg++) {
-		char *virt = page_address(sg->page) + sg->offset;
+		char *virt = page_address(sg_page(sg)) + sg->offset;
 		if (!arch_is_coherent())
 			dma_cache_maint(virt, sg->length, dir);
 	}
diff --git a/include/asm-parisc/scatterlist.h b/include/asm-parisc/scatterlist.h
index cd3cfdf..3c79a2a 100644
--- a/include/asm-parisc/scatterlist.h
+++ b/include/asm-parisc/scatterlist.h
 <at>  <at>  -18,7 +18,8  <at>  <at>  struct scatterlist {
 	__u32      iova_length; /* bytes mapped */
 };

-#define sg_virt_addr(sg) ((unsigned long)(page_address(sg->page) + sg->offset))
+#define sg_virt_addr(sg) \
+		((unsigned long)(page_address(sg_page(sg)) + sg->offset))
 #define sg_dma_address(sg) ((sg)->iova)
 #define sg_dma_len(sg)     ((sg)->iova_length)

diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h
index 65be95d..ff52013 100644
--- a/include/asm-powerpc/dma-mapping.h
+++ b/include/asm-powerpc/dma-mapping.h
 <at>  <at>  -285,9 +285,9  <at>  <at>  dma_map_sg(struct device *dev, struct scatterlist *sgl, int nents,
 	BUG_ON(direction == DMA_NONE);

 	for_each_sg(sgl, sg, nents, i) {
-		BUG_ON(!sg->page);
-		__dma_sync_page(sg->page, sg->offset, sg->length, direction);
-		sg->dma_address = page_to_bus(sg->page) + sg->offset;
+		BUG_ON(!sg_page(sg));
+		__dma_sync_page(sg_page(sg), sg->offset, sg->length, direction);
+		sg->dma_address = page_to_bus(sg_page(sg)) + sg->offset;
 	}

 	return nents;
 <at>  <at>  -328,7 +328,7  <at>  <at>  static inline void dma_sync_sg_for_cpu(struct device *dev,
 	BUG_ON(direction == DMA_NONE);

 	for_each_sg(sgl, sg, nents, i)
-		__dma_sync_page(sg->page, sg->offset, sg->length, direction);
+		__dma_sync_page(sg_page(sg), sg->offset, sg->length, direction);
 }

 static inline void dma_sync_sg_for_device(struct device *dev,
 <at>  <at>  -341,7 +341,7  <at>  <at>  static inline void dma_sync_sg_for_device(struct device *dev,
 	BUG_ON(direction == DMA_NONE);

 	for_each_sg(sgl, sg, nents, i)
-		__dma_sync_page(sg->page, sg->offset, sg->length, direction);
+		__dma_sync_page(sg_page(sg), sg->offset, sg->length, direction);
 }

 static inline int dma_mapping_error(dma_addr_t dma_addr)
diff --git a/include/asm-xtensa/dma-mapping.h b/include/asm-xtensa/dma-mapping.h
index 82b03b3..2b3e975 100644
--- a/include/asm-xtensa/dma-mapping.h
+++ b/include/asm-xtensa/dma-mapping.h
 <at>  <at>  -58,10 +58,10  <at>  <at>  dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
 	BUG_ON(direction == DMA_NONE);

 	for (i = 0; i < nents; i++, sg++ ) {
-		BUG_ON(!sg->page);
+		BUG_ON(!sg_page(sg));

-		sg->dma_address = page_to_phys(sg->page) + sg->offset;
-		consistent_sync(page_address(sg->page) + sg->offset,
+		sg->dma_address = page_to_phys(sg_page(sg)) + sg->offset;
+		consistent_sync(page_address(sg_page(sg)) + sg->offset,
 				sg->length, direction);
 	}

 <at>  <at>  -128,7 +128,7  <at>  <at>  dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
 {
 	int i;
 	for (i = 0; i < nelems; i++, sg++)
-		consistent_sync(page_address(sg->page) + sg->offset,
+		consistent_sync(page_address(sg_page(sg)) + sg->offset,
 				sg->length, dir);
 }

 <at>  <at>  -138,7 +138,7  <at>  <at>  dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
 {
 	int i;
 	for (i = 0; i < nelems; i++, sg++)
-		consistent_sync(page_address(sg->page) + sg->offset,
+		consistent_sync(page_address(sg_page(sg)) + sg->offset,
 				sg->length, dir);
 }
 static inline int
--

-- 
1.5.3.GIT

Joel Soete | 23 Oct 2007 18:15
Picon
Favicon

Re: [patch 2/2] backport of sba sg list management to ccio-dma

> On Sat, Oct 20, 2007 at 01:23:28PM -0400, Kyle McMartin wrote:
> > On Sat, Oct 20, 2007 at 05:21:44PM +0000, Joel Soete wrote:
> > > Hello Kyle,
> > > 
> > > Hppay that you finaly receive it ;-)
> > > (btw sorry for boucing)
> > > 
> > 
> > I've looked over the code, and it looks fine to me. Will wait for an ack
> > from Grant though, since I have no ability to test ccio :/
> 
> We both have access to the FtC test ring - but I think we are also both
> too lazy to build a kernel and test it on a remote box. :)
> 
> In general I'm ok with this code since I trust Joel is testing
> it with both NIC and storage devices and I'm too lazy to.
> 
> Some comments/requests/ideas below but nothing critical.
> 
> Apologies that I'm cut/pasting from the mailing list archive:
>    
http://lists.parisc-linux.org/pipermail/parisc-linux/2007-October/031998.html
> 
> I didn't have the original mail in my inbox anymore.
> 
> 
> +static CCIO_INLINE int
> +get_iovp_order(unsigned long size)
> +{
> +	int order;
> +
> +	size = (size - 1) >> (IOVP_SHIFT - 1);
> +	order = -1;
> +	do {
> +		size >>= 1;
> +		order++;
> +	} while (size);
> +	return order;
> +}
> 
> Would this be faster if written to use "ffs()"?
> 
This seems to be better fls then ffs like:
int get_iovp_order_faster(unsigned long size)
{
	return fls((size - 1) >> (IOVP_SHIFT));
}

Even thought following test seems to be ok:
	unsigned int a;
	unsigned long ul;

	/* for proof of concept
	*/
	for (ul=0; ul<536870914; ul++) {
		if ( get_iovp_order(ul) != get_iovp_order_faster(ul) ) {
			printf("get_iovp_order(%ld) = %ld (0x%x)\n\n", ul, a = get_iovp_order(ul), a);
			printf("get_iovp_order_faster(%ld) = %ld (0x%x)\n\n", ul, a =
get_iovp_order_faster(ul), a);
			exit (1);
		}
	}

But what would give the kernel generic (include/asm-generic/page.h: this is
what get_iovp_order() is if IOVP_SHIFT==PAGE_SHIFT) get_order(0): 0?
the answer is 20 for paric and ia32?

> 
> ...
> +#define ROUNDUP(x, y)		((x + ((y)-1)) & ~((y)-1))
> 
> ROUNDUP got replace in SBA with ALIGN(). Please use ALIGN instead.

Yes I figure it out later sorry.

> 
> ...
> +	} else {
> +		/*
> +		** Search the resource bit map on well-aligned values.
> +		** "o" is the alignment.
> +		** We need the alignment to invalidate I/O TLB using
> +		** xxx HW features in the unmap path.
> +		*/
> +		unsigned long o = 1 << get_iovp_order(pages_wanted << IOVP_SHIFT);
> +		uint bitshiftcnt = ROUNDUP(ioc->res_bitshift, o);
> +		unsigned long mask;
> 
> CCIO doesn't have this feature AFAIK. The comment only applies to SBA.
> Please remove the second sentence of the comment.
Ok.

> Searching on "well-aligned" values is still a good idea.
> 
> 
> NOTE: Each 8 consecutive CCIO IO PDIR mappings land on the same IO TLB entry.
> 
> To avoid thrashing the IO TLB, ideally CCIO code will do the following:
> 
> o map_sg (ie storage devices) use 8 bit alignment (ie each mapping start
>  on a new byte boundary).  Traditional block storage can complete the
>  IOs out of order and in parallel (via different controllers). This
>  would thrash one IO TLB entry if 8 seperate 4K DMA mappings are inflight
>  at the same time.
> 
> o map_single() (ie NICs) to just use the next available bit for a given
>   PCI device.  NIC DMA patterns (at least for a given stream) are linear.
>   The ccio_map_single() should track the last bitmap octet used for both
>   DMA_TO_DEVICE and FROM_DEVICE for each PCI device.
>   Once that octet is "used", find the next 8 bit field in the bitmap that
>   is available.
> 
> For a single NIC and one or two SCSI controllers, this probably doesn't
> make much difference unless you start measuring latency. Throughput
> should be nearly the same.
> 
> My guess is the biggest perf gain will come from reducing the number
> of "sync" ops by implementing DELAYED_RESOURCE_CNT. 
> 
> 
> ...
>  #ifdef CCIO_SEARCH_TIME
> +	udelay(100);
> 
> Did you want to keep udelay() call?
> 
Most probably not (just need more test)

> 
> ...
> +#else /* DELAYED_RESOURCE_CNT == 0 */
> +
> +	ccio_free_range(ioc, iova, size);
> +
> +	/* force fdc's to be visible now */
> +	asm volatile("sync" :: );
> +
> +#endif /* DELAYED_RESOURCE_CNT == 0 */
> 
> Does the asm("sync") need to be outside the #endif ?
> Please make sure "sync" is called exactly once IFF 
> the IO PDIR is modified.
> 
Well understand but this check stay hard to me (but I will try to spend a bit
more time to check)

> 
> ...
> +#ifdef CCIO_MAP_STATS
> +		ioc->usg_pages += sg_dma_len(sglist) >> IOVP_SHIFT;
> +		ioc->usingle_calls--;   /* kluge since call is unmap_sg() */
> +#endif
> 
> I wouldn't add MAP_STATS here.
> They aren't enabled in SBA becuase they impact performance too much.
> I expect that will always be true and would seriously consider removing
> MAP_STATS code from SBA as well. Timing the bitmap search is
> probably the only critical bit of info that really matters. 
> And that's for developement/testing only.
> 
mmm, I would so let stay here but with just additional comment to prevent to
activate it outside this developement/testing context?

> hth,
> grant
> 
Yes, tx a lot,
    J.

>
---
Pack Scarlet One, ADSL 6 Mbps + Telephonie, a partir de EUR 29,95...
http://www.scarlet.be/
Matthew Wilcox | 21 Oct 2007 21:06

Re: [PATCH] VSC_GSC_HSC bus debugging

On Sun, Oct 21, 2007 at 07:54:53PM +0200, Roel Kluin wrote:
> +config GSC_DEBUG
> +	bool "VSC_GSC_HSC bus debugging"

What an ugly prompt string ...

> +	depends on GSC
> +	default n

default is 'n', by default.  No need to specify it.

> +#ifdef GSC_DEBUG
> +	#define DEBUG 1
> +#endif

Why the indent?

> -	DEBPRINTK("%s intr, mask=0x%x\n", gsc_asic->name, irr);
> +	printk("%s intr, mask=0x%x\n", gsc_asic->name, irr);

Presumably you meant pr_debug?

--

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

Gmane