raid6: altivec support
Quoted 8 lines · Linux Kernel Mailing List
ChangeSet 1.2347, 2005/01/08 14:02:27-08:00, [email protected]
[PATCH] raid6: altivec support
This patch adds Altivec support for RAID-6, if appropriately configured on the ppc or ppc64 architectures. Note that it changes the compile flags for ppc64 in order to handle -maltivec correctly; this change was vetted on the ppc64 mailing list and OK'd by paulus.
This fails to compile on ppc, enable_kernel_altivec() is an exported but undeclared function. cpu_features is also missing.
drivers/md/raid6altivec1.c: In function `raid6_altivec1_gen_syndrome':drivers/md/raid6altivec1.c:99: warning: implicit declaration of function enable_kernel_altivec' drivers/md/raid6altivec1.c: In function raid6_have_altivec':drivers/md/raid6altivec1.c:111: error: request for member cpu_features' in something not a structure or union drivers/md/raid6altivec2.c: In function raid6_altivec2_gen_syndrome':drivers/md/raid6altivec2.c:110: warning: implicit declaration of function `enable_kernel_altivec'
There are a few more exported symbols without declaration:__ashldi3__ashrdi3__lshrdi3enable_kernel_spefec_register_phfec_unregister_phidma_pci9_readidma_pci9_read_lelocal_irq_disable_endlocal_irq_enable_endlocal_irq_restore_endlocal_save_flags_ptr_endocp_bus_typeppc4xx_set_dma_addr
I'm not sure if the EXPORT_SYMBOL should be dropped for them, they have no users in the current kernel.
include/asm-ppc/system.h renamed from linux-2.6.10-bk12/include/asm-ppc/system.h +1 -0
@@ -76,6 +76,7 @@ extern void giveup_fpu(struct task_strucextern void enable_kernel_fp (void );extern void giveup_altivec (struct task_struct *);extern void load_up_altivec (struct task_struct *); +extern void enable_kernel_altivec (void );extern void giveup_spe (struct task_struct *);extern void load_up_spe (struct task_struct *);extern int fix_alignment (struct pt_regs *);
Quoted 13 lines · Olaf Hering
Quoted 9 lines
ChangeSet 1.2347, 2005/01/08 14:02:27-08:00, [email protected]
[PATCH] raid6: altivec support
This patch adds Altivec support for RAID-6, if appropriately configured on the ppc or ppc64 architectures. Note that it changes the compile flags for ppc64 in order to handle -maltivec correctly; this change was vetted on the ppc64 mailing list and OK'd by paulus.
This fails to compile on ppc,
enable_kernel_altivec()is an exported but undeclared function.cpu_featuresis also missing.
Quoted 6 lines
drivers/md/raid6altivec1.c: In function `raid6_altivec1_gen_syndrome':drivers/md/raid6altivec1.c:99: warning: implicit declaration of functionenable_kernel_altivec' drivers/md/raid6altivec1.c: In functionraid6_have_altivec':drivers/md/raid6altivec1.c:111: error: request for membercpu_features' in something not a structure or union drivers/md/raid6altivec2.c: In functionraid6_altivec2_gen_syndrome':drivers/md/raid6altivec2.c:110: warning: implicit declaration of function `enable_kernel_altivec'
This makes it compile on PPC, but highlights the difference between 'cur_cpu_spec' on ppc32 and ppc64. Why is 'cur_cpu_spec' an array on ppc32? Isn't 'cur' supposed to imply 'current'?
===== drivers/md/raid6altivec.uc 1.1 vs edited =====
drivers/md/raid6altivec.uc +4 -0
@@ -108,7 +108,11 @@ int raid6_have_altivec(void) { /* This assumes either all CPUs have Altivec or none does */ +#ifdef CONFIG_PPC64 return cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC; +#else + return cur_cpu_spec[0]->cpu_features & CPU_FTR_ALTIVEC; +#endif } #endif
Signature · 1 line
dwmw2
[snip]
Quoted 3 lines
This makes it compile on PPC, but highlights the difference between
'cur_cpu_spec' on ppc32 and ppc64. Why is 'cur_cpu_spec' an array on ppc32? Isn't 'cur' supposed to imply 'current'?
I can only guess to handle an SMP case with two different revs of the same processor that might have slightly different errata.
- kumar
Quoted 6 lines · David Woodhouse
Quoted 5 lines · Olaf Hering
Quoted 5 lines
ChangeSet 1.2347, 2005/01/08 14:02:27-08:00, [email protected]
[PATCH] raid6: altivec support
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
This patch adds Altivec support for RAID-6, if appropriately configured on the ppc or ppc64 architectures. Note that it changes the compile flags for ppc64 in order to handle -maltivec correctly; this change was vetted on the ppc64 mailing list and OK'd by paulus.
This fails to compile on ppc,
enable_kernel_altivec()is an exported but undeclared function.cpu_featuresis also missing.
I sent Linus & Andrew a patch fixing the enable_kernel_altivec() thing yesterday. cpu_features isn't missing, it's defined differently.
Quoted 10 lines
Quoted 6 lines
drivers/md/raid6altivec1.c: In function `raid6_altivec1_gen_syndrome':drivers/md/raid6altivec1.c:99: warning: implicit declaration of functionenable_kernel_altivec' drivers/md/raid6altivec1.c: In functionraid6_have_altivec':drivers/md/raid6altivec1.c:111: error: request for membercpu_features' in something not a structure or union drivers/md/raid6altivec2.c: In functionraid6_altivec2_gen_syndrome':drivers/md/raid6altivec2.c:110: warning: implicit declaration of function `enable_kernel_altivec'This makes it compile on PPC, but highlights the difference between '
cur_cpu_spec' on ppc32 and ppc64. Why is 'cur_cpu_spec' an array on ppc32? Isn't 'cur' supposed to imply 'current'?
It's history. When I wrote that on ppc in the first place, I decided to leave room for having slightly different CPUs so I defined it as an array of NR_CPUs.
When we ported this to ppc64, we figured out we never actually used that "feature", and that the way the dynamic patching works with CPU features makes it mandatory to have identical feature sets anyway.
We should probably "backport" that simplification to ppc32...
Ben.
Quoted 1 line · Benjamin Herrenschmidt
We should probably "backport" that simplification to ppc32...
Yeah.... I'm increasingly tempted to merge ppc32/ppc64 into one arch like mips/parisc/s390. Or would that get vetoed on the basis that we don't have all that horrid non-OF platform support in ppc64 yet, and we're still kidding ourselves that all those embedded vendors will either not notice ppc64 or will use OF?
Signature · 1 line
dwmw2
Quoted 5 lines · David Woodhouse
Yeah.... I'm increasingly tempted to merge ppc32/ppc64 into one arch like mips/parisc/s390. Or would that get vetoed on the basis that we don't have all that horrid non-OF platform support in ppc64 yet, and we're still kidding ourselves that all those embedded vendors will either not notice ppc64 or will use OF?
I'm going to insist that every new ppc64 platform supplies a device tree. They don't have to have OF but they do need to have the booter or wrapper supply a flattened device tree (which is just a few kB of binary data as far as the booter/wrapper is concerned). It doesn't have to include all the
As for merging ppc32 and ppc64, I think it would end up an awful ifdef mess, but if you can see a clean way to do it, send me a patch. :)
Paul.
David,
We did talk about looking at using some work Ben did in ppc64 with OF in ppc32. John Masters was looking into this, but I havent heard much from him on it lately.
The firmware interface on the ppc32 embedded side is some what broken in my mind.
- kumar
Quoted 20 lines · David Woodhouse
Quoted 1 line · Benjamin Herrenschmidt
We should probably "backport" that simplification to ppc32...
Yeah.... I'm increasingly tempted to merge ppc32/ppc64 into one arch
like mips/parisc/s390. Or would that get vetoed on the basis that we don't have all that horrid non-OF platform support in ppc64 yet, and
we're still kidding ourselves that all those embedded vendors will
either not notice ppc64 or will use OF?Signature · 10 lines
dwmw2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Quoted 6 lines · Kumar Gala
We did talk about looking at using some work Ben did in ppc64 with OF in ppc32. John Masters was looking into this, but I havent heard much from him on it lately.
The firmware interface on the ppc32 embedded side is some what broken in my mind.
The binary structure which changes every few weeks and which is shared between the bootloader and the kernel? Yeah, "somewhat broken" is one way of putting it :)
The ARM kernel does it a lot better with tag,value pairs.
Signature · 1 line
dwmw2
Quoted 10 lines · David Woodhouse
Quoted 1 line · Kumar Gala
We did talk about looking at using some work Ben did in ppc64 with=20=
OF
Quoted 1 line
in ppc32.=A0 John Masters was looking into this, but I havent heard=20=
much
Quoted 3 lines
from him on it lately.
The firmware interface on the ppc32 embedded side is some what =
broken
Quoted 7 lines
Quoted 1 line
in my mind.
The binary structure which changes every few weeks and which is shared
between the bootloader and the kernel? Yeah, "somewhat broken" is one
way of putting it :)The ARM kernel does it a lot better with tag,value pairs.
The funny thing is that one of the variants on ppc32 supports tag,=20 value pairs
- kumar=
Quoted 5 lines · David Woodhouse
Quoted 4 lines · Kumar Gala
We did talk about looking at using some work Ben did in ppc64 with OF in ppc32. John Masters was looking into this, but I havent heard much from him on it lately.
Quoted 8 lines
Quoted 2 lines
The firmware interface on the ppc32 embedded side is some what broken in my mind.
The binary structure which changes every few weeks and which is shared between the bootloader and the kernel? Yeah, "somewhat broken" is one way of putting it :)
The ARM kernel does it a lot better with tag,value pairs.
As does m68k... That's why we never got beyond bootinfo major version 2.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 5 lines · Geert Uytterhoeven
Quoted 2 lines · David Woodhouse
Quoted 1 line · Kumar Gala
We did talk about looking at using some work Ben did in ppc64=20
with OF
Quoted 1 line
Quoted 1 line
in ppc32.=A0 John Masters was looking into this, but I havent =
heard=20
Quoted 11 lines
much
Quoted 3 lines
Quoted 3 lines
from him on it lately.
The firmware interface on the ppc32 embedded side is some what=20
broken
Quoted 3 lines
Quoted 1 line
in my mind.
The binary structure which changes every few weeks and which is=20
shared
Quoted 1 line
between the bootloader and the kernel? Yeah, "somewhat broken" is=20=
Quoted 8 lines
one
Quoted 3 lines
way of putting it :)
The ARM kernel does it a lot better with tag,value pairs.
As does m68k... That's why we never got beyond bootinfo major version=20=
2.
Out of interest, on ARM & m68k I would assume that the list of tag's=20 gets added to over time?
- kumar
Quoted 4 lines · Kumar Gala
Quoted 3 lines · Geert Uytterhoeven
Quoted 2 lines · David Woodhouse
The binary structure which changes every few weeks and which is shared between the bootloader and the kernel? Yeah, "somewhat broken" is one
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
way of putting it :)
The ARM kernel does it a lot better with tag,value pairs.
As does m68k... That's why we never got beyond bootinfo major version 2.
Out of interest, on ARM & m68k I would assume that the list of tag's gets added to over time?
That's true. But besides the recent conversion of the HP9000/[34]00 code to use bootinfo, not much has changed during the last 5 years.
If a tag is not recognized, it's just ignored. That means your new feature cannot be used by the kernel, but it doesn't break the bootloader<->kernel interface the hard way.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 1 line · Kumar Gala
We did talk about looking at using some work Ben did in ppc64 with OF in ppc32. John Masters was looking into this, but I havent heard much from him on it lately.
I went rather quiet since I had nothing new to add to the discussion. But I did plan to get somewhere before FOSDEM (next month) so I could at least talk to the guys there about it - this is really taking a backseat as I've little time for it and no BDI2000/etc. at home :-)
Quoted 1 line
The firmware interface on the ppc32 embedded side is some what broken in my mind.
It's absolutely broken and needs fixing - perhaps if someone wants to work with me on it, we'd get it sorted more quickly.
Cheers,
Jon.
Quoted 8 lines · David Woodhouse
Quoted 1 line · Benjamin Herrenschmidt
We should probably "backport" that simplification to ppc32...
Yeah.... I'm increasingly tempted to merge ppc32/ppc64 into one arch like mips/parisc/s390. Or would that get vetoed on the basis that we don't have all that horrid non-OF platform support in ppc64 yet, and we're still kidding ourselves that all those embedded vendors will either not notice ppc64 or will use OF?
Oh well... i've though about it too, and decided that I was not ready to try it. For one, the problem you mention, with the pile of embedded junk. I made the design decision to define an OF client interface as the standard & mandatory entry mecanism to the ppc64 kernel (except legacy iSeries of course, but I don't want that to multiply). That or the kexec-like entrypoint passing a flattened device-tree in.
Also, there are other significant differences in other areas. At this point, I think the differences are bigger than the common code.
What would be interesting would be to proceed incrementally, having a directory somewhere to put the "common" ppc/ppc64 code, and slowly moving things there.
Ben.
Quoted 5 lines · David Woodhouse
Quoted 4 lines · Kumar Gala
We did talk about looking at using some work Ben did in ppc64 with OF in ppc32. John Masters was looking into this, but I havent heard much from him on it lately.
Quoted 8 lines
Quoted 2 lines
The firmware interface on the ppc32 embedded side is some what broken in my mind.
The binary structure which changes every few weeks and which is shared between the bootloader and the kernel? Yeah, "somewhat broken" is one way of putting it :)
The ARM kernel does it a lot better with tag,value pairs.
And ppc64 adds a flattened device-tree format, even better imho :)
Ben.
[excuse formatting, adhoc connectivity]
Quoted 1 line · Ben
And ppc64 adds a flattened device-tree format, even better imho :)
This is exactly what I was looking at - pulling that in to ppc32, helps with stuff like kexec too. Like everything else, it helps to have people moaning at me to make me get on with it :-) I'll see if I can't spend a few hours on the plane and ressurrect this instead of window gazing.
Jon.
Quoted 8 lines · Paul Mackerras
Quoted 5 lines · David Woodhouse
Yeah.... I'm increasingly tempted to merge ppc32/ppc64 into one arch like mips/parisc/s390. Or would that get vetoed on the basis that we don't have all that horrid non-OF platform support in ppc64 yet, and we're still kidding ourselves that all those embedded vendors will either not notice ppc64 or will use OF?
Quoted 5 lines
I'm going to insist that every new ppc64 platform supplies a device tree. They don't have to have OF but they do need to have the booter or wrapper supply a flattened device tree (which is just a few kB of binary data as far as the booter/wrapper is concerned). It doesn't have to include all the
*shurg*
It really is a great idea, but I think it will just move the ire from (serial infos, IRQ table, ?) being in platforms/fooboard.[ch] to platforms/fooboard.h or platforms/fooboard_bootinfos.h
So lets just hope ppc64 keeps getting ignored :)
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 17 lines · Benjamin Herrenschmidt
Quoted 8 lines · David Woodhouse
Quoted 1 line · Benjamin Herrenschmidt
We should probably "backport" that simplification to ppc32...
Yeah.... I'm increasingly tempted to merge ppc32/ppc64 into one arch like mips/parisc/s390. Or would that get vetoed on the basis that we don't have all that horrid non-OF platform support in ppc64 yet, and we're still kidding ourselves that all those embedded vendors will either not notice ppc64 or will use OF?
Oh well... i've though about it too, and decided that I was not ready to try it. For one, the problem you mention, with the pile of embedded junk. I made the design decision to define an OF client interface as the standard & mandatory entry mecanism to the ppc64 kernel (except legacy iSeries of course, but I don't want that to multiply). That or the kexec-like entrypoint passing a flattened device-tree in.
Quoted 6 lines
Also, there are other significant differences in other areas. At this point, I think the differences are bigger than the common code.
What would be interesting would be to proceed incrementally, having a directory somewhere to put the "common" ppc/ppc64 code, and slowly moving things there.
It may be too complicated, but what about letting the commong code in ppc, and moving the ppc32 code into ppc32 ?
Friendly,
Sven Luther