Commit Graph

4808 Commits

Author SHA1 Message Date
pooka 01d7ebdd80 Fix PTHREAD_FOO_INITIALIZER for C++ by not using volatile in the relevant
pthread types in C++ builds, attempt 2.

The problem with attempt 1 was making assumptions of what the MD
__cpu_simple_lock_t (declared volatile) looks like.  To get a same type
except non-volatile, we change the MD type to __cpu_simple_lock_nv_t
and typedef __cpu_simple_lock_t as a volatile __cpu_simple_lock_nv_t.
IMO, __cpu_simple_lock_t should not be volatile at all, but changing it
now is too risky.

Fixes at least Rumprun w/ gcc 5.1/5.2.  Furthermore, the mpd application
(and possibly others) will no longer require NetBSD-specific patches.

Tested: build.sh for i386, Rumprun for x86_64 w/ gcc 5.2.

Based on the patch from Christos in lib/49989.
2015-08-27 12:30:50 +00:00
uebayasi 5a533f959b Don't expand unwanted symbols by cpp(1). 2015-08-25 02:58:59 +00:00
uebayasi db0ac56ebf Define ${LINKSCRIPT} in one place. 2015-08-24 14:04:24 +00:00
uebayasi ce93b3da57 Don't mention stab and DWARF sections, because these (poorly mtaintained)
lists only help to make them harder to read.

If those sections are found in inputs, they simply appear in outputs as
orphaned sections, sorted by section types and attributes.
2015-08-24 08:13:07 +00:00
joerg 865795c450 Use .word for data that is known to be aligned. 2015-08-23 11:01:24 +00:00
joerg 9d0743abbf Remove .proc 1, it has been ignored by gas for ages. 2015-08-23 10:59:15 +00:00
uebayasi 7633735d00 .interp and friends are unlikely to appear in kernels. 2015-08-22 23:51:48 +00:00
uebayasi 6ecada7d3b .rel/.rela should not be generated in kernels. 2015-08-22 23:49:54 +00:00
uebayasi c0e6eb15f5 .init/.fini/.ctors/.dtors should be irrelevant to kernels. 2015-08-22 23:47:34 +00:00
uebayasi 220951d1d4 I bet setting search-directory for ld.so is useless in any kernel. 2015-08-21 02:35:52 +00:00
uebayasi 7fe7089a02 Add `pseudo-device ksyms' where `options DDB' is used, because
config(1)/config(5) can't handle module dependency correctly at this
moment.

(This is another proof that shared file definition (`file xxx.c a|b')
is a bad idea.)
2015-08-21 01:52:07 +00:00
uebayasi 185745d477 Indent with 2 spaces. 2015-08-20 07:00:48 +00:00
dholland ab3a85b805 adjust comments slightly 2015-08-20 05:40:24 +00:00
dholland 65ff76a38f Use lfs32_dinode_SIZEOF instead of ufs1_dinode_SIZEOF for lfs. These
are the same so it doesn't make any difference, but technically one
should use lfs parts with lfs.
2015-08-20 05:40:08 +00:00
uebayasi ce546f0df7 Adjust paths to ${KERNLDSCRIPT} files so that dependency is resolved. 2015-08-18 10:00:11 +00:00
uebayasi b19d5046bd Use ${KERNLDSCRIPT} instead of ${KERN_LDSCRIPT}. The former is added
to ${SYSTEM_DEP} if defined.
2015-08-18 08:39:12 +00:00
jdc 4139ed58a3 Make these compile again after changes to LFS. 2015-08-16 10:58:54 +00:00
martin e7a3928268 Make clock_t unsigned int everywhere.
Ok: matt@, mrg@
2015-06-17 14:32:31 +00:00
martin 5dd05e8b9a Bump version now that we can load kernels with sizeof(.data)+sizeof(.bss)> 4 MB 2015-06-14 18:40:10 +00:00
martin 158ff069a0 Fix available length calculation in kvamap_extract when reusing existing
mappings.
2015-06-14 16:20:44 +00:00
mlelstv 6f00c789e1 Use C99-style initializers for struct dkdriver. 2015-04-26 15:15:19 +00:00
pgoyette 37202cb966 Update device dependency information - the sysmon major device now depends on the sysmon module itself, not on the individual components. 2015-04-23 23:22:51 +00:00
nakayama f1e575ac8e Sync sparc64 kernel's OF_seek with ofwboot's one, but sparc version
is not changed.
2015-03-27 06:10:25 +00:00
nakayama ba1d0502fa Fix kernel loading failures from partitions started from over first
4GB of disks on sparc64.
2015-03-27 06:07:33 +00:00
martin 60e30960bb Handle EINVAL in the fault path, send SIGSEGV on mmap access past EOF. 2015-03-02 13:53:19 +00:00
martin 0ad84ca589 Strip debug symbols from ofwboot.
The forth bootsector loading this file when booting from disk is
"simplistic" and does not skip non loadable sections. The five times
bigger file with debug info overruns some important memory contents
with some firmware versions otherwise.
2015-01-11 22:59:25 +00:00
martin e654a4e4fd Avoid defining macros from the <fenv.h> namespace here (especially with
different values).
2015-01-03 18:12:12 +00:00
christos c182898b0d We have three sets of DTYPE_ constants in the kernel:
altq		Drop 		Type
	disklabel	Disk 		Type
	file		Descriptor	Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
2015-01-02 19:42:05 +00:00
christos e79caf8a7d avoid shadowed variable 2014-11-23 02:15:52 +00:00
manu 239cf5506d Remove unused extended attributes kernel options
As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
2014-11-16 16:01:39 +00:00
uebayasi 104daad189 Use LINKSCRIPT. 2014-11-15 12:36:42 +00:00
manu 2cab231d44 Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels
This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr

Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
2014-11-12 10:47:20 +00:00
snj f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
christos ce6e7b2537 fix leak. 2014-09-21 16:36:32 +00:00
jnemeth ee79d5b0e4 Create an "options MODULAR_DEFAULT_AUTOLOAD" config option and add
it to all kernel configs that contain "options MODULAR".  This
option turns on module autoloading by default (which is the current
default).  This allows people who don't want module autoloading on
by default to disable it by simply removing/commentting this line.
2014-08-24 07:59:22 +00:00
dholland 4acb6306f5 Systematize (and in many cases, fix) the comments on options COMPAT_NN.
There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
2014-08-23 20:26:56 +00:00
martin 0bf2d320c8 Revert previous, we have restores ABI for {u,}int_fast_*_t. 2014-08-21 15:27:37 +00:00
tsutsui 09d162f919 Fix panic() on opening fd(4), caused by a wrong pointer passed to memset().
I'm not sure why this 18 year old bug didn't cause problem before
(at least my old 5.99.23 kernel worked), but probably it's triggered
by new gcc 4.8 which might do more aggressive memory allocation.
The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4).

Should be pulled up to netbsd-7.
2014-08-19 14:43:41 +00:00
apb 30a0368950 Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
2014-08-16 17:56:30 +00:00
martin 3cc0e3b686 All FAST datatypes are int (32 bit) on both sparc and sparc64, only FAST64
variants are long (sparc64) or long long (sparc).
2014-08-15 07:45:31 +00:00
matt 82a12988ef Include <sys/common_int_types.h> if __UINTPTR_TYPE__ is defined. 2014-08-13 22:56:56 +00:00
matt 0b2cac531b Include <sys/common_int_const.h> if __INTMAX_C_SUFFIX__ is defined. 2014-08-13 22:51:58 +00:00
matt 7c5094c243 Include <sys/common_init_limits.h> if __SIG_ATOMIC_MAX__ is defined. 2014-08-13 22:31:06 +00:00
matt 2534797f07 include <sys/common_int_mwgwtypes.h> if __UINT_FAST64_TYPE__ is defined. 2014-08-13 22:25:39 +00:00
matt efe99ca41d include <sys/common_int_fmtio.h> if __INTPTR_FMTd__ is defined 2014-08-13 19:48:17 +00:00
martin 6aecae818d PR port-sparc/49103: add device name mapping for "qfe" (quad hme) cards.
From MOCHIDA Shuji.
2014-08-12 13:53:49 +00:00
joerg eb6cc7528a Consistently define WARN in a way that passes format string checks, i.e.
always uses the same number of arguments as given in the format string.
2014-08-06 21:57:48 +00:00
nakayama 0517078c60 Backout using humanize_number(9) in clockfreq().
humanize_number(9) cannot handle a fraction part and doesn't
match the intention of clockfreq().

Also backout the changes caused by the fallout of clockfreq().

Fixed outputs:

-cpu0 at mainbus0: MB86904 @ 170  MHz, MB86910 or WTL1164/5 FPU
+cpu0 at mainbus0: MB86904 @ 170 MHz, MB86910 or WTL1164/5 FPU

-sbus0 at iommu0: clock = 21250  MHz
+sbus0 at iommu0: clock = 21.250 MHz

-cpu0 at mainbus0: SUNW,UltraSPARC-II @ 449  MHz, CPU id 0
+cpu0 at mainbus0: SUNW,UltraSPARC-II @ 449.971 MHz, CPU id 0
2014-07-25 17:21:32 +00:00
dholland f9228f4225 Add d_discard to all struct cdevsw instances I could find.
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25 08:10:31 +00:00
dholland 8c70ef39af Add d_discard to all struct bdevsw instances I could find.
I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
2014-07-25 08:02:18 +00:00