Commit Graph

268 Commits

Author SHA1 Message Date
christos b59f66e17c use the inline bcdtobin and bintobcd directly instead through a macro. 2014-11-20 16:34:25 +00:00
christos a95736d447 PR/49207: Kamil Rytarowski: Add sys/clock.h with generic time macros
(derived from clock_subr.h). Keep clock_subr.h with the kernel structures
and functions to reduce diffs, and have clock.h only include standalone
constants and macros.
2014-11-17 02:15:48 +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
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
joerg 5d592fb4e3 Use cmpw. 2014-08-07 13:56:57 +00:00
joerg bcbe3c1d77 Use cmpwi. 2014-08-07 09:08:41 +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
joerg 11bf7fa606 Give non-standard main in a freestanding environment a prototype. 2014-08-06 13:55:08 +00:00
alnsn 582402eab5 Rename sljitarch.h to sljit_machdep.h. 2014-07-23 18:19:43 +00:00
christos 43ebc39121 kill sprintf 2014-03-26 17:41:15 +00:00
tsutsui 8c436a9898 Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.
XXX: probabry we should have bsd.saprog.mk or something.
2014-01-12 15:26:28 +00:00
alnsn 5345f80ec7 Enable sljit and bpfjit on powerpc. 2013-11-17 14:34:11 +00:00
tsutsui 6baf00efc8 Explicitly link srt0.o (Standalone RunTime startup code) first.
Taken from the similar fix of mvme68k:
http://mail-index.netbsd.org/source-changes/2013/09/21/msg047819.html
> MVME PROM requires raw binaries (by objcopy -O binary) so we have to
> make sure the entry point is located at the first address of the binaries.
The original changes to switch to using MI libsa is:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016563.html

Should be pulled up to netbsd-6 branches.
(though untested since there seems no users of mvmeppc)
2013-09-21 08:40:37 +00:00
rmind 666e919182 G/C PFIL_HOOKS from the kernel configs. 2013-06-30 21:38:55 +00:00
christos e46f5f0078 remove obsolete networking options 2013-06-05 23:07:59 +00:00
christos 2ec4fd84ba Complete the dosparts -> mbrparts conversion. Only x86k new uses dosparts
because it also uses struct dos_partition.
2013-05-16 19:06:44 +00:00
christos 9434c99ee1 more bogus number removal 2013-04-27 22:21:12 +00:00
christos 1cc8b68d4b the bogus number police 2013-04-27 21:43:10 +00:00
christos dc14ae835f remove confusing numeric locators where they are unused. 2013-04-27 18:19:19 +00:00
christos 2c1aa36c3d Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it. 2013-03-02 02:42:07 +00:00
jdc 4be6ce2eeb Adapt to the changed signature of pckbc_cnattach(). 2012-10-13 17:58:53 +00:00
abs 3267a6b9fe Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
  and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

Some of the INSTALL configs for larger memory machines are probably suitable
for adding WSDISPLAY_COMPAT_USL.

Now wsconscfg(8) should be able to switch VTs when expected.

Implemented after no objection from tech-kern to the following:

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
2012-08-17 20:11:37 +00:00
mlelstv 8ce4433821 Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().

Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().

Make cpu_rootconf(9) describe the calling order.
2012-07-29 18:05:39 +00:00
para 89c9828deb converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
2012-01-27 18:52:47 +00:00
dholland 7bbf82b772 WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
2011-12-18 05:49:22 +00:00
tls 8a012bd83f The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself.  Move it to std.  This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports.  Thanks to Havard Eidnes for
pointing them out.
2011-11-22 21:25:05 +00:00
bouyer a47e2eb758 Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
2011-08-30 12:39:49 +00:00
dyoung d181d57cd1 Enable new-style <sys/bus.h> on several PowerPC ports supporting PCI
buses.  Make non-inline implementations of bus_space(9) and bus_dma(9)
routines and move them to appropriate .c files.

This may leave amigappc in a bad state, sorry.  Fortunately, it will be
easy to repair by imitating the bus.h -> bus_{defs,funcs}.h split in
some other PowerPC port.
2011-07-17 23:23:53 +00:00
joerg 3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
dyoung a0a8f335b9 #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-01 20:47:43 +00:00
dyoung 59adf08e17 Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet.  Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
2011-07-01 17:09:58 +00:00
wiz 4cbd24b23f dependant -> dependent 2011-06-30 20:09:15 +00:00
matt 4a40b01453 Modify mapiodev to take a third argument indicating whether the space
should be prefetchable (true) or not (false).
2011-06-30 00:52:55 +00:00
matt dd2488a8b3 Add support pci_intr_setattr.
Export non-inline version of pci api for modules (_MODULE is defined).
Fix definition of pc_conf_hook and pc_conf_interrupt.
Switch to using inlines instead of macros.
Switch ibm4xx to use <powerpc/pci_machdep.h>
2011-06-22 18:06:32 +00:00
matt 6265330aa0 Don't include *pmap.h in assembly files. Get the needed definitions
from "assym.h".
2011-06-20 19:56:10 +00:00
matt a4d141ba75 Don't export USER_SR if _MODULE is defined.
Add a common <powerpc/vmparam.h> like we have for <powerpc/pmap.h>
2011-06-20 08:01:13 +00:00
matt 7e37a13248 Cleanup includes. (<net/netisr.h> is handled by softints, not MD anymore,
so this can be nuked).
2011-06-20 07:18:05 +00:00
matt d9c7720855 Don't expose port-specific if _MODULE is defined.
Don't _MACHINE_CPU_H_, _<PORT>_CPU_H_
2011-06-20 06:35:39 +00:00
matt 179b37ab20 Cleanup powerpc param.h. If compiling a MODULE, ignore port-specific stuff.
Only include <machine/cpu.h> in <powerpc/param.h> at the end.
2011-06-20 06:29:53 +00:00
matt dcbb41139e Make a common genassym.cf (powerpc/genassym.cf) and then
only put specific stuff in foo/genassym.cf
2011-06-18 21:17:28 +00:00
matt 05b09539a2 struct device * -> device_t
struct cfdata * -> cfdata_t
use device accessors, use device_private.
some softc/device_t splits (macppc needs a bunch more)
aprint*_dev used considerably more
2011-06-18 08:08:27 +00:00
matt e2a71f6c7b intr.h must not include cpu due to deadly embrace with SOFTINT_COUNT.
Cleanup intr.h so MD definitions can overload common definitions.
Rototill pic/intr.c.  Virtual IRQs can now be reclaimed.  separate virq
from hwirq from picirq.  Redo intr mask calculations.
tested on pmppc and macppc (MP).
2011-06-17 23:36:17 +00:00
matt 612b7ee57a struct device * -> device_t, struct cfdata * -> cfdata_t
CFATTACH_DECL(*, sizeof(struct device), -> CFATTACH_DECL_NEW(&, 0
2011-06-05 17:03:16 +00:00
matt 01fd92550a Remove <machine/atomic.h>; use <sys/atomic.h> instead.
Add <powerpc/cpuset.h> (for mpc85xx pmap).
Add some initial MP code for mpc85xx
Rework ipi code to be common across all ppcs
Change PPC to keep curlwp in %r13 while in the kernel.
Move astpending from cpu_info to mdlwp
Improve cpu_need_resched to be more MP friendly.
2011-06-05 16:52:22 +00:00
dyoung a6b2b8396b PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name.  Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
2011-05-17 17:34:47 +00:00
joerg 5aca2679d7 Remove Darwin, MACH and Mach-O support. 2011-04-26 15:51:22 +00:00
bouyer 063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
matt 4c2b26a393 Fix ident. 2011-01-31 06:33:05 +00:00
joerg 3c550524b5 Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh.  Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
2011-01-22 19:19:14 +00:00
he 4f221d300c Prefix register names with %, apparently now required to build. 2011-01-19 09:03:15 +00:00