Discussion:
HEADS UP: COMPAT_IA32 renamed COMPAT_FREEBSD32
(too old to reply)
Nathan Whitehorn
2010-03-11 14:50:05 UTC
Permalink
As a result of importing 32-bit compatibility support for non-x86 64-bit
platforms, the kernel options COMPAT_IA32 has been renamed
COMPAT_FREEBSD32 in revision 205014, so all kernel configurations
including this option must be modified accordingly.
-Nathan
Hajimu UMEMOTO
2010-03-11 15:04:41 UTC
Permalink
Hi,
On Thu, 11 Mar 2010 08:50:05 -0600
nwhitehorn> As a result of importing 32-bit compatibility support for non-x86 64-bit
nwhitehorn> platforms, the kernel options COMPAT_IA32 has been renamed
nwhitehorn> COMPAT_FREEBSD32 in revision 205014, so all kernel configurations
nwhitehorn> including this option must be modified accordingly.

Doesn't this mean we cannot have FreeBSD version 32? :)

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
***@mahoroba.org ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/
Sean C. Farley
2010-03-11 15:13:02 UTC
Permalink
Post by Hajimu UMEMOTO
Hi,
On Thu, 11 Mar 2010 08:50:05 -0600
nwhitehorn> As a result of importing 32-bit compatibility support for non-x86 64-bit
nwhitehorn> platforms, the kernel options COMPAT_IA32 has been renamed
nwhitehorn> COMPAT_FREEBSD32 in revision 205014, so all kernel configurations
nwhitehorn> including this option must be modified accordingly.
Doesn't this mean we cannot have FreeBSD version 32? :)
Think like the U.S. government and push the problem off to the
great*N-grandchildren. ;)

Sean
--
***@FreeBSD.org
Mike Jakubik
2010-03-11 16:36:16 UTC
Permalink
Post by Nathan Whitehorn
As a result of importing 32-bit compatibility support for non-x86
64-bit platforms, the kernel options COMPAT_IA32 has been renamed
COMPAT_FREEBSD32 in revision 205014, so all kernel configurations
including this option must be modified accordingly.
That sounds a bit confusing, compatibility with FreeBSD 3.2?
Scot Hetzel
2010-03-12 01:14:29 UTC
Permalink
On Thu, Mar 11, 2010 at 10:36 AM, Mike Jakubik
Post by Mike Jakubik
Post by Nathan Whitehorn
As a result of importing 32-bit compatibility support for non-x86 64-bit
platforms, the kernel options COMPAT_IA32 has been renamed COMPAT_FREEBSD32
in revision 205014, so all kernel configurations including this option must
be modified accordingly.
That sounds a bit confusing, compatibility with FreeBSD 3.2?
I agree that the name COMPAT_FREEBSD32 is confusing, does it mean
compatiblity with FreeBSD 3.2, FreeBSD 32 or 32-bit ARCH's.

A better name would have been COMPAT_ARCH32 or COMPAT_32BIT_ARCH.

Scot
Garrett Cooper
2010-03-12 01:20:08 UTC
Permalink
Post by Scot Hetzel
On Thu, Mar 11, 2010 at 10:36 AM, Mike Jakubik
Post by Mike Jakubik
Post by Nathan Whitehorn
As a result of importing 32-bit compatibility support for non-x86 64-bit
platforms, the kernel options COMPAT_IA32 has been renamed COMPAT_FREEBSD32
in revision 205014, so all kernel configurations including this option must
be modified accordingly.
That sounds a bit confusing, compatibility with FreeBSD 3.2?
I agree that the name COMPAT_FREEBSD32 is confusing, does it mean
compatiblity with FreeBSD 3.2, FreeBSD 32 or 32-bit ARCH's.
A better name would have been COMPAT_ARCH32 or COMPAT_32BIT_ARCH.
Agreed. Is it possible to change the name again because it really
hasn't gotten much traction yet?
Thanks,
-Garrett
M. Warner Losh
2010-03-12 02:24:23 UTC
Permalink
In message: <***@mail.gmail.com>
Garrett Cooper <***@gmail.com> writes:
: On Thu, Mar 11, 2010 at 5:14 PM, Scot Hetzel <***@gmail.com> wrote:
: > On Thu, Mar 11, 2010 at 10:36 AM, Mike Jakubik
: > <***@intertainservices.com> wrote:
: >> On 3/11/2010 9:50 AM, Nathan Whitehorn wrote:
: >>>
: >>> As a result of importing 32-bit compatibility support for non-x86 64-bit
: >>> platforms, the kernel options COMPAT_IA32 has been renamed COMPAT_FREEBSD32
: >>> in revision 205014, so all kernel configurations including this option must
: >>> be modified accordingly.
: >>>
: >>
: >> That sounds a bit confusing, compatibility with FreeBSD 3.2?
: >>
: > I agree that the name COMPAT_FREEBSD32 is confusing, does it mean
: > compatiblity with FreeBSD 3.2, FreeBSD 32 or 32-bit ARCH's.
: >
: > A better name would have been COMPAT_ARCH32 or COMPAT_32BIT_ARCH.
:
: Agreed. Is it possible to change the name again because it really
: hasn't gotten much traction yet?

What does the name matter, really?

This will be documented, and mirrors the kernel source
compat/freebsd32.

Put another way: if everybody that's going to comment on the name
would instead fix one bug from the PR database with the time they
spend commenting on it, would FreeBSD be better or worse off than
spending dozens of hours arguing over COMPAT_X32 vs COMPAT_Y32 vs
COMPAT_FLYING_MONKEYS?

Warner
Justin Hibbits
2010-03-12 02:44:24 UTC
Permalink
Post by M. Warner Losh
: > On Thu, Mar 11, 2010 at 10:36 AM, Mike Jakubik
: >>>
: >>> As a result of importing 32-bit compatibility support for non-x86 64-bit
: >>> platforms, the kernel options COMPAT_IA32 has been renamed COMPAT_FREEBSD32
: >>> in revision 205014, so all kernel configurations including this option must
: >>> be modified accordingly.
: >>>
: >>
: >> That sounds a bit confusing, compatibility with FreeBSD 3.2?
: >>
: > I agree that the name COMPAT_FREEBSD32 is confusing, does it mean
: > compatiblity with FreeBSD 3.2, FreeBSD 32 or 32-bit ARCH's.
: >
: > A better name would have been COMPAT_ARCH32 or COMPAT_32BIT_ARCH.
: Agreed. Is it possible to change the name again because it really
: hasn't gotten much traction yet?
What does the name matter, really?
This will be documented, and mirrors the kernel source
compat/freebsd32.
Put another way: if everybody that's going to comment on the name
would instead fix one bug from the PR database with the time they
spend commenting on it, would FreeBSD be better or worse off than
spending dozens of hours arguing over COMPAT_X32 vs COMPAT_Y32 vs
COMPAT_FLYING_MONKEYS?
Warner
Just for that, I nominate Nathan rename the option to
COMPAT_FLYING_MONKEYS32.
Garrett Cooper
2010-03-12 04:24:57 UTC
Permalink
Post by M. Warner Losh
: > On Thu, Mar 11, 2010 at 10:36 AM, Mike Jakubik
: >>>
: >>> As a result of importing 32-bit compatibility support for non-x86 64-bit
: >>> platforms, the kernel options COMPAT_IA32 has been renamed COMPAT_FREEBSD32
: >>> in revision 205014, so all kernel configurations including this option must
: >>> be modified accordingly.
: >>>
: >>
: >> That sounds a bit confusing, compatibility with FreeBSD 3.2?
: >>
: > I agree that the name COMPAT_FREEBSD32 is confusing, does it mean
: > compatiblity with FreeBSD 3.2, FreeBSD 32 or 32-bit ARCH's.
: >
: > A better name would have been COMPAT_ARCH32 or COMPAT_32BIT_ARCH.
: Agreed. Is it possible to change the name again because it really
: hasn't gotten much traction yet?
What does the name matter, really?
This will be documented, and mirrors the kernel source
compat/freebsd32.
Put another way: if everybody that's going to comment on the name
would instead fix one bug from the PR database with the time they
spend commenting on it, would FreeBSD be better or worse off than
spending dozens of hours arguing over COMPAT_X32 vs COMPAT_Y32 vs
COMPAT_FLYING_MONKEYS?
I can haz PR review then? Here's an easy one :)...

http://www.freebsd.org/cgi/query-pr.cgi?pr=144644

Thanks,
-Garrett
Gary Jennejohn
2010-03-12 10:36:25 UTC
Permalink
On Thu, 11 Mar 2010 20:24:57 -0800
Post by Garrett Cooper
I can haz PR review then? Here's an easy one :)...
http://www.freebsd.org/cgi/query-pr.cgi?pr=144644
Looks OK to me except I don't like the
if (something) {
one-line-of-code();
}
constructs, but according to style(9) these are sort-of OK, viz

Closing and opening braces go on the same line as the else. Braces that
are not necessary may be left out.
^^^^^^^^^^^^^^^
if (test)
stmt;
else if (bar) {
stmt;
stmt;
} else
stmt;

Saved by the "may."

---
Gary Jennejohn (gj@)
Ulrich Spörlein
2010-03-12 11:02:21 UTC
Permalink
Post by Gary Jennejohn
On Thu, 11 Mar 2010 20:24:57 -0800
Post by Garrett Cooper
I can haz PR review then? Here's an easy one :)...
http://www.freebsd.org/cgi/query-pr.cgi?pr=144644
Looks OK to me except I don't like the
if (something) {
one-line-of-code();
}
constructs, but according to style(9) these are sort-of OK, viz
Closing and opening braces go on the same line as the else. Braces that
are not necessary may be left out.
^^^^^^^^^^^^^^^
if (test)
stmt;
else if (bar) {
stmt;
stmt;
} else
stmt;
Saved by the "may."
True, but some folks (me included) really hate it, when different
bracing is used *within* the same statement. The example above really is
horrible. If one if/else-if clause needs braces, just brace them all. This
loses no vertical space (the dangling else excluded) and some folks find
it visually more pleasing/easier to read.

... hence begins the bikeshedding.

Bye,
Uli
Julian Elischer
2010-03-12 19:10:52 UTC
Permalink
Post by Ulrich Spörlein
Post by Gary Jennejohn
On Thu, 11 Mar 2010 20:24:57 -0800
Post by Garrett Cooper
I can haz PR review then? Here's an easy one :)...
http://www.freebsd.org/cgi/query-pr.cgi?pr=144644
Looks OK to me except I don't like the
if (something) {
one-line-of-code();
}
constructs, but according to style(9) these are sort-of OK, viz
Closing and opening braces go on the same line as the else. Braces that
are not necessary may be left out.
^^^^^^^^^^^^^^^
if (test)
stmt;
else if (bar) {
stmt;
stmt;
} else
stmt;
Saved by the "may."
True, but some folks (me included) really hate it, when different
bracing is used *within* the same statement. The example above really is
horrible. If one if/else-if clause needs braces, just brace them all. This
loses no vertical space (the dangling else excluded) and some folks find
it visually more pleasing/easier to read.
... hence begins the bikeshedding.
"Green"

My personal preference is that if one clause requires braces,
they all get them so you would never see

"else {"

or

"} else"

just
"else"
or
"} else {"

I just find it helps keep everything correctly associated when reading.
Post by Ulrich Spörlein
Bye,
Uli
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-current
David O'Brien
2010-03-12 17:17:58 UTC
Permalink
Post by M. Warner Losh
: > On Thu, Mar 11, 2010 at 10:36 AM, Mike Jakubik
: >>> As a result of importing 32-bit compatibility support for non-x86
: >>> 64-bit platforms, the kernel options COMPAT_IA32 has been renamed
: >>> COMPAT_FREEBSD32 in revision 205014, so all kernel configurations
: >>> including this option must be modified accordingly.
: >>
: >> That sounds a bit confusing, compatibility with FreeBSD 3.2?
: >>
: > I agree that the name COMPAT_FREEBSD32 is confusing, does it mean
: > compatiblity with FreeBSD 3.2, FreeBSD 32 or 32-bit ARCH's.
: >
: > A better name would have been COMPAT_ARCH32 or COMPAT_32BIT_ARCH.
: Agreed. Is it possible to change the name again because it really
: hasn't gotten much traction yet?
What does the name matter, really?
Yes names matter. Otherwise we would have made it "DEF8931". #define
names are chosen to be self-documenting.

$ grep COMPAT_FREEBSD conf/*
conf/NOTES:# Note that as a general rule, COMPAT_FREEBSD<n> depends on
conf/NOTES:# COMPAT_FREEBSD<n+1>, COMPAT_FREEBSD<n+2>, etc.
conf/NOTES:options COMPAT_FREEBSD4
conf/NOTES:options COMPAT_FREEBSD5
conf/NOTES:options COMPAT_FREEBSD6
conf/NOTES:options COMPAT_FREEBSD7
conf/options:COMPAT_FREEBSD4 opt_compat.h
conf/options:COMPAT_FREEBSD5 opt_compat.h
conf/options:COMPAT_FREEBSD6 opt_compat.h
conf/options:COMPAT_FREEBSD7 opt_compat.h

COMPAT_FREEBSD32 is not the same as any of the other well established
"COMPAT_FREEBSD" macros. So I do see where this could lead to confusion
to users.
--
-- David (***@FreeBSD.org)
M. Warner Losh
2010-03-12 19:50:32 UTC
Permalink
In message: <***@dragon.NUXI.org>
"David O'Brien" <***@freebsd.org> writes:
: On Thu, Mar 11, 2010 at 07:24:23PM -0700, M. Warner Losh wrote:
: > In message: <***@mail.gmail.com>
: > Garrett Cooper <***@gmail.com> writes:
: > : On Thu, Mar 11, 2010 at 5:14 PM, Scot Hetzel <***@gmail.com> wrote:
: > : > On Thu, Mar 11, 2010 at 10:36 AM, Mike Jakubik
: > : > <***@intertainservices.com> wrote:
: > : >> On 3/11/2010 9:50 AM, Nathan Whitehorn wrote:
: > : >>> As a result of importing 32-bit compatibility support for non-x86
: > : >>> 64-bit platforms, the kernel options COMPAT_IA32 has been renamed
: > : >>> COMPAT_FREEBSD32 in revision 205014, so all kernel configurations
: > : >>> including this option must be modified accordingly.
: > : >>
: > : >> That sounds a bit confusing, compatibility with FreeBSD 3.2?
: > : >>
: > : > I agree that the name COMPAT_FREEBSD32 is confusing, does it mean
: > : > compatiblity with FreeBSD 3.2, FreeBSD 32 or 32-bit ARCH's.
: > : >
: > : > A better name would have been COMPAT_ARCH32 or COMPAT_32BIT_ARCH.
: > :
: > : Agreed. Is it possible to change the name again because it really
: > : hasn't gotten much traction yet?
: >
: > What does the name matter, really?
:
: Yes names matter. Otherwise we would have made it "DEF8931". #define
: names are chosen to be self-documenting.

I'd maintain that this name is self-documenting as well. Obviously
you can take the what does the name matter to an extreme. However,
for names that meet a minimum threshold of conformity, there reaches a
point where arguing over them is counter productive. I believe that
this name meets those minimum requirements.

: $ grep COMPAT_FREEBSD conf/*
: conf/NOTES:# Note that as a general rule, COMPAT_FREEBSD<n> depends on
: conf/NOTES:# COMPAT_FREEBSD<n+1>, COMPAT_FREEBSD<n+2>, etc.
: conf/NOTES:options COMPAT_FREEBSD4
: conf/NOTES:options COMPAT_FREEBSD5
: conf/NOTES:options COMPAT_FREEBSD6
: conf/NOTES:options COMPAT_FREEBSD7
: conf/options:COMPAT_FREEBSD4 opt_compat.h
: conf/options:COMPAT_FREEBSD5 opt_compat.h
: conf/options:COMPAT_FREEBSD6 opt_compat.h
: conf/options:COMPAT_FREEBSD7 opt_compat.h
:
: COMPAT_FREEBSD32 is not the same as any of the other well established
: "COMPAT_FREEBSD" macros. So I do see where this could lead to confusion
: to users.

This is where we disagree. Any confusion can be solved by
documentation.

See for example these other compat options:

COMPAT_LINUX brings in the files in sys/compat/linux
COMPAT_SVR4 brings in the files in sys/compat/svr4

and

COMPAT_LINUX32 compiles the 32-bit linux support on 64-bit
hosts.

So the issue isn't as cut and dried as you might think. There's
multiple different conventions used here in addition to your simple
example. Users of 64-bit systems that will be using COMPAT_FREEBSD32
are likely to find this a natural extension of the COMPAT_LINUX32 that
they are likely already using.

Warner
David O'Brien
2010-03-22 18:53:31 UTC
Permalink
Post by M. Warner Losh
So the issue isn't as cut and dried as you might think. There's
multiple different conventions used here in addition to your simple
example.
I guess we'd have to take a poll to find out. Seems pretty cut and dried
to me. COMPAT_FREEBSDn has an established context that does not match
this new usage. That is - same bit'ness, compatibility with an older
FreeBSD API for the same architecture. All the other COMPAT_* are for
foreign ABI compatibility. COMPAT_LINUX32 possibly should have been
"COMPAT_LINUX_X86_64". (or is it MI and is usable as-is for PowerPC
and MIPS? I haven't looked that deeply at the code.)
Post by M. Warner Losh
Users of 64-bit systems that will be using COMPAT_FREEBSD32
are likely to find this a natural extension of the COMPAT_LINUX32 that
they are likely already using.
You know I am such a user - and I don't think it is so clear given the
existence (and purpose) of "COMPAT_FREEBSDn" for the past many years.

While it does match the directory name of 'sys/compat/freebsd32', it may
be that "freebsd32" was a poor choice for that directory's name. But
given the recent discussion in another thread - I won't even suggest
we rename it.
--
-- David (***@FreeBSD.org)
M. Warner Losh
2010-03-22 19:01:18 UTC
Permalink
In message: <***@dragon.NUXI.org>
"David O'Brien" <***@freebsd.org> writes:
: On Fri, Mar 12, 2010 at 12:50:32PM -0700, M. Warner Losh wrote:
: > : On Thu, Mar 11, 2010 at 07:24:23PM -0700, M. Warner Losh wrote:
: > So the issue isn't as cut and dried as you might think. There's
: > multiple different conventions used here in addition to your simple
: > example.
:
: I guess we'd have to take a poll to find out. Seems pretty cut and dried
: to me. COMPAT_FREEBSDn has an established context that does not match
: this new usage. That is - same bit'ness, compatibility with an older
: FreeBSD API for the same architecture. All the other COMPAT_* are for
: foreign ABI compatibility. COMPAT_LINUX32 possibly should have been
: "COMPAT_LINUX_X86_64". (or is it MI and is usable as-is for PowerPC
: and MIPS? I haven't looked that deeply at the code.)

no, COMPAT_LINUX32 is the right name. While we don't have PowerPC or
MIPS linux emulation bits in the kernel, the code if for dealing with
running 32-bit binaries on 64-bit machines. There may be a little
leakage of x86 specific goo here, but not a lot.

Warner
M. Warner Losh
2010-03-22 19:09:39 UTC
Permalink
P.S. I think that there's much traction to the idea of moving from
COMPAT_FREEBSDx to some other variable called, for example,
COMPAT_FREEBSD_BACK_TO=x, which will give compatibility for binaries
as old as FreeBSD x.0, and have all the other magic handled behind the
scenes. This would render the inconsistency with COMPAT_FREEBSDx part
of the debate completely moot.

Warner
Daniel Eischen
2010-03-22 19:42:22 UTC
Permalink
[ Some CC's stripped ]
Post by M. Warner Losh
P.S. I think that there's much traction to the idea of moving from
COMPAT_FREEBSDx to some other variable called, for example,
COMPAT_FREEBSD_BACK_TO=x, which will give compatibility for binaries
as old as FreeBSD x.0, and have all the other magic handled behind the
scenes. This would render the inconsistency with COMPAT_FREEBSDx part
of the debate completely moot.
Doesn't matter. We're still use to COMPAT_FREEBSDx since
it's been here so long. So regardless if you rename them
to COMPAT_FREEBSD_BACK_TO=x, it is still potentially confusing.

COMPAT_ARCH32 and all other choices David mentions seem like
much better names - even if there wasn't any existing
COMPAT_FREEBSDx knobs.

My $0.02.
--
DE
jhell
2010-03-23 23:39:52 UTC
Permalink
Post by Daniel Eischen
[ Some CC's stripped ]
Post by M. Warner Losh
P.S. I think that there's much traction to the idea of moving from
COMPAT_FREEBSDx to some other variable called, for example,
COMPAT_FREEBSD_BACK_TO=x, which will give compatibility for binaries
as old as FreeBSD x.0, and have all the other magic handled behind the
scenes. This would render the inconsistency with COMPAT_FREEBSDx part
of the debate completely moot.
Doesn't matter. We're still use to COMPAT_FREEBSDx since
it's been here so long. So regardless if you rename them
to COMPAT_FREEBSD_BACK_TO=x, it is still potentially confusing.
COMPAT_ARCH32 and all other choices David mentions seem like
much better names - even if there wasn't any existing
COMPAT_FREEBSDx knobs.
My $0.02.
Ill say it again if I have to... COMPAT_ELF32 or possibly even
ELF32_SUPPORT seems to me as a very likely possibility.

Maybe even:
SUPPORT_ELF32= # Support for 32 Bit ELF Binaries

This would add its own name structure that is expandabe later-in-future
when 128 Bit systems come out ;)

Regards,
--
jhell
Carlos A. M. dos Santos
2010-03-24 00:49:49 UTC
Permalink
Post by Daniel Eischen
[ Some CC's stripped ]
P.S.  I think that there's much traction to the idea of moving from
COMPAT_FREEBSDx to some other variable called, for example,
COMPAT_FREEBSD_BACK_TO=x, which will give compatibility for binaries
as old as FreeBSD x.0, and have all the other magic handled behind the
scenes.  This would render the inconsistency with COMPAT_FREEBSDx part
of the debate completely moot.
Doesn't matter.  We're still use to COMPAT_FREEBSDx since
it's been here so long.  So regardless if you rename them
to COMPAT_FREEBSD_BACK_TO=x, it is still potentially confusing.
COMPAT_ARCH32 and all other choices David mentions seem like
much better names - even if there wasn't any existing
COMPAT_FREEBSDx knobs.
My $0.02.
Ill say it again if I have to... COMPAT_ELF32 or possibly even ELF32_SUPPORT
seems to me as a very likely possibility.
SUPPORT_ELF32=          # Support for 32 Bit ELF Binaries
This would add its own name structure that is expandabe later-in-future when
128 Bit systems come out ;)
ELF may go away sometime, just like a.out went to the holly pastures.
--
Not so young, but still crying out
Full of anger full of doubt
Svein Skogen (Listmail Account)
2010-03-24 00:54:54 UTC
Permalink
Post by Carlos A. M. dos Santos
Post by Daniel Eischen
[ Some CC's stripped ]
Post by M. Warner Losh
P.S. I think that there's much traction to the idea of moving from
COMPAT_FREEBSDx to some other variable called, for example,
COMPAT_FREEBSD_BACK_TO=x, which will give compatibility for binaries
as old as FreeBSD x.0, and have all the other magic handled behind the
scenes. This would render the inconsistency with COMPAT_FREEBSDx part
of the debate completely moot.
Doesn't matter. We're still use to COMPAT_FREEBSDx since
it's been here so long. So regardless if you rename them
to COMPAT_FREEBSD_BACK_TO=x, it is still potentially confusing.
COMPAT_ARCH32 and all other choices David mentions seem like
much better names - even if there wasn't any existing
COMPAT_FREEBSDx knobs.
My $0.02.
Ill say it again if I have to... COMPAT_ELF32 or possibly even ELF32_SUPPORT
seems to me as a very likely possibility.
SUPPORT_ELF32= # Support for 32 Bit ELF Binaries
This would add its own name structure that is expandabe later-in-future when
128 Bit systems come out ;)
ELF may go away sometime, just like a.out went to the holly pastures.
It may. But having a confusing directive (the COMPAT_FREEBSD32 vs
COMPAT_FREEBSD[4567]) is likely to stay with us for a long, long, long
time. Just like the scarring after a bullet wound to the foot.

//Svein

- --
- --------+-------------------+-------------------------------
/"\ |Svein Skogen | ***@d80.iso100.no
\ / |Solberg Østli 9 | PGP Key: 0xE5E76831
X |2020 Skedsmokorset | ***@jernhuset.no
/ \ |Norway | PGP Key: 0xCE96CE13
| | ***@stillbilde.net
ascii | | PGP Key: 0x58CD33B6
ribbon |System Admin | svein-***@stillbilde.net
Campaign|stillbilde.net | PGP Key: 0x22D494A4
+-------------------+-------------------------------
|msn messenger: | Mobile Phone: +47 907 03 575
|***@jernhuset.no | RIPE handle: SS16503-RIPE
- --------+-------------------+-------------------------------
If you really are in a hurry, mail me at
svein-***@stillbilde.net
This mailbox goes directly to my cellphone and is checked
even when I'm not in front of my computer.
- ------------------------------------------------------------
Picture Gallery:
https://gallery.stillbilde.net/v/svein/
- ------------------------------------------------------------
jhell
2010-03-24 01:08:59 UTC
Permalink
Post by Carlos A. M. dos Santos
Post by Daniel Eischen
[ Some CC's stripped ]
P.S.  I think that there's much traction to the idea of moving from
COMPAT_FREEBSDx to some other variable called, for example,
COMPAT_FREEBSD_BACK_TO=x, which will give compatibility for binaries
as old as FreeBSD x.0, and have all the other magic handled behind the
scenes.  This would render the inconsistency with COMPAT_FREEBSDx part
of the debate completely moot.
Doesn't matter.  We're still use to COMPAT_FREEBSDx since
it's been here so long.  So regardless if you rename them
to COMPAT_FREEBSD_BACK_TO=x, it is still potentially confusing.
COMPAT_ARCH32 and all other choices David mentions seem like
much better names - even if there wasn't any existing
COMPAT_FREEBSDx knobs.
My $0.02.
Ill say it again if I have to... COMPAT_ELF32 or possibly even ELF32_SUPPORT
seems to me as a very likely possibility.
SUPPORT_ELF32=          # Support for 32 Bit ELF Binaries
This would add its own name structure that is expandabe later-in-future when
128 Bit systems come out ;)
ELF may go away sometime, just like a.out went to the holly pastures.
Alright, that's like anything else in the world of computer sciences. But
that still does not dismiss its purpose and right now ELF is in full swing
and when the time comes... 10, 20, 30 years down the road then you simply
add something else but by that point 32 bit computing will probably be
history so there wont need to be any of this fuss for ELF or 32 bit
support at that time.
--
jhell
pluknet
2010-04-05 15:12:08 UTC
Permalink
Hi,

the interesting part for me is how to properly assert now a value of e.g.
KINFO_PROC_SIZE varying on err.. different COMPAT_FREEBSD32 arches
(say, FreeBSD would have _kern_proc FreeBSD32 compat layer for top/ps/).
--
wbr,
pluknet
Nathan Whitehorn
2010-04-06 15:24:21 UTC
Permalink
Post by pluknet
Hi,
the interesting part for me is how to properly assert now a value of e.g.
KINFO_PROC_SIZE varying on err.. different COMPAT_FREEBSD32 arches
(say, FreeBSD would have _kern_proc FreeBSD32 compat layer for top/ps/).
Probably the cleanest thing would be to set KINFO_PROC_SIZE in
machine/proc.h instead of where it is now, and then also define a
KINFO_PROC32_SIZE or something in the same place. Also, that would be a
really nice feature.
-Nathan
John Baldwin
2010-04-07 19:49:41 UTC
Permalink
Post by Nathan Whitehorn
Post by pluknet
Hi,
the interesting part for me is how to properly assert now a value of e.g.
KINFO_PROC_SIZE varying on err.. different COMPAT_FREEBSD32 arches
(say, FreeBSD would have _kern_proc FreeBSD32 compat layer for top/ps/).
Probably the cleanest thing would be to set KINFO_PROC_SIZE in
machine/proc.h instead of where it is now, and then also define a
KINFO_PROC32_SIZE or something in the same place. Also, that would be a
really nice feature.
Yes, I think this sounds like the best approach.
--
John Baldwin
Scott Long
2010-03-12 03:54:32 UTC
Permalink
Post by Scot Hetzel
On Thu, Mar 11, 2010 at 10:36 AM, Mike Jakubik
Post by Mike Jakubik
Post by Nathan Whitehorn
As a result of importing 32-bit compatibility support for non-x86 64-bit
platforms, the kernel options COMPAT_IA32 has been renamed COMPAT_FREEBSD32
in revision 205014, so all kernel configurations including this option must
be modified accordingly.
That sounds a bit confusing, compatibility with FreeBSD 3.2?
I agree that the name COMPAT_FREEBSD32 is confusing, does it mean
compatiblity with FreeBSD 3.2, FreeBSD 32 or 32-bit ARCH's.
A better name would have been COMPAT_ARCH32 or COMPAT_32BIT_ARCH.
Seriously, this is being debated? FreeBSD 3.2? Is this a joke? I caught the humor in the first couple of replies, but you sound serious. Wow.

Scott
David O'Brien
2010-03-12 17:22:55 UTC
Permalink
Post by Scott Long
Post by Scot Hetzel
On Thu, Mar 11, 2010 at 10:36 AM, Mike Jakubik
Post by Mike Jakubik
Post by Nathan Whitehorn
As a result of importing 32-bit compatibility support for non-x86 64-bit
platforms, the kernel options COMPAT_IA32 has been renamed
COMPAT_FREEBSD32 in revision 205014, so all kernel configurations
including this option must be modified accordingly.
That sounds a bit confusing, compatibility with FreeBSD 3.2?
I agree that the name COMPAT_FREEBSD32 is confusing, does it mean
compatiblity with FreeBSD 3.2, FreeBSD 32 or 32-bit ARCH's.
A better name would have been COMPAT_ARCH32 or COMPAT_32BIT_ARCH.
Seriously, this is being debated? FreeBSD 3.2? Is this a joke?
I caught the humor in the first couple of replies, but you sound
serious. Wow.
Yes it is. Where was it discussed first? I do not see anything in my
freebsd-arch or freebsd-current archive; or any other FreeBSD list.

If there wasn't already a well established meaning to "COMPAT_FREEBSD"
(grep for it in /usr/src/sys/conf/), there probably wouldn't be any real
complaints.
--
-- David (***@FreeBSD.org)
Mark Linimon
2010-03-12 18:59:49 UTC
Permalink
Post by David O'Brien
Yes it is. Where was it discussed first? I do not see anything in my
freebsd-arch or freebsd-current archive; or any other FreeBSD list.
http://docs.freebsd.org/cgi/mid.cgi?4B971CA3.9090301

crossposted on amd64@, ia64@, ***@.

mcl
Garance A Drosehn
2010-03-15 18:02:22 UTC
Permalink
Post by Mark Linimon
Post by David O'Brien
Yes it is. Where was it discussed first? I do not see anything
in my freebsd-arch or freebsd-current archive; or any other
FreeBSD list.
http://docs.freebsd.org/cgi/mid.cgi?4B971CA3.9090301
While those are logical mailing lists for this topic to have come
up on, it shouldn't be much of a surprise that there are many
freebsd users and committers who are not on those lists. Many
people who do know about the existing COMPAT_FREEBSD* variables,
and thus will be surprised at this variable name.

My understanding is that there has already been a lot of furor
over this name, so let me first say I don't mean to infuriate
anyone. However, my own vote would be for some other name than
COMPAT_FREEBSD32.
--
Garance Alistair Drosehn = ***@rpi.edu
Senior Systems Programmer or ***@FreeBSD.org
Rensselaer Polytechnic Institute; Troy, NY; USA
jhell
2010-03-17 12:06:56 UTC
Permalink
Post by Garance A Drosehn
Post by Mark Linimon
Post by David O'Brien
Yes it is. Where was it discussed first? I do not see anything
in my freebsd-arch or freebsd-current archive; or any other
FreeBSD list.
http://docs.freebsd.org/cgi/mid.cgi?4B971CA3.9090301
While those are logical mailing lists for this topic to have come
up on, it shouldn't be much of a surprise that there are many
freebsd users and committers who are not on those lists. Many
people who do know about the existing COMPAT_FREEBSD* variables,
and thus will be surprised at this variable name.
My understanding is that there has already been a lot of furor
over this name, so let me first say I don't mean to infuriate
anyone. However, my own vote would be for some other name than
COMPAT_FREEBSD32.
Perhaps COMPAT_ELF32 would be more well suited for this ?

$0.002
--
jhell
Svein Skogen (Listmail Account)
2010-03-15 13:16:29 UTC
Permalink
Hi
options COMPAT_FREEBSD4 #Compatible with FreeBSD4
options COMPAT_FREEBSD5 #Compatible with FreeBSD5
options COMPAT_FREEBSD6 #Compatible with FreeBSD6
options COMPAT_FREEBSD7 #Compatible with FreeBSD7
options COMPAT_FREEBSD32
Thanks for the advance notice that FreeBSD will be EoL before RELENG_32.
Perhaps "COMPAT_ARCH_32BIT" would've been a smarter move?

//Svein

- --
- --------+-------------------+-------------------------------
/"\ |Svein Skogen | ***@d80.iso100.no
\ / |Solberg Østli 9 | PGP Key: 0xE5E76831
X |2020 Skedsmokorset | ***@jernhuset.no
/ \ |Norway | PGP Key: 0xCE96CE13
| | ***@stillbilde.net
ascii | | PGP Key: 0x58CD33B6
ribbon |System Admin | svein-***@stillbilde.net
Campaign|stillbilde.net | PGP Key: 0x22D494A4
+-------------------+-------------------------------
|msn messenger: | Mobile Phone: +47 907 03 575
|***@jernhuset.no | RIPE handle: SS16503-RIPE
- --------+-------------------+-------------------------------
If you really are in a hurry, mail me at
svein-***@stillbilde.net
This mailbox goes directly to my cellphone and is checked
even when I'm not in front of my computer.
- ------------------------------------------------------------
Picture Gallery:
https://gallery.stillbilde.net/v/svein/
- ------------------------------------------------------------
Julian Elischer
2010-03-15 16:00:18 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
options COMPAT_FREEBSD4 #Compatible with FreeBSD4
options COMPAT_FREEBSD5 #Compatible with FreeBSD5
options COMPAT_FREEBSD6 #Compatible with FreeBSD6
options COMPAT_FREEBSD7 #Compatible with FreeBSD7
options COMPAT_FREEBSD32
Thanks for the advance notice that FreeBSD will be EoL before RELENG_32.
Perhaps "COMPAT_ARCH_32BIT" would've been a smarter move?
I certainly agree.. can it be changed please?
//Svein
- --
- --------+-------------------+-------------------------------
\ / |Solberg Østli 9 | PGP Key: 0xE5E76831
/ \ |Norway | PGP Key: 0xCE96CE13
ascii | | PGP Key: 0x58CD33B6
Campaign|stillbilde.net | PGP Key: 0x22D494A4
+-------------------+-------------------------------
|msn messenger: | Mobile Phone: +47 907 03 575
- --------+-------------------+-------------------------------
If you really are in a hurry, mail me at
This mailbox goes directly to my cellphone and is checked
even when I'm not in front of my computer.
- ------------------------------------------------------------
https://gallery.stillbilde.net/v/svein/
- ------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkueMywACgkQODUnwSLUlKS6QgCfTPtf0qlgwuSRTSSjtev5N6zc
bG4An2oQhtzEtmaAEzrRs01ClK+nDf/8
=SLia
-----END PGP SIGNATURE-----
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-current
David O'Brien
2010-03-22 17:52:13 UTC
Permalink
Post by Julian Elischer
I certainly agree.. can it be changed please?
I've waited a while to see what other opinions would be expressed on this
topic. I believe there is sufficient support to rename COMPAT_FREEBSD32
to something else based on responses in the mailing lists.

I am sorry if some may wish to label this a "bikeshead". But we seem to
have many folks disliking "COMPAT_FREEBSD32".


Based on responses to the topic of COMPAT_FREEBSD32, the following
were the suggestions offered:
COMPAT_ARCH32, COMPAT_ARCH_32BIT, COMPAT_32BIT_ARCH, COMPAT_32BIT,
COMPAT_FREEBSD32BIT

I went with the first as it seemed the most direct to me, but I find
all but the last are suitable as well. (The last is probably too close
to COMPAT_FREEBSDn given we do have other suggestions.)

This patch was produced by checking out a fresh tree and running this
command from the top level:

wcfind sys -type f | xargs fgrep -l COMPAT_FREEBSD32 | xargs \
sed -i '' \
-e 's/COMPAT_FREEBSD32/COMPAT_ARCH32/g' \
-e 's/compat_freebsd32/compat_arch32/g'
svn revert -R sys/compat/freebsd32


Thoughts?
--
-- David (***@FreeBSD.org)

Index: conf/options.amd64
===================================================================
--- conf/options.amd64 (revision 205451)
+++ conf/options.amd64 (working copy)
@@ -11,7 +11,7 @@ MP_WATCHDOG
# Options for emulators. These should only be used at config time, so
# they are handled like options for static filesystems
# (see src/sys/conf/options), except for broken debugging options.
-COMPAT_FREEBSD32 opt_compat.h
+COMPAT_ARCH32 opt_compat.h
#IBCS2 opt_dontuse.h
#COMPAT_LINUX opt_dontuse.h
COMPAT_LINUX32 opt_compat.h
Index: conf/options.ia64
===================================================================
--- conf/options.ia64 (revision 205451)
+++ conf/options.ia64 (working copy)
@@ -9,7 +9,7 @@ LOG2_PAGE_SIZE opt_global.h

UWX_TRACE_ENABLE opt_global.h

-COMPAT_FREEBSD32 opt_compat.h
+COMPAT_ARCH32 opt_compat.h

EXCEPTION_TRACING opt_xtrace.h

Index: conf/files.ia64
===================================================================
--- conf/files.ia64 (revision 205451)
+++ conf/files.ia64 (working copy)
@@ -28,11 +28,11 @@ ukbdmap.h optional ukbd_dflt_keymap \
no-obj no-implicit-rule before-depend \
clean "ukbdmap.h"
#
-compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32
-compat/freebsd32/freebsd32_misc.c optional compat_freebsd32
-compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32
-compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32
-compat/ia32/ia32_sysvec.c optional compat_freebsd32
+compat/freebsd32/freebsd32_ioctl.c optional compat_arch32
+compat/freebsd32/freebsd32_misc.c optional compat_arch32
+compat/freebsd32/freebsd32_syscalls.c optional compat_arch32
+compat/freebsd32/freebsd32_sysent.c optional compat_arch32
+compat/ia32/ia32_sysvec.c optional compat_arch32
contrib/ia64/libuwx/src/uwx_bstream.c standard
contrib/ia64/libuwx/src/uwx_context.c standard
contrib/ia64/libuwx/src/uwx_env.c standard
@@ -68,10 +68,10 @@ ia64/acpica/madt.c optional acpi
ia64/disasm/disasm_decode.c standard
ia64/disasm/disasm_extract.c standard
ia64/disasm/disasm_format.c standard
-ia64/ia32/ia32_misc.c optional compat_freebsd32
-ia64/ia32/ia32_reg.c optional compat_freebsd32
-ia64/ia32/ia32_signal.c optional compat_freebsd32
-ia64/ia32/ia32_trap.c optional compat_freebsd32
+ia64/ia32/ia32_misc.c optional compat_arch32
+ia64/ia32/ia32_reg.c optional compat_arch32
+ia64/ia32/ia32_signal.c optional compat_arch32
+ia64/ia32/ia32_trap.c optional compat_arch32
ia64/ia64/autoconf.c standard
ia64/ia64/bus_machdep.c standard
ia64/ia64/busdma_machdep.c standard
@@ -117,7 +117,7 @@ ia64/isa/isa_dma.c optional isa
ia64/pci/pci_cfgreg.c optional pci
isa/syscons_isa.c optional sc
isa/vga_isa.c optional vga
-kern/imgact_elf32.c optional compat_freebsd32
+kern/imgact_elf32.c optional compat_arch32
libkern/bcmp.c standard
libkern/ffsl.c standard
libkern/fls.c standard
Index: conf/files.amd64
===================================================================
--- conf/files.amd64 (revision 205451)
+++ conf/files.amd64 (working copy)
@@ -227,20 +227,20 @@ kern/link_elf_obj.c standard
#
# IA32 binary support
#
-#amd64/ia32/ia32_exception.S optional compat_freebsd32
-amd64/ia32/ia32_reg.c optional compat_freebsd32
-amd64/ia32/ia32_signal.c optional compat_freebsd32
-amd64/ia32/ia32_sigtramp.S optional compat_freebsd32
-amd64/ia32/ia32_syscall.c optional compat_freebsd32
-amd64/ia32/ia32_misc.c optional compat_freebsd32
-compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32
-compat/freebsd32/freebsd32_misc.c optional compat_freebsd32
-compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32
-compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32
-compat/ia32/ia32_sysvec.c optional compat_freebsd32
+#amd64/ia32/ia32_exception.S optional compat_arch32
+amd64/ia32/ia32_reg.c optional compat_arch32
+amd64/ia32/ia32_signal.c optional compat_arch32
+amd64/ia32/ia32_sigtramp.S optional compat_arch32
+amd64/ia32/ia32_syscall.c optional compat_arch32
+amd64/ia32/ia32_misc.c optional compat_arch32
+compat/freebsd32/freebsd32_ioctl.c optional compat_arch32
+compat/freebsd32/freebsd32_misc.c optional compat_arch32
+compat/freebsd32/freebsd32_syscalls.c optional compat_arch32
+compat/freebsd32/freebsd32_sysent.c optional compat_arch32
+compat/ia32/ia32_sysvec.c optional compat_arch32
compat/linprocfs/linprocfs.c optional linprocfs
compat/linsysfs/linsysfs.c optional linsysfs
-kern/imgact_elf32.c optional compat_freebsd32
+kern/imgact_elf32.c optional compat_arch32
#
# Linux/i386 binary support
#
Index: kern/kern_jail.c
===================================================================
--- kern/kern_jail.c (revision 205451)
+++ kern/kern_jail.c (working copy)
@@ -734,7 +734,7 @@ kern_jail_set(struct thread *td, struct
}
}

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (td->td_proc->p_sysent->sv_flags & SV_ILP32) {
uint32_t hid32;

@@ -1961,7 +1961,7 @@ kern_jail_get(struct thread *td, struct
error = vfs_setopts(opts, "host.hostuuid", pr->pr_hostuuid);
if (error != 0 && error != ENOENT)
goto done_deref;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (td->td_proc->p_sysent->sv_flags & SV_ILP32) {
uint32_t hid32 = pr->pr_hostid;

Index: kern/sysv_msg.c
===================================================================
--- kern/sysv_msg.c (revision 205451)
+++ kern/sysv_msg.c (working copy)
@@ -165,7 +165,7 @@ static struct syscall_helper_data msg_sy
SYSCALL_INIT_LAST
};

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <compat/freebsd32/freebsd32.h>
#include <compat/freebsd32/freebsd32_ipc.h>
#include <compat/freebsd32/freebsd32_proto.h>
@@ -274,7 +274,7 @@ msginit()
error = syscall_helper_register(msg_syscalls);
if (error != 0)
return (error);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
error = syscall32_helper_register(msg32_syscalls);
if (error != 0)
return (error);
@@ -292,7 +292,7 @@ msgunload()
#endif

syscall_helper_unregister(msg_syscalls);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
syscall32_helper_unregister(msg32_syscalls);
#endif

@@ -1304,7 +1304,7 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, msgseg,
SYSCTL_PROC(_kern_ipc, OID_AUTO, msqids, CTLFLAG_RD,
NULL, 0, sysctl_msqids, "", "Message queue IDs");

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
int
freebsd32_msgsys(struct thread *td, struct freebsd32_msgsys_args *uap)
{
Index: kern/uipc_mqueue.c
===================================================================
--- kern/uipc_mqueue.c (revision 205451)
+++ kern/uipc_mqueue.c (working copy)
@@ -2563,7 +2563,7 @@ static struct syscall_helper_data mq_sys
SYSCALL_INIT_LAST
};

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <compat/freebsd32/freebsd32.h>
#include <compat/freebsd32/freebsd32_proto.h>
#include <compat/freebsd32/freebsd32_syscall.h>
@@ -2711,7 +2711,7 @@ mqinit(void)
error = syscall_helper_register(mq_syscalls);
if (error != 0)
return (error);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
error = syscall32_helper_register(mq32_syscalls);
if (error != 0)
return (error);
@@ -2723,7 +2723,7 @@ static int
mqunload(void)
{

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
syscall32_helper_unregister(mq32_syscalls);
#endif
syscall_helper_unregister(mq_syscalls);
Index: kern/kern_umtx.c
===================================================================
--- kern/kern_umtx.c (revision 205451)
+++ kern/kern_umtx.c (working copy)
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");

#include <machine/cpu.h>

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <compat/freebsd32/freebsd32_proto.h>
#endif

@@ -818,7 +818,7 @@ do_unlock_umtx(struct thread *td, struct
return (0);
}

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32

/*
* Lock a umtx object.
@@ -3269,7 +3269,7 @@ _umtx_op(struct thread *td, struct _umtx
return (EINVAL);
}

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
int
freebsd32_umtx_lock(struct thread *td, struct freebsd32_umtx_lock_args *uap)
/* struct umtx *umtx */
Index: kern/kern_thr.c
===================================================================
--- kern/kern_thr.c (revision 205451)
+++ kern/kern_thr.c (working copy)
@@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$");

#include <security/audit/audit.h>

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32

static inline int
suword_lwpid(void *addr, lwpid_t lwpid)
Index: kern/uipc_syscalls.c
===================================================================
--- kern/uipc_syscalls.c (revision 205451)
+++ kern/uipc_syscalls.c (working copy)
@@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$");
#ifdef KTRACE
#include <sys/ktrace.h>
#endif
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <compat/freebsd32/freebsd32_util.h>
#endif

@@ -2517,7 +2517,7 @@ sctp_generic_sendmsg_iov(td, uap)
if (error)
goto sctp_bad1;

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (SV_CURPROC_FLAG(SV_ILP32))
error = freebsd32_copyiniov((struct iovec32 *)uap->iov,
uap->iovlen, &iov, EMSGSIZE);
@@ -2625,7 +2625,7 @@ sctp_generic_recvmsg(td, uap)
if (error) {
return (error);
}
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (SV_CURPROC_FLAG(SV_ILP32))
error = freebsd32_copyiniov((struct iovec32 *)uap->iov,
uap->iovlen, &iov, EMSGSIZE);
Index: kern/sysv_sem.c
===================================================================
--- kern/sysv_sem.c (revision 205451)
+++ kern/sysv_sem.c (working copy)
@@ -226,7 +226,7 @@ static struct syscall_helper_data sem_sy
SYSCALL_INIT_LAST
};

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <compat/freebsd32/freebsd32.h>
#include <compat/freebsd32/freebsd32_ipc.h>
#include <compat/freebsd32/freebsd32_proto.h>
@@ -295,7 +295,7 @@ seminit(void)
error = syscall_helper_register(sem_syscalls);
if (error != 0)
return (error);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
error = syscall32_helper_register(sem32_syscalls);
if (error != 0)
return (error);
@@ -312,7 +312,7 @@ semunload(void)
if (semtot != 0)
return (EBUSY);

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
syscall32_helper_unregister(sem32_syscalls);
#endif
syscall_helper_unregister(sem_syscalls);
@@ -1479,7 +1479,7 @@ freebsd7___semctl(struct thread *td, str

#endif /* COMPAT_FREEBSD{4,5,6,7} */

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32

int
freebsd32_semsys(struct thread *td, struct freebsd32_semsys_args *uap)
@@ -1645,4 +1645,4 @@ freebsd32_semctl(struct thread *td, stru
return (error);
}

-#endif /* COMPAT_FREEBSD32 */
+#endif /* COMPAT_ARCH32 */
Index: kern/uipc_socket.c
===================================================================
--- kern/uipc_socket.c (revision 205451)
+++ kern/uipc_socket.c (working copy)
@@ -136,7 +136,7 @@ __FBSDID("$FreeBSD$");

#include <vm/uma.h>

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <sys/mount.h>
#include <sys/sysent.h>
#include <compat/freebsd32/freebsd32.h>
@@ -2507,7 +2507,7 @@ sosetopt(struct socket *so, struct socko

case SO_SNDTIMEO:
case SO_RCVTIMEO:
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (SV_CURPROC_FLAG(SV_ILP32)) {
struct timeval32 tv32;

@@ -2688,7 +2688,7 @@ integer:

tv.tv_sec = optval / hz;
tv.tv_usec = (optval % hz) * tick;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (SV_CURPROC_FLAG(SV_ILP32)) {
struct timeval32 tv32;

Index: kern/imgact_elf.c
===================================================================
--- kern/imgact_elf.c (revision 205451)
+++ kern/imgact_elf.c (working copy)
@@ -1298,7 +1298,7 @@ __elfN(corehdr)(td, vp, cred, numsegs, h
}
}

-#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
+#if defined(COMPAT_ARCH32) && __ELF_WORD_SIZE == 32
#include <compat/freebsd32/freebsd32.h>

typedef struct prstatus32 elf_prstatus_t;
@@ -1384,7 +1384,7 @@ __elfN(puthdr)(struct thread *td, void *
status->pr_osreldate = osreldate;
status->pr_cursig = p->p_sig;
status->pr_pid = thr->td_tid;
-#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
+#if defined(COMPAT_ARCH32) && __ELF_WORD_SIZE == 32
fill_regs32(thr, &status->pr_reg);
fill_fpregs32(thr, fpregset);
#else
@@ -1436,7 +1436,7 @@ __elfN(puthdr)(struct thread *td, void *
ehdr->e_ident[EI_ABIVERSION] = 0;
ehdr->e_ident[EI_PAD] = 0;
ehdr->e_type = ET_CORE;
-#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
+#if defined(COMPAT_ARCH32) && __ELF_WORD_SIZE == 32
ehdr->e_machine = ELF_ARCH32;
#else
ehdr->e_machine = ELF_ARCH;
Index: kern/sysv_shm.c
===================================================================
--- kern/sysv_shm.c (revision 205451)
+++ kern/sysv_shm.c (working copy)
@@ -831,7 +831,7 @@ static struct syscall_helper_data shm_sy
SYSCALL_INIT_LAST
};

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <compat/freebsd32/freebsd32.h>
#include <compat/freebsd32/freebsd32_ipc.h>
#include <compat/freebsd32/freebsd32_proto.h>
@@ -896,7 +896,7 @@ shminit()
error = syscall_helper_register(shm_syscalls);
if (error != 0)
return (error);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
error = syscall32_helper_register(shm32_syscalls);
if (error != 0)
return (error);
@@ -914,7 +914,7 @@ shmunload()
if (shm_nused > 0)
return (EBUSY);

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
syscall32_helper_unregister(shm32_syscalls);
#endif
syscall_helper_unregister(shm_syscalls);
@@ -1039,7 +1039,7 @@ shmsys(td, uap)

#endif /* i386 && (COMPAT_FREEBSD4 || COMPAT_43) */

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32

int
freebsd32_shmsys(struct thread *td, struct freebsd32_shmsys_args *uap)
Index: kern/uipc_sem.c
===================================================================
--- kern/uipc_sem.c (revision 205451)
+++ kern/uipc_sem.c (working copy)
@@ -380,13 +380,13 @@ ksem_create_copyout_semid(struct thread
int compat32)
{
semid_t semid;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
int32_t semid32;
#endif
void *ptr;
size_t ptrs;

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (compat32) {
semid32 = fd;
ptr = &semid32;
@@ -397,7 +397,7 @@ ksem_create_copyout_semid(struct thread
ptr = &semid;
ptrs = sizeof(semid);
compat32 = 0; /* silence gcc */
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
}
#endif

@@ -874,7 +874,7 @@ static struct syscall_helper_data ksem_s
SYSCALL_INIT_LAST
};

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <compat/freebsd32/freebsd32.h>
#include <compat/freebsd32/freebsd32_proto.h>
#include <compat/freebsd32/freebsd32_signal.h>
@@ -955,7 +955,7 @@ ksem_module_init(void)
error = syscall_helper_register(ksem_syscalls);
if (error)
return (error);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
error = syscall32_helper_register(ksem32_syscalls);
if (error)
return (error);
@@ -967,7 +967,7 @@ static void
ksem_module_destroy(void)
{

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
syscall32_helper_unregister(ksem32_syscalls);
#endif
syscall_helper_unregister(ksem_syscalls);
Index: kern/vfs_aio.c
===================================================================
--- kern/vfs_aio.c (revision 205451)
+++ kern/vfs_aio.c (working copy)
@@ -435,7 +435,7 @@ static struct syscall_helper_data aio_sy
SYSCALL_INIT_LAST
};

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <sys/mount.h>
#include <sys/socket.h>
#include <compat/freebsd32/freebsd32.h>
@@ -508,7 +508,7 @@ aio_onceonly(void)
error = syscall_helper_register(aio_syscalls);
if (error)
return (error);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
error = syscall32_helper_register(aio32_syscalls);
if (error)
return (error);
@@ -535,7 +535,7 @@ aio_unload(void)
if (!unloadable)
return (EOPNOTSUPP);

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
syscall32_helper_unregister(aio32_syscalls);
#endif
syscall_helper_unregister(aio_syscalls);
@@ -2577,7 +2577,7 @@ filt_lio(struct knote *kn, long hint)
return (lj->lioj_flags & LIOJ_KEVENT_POSTED);
}

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32

struct __aiocb_private32 {
int32_t status;
Index: kern/sys_process.c
===================================================================
--- kern/sys_process.c (revision 205451)
+++ kern/sys_process.c (working copy)
@@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_pager.h>
#include <vm/vm_param.h>

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <sys/procfs.h>

struct ptrace_io_desc32 {
@@ -170,7 +170,7 @@ proc_write_fpregs(struct thread *td, str
PROC_ACTION(set_fpregs(td, fpregs));
}

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
/* For 32 bit binaries, we need to expose the 32 bit regs layouts. */
int
proc_read_regs32(struct thread *td, struct reg32 *regs32)
@@ -471,7 +471,7 @@ ptrace_vm_entry(struct thread *td, struc
return (error);
}

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
static int
ptrace_vm_entry32(struct thread *td, struct proc *p,
struct ptrace_vm_entry32 *pve32)
@@ -498,7 +498,7 @@ ptrace_vm_entry32(struct thread *td, str
pve32->pve_pathlen = pve.pve_pathlen;
return (error);
}
-#endif /* COMPAT_FREEBSD32 */
+#endif /* COMPAT_ARCH32 */

/*
* Process debugging system call.
@@ -512,7 +512,7 @@ struct ptrace_args {
};
#endif

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
/*
* This CPP subterfuge is to try and reduce the number of ifdefs in
* the body of the code.
@@ -547,7 +547,7 @@ ptrace(struct thread *td, struct ptrace_
struct dbreg dbreg;
struct fpreg fpreg;
struct reg reg;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
struct dbreg32 dbreg32;
struct fpreg32 fpreg32;
struct reg32 reg32;
@@ -557,7 +557,7 @@ ptrace(struct thread *td, struct ptrace_
} r;
void *addr;
int error = 0;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
int wrap32 = 0;

if (SV_CURPROC_FLAG(SV_ILP32))
@@ -625,7 +625,7 @@ ptrace(struct thread *td, struct ptrace_
#undef COPYIN
#undef COPYOUT

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
/*
* PROC_READ(regs, td2, addr);
* becomes either:
@@ -659,7 +659,7 @@ kern_ptrace(struct thread *td, int req,
int error, write, tmp, num;
int proctree_locked = 0;
lwpid_t tid = 0, *buf;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
int wrap32 = 0, safe = 0;
struct ptrace_io_desc32 *piod32 = NULL;
#endif
@@ -747,7 +747,7 @@ kern_ptrace(struct thread *td, int req,
tid = td2->td_tid;
}

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
/*
* Test if we're a 32 bit client and what the target is.
* Set the wrap controls accordingly.
@@ -1015,7 +1015,7 @@ kern_ptrace(struct thread *td, int req,
break;

case PT_IO:
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (wrap32) {
piod32 = addr;
iov.iov_base = (void *)(uintptr_t)piod32->piod_addr;
@@ -1035,7 +1035,7 @@ kern_ptrace(struct thread *td, int req,
uio.uio_iovcnt = 1;
uio.uio_segflg = UIO_USERSPACE;
uio.uio_td = td;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
tmp = wrap32 ? piod32->piod_op : piod->piod_op;
#else
tmp = piod->piod_op;
@@ -1056,7 +1056,7 @@ kern_ptrace(struct thread *td, int req,
}
PROC_UNLOCK(p);
error = proc_rwmem(p, &uio);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (wrap32)
piod32->piod_len -= uio.uio_resid;
else
@@ -1145,7 +1145,7 @@ kern_ptrace(struct thread *td, int req,

case PT_VM_ENTRY:
PROC_UNLOCK(p);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (wrap32)
error = ptrace_vm_entry32(td, p, addr);
else
Index: kern/sysv_ipc.c
===================================================================
--- kern/sysv_ipc.c (revision 205451)
+++ kern/sysv_ipc.c (working copy)
@@ -179,7 +179,7 @@ ipcperm_new2old(struct ipc_perm *new, st
}
#endif

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <sys/mount.h>
#include <sys/socket.h>
#include <compat/freebsd32/freebsd32.h>
Index: kern/kern_module.c
===================================================================
--- kern/kern_module.c (revision 205451)
+++ kern/kern_module.c (working copy)
@@ -446,7 +446,7 @@ modfind(struct thread *td, struct modfin

MODULE_VERSION(kernel, __FreeBSD_version);

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <sys/mount.h>
#include <sys/socket.h>
#include <compat/freebsd32/freebsd32_util.h>
Index: ia64/ia64/exception.S
===================================================================
--- ia64/ia64/exception.S (revision 205451)
+++ ia64/ia64/exception.S (working copy)
@@ -676,7 +676,7 @@ ivt_##name: \
#define IVT_END(name) \
.endp ivt_##name

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#define IA32_TRAP ia32_trap
#else
#define IA32_TRAP trap
Index: ia64/ia64/genassym.c
===================================================================
--- ia64/ia64/genassym.c (revision 205451)
+++ ia64/ia64/genassym.c (working copy)
@@ -61,8 +61,8 @@
#include <net/if.h>
#include <netinet/in.h>

-#ifdef COMPAT_FREEBSD32
-ASSYM(COMPAT_FREEBSD32, COMPAT_FREEBSD32);
+#ifdef COMPAT_ARCH32
+ASSYM(COMPAT_ARCH32, COMPAT_ARCH32);
#endif

ASSYM(DT_NULL, DT_NULL);
Index: ia64/ia64/machdep.c
===================================================================
--- ia64/ia64/machdep.c (revision 205451)
+++ ia64/ia64/machdep.c (working copy)
@@ -440,7 +440,7 @@ cpu_switch(struct thread *old, struct th
struct pcb *oldpcb, *newpcb;

oldpcb = old->td_pcb;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
ia32_savectx(oldpcb);
#endif
if (PCPU_GET(fpcurthread) == old)
@@ -459,7 +459,7 @@ cpu_switch(struct thread *old, struct th

PCPU_SET(curthread, new);

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
ia32_restorectx(newpcb);
#endif

@@ -487,7 +487,7 @@ cpu_throw(struct thread *old __unused, s

PCPU_SET(curthread, new);

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
ia32_restorectx(newpcb);
#endif

Index: ia64/include/reg.h
===================================================================
--- ia64/include/reg.h (revision 205451)
+++ ia64/include/reg.h (working copy)
@@ -52,7 +52,7 @@ struct dbreg {
unsigned long dbr_inst[8];
};

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <machine/fpu.h>
#include <compat/ia32/ia32_reg.h>
#endif
Index: ia64/conf/NOTES
===================================================================
--- ia64/conf/NOTES (revision 205451)
+++ ia64/conf/NOTES (working copy)
@@ -12,10 +12,10 @@
cpu ITANIUM
cpu ITANIUM2

-# option: COMPAT_FREEBSD32
+# option: COMPAT_ARCH32
# This option enables the support for execution of i386 (32-bit) programs on
# ia64. It is based on the ia32 emulation in the processor.
-options COMPAT_FREEBSD32
+options COMPAT_ARCH32

# option: LOG2_ID_PAGE_SIZE
# Specify the log2 size of the identity (direct) mappings in regions 6 and 7
Index: modules/procfs/Makefile
===================================================================
--- modules/procfs/Makefile (revision 205451)
+++ modules/procfs/Makefile (working copy)
@@ -35,7 +35,7 @@ opt_compat.h:
echo "#define COMPAT_FREEBSD5 1" >> ${.TARGET}
echo "#define COMPAT_FREEBSD6 1" >> ${.TARGET}
.if ${MACHINE_ARCH} == "amd64"
- echo "#define COMPAT_FREEBSD32 1" >> ${.TARGET}
+ echo "#define COMPAT_ARCH32 1" >> ${.TARGET}
echo "#define COMPAT_LINUX32 1" >> ${.TARGET}
.endif
.endif
Index: modules/linux/Makefile
===================================================================
--- modules/linux/Makefile (revision 205451)
+++ modules/linux/Makefile (working copy)
@@ -2,7 +2,7 @@

.if ${MACHINE_ARCH} == "amd64"
SFX= 32
-CFLAGS+=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32
+CFLAGS+=-DCOMPAT_ARCH32 -DCOMPAT_LINUX32
.endif

.PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_ARCH}/linux${SFX}
Index: fs/procfs/procfs_fpregs.c
===================================================================
--- fs/procfs/procfs_fpregs.c (revision 205451)
+++ fs/procfs/procfs_fpregs.c (working copy)
@@ -53,7 +53,7 @@
#include <fs/pseudofs/pseudofs.h>
#include <fs/procfs/procfs.h>

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <sys/procfs.h>
#include <machine/fpu.h>

@@ -83,7 +83,7 @@ procfs_doprocfpregs(PFS_FILL_ARGS)
int error;
struct fpreg r;
struct thread *td2;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
struct fpreg32 r32;
int wrap32 = 0;
#endif
@@ -100,7 +100,7 @@ procfs_doprocfpregs(PFS_FILL_ARGS)

/* XXXKSE: */
td2 = FIRST_THREAD_IN_PROC(p);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (SV_CURPROC_FLAG(SV_ILP32)) {
if ((td2->td_proc->p_sysent->sv_flags & SV_ILP32) == 0) {
PROC_UNLOCK(p);
Index: fs/procfs/procfs_regs.c
===================================================================
--- fs/procfs/procfs_regs.c (revision 205451)
+++ fs/procfs/procfs_regs.c (working copy)
@@ -53,7 +53,7 @@
#include <fs/pseudofs/pseudofs.h>
#include <fs/procfs/procfs.h>

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <sys/procfs.h>
#include <machine/fpu.h>

@@ -83,7 +83,7 @@ procfs_doprocregs(PFS_FILL_ARGS)
int error;
struct reg r;
struct thread *td2;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
struct reg32 r32;
int wrap32 = 0;
#endif
@@ -100,7 +100,7 @@ procfs_doprocregs(PFS_FILL_ARGS)

/* XXXKSE: */
td2 = FIRST_THREAD_IN_PROC(p);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (SV_CURPROC_FLAG(SV_ILP32)) {
if ((td2->td_proc->p_sysent->sv_flags & SV_ILP32) == 0) {
PROC_UNLOCK(p);
Index: fs/procfs/procfs_dbregs.c
===================================================================
--- fs/procfs/procfs_dbregs.c (revision 205451)
+++ fs/procfs/procfs_dbregs.c (working copy)
@@ -59,7 +59,7 @@
#include <fs/pseudofs/pseudofs.h>
#include <fs/procfs/procfs.h>

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <sys/procfs.h>
#include <machine/fpu.h>

@@ -89,7 +89,7 @@ procfs_doprocdbregs(PFS_FILL_ARGS)
int error;
struct dbreg r;
struct thread *td2;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
struct dbreg32 r32;
int wrap32 = 0;
#endif
@@ -105,7 +105,7 @@ procfs_doprocdbregs(PFS_FILL_ARGS)
}

td2 = FIRST_THREAD_IN_PROC(p);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (SV_CURPROC_FLAG(SV_ILP32)) {
if ((td2->td_proc->p_sysent->sv_flags & SV_ILP32) == 0) {
PROC_UNLOCK(p);
Index: fs/procfs/procfs_ioctl.c
===================================================================
--- fs/procfs/procfs_ioctl.c (revision 205451)
+++ fs/procfs/procfs_ioctl.c (working copy)
@@ -42,7 +42,7 @@
#include <fs/pseudofs/pseudofs.h>
#include <fs/procfs/procfs.h>

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
struct procfs_status32 {
int state; /* Running, stopped, something else? */
int flags; /* Any flags */
@@ -62,7 +62,7 @@ int
procfs_ioctl(PFS_IOCTL_ARGS)
{
struct procfs_status *ps;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
struct procfs_status32 *ps32;
#endif
int error, flags, sig;
@@ -142,7 +142,7 @@ procfs_ioctl(PFS_IOCTL_ARGS)
ps->why = p->p_step ? p->p_stype : 0;
ps->val = p->p_step ? p->p_xstat : 0;
break;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
case PIOCWAIT32:
while (p->p_step == 0 && (p->p_flag & P_WEXIT) == 0) {
/* sleep until p stops */
Index: fs/procfs/procfs_map.c
===================================================================
--- fs/procfs/procfs_map.c (revision 205451)
+++ fs/procfs/procfs_map.c (working copy)
@@ -47,7 +47,7 @@
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/sbuf.h>
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <sys/sysent.h>
#endif
#include <sys/uio.h>
@@ -86,7 +86,7 @@ procfs_doprocmap(PFS_FILL_ARGS)
struct uidinfo *uip;
int error, vfslocked;
unsigned int last_timestamp;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
int wrap32 = 0;
#endif

@@ -99,7 +99,7 @@ procfs_doprocmap(PFS_FILL_ARGS)
if (uio->uio_rw != UIO_READ)
return (EOPNOTSUPP);

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (curproc->p_sysent->sv_flags & SV_ILP32) {
if (!(p->p_sysent->sv_flags & SV_ILP32))
return (EOPNOTSUPP);
@@ -209,7 +209,7 @@ procfs_doprocmap(PFS_FILL_ARGS)
"0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s %s %d\n",
(u_long)e_start, (u_long)e_end,
resident, privateresident,
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
wrap32 ? NULL : obj, /* Hide 64 bit value */
#else
obj,
Index: amd64/include/reg.h
===================================================================
--- amd64/include/reg.h (revision 205451)
+++ amd64/include/reg.h (working copy)
@@ -120,7 +120,7 @@ struct dbreg {
#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by
register number */

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
#include <machine/fpu.h>
#include <compat/ia32/ia32_reg.h>
#endif
Index: amd64/linux32/linux32_sysvec.c
===================================================================
--- amd64/linux32/linux32_sysvec.c (revision 205451)
+++ amd64/linux32/linux32_sysvec.c (working copy)
@@ -34,8 +34,8 @@
__FBSDID("$FreeBSD$");
#include "opt_compat.h"

-#ifndef COMPAT_FREEBSD32
-#error "Unable to compile Linux-emulator due to missing COMPAT_FREEBSD32 option!"
+#ifndef COMPAT_ARCH32
+#error "Unable to compile Linux-emulator due to missing COMPAT_ARCH32 option!"
#endif

#define __ELF_WORD_SIZE 32
Index: amd64/conf/XENHVM
===================================================================
--- amd64/conf/XENHVM (revision 205451)
+++ amd64/conf/XENHVM (working copy)
@@ -45,7 +45,7 @@ options PROCFS # Process filesystem (
options PSEUDOFS # Pseudo-filesystem framework
options GEOM_PART_GPT # GUID Partition Tables.
options GEOM_LABEL # Provides labelization
-options COMPAT_FREEBSD32 # Compatible with i386 binaries
+options COMPAT_ARCH32 # Compatible with i386 binaries
options COMPAT_FREEBSD4 # Compatible with FreeBSD4
options COMPAT_FREEBSD5 # Compatible with FreeBSD5
options COMPAT_FREEBSD6 # Compatible with FreeBSD6
Index: amd64/conf/NOTES
===================================================================
--- amd64/conf/NOTES (revision 205451)
+++ amd64/conf/NOTES (working copy)
@@ -483,7 +483,7 @@ options PMAP_SHPGPERPROC=201
#XXX these 32 bit binaries is added.

# Enable 32-bit runtime support for FreeBSD/i386 binaries.
-options COMPAT_FREEBSD32
+options COMPAT_ARCH32

# Enable iBCS2 runtime support for SCO and ISC binaries
#XXX#options IBCS2
@@ -494,7 +494,7 @@ options COMPAT_FREEBSD32
# Enable Linux ABI emulation
#XXX#options COMPAT_LINUX

-# Enable 32-bit Linux ABI emulation (requires COMPAT_43 and COMPAT_FREEBSD32)
+# Enable 32-bit Linux ABI emulation (requires COMPAT_43 and COMPAT_ARCH32)
options COMPAT_LINUX32

# Enable the linux-like proc filesystem support (requires COMPAT_LINUX32
Index: amd64/conf/GENERIC
===================================================================
--- amd64/conf/GENERIC (revision 205451)
+++ amd64/conf/GENERIC (working copy)
@@ -44,7 +44,7 @@ options PROCFS # Process filesystem (
options PSEUDOFS # Pseudo-filesystem framework
options GEOM_PART_GPT # GUID Partition Tables.
options GEOM_LABEL # Provides labelization
-options COMPAT_FREEBSD32 # Compatible with i386 binaries
+options COMPAT_ARCH32 # Compatible with i386 binaries
options COMPAT_FREEBSD4 # Compatible with FreeBSD4
options COMPAT_FREEBSD5 # Compatible with FreeBSD5
options COMPAT_FREEBSD6 # Compatible with FreeBSD6
Index: amd64/amd64/db_trace.c
===================================================================
--- amd64/amd64/db_trace.c (revision 205451)
+++ amd64/amd64/db_trace.c (working copy)
@@ -319,7 +319,7 @@ db_nextframe(struct amd64_frame **fp, db
frame_type = INTERRUPT;
else if (strcmp(name, "Xfast_syscall") == 0)
frame_type = SYSCALL;
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
else if (strcmp(name, "Xint0x80_syscall") == 0)
frame_type = SYSCALL;
#endif
Index: amd64/amd64/vm_machdep.c
===================================================================
--- amd64/amd64/vm_machdep.c (revision 205451)
+++ amd64/amd64/vm_machdep.c (working copy)
@@ -439,7 +439,7 @@ cpu_set_upcall_kse(struct thread *td, vo
*/
cpu_thread_clean(td);

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (td->td_proc->p_sysent->sv_flags & SV_ILP32) {
/*
* Set the trap frame to point at the beginning of the uts
@@ -490,7 +490,7 @@ cpu_set_user_tls(struct thread *td, void
if ((u_int64_t)tls_base >= VM_MAXUSER_ADDRESS)
return (EINVAL);

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
if (td->td_proc->p_sysent->sv_flags & SV_ILP32) {
td->td_pcb->pcb_gsbase = (register_t)tls_base;
return (0);
Index: amd64/amd64/exception.S
===================================================================
--- amd64/amd64/exception.S (revision 205451)
+++ amd64/amd64/exception.S (working copy)
@@ -572,7 +572,7 @@ ENTRY(fork_trampoline)
* included.
*/

-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
.data
.p2align 4
.text
Index: sys/ptrace.h
===================================================================
--- sys/ptrace.h (revision 205451)
+++ sys/ptrace.h (working copy)
@@ -158,7 +158,7 @@ int proc_read_dbregs(struct thread *_td,
int proc_write_dbregs(struct thread *_td, struct dbreg *_dbreg);
int proc_sstep(struct thread *_td);
int proc_rwmem(struct proc *_p, struct uio *_uio);
-#ifdef COMPAT_FREEBSD32
+#ifdef COMPAT_ARCH32
struct reg32;
struct fpreg32;
struct dbreg32;
John Baldwin
2010-03-23 14:20:46 UTC
Permalink
Post by David O'Brien
Post by Julian Elischer
I certainly agree.. can it be changed please?
I've waited a while to see what other opinions would be expressed on this
topic. I believe there is sufficient support to rename COMPAT_FREEBSD32
to something else based on responses in the mailing lists.
I am sorry if some may wish to label this a "bikeshead". But we seem to
have many folks disliking "COMPAT_FREEBSD32".
Based on responses to the topic of COMPAT_FREEBSD32, the following
COMPAT_ARCH32, COMPAT_ARCH_32BIT, COMPAT_32BIT_ARCH, COMPAT_32BIT,
COMPAT_FREEBSD32BIT
There's probably a bigger problem than just how we name it. The option
1. Support for a 32-bit ABI (i.e. ILP32)
2. Support for a particular OS in ILP32.
Of course 2 implies 1.
COMPAT_IA32 in sys/ia64/ia64/machdep.c enabled code to save and restore
IA32 registers as part of cpu_switch(). In this context COMPAT_IA32 was
perfectly named. It's now called COMPAT_FREEBSD32, which doesn't make a
lot of sense because what if I only want to support Linux/ia32 and not
FreeBSD/ia32 (or vice-versa if you club them under a single COMPAT_*32)?
For amd64 I think COMPAT_LINUX32 requires COMPAT_FREEBSD32 in practice for
this reason. If you did make them independent, I would prefer that the code
use things like '#if defined(COMPAT_FREEBSD32) || defined(COMPAT_LINUX32)'
instead of requiring the user to specify both COMPAT_IA32 and
COMPAT_(FREEBSD32|LINUX32).

BTW, in that context COMPAT_FREEBSD32 looks far more consistent than other
alternatives suggested. I think all of the names have various pros and cons
and that changing it is more hassle than its worth. My one suggestion to
Nathan was to move COMPAT_FREEBSD32 in GENERIC on amd64 so it is not
immediately next to COMPAT_FREEBSD<n> to reduce confusion.
--
John Baldwin
Ian FREISLICH
2010-03-15 12:49:11 UTC
Permalink
Hi

I originally wasn't going to weigh in on this, but:

options COMPAT_FREEBSD4 #Compatible with FreeBSD4
options COMPAT_FREEBSD5 #Compatible with FreeBSD5
options COMPAT_FREEBSD6 #Compatible with FreeBSD6
options COMPAT_FREEBSD7 #Compatible with FreeBSD7
options COMPAT_FREEBSD32

Thanks for the advance notice that FreeBSD will be EoL before RELENG_32.

Ian

--
Ian Freislich
Justin Hibbits
2010-03-15 12:56:46 UTC
Permalink
Hi
options COMPAT_FREEBSD4 #Compatible with FreeBSD4
options COMPAT_FREEBSD5 #Compatible with FreeBSD5
options COMPAT_FREEBSD6 #Compatible with FreeBSD6
options COMPAT_FREEBSD7 #Compatible with FreeBSD7
options COMPAT_FREEBSD32
Thanks for the advance notice that FreeBSD will be EoL before RELENG_32.
Ian
Use Babylonian counting (base 60) and we have almost 200 years before
worrying about that.
Andrius Morkūnas
2010-03-15 12:59:54 UTC
Permalink
Hi
options COMPAT_FREEBSD4 #Compatible with FreeBSD4
options COMPAT_FREEBSD5 #Compatible with FreeBSD5
options COMPAT_FREEBSD6 #Compatible with FreeBSD6
options COMPAT_FREEBSD7 #Compatible with FreeBSD7
options COMPAT_FREEBSD32
Thanks for the advance notice that FreeBSD will be EoL before RELENG_32.
Well... BSD *is* dying. Now we know when to expect it to finally happen.
--
Andrius
Nathan Whitehorn
2010-03-23 14:05:04 UTC
Permalink
/>>>/ I certainly agree.. can it be changed please?
/>>/
/>>/ I've waited a while to see what other opinions would be expressed on this
/>>/ topic. I believe there is sufficient support to rename COMPAT_FREEBSD32
/>>/ to something else based on responses in the mailing lists.
/>>/
/>>/ I am sorry if some may wish to label this a "bikeshead". But we seem to
/>>/ have many folks disliking "COMPAT_FREEBSD32".
/>>/
/>>/
/>>/ Based on responses to the topic of COMPAT_FREEBSD32, the following
/>>/ were the suggestions offered:
/>>/ COMPAT_ARCH32, COMPAT_ARCH_32BIT, COMPAT_32BIT_ARCH, COMPAT_32BIT,
/>>/ COMPAT_FREEBSD32BIT
/>
There's probably a bigger problem than just how we name it. The option
1. Support for a 32-bit ABI (i.e. ILP32)
2. Support for a particular OS in ILP32.
Of course 2 implies 1.
COMPAT_IA32 in sys/ia64/ia64/machdep.c enabled code to save and restore
IA32 registers as part of cpu_switch(). In this context COMPAT_IA32 was
perfectly named. It's now called COMPAT_FREEBSD32, which doesn't make a
lot of sense because what if I only want to support Linux/ia32 and not
FreeBSD/ia32 (or vice-versa if you club them under a single COMPAT_*32)?
The original version of my my patch had this split, with a COMPAT_FREEBSD32
and a COMPAT_[IA/PPC/MIPS]32. The problem is that the 32-bit FreeBSD compat is
deeply intertwined with providing support for any 32-bit binaries at all (e.g.,
the 32-bit linuxolator depends on calling into it), so it isn't actually possible
to support having COMPAT_LINUX32 without COMPAT_FREEBSD32 without a huge amount
of work. So I scrapped that in favor of the unified name only, and we
ended up with COMPAT_FREEBSD32.

In any event, given the persistent interest and consolidation around
COMPAT_ARCH32, I'm fine changing the name.
-Nathan
Marcel Moolenaar
2010-03-23 16:07:05 UTC
Permalink
Post by Nathan Whitehorn
/>>>/ I certainly agree.. can it be changed please?
/>>/ />>/ I've waited a while to see what other opinions would be expressed on this
/>>/ topic. I believe there is sufficient support to rename COMPAT_FREEBSD32
/>>/ to something else based on responses in the mailing lists.
/>>/ />>/ I am sorry if some may wish to label this a "bikeshead". But we seem to
/>>/ have many folks disliking "COMPAT_FREEBSD32".
/>>/ />>/ />>/ Based on responses to the topic of COMPAT_FREEBSD32, the following
/>>/ COMPAT_ARCH32, COMPAT_ARCH_32BIT, COMPAT_32BIT_ARCH, COMPAT_32BIT,
/>>/ COMPAT_FREEBSD32BIT
/>
There's probably a bigger problem than just how we name it. The option
1. Support for a 32-bit ABI (i.e. ILP32)
2. Support for a particular OS in ILP32.
Of course 2 implies 1.
COMPAT_IA32 in sys/ia64/ia64/machdep.c enabled code to save and restore
IA32 registers as part of cpu_switch(). In this context COMPAT_IA32 was
perfectly named. It's now called COMPAT_FREEBSD32, which doesn't make a
lot of sense because what if I only want to support Linux/ia32 and not
FreeBSD/ia32 (or vice-versa if you club them under a single COMPAT_*32)?
The original version of my my patch had this split, with a COMPAT_FREEBSD32
and a COMPAT_[IA/PPC/MIPS]32. The problem is that the 32-bit FreeBSD compat is
deeply intertwined with providing support for any 32-bit binaries at all (e.g.,
the 32-bit linuxolator depends on calling into it), so it isn't actually possible
to support having COMPAT_LINUX32 without COMPAT_FREEBSD32 without a huge amount
of work. So I scrapped that in favor of the unified name only, and we
ended up with COMPAT_FREEBSD32.
I understand. I just wonder if it was wise to expose this dependency
across the whole source base with COMPAT_FREEBSD32 rather than keep
it local to the linuxulator. What if we remove the dependency at some
later point in time? Then what we have left is COMPAT_FREEBSD32 for
no reason other than hysterical raisins.

Anyway... Just want to point out that it's probably not a good idea
to have a single option for multiple features, even if the code has
them intertwined. Code changes easily, but options typically don't.

<out-on-a-limb>
Maybe we should improve our config to include dependencies, so that
one only has to add "options INVARIANTS" and config knows to include
"options INVARIANT_SUPPORT". It's not uncommon for option/device X
to need or depend on option/device Y...
</out-on-a-limb>
--
Marcel Moolenaar
***@mac.com
Loading...