Skip to contentSkip to conversation

: Sparc

GIT David Miller 7 participants 16 messages Apr 21, 2008 – Dec 7, 2009

lore
Share & tools
lore
#0 lore raw

This performs the scheduled removal of Solaris and SunOS system call for sparc, much to the chagrin of Al Viro and others :-) (in particular, that asm/namei.h crud can now die)

Note that I also have a set of NUMA support patches pending for sparc64, but that work depends upon some infrastructure coming in via the powerpc tree. So once that's in, I'll send that over too.

Please pull, thanks a lot!

The following changes since commit 3925e6fc1f774048404fdd910b0345b06c699eb4:
Linus Torvalds (1):
Merge branch 'for-linus' of git://git.kernel.org/.../jmorris/security-testing-2.6

are available in the git repository at:

master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6.git master

David S. Miller (1):
[SPARC]: Remove SunOS and Solaris binary support.

 Documentation/feature-removal-schedule.txt |   11 -
 Documentation/highuid.txt                  |    2 -
 Documentation/magic-number.txt             |    1 -
 arch/sparc/Kconfig                         |   12 -
 arch/sparc/defconfig                       |  165 ++--
 arch/sparc/kernel/Makefile                 |   10 +-
 arch/sparc/kernel/entry.S                  |  206 +----
 arch/sparc/kernel/errtbls.c                |  144 ---
 arch/sparc/kernel/head.S                   |   37 +-
 arch/sparc/kernel/sclow.S                  |   86 --
 arch/sparc/kernel/signal.c                 |  307 +------
 arch/sparc/kernel/sparc_ksyms.c            |    8 -
 arch/sparc/kernel/sunos_asm.S              |   67 --
 arch/sparc/kernel/sunos_ioctl.c            |  230 -----
 arch/sparc/kernel/sys_solaris.c            |   35 -
 arch/sparc/kernel/sys_sunos.c              | 1210 -------------------------
 arch/sparc/kernel/systbls.S                |  121 ---
 arch/sparc64/Kconfig                       |   47 +-
 arch/sparc64/Makefile                      |    1 -
 arch/sparc64/defconfig                     |   29 +-
 arch/sparc64/kernel/Makefile               |    9 -
 arch/sparc64/kernel/binfmt_aout32.c        |  419 ---------
 arch/sparc64/kernel/entry.S                |   61 +--
 arch/sparc64/kernel/signal.c               |    1 -
 arch/sparc64/kernel/signal32.c             |  300 +------
 arch/sparc64/kernel/sparc64_ksyms.c        |   41 -
 arch/sparc64/kernel/sunos_ioctl32.c        |  275 ------
 arch/sparc64/kernel/sys_sparc.c            |   38 -
 arch/sparc64/kernel/sys_sunos32.c          | 1359 ----------------------------
 arch/sparc64/kernel/systbls.S              |  122 ---
 arch/sparc64/kernel/systbls.h              |    2 -
 arch/sparc64/kernel/ttable.S               |   14 +-
 arch/sparc64/solaris/Makefile              |   10 -
 arch/sparc64/solaris/conv.h                |   38 -
 arch/sparc64/solaris/entry64.S             |  223 -----
 arch/sparc64/solaris/fs.c                  |  745 ---------------
 arch/sparc64/solaris/ioctl.c               |  825 -----------------
 arch/sparc64/solaris/ipc.c                 |  126 ---
 arch/sparc64/solaris/misc.c                |  786 ----------------
 arch/sparc64/solaris/signal.c              |  429 ---------
 arch/sparc64/solaris/signal.h              |  108 ---
 arch/sparc64/solaris/socket.c              |  461 ----------
 arch/sparc64/solaris/socksys.c             |  203 -----
 arch/sparc64/solaris/socksys.h             |  208 -----
 arch/sparc64/solaris/systbl.S              |  285 ------
 arch/sparc64/solaris/timod.c               |  976 --------------------
 fs/Kconfig.binfmt                          |    2 +-
 include/asm-sparc/Kbuild                   |    1 -
 include/asm-sparc/a.out-core.h             |   52 --
 include/asm-sparc/a.out.h                  |   97 --
 include/asm-sparc/head.h                   |   33 -
 include/asm-sparc/ioctls.h                 |    2 -
 include/asm-sparc/mman.h                   |   13 -
 include/asm-sparc/namei.h                  |   15 +-
 include/asm-sparc/pconf.h                  |   25 -
 include/asm-sparc/processor.h              |    3 -
 include/asm-sparc/socket.h                 |    3 -
 include/asm-sparc/solerrno.h               |  132 ---
 include/asm-sparc/svr4.h                   |  119 ---
 include/asm-sparc/termios.h                |    5 -
 include/asm-sparc/user.h                   |   56 +--
 include/asm-sparc64/Kbuild                 |    1 -
 include/asm-sparc64/a.out-core.h           |   31 -
 include/asm-sparc64/a.out.h                |    1 -
 include/asm-sparc64/ioctls.h               |    2 -
 include/asm-sparc64/mman.h                 |   13 -
 include/asm-sparc64/namei.h                |   15 +-
 include/asm-sparc64/pconf.h                |   25 -
 include/asm-sparc64/socket.h               |    3 -
 include/asm-sparc64/solerrno.h             |  132 ---
 include/asm-sparc64/svr4.h                 |  120 ---
 include/asm-sparc64/termios.h              |    5 -
 include/asm-sparc64/ttable.h               |   18 -
 include/asm-sparc64/unistd.h               |   10 -
 include/asm-sparc64/user.h                 |   61 +--
 net/core/sock.c                            |    9 -
 76 files changed, 172 insertions(+), 11625 deletions(-)
 delete mode 100644 arch/sparc/kernel/errtbls.c
 delete mode 100644 arch/sparc/kernel/sclow.S
 delete mode 100644 arch/sparc/kernel/sunos_asm.S
 delete mode 100644 arch/sparc/kernel/sunos_ioctl.c
 delete mode 100644 arch/sparc/kernel/sys_solaris.c
 delete mode 100644 arch/sparc/kernel/sys_sunos.c
 delete mode 100644 arch/sparc64/kernel/binfmt_aout32.c
 delete mode 100644 arch/sparc64/kernel/sunos_ioctl32.c
 delete mode 100644 arch/sparc64/kernel/sys_sunos32.c
 delete mode 100644 arch/sparc64/solaris/Makefile
 delete mode 100644 arch/sparc64/solaris/conv.h
 delete mode 100644 arch/sparc64/solaris/entry64.S
 delete mode 100644 arch/sparc64/solaris/fs.c
 delete mode 100644 arch/sparc64/solaris/ioctl.c
 delete mode 100644 arch/sparc64/solaris/ipc.c
 delete mode 100644 arch/sparc64/solaris/misc.c
 delete mode 100644 arch/sparc64/solaris/signal.c
 delete mode 100644 arch/sparc64/solaris/signal.h
 delete mode 100644 arch/sparc64/solaris/socket.c
 delete mode 100644 arch/sparc64/solaris/socksys.c
 delete mode 100644 arch/sparc64/solaris/socksys.h
 delete mode 100644 arch/sparc64/solaris/systbl.S
 delete mode 100644 arch/sparc64/solaris/timod.c
 delete mode 100644 include/asm-sparc/a.out-core.h
 delete mode 100644 include/asm-sparc/a.out.h
 delete mode 100644 include/asm-sparc/pconf.h
 delete mode 100644 include/asm-sparc/solerrno.h
 delete mode 100644 include/asm-sparc/svr4.h
 delete mode 100644 include/asm-sparc64/a.out-core.h
 delete mode 100644 include/asm-sparc64/a.out.h
 delete mode 100644 include/asm-sparc64/pconf.h
 delete mode 100644 include/asm-sparc64/solerrno.h
 delete mode 100644 include/asm-sparc64/svr4.h
#1 lore raw
Quoted 4 lines

This performs the scheduled removal of Solaris and SunOS system call for sparc, much to the chagrin of Al Viro and others :-) (in particular, that asm/namei.h crud can now die)

Maybe this is an inside joke I don't get, but why are we merging something that causes Al Viro and others to feel chagrin?

- R.

#2 lore raw

From: Roland Dreier <[email protected]>
Date: Mon, 21 Apr 2008 15:50:37 -0700

Quoted 7 lines
Quoted 4 lines

This performs the scheduled removal of Solaris and SunOS system call for sparc, much to the chagrin of Al Viro and others :-) (in particular, that asm/namei.h crud can now die)

Maybe this is an inside joke I don't get, but why are we merging something that causes Al Viro and others to feel chagrin?

Sorry, I definitely used to wrong word. I mean it would make people like Al pleased.

#3 lore raw
In reply to David Miller
Quoted 5 lines · David Miller

This performs the scheduled removal of Solaris and SunOS system call for sparc, much to the chagrin of Al Viro and others :-) (in particular, that asm/namei.h crud can now die)

Hmm. I think this is sad. The fact is, Solaris/SunOS is the de-facto standard for Sparc. Which makes me think that not emulating them is a real capability loss.

I realize that the code may be painful, but still...

Linus

#4 lore raw
Quoted 9 lines · Linus Torvalds
Quoted 5 lines · David Miller

This performs the scheduled removal of Solaris and SunOS system call for sparc, much to the chagrin of Al Viro and others :-) (in particular, that asm/namei.h crud can now die)

Quoted 5 lines

Hmm. I think this is sad. The fact is, Solaris/SunOS is the de-facto standard for Sparc. Which makes me think that not emulating them is a real capability loss.

I realize that the code may be painful, but still...

FWIW, two things I _really_ want dead and gone are
* timod (or full rewrite of that animal; current one is badly racy
and plays fast and loose with way too many place in VFS guts)
* altroot (use chroot, damnit, and bind whatever you need in there)

Other than that... No preferences, really.

#5 lore raw
Quoted 4 lines · Al Viro

FWIW, two things I _really_ want dead and gone are
* timod (or full rewrite of that animal; current one is badly racy
and plays fast and loose with way too many place in VFS guts)
* altroot (use chroot, damnit, and bind whatever you need in there)

BTW, the part about altroot goes for other architectures too; it's badly broken and it's one hell of an obstacle to fs/namei.c work of any kind.

As absolute minimum we _must_ lose the "if we hadn't found what we wanted in that subtree, repeat lookup starting at real root"; that's causing nightmares in pathname resolution and there's no excuse whatsoever for that since we have bindings.

#6 lore raw

From: Al Viro <[email protected]>
Date: Tue, 22 Apr 2008 00:25:34 +0100

Quoted 7 lines · Al Viro
Quoted 5 lines

FWIW, two things I _really_ want dead and gone are
* timod (or full rewrite of that animal; current one is badly racy
and plays fast and loose with way too many place in VFS guts)
* altroot (use chroot, damnit, and bind whatever you need in there)

Quoted 7 lines

BTW, the part about altroot goes for other architectures too; it's badly broken and it's one hell of an obstacle to fs/namei.c work of any kind.

As absolute minimum we _must_ lose the "if we hadn't found what we wanted in that subtree, repeat lookup starting at real root"; that's causing nightmares in pathname resolution and there's no excuse whatsoever for that since we have bindings.

The only platforms defining a non-NOP __emul_prefix() after this sparc changeset are:

1) IA-64 for PER_LINUX32 --> /emul/ia32-linux/
2) MIPS for riscos and IRIX compat support
3) ARM for ARM_BSD_EMUL --> "usr/gnemul/bsd", yikes no leading slash in that path!

I bet if we really tried we could get rid of these things.

#7 lore raw
Quoted 9 lines · David Miller

The only platforms defining a non-NOP __emul_prefix() after this sparc changeset are:

1) IA-64 for PER_LINUX32 --> /emul/ia32-linux/
2) MIPS for riscos and IRIX compat support
3) ARM for ARM_BSD_EMUL --> "usr/gnemul/bsd", yikes no leading slash in that path!

I bet if we really tried we could get rid of these things.

By killing altroot-related code in fs/namei.c, which is what I'm going to do _anyway_. If somebody really needs a working replacement, I would very much suggest starting with figuring out the desired semantics; frankly, I suspect that having native wrapper for their ld.so might be much better idea as far as the location of libraries is concerned, with chroot and bindings doing the rest.

#8 lore raw
In reply to Al Viro
Quoted 5 lines · Al Viro

FWIW, two things I _really_ want dead and gone are
* timod (or full rewrite of that animal; current one is badly racy
and plays fast and loose with way too many place in VFS guts)
* altroot (use chroot, damnit, and bind whatever you need in there)

I heartily concur about the "altroot" thing. It should die. Removing that part from the Solaris/SunOS emulation is probably worthwhile, and then eventually when/if we end up having a working unionfs, that (along with solaros/sunos-emulation specific mounts) should be able to replace the need for altroot.

Linus

#9 lore raw
In reply to Linus Torvalds

From: Linus Torvalds <[email protected]>
Date: Mon, 21 Apr 2008 16:10:00 -0700 (PDT)

Quoted 3 lines

Hmm. I think this is sad. The fact is, Solaris/SunOS is the de-facto standard for Sparc. Which makes me think that not emulating them is a real capability loss.

There is no capability loss, the code we have hasn't worked on anything other than extremely trivial Solaris cases, and that's when it was working.

Nobody has tested or tried to use it at all for years, and as a result even something as simple as a modern compiled Solaris binary doing:

	int main(void) { return 0; }

won't even work because things the dynamic linker does are unsupported.

It's not like I've removed the capability for people to run something like Oracle/Solaris under Linux, nothing even half-way approaching that ever worked, and so I just wanted to make that clear :-)

#10 lore raw
Quoted 4 lines · David Miller

There is no capability loss, the code we have hasn't worked on anything other than extremely trivial Solaris cases, and that's when it was working.

Ahh, ok. Will pull.

Linus

#11 lore raw
In reply to David Miller

Besides a few bug fixes, the main bit in here is changing sparc64's SMP code to take advantage of the &cpumask_of_cpu() stuff we have now.

With one exception, the sparc64 cross-call code will now only work with constant cpumask_t pointers, rather than using cpumask_t local variables.

That exception is arch_send_call_function_ipi()' "mask" argument. I would really like to see that interface pass in a constant cpumask_t pointer too.

As I found when transforming the sparc64 code, the only way to get rid of these function local cpumask_t variables is to put the "is it online?" and "is it current cpu?" handling down in the cross-call dispatch code itself. I think the generic SMP helper code should do the same as well.

In fact the current:

	cpu = smp_processor_id();
	allbutself = cpu_online_map;
	cpu_clear(cpu, allbutself);
	cpus_and(mask, mask, allbutself);

construct in smp_call_function_mask() is very inefficient. Better would be something like:

	cpu = smp_processor_id();
	cpu_clear(cpu, mask);
	cpus_and(mask, mask, cpu_online_map);

which allows to eliminate the allbutself local variable entirely.

Please pull, thanks a lot!

The following changes since commit 8f616cd5249e03c9e1b371623d85e76d4b86bbc1:
Linus Torvalds (1):
Merge branch 'for_linus' of git://git.kernel.org/.../tytso/ext4

are available in the git repository at:

master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6.git master

David S. Miller (13):
sparc64: Need to disable preemption around smp_tsb_sync().
sparc64: Use function pointer for cross-call sending.
sparc64: Use xcall_deliver() consistently.
sparc64: Use cpumask_t pointers and for_each_cpu_mask_nr() in xcall_deliver.
sparc64: Call xcall_deliver() directly in some cases.
sparc64: Directly call xcall_deliver() in smp_start_sync_tick_client.
sparc64: Make smp_cross_call_masked() take a cpumask_t pointer.
sparc64: Always allocate the send mondo blocks, even on non-sun4v.
sparc64: Make all xcall_deliver's go through common helper function.
sparc64: Disable local interrupts around xcall_deliver_impl() invocation.
sparc64: Build cpu list and mondo block at top-level xcall_deliver().
sparc64: Kill error_mask from hypervisor_xcall_deliver().
sparc64: Remove all cpumask_t local variables in xcall dispatch.

Huang Weiyi (1):
arch/sparc64/kernel/signal.c: removed duplicated #include

 arch/sparc64/kernel/irq.c    |   19 +++-
 arch/sparc64/kernel/signal.c |    1 -
 arch/sparc64/kernel/smp.c    |  292 +++++++++++++++++++++---------------------
 arch/sparc64/mm/tsb.c        |    5 +-
 4 files changed, 166 insertions(+), 151 deletions(-)
#12 lore raw
In reply to David Miller
Quoted 1 line · David Miller

sparc64: Manage NMI watchdog enabling like x86.

Dave, do you expect anything to have changed regarding the v240 NMI hang because of this change to atomic*(), should we give it a try?

Signature · 1 line
     2. That which causes joy or happiness.
#13 lore raw
In reply to David Miller

From: Josip Rodin <[email protected]>
Date: Sat, 12 Sep 2009 11:53:02 +0200

Quoted 5 lines · David Miller
Quoted 1 line

sparc64: Manage NMI watchdog enabling like x86.

Dave, do you expect anything to have changed regarding the v240 NMI hang because of this change to atomic*(), should we give it a try?

No.

#14 lore raw
In reply to David Miller

I've been grabbing random patches for my Ultra2 as I see them, to try and figure out why I can't get a clean boot, but was wondering if it's possible to git-clone the sparc-next-2.6 branch, master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git master

any get-clone I currently try asks me for a password, so I'm guessing that it is locked down.

Most of my tests will be compile/reboot when I have access, so fairly slow going.

Thanks

#15 lore raw
In reply to David Miller
Quoted 6 lines · Leif Sawyer

I've been grabbing random patches for my Ultra2 as I see them, to try and figure out why I can't get a clean boot, but was wondering if it's possible to git-clone the sparc-next-2.6 branch, master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git master

any get-clone I currently try asks me for a password, so I'm guessing that it is locked down.

You need to access the public repository here:
git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git master

Notice that "master" is replaced by "git".

Sam