Skip to contentSkip to conversation

support for NCR voyager (3/4/5xxx series)

PATCH In review James Bottomley 4 participants 14 messages Jun 9, 2002 – Jun 17, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support for NCR voyager (3/4/5xxx series)

This patch adds SMP (and UP) support for voyager which is an (up to 32 way) SMP microchannel non-PC architecture.

There's basically nothing different from the 2.5.15 one except for updates and changes to the arch-split and a few #include file additions.

The patch is in two parts: The i386 sub-architecture split is separated from the addition of the voyager components

http://www.hansenpartnership.com/voyager/files/arch-split-2.5.21.diff (165k)
http://www.hansenpartnership.com/voyager/files/voyager-2.5.21.diff (148k)

(The split diff is pretty huge because it's actually moving files about). You must apply the split diff before applying the voyager one.

These two patches are also available as separate bitkeeper trees (the voyager tree is a superset of the arch-split one):

http://linux-voyager.bkbits.net/voyager-2.5
http://linux-voyager.bkbits.net/arch-split-2.5

James Bottomley

#1 lore raw

Attached patch is needed to compile kernel with Voyager patch applied for the SMP PC machine.

Also some questions, mostly related to arch-split patch:

[Q1] Will it be better to create separate directory for PC architecture and split some PC'isms from arch/i386/generic ? Right now it contains acpi.c, bootflag.c and dmi_scan.c which are not generic in any way :)

[Q2] May be directory naming like mach-visws, mach-voyager and possible mach-pc will be more convinent ?

Signature · 2 lines
Andrey Panin            | Embedded systems software engineer
[email protected]        | PGP key: wwwkeys.eu.pgp.net
arch/i386/config.in +7 -5
diff -urN -X /usr/share/dontdiff linux.vanilla/arch/i386/config.in linux/arch/i386/config.in
@@ -425,11 +425,6 @@
    fi
 fi
 
-if [ "$CONFIG_X86_LOCAL_APIC" = "y" ]; then
-   define_bool CONFIG_X86_EXTRA_IRQS y
-   define_bool CONFIG_X86_FIND_SMP_CONFIG y
-fi
-
 endmenu
 
 source lib/Config.in
@@ -443,6 +438,13 @@
    if [ "$CONFIG_SMP" = "y" ]; then
       define_bool CONFIG_X86_SMP y
       define_bool CONFIG_X86_HT y
+      define_bool CONFIG_X86_IO_APIC y
+      define_bool CONFIG_X86_LOCAL_APIC y
    fi
    define_bool CONFIG_X86_BIOS_REBOOT y
+fi
+
+if [ "$CONFIG_X86_LOCAL_APIC" = "y" ]; then
+   define_bool CONFIG_X86_EXTRA_IRQS y
+   define_bool CONFIG_X86_FIND_SMP_CONFIG y
 fi
arch/i386/generic/Makefile +0 -1
diff -urN -X /usr/share/dontdiff linux.vanilla/arch/i386/generic/Makefile linux/arch/i386/generic/Makefile
@@ -18,7 +18,6 @@
 
 obj-y				:= setup.o
 
-obj-$(CONFIG_PCI)		+= pci-pc.o pci-irq.o
 obj-$(CONFIG_X86_LOCAL_APIC)	+= mpparse.o
 
 include $(TOPDIR)/Rules.make
author Applied
#2 lore raw
Quoted 2 lines · [email protected] said:

Attached patch is needed to compile kernel with Voyager patch applied for the SMP PC machine.

I've applied it to my repository, thanks. I forgot to keep track of these issues in the voyager tree when I separated the arch-split stuff.

Quoted 4 lines

[Q1] Will it be better to create separate directory for PC architecture and split some PC'isms from arch/i386/generic ? Right now it contains acpi.c, bootflag.c and dmi_scan.c which are not generic in any way :)

The thinking currently is that arch/i386 is really PC plus a few exceptions rather than a truly generic x86 plus additonal machine architectures, so it makes sense under this view that `generic' and PC be the same thing.

Quoted 2 lines

[Q2] May be directory naming like mach-visws, mach-voyager and possible mach-pc will be more convinent ?

To be more consistent with the way arch/arm does it? Certainly the renames can be done easily enough, what does the rest of the list think?

James

#3 lore raw
Quoted 7 lines · James Bottomley
Quoted 4 lines

[Q1] Will it be better to create separate directory for PC architecture and split some PC'isms from arch/i386/generic ? Right now it contains acpi.c, bootflag.c and dmi_scan.c which are not generic in any way :)

The thinking currently is that arch/i386 is really PC plus a few exceptions rather than a truly generic x86 plus additonal machine architectures, so it makes sense under this view that `generic' and PC be the same thing.

Would it make sense for the subarchs to use the generic code where possible, and only reimplement it's own (for eg) apic.c as and when it actually *needs* to be different ?

For the most part, I'd expect the existing subarchs we know about (sgi visws, voyager, numaq), the amount of "own version" copies of files would be quite low.

The big advantage of doing it this way, is that it reduces the overhead of having to update every subarch when someone changes function parameters. The downside is possibly slightly ickier Makefile's.

Quoted 4 lines
Quoted 2 lines

[Q2] May be directory naming like mach-visws, mach-voyager and possible mach-pc will be more convinent ?

To be more consistent with the way arch/arm does it? Certainly the renames can be done easily enough, what does the rest of the list think?

Sounds quite logical. What does the current patches you have do ? I've not had chance to look at them yet.

Dave

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#4 lore raw
Quoted 3 lines · [email protected] said:

Would it make sense for the subarchs to use the generic code where possible, and only reimplement it's own (for eg) apic.c as and when it actually *needs* to be different ?

That is really the way I've implemented it. The only PC specific file in the generic directory is mpparse.c (since neither visws nor voyager has an MP compliant bios). All the shareable files are kept in `kernel' and activated by config options.

I can certainly move mpparse.c back to kernel and add an extra (non user visible) config option.

Quoted 2 lines

Sounds quite logical. What does the current patches you have do ? I've not had chance to look at them yet.

It creates directories generic' for the standard pc and visws'. The voyager patch creates a voyager' directory. Alternatively, these could be mach-pc', mach-visws' and mach-voyager'.

James

#5 lore raw
Quoted 4 lines · James Bottomley
Quoted 3 lines

Would it make sense for the subarchs to use the generic code where possible, and only reimplement it's own (for eg) apic.c as and when it actually *needs* to be different ?

That is really the way I've implemented it.

Ah, good.

Quoted 4 lines

The only PC specific file in the
generic directory is mpparse.c (since neither visws nor voyager has an MP compliant bios). All the shareable files are kept in `kernel' and activated by config options.

Another piece of low hanging fruit is probably dmi_scan.c There are no workarounds there for either (are they even DMI compliant?) so compiling it in doesn't make much sense.

Quoted 2 lines

I can certainly move mpparse.c back to kernel and add an extra (non user visible) config option.

if neither visws or voyager need it, I'd say it doesn't belong in the respective subarch directories period.

Quoted 5 lines
Quoted 2 lines

Sounds quite logical. What does the current patches you have do ? I've not had chance to look at them yet.

It creates directories generic' for the standard pc and visws'. The voyager patch creates a voyager' directory. Alternatively, these could be mach-pc', mach-visws' and mach-voyager'.

Yeah, I think mach-foo would be more aesthetically pleasing, so I'll cast my vote for that one. If nothing else, it makes it obvious that the subdir isn't important if you don't care about $subarch

Dave.

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#6 lore raw
In reply to James Bottomley
Quoted 8 lines · Dave Jones
Quoted 4 lines · James Bottomley
Quoted 3 lines

Would it make sense for the subarchs to use the generic code where possible, and only reimplement it's own (for eg) apic.c as and when it actually *needs* to be different ?

That is really the way I've implemented it.

Ah, good.

Quoted 8 lines
Quoted 4 lines

The only PC specific file in the
generic directory is mpparse.c (since neither visws nor voyager has an MP compliant bios). All the shareable files are kept in `kernel' and activated by config options.

Another piece of low hanging fruit is probably dmi_scan.c There are no workarounds there for either (are they even DMI compliant?) so compiling it in doesn't make much sense.

We also have apm.c, bootflag.c and acpi.c which are definetely PC specific.

Quoted 5 lines
Quoted 2 lines

I can certainly move mpparse.c back to kernel and add an extra (non user visible) config option.

if neither visws or voyager need it, I'd say it doesn't belong in the respective subarch directories period.

"Latest" (2.4.17) visws patch which i'm planning to convert for 2.5, uses function MP_processor_info() from generic mpparse.c. May be it makes sence to move to some generic file ?

Quoted 11 lines
Quoted 5 lines
Quoted 2 lines

Sounds quite logical. What does the current patches you have do ? I've not had chance to look at them yet.

It creates directories generic' for the standard pc and visws'. The voyager patch creates a voyager' directory. Alternatively, these could be mach-pc', mach-visws' and mach-voyager'.

Yeah, I think mach-foo would be more aesthetically pleasing, so I'll cast my vote for that one. If nothing else, it makes it obvious that the subdir isn't important if you don't care about $subarch

Dave.

Signature · 2 lines
Andrey Panin            | Embedded systems software engineer
[email protected]        | PGP key: wwwkeys.eu.pgp.net
#8 lore raw
In reply to James Bottomley
Quoted 1 line · Andrey Panin

We also have apm.c, bootflag.c and acpi.c which are definetely PC specific.

apm may be present on the others (need visws/voyager folks to comment on that I guess), but bootflag and acpi I'd suspect not.

Quoted 3 lines

"Latest" (2.4.17) visws patch which i'm planning to convert for 2.5, uses function MP_processor_info() from generic mpparse.c. May be it makes sence to move to some generic file ?

Is that the one from the visws sourceforge project ?

Dave

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#9 lore raw
In reply to James Bottomley
Quoted 6 lines · Dave Jones
Quoted 1 line · Andrey Panin

We also have apm.c, bootflag.c and acpi.c which are definetely PC specific.

apm may be present on the others (need visws/voyager folks to comment on that I guess), but bootflag and acpi I'd suspect not.

IMHO Voyagers are too old and big machines to get (working) APM, and visws have no BIOS or limited BIOS emulation.

Quoted 5 lines
Quoted 3 lines

"Latest" (2.4.17) visws patch which i'm planning to convert for 2.5, uses function MP_processor_info() from generic mpparse.c. May be it makes sence to move to some generic file ?

Is that the one from the visws sourceforge project ?

Yes it is.

Signature · 2 lines
Andrey Panin            | Embedded systems software engineer
[email protected]        | PGP key: wwwkeys.eu.pgp.net
#10 lore raw
Quoted 2 lines · [email protected] said:

IMHO Voyagers are too old and big machines to get (working) APM, and visws have no BIOS or limited BIOS emulation.

That depends what you mean by `apm'. In kernel/apm.c, it's tied to the existence of the APM bios and since voyagers have no bios per say (they actually have a SUS, which is an actively running boot OS on a tiny i386 processor which can emulate a minimal PC bios when in PC mode) then you're correct.

Running Linux on a voyager, I can power off the machine, read the internal power source, the status of the front panel switch and even trigger a power management shutdown after the AC power is lost for a certain length of time (voyagers usually have internal lead acid batteries). The way it's currently set up, if I turn off the front panel switch, the machine will execute a clean shutdown and power itself off when the shutdown is finished. (this is mainly done in the voyager_thread.c file, where it keeps a kernel daemon permanently monitoring the machine status, if you're interested).

The above are all traditional APM functions, I just don't need apm.c to do them.

However, apm.c is still in arch/i386/kernel, just in case, so I think mpparse.c should join it, and we should keep all the other pieces (bootflag.c and acpi.c) in there just in case.

James

#11 lore raw
In reply to James Bottomley
Quoted 5 lines · Andrey Panin
Quoted 4 lines
Quoted 3 lines

"Latest" (2.4.17) visws patch which i'm planning to convert for 2.5, uses function MP_processor_info() from generic mpparse.c. May be it makes sence to move to some generic file ?

Is that the one from the visws sourceforge project ?

Yes it is.

Ah good. *cross item off TODO list*

Dave

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#7 lore raw
In reply to Andrey Panin
Quoted 3 lines · [email protected] said:

"Latest" (2.4.17) visws patch which i'm planning to convert for 2.5, uses function MP_processor_info() from generic mpparse.c. May be it makes sence to move to some generic file ?

OK, I moved mpparse back into kernel (and gated it on CONFIG_X86_MPPARSE). It probably makes sense to split it up so that you only get the piece you need for visws.

I've also done the mach-* renames by popular request. The new patch is at:

http://www.hansenpartnership.com/voyager/files/arch-split-2.5.21-II.diff

and also in the bitkeeper repository:

http://linux-voyager.bkbits.net/arch-split-2.5

James

#12 lore raw
In reply to Dave Jones
Quoted 9 lines · Dave Jones
Quoted 5 lines · Andrey Panin
Quoted 4 lines
Quoted 3 lines

"Latest" (2.4.17) visws patch which i'm planning to convert for 25, uses function MP_processor_info() from generic mpparse.c. May be it makes sence to move to some generic file ?

Is that the one from the visws sourceforge project ?

Yes it is.

Ah good. *cross item off TODO list*

Does it make sense to submit it right now before i386 arch split will be completed ?

Signature · 2 lines
Andrey Panin            | Embedded systems software engineer
[email protected]        | PGP key: wwwkeys.eu.pgp.net
#13 lore raw
Quoted 10 lines · Andrey Panin
Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines

"Latest" (2.4.17) visws patch which i'm planning to convert for 25, uses function MP_processor_info() from generic mpparse.c. May be it makes sence to move to some generic file ?

Is that the one from the visws sourceforge project ?

Yes it is.

Ah good. *cross item off TODO list*

Does it make sense to submit it right now before i386 arch split will be completed ?

I took a quick look over James' current patch last night. In it's current state, I think it's quite large already, and as it touches so many areas, I'm wondering if it's possible to split it up into chunks and merge it gradually.

merging visws now would mean a large part of James' current work would be out of sync.

Dave

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs