head	1.7;
access;
symbols
	netbsd-11-0-RC3:1.7
	netbsd-11-0-RC2:1.7
	netbsd-11-0-RC1:1.7
	perseant-exfatfs-base-20250801:1.7
	netbsd-11:1.7.0.8
	netbsd-11-base:1.7
	netbsd-10-1-RELEASE:1.6
	perseant-exfatfs-base-20240630:1.7
	perseant-exfatfs:1.7.0.6
	perseant-exfatfs-base:1.7
	netbsd-8-3-RELEASE:1.1
	netbsd-9-4-RELEASE:1.6
	netbsd-10-0-RELEASE:1.6
	netbsd-10-0-RC6:1.6
	netbsd-10-0-RC5:1.6
	netbsd-10-0-RC4:1.6
	netbsd-10-0-RC3:1.6
	netbsd-10-0-RC2:1.6
	thorpej-ifq:1.7.0.4
	thorpej-ifq-base:1.7
	thorpej-altq-separation:1.7.0.2
	thorpej-altq-separation-base:1.7
	netbsd-10-0-RC1:1.6
	netbsd-10:1.6.0.30
	netbsd-10-base:1.6
	bouyer-sunxi-drm:1.6.0.28
	bouyer-sunxi-drm-base:1.6
	netbsd-9-3-RELEASE:1.6
	thorpej-i2c-spi-conf2:1.6.0.26
	thorpej-i2c-spi-conf2-base:1.6
	thorpej-futex2:1.6.0.24
	thorpej-futex2-base:1.6
	thorpej-cfargs2:1.6.0.22
	thorpej-cfargs2-base:1.6
	cjep_sun2x-base1:1.6
	cjep_sun2x:1.6.0.20
	cjep_sun2x-base:1.6
	cjep_staticlib_x-base1:1.6
	netbsd-9-2-RELEASE:1.6
	cjep_staticlib_x:1.6.0.18
	cjep_staticlib_x-base:1.6
	thorpej-i2c-spi-conf:1.6.0.16
	thorpej-i2c-spi-conf-base:1.6
	thorpej-cfargs:1.6.0.14
	thorpej-cfargs-base:1.6
	thorpej-futex:1.6.0.12
	thorpej-futex-base:1.6
	netbsd-9-1-RELEASE:1.6
	bouyer-xenpvh-base2:1.6
	phil-wifi-20200421:1.6
	bouyer-xenpvh-base1:1.6
	phil-wifi-20200411:1.6
	bouyer-xenpvh:1.6.0.10
	bouyer-xenpvh-base:1.6
	is-mlppp:1.6.0.8
	is-mlppp-base:1.6
	phil-wifi-20200406:1.6
	netbsd-8-2-RELEASE:1.1
	ad-namecache-base3:1.6
	netbsd-9-0-RELEASE:1.6
	netbsd-9-0-RC2:1.6
	ad-namecache-base2:1.6
	ad-namecache-base1:1.6
	ad-namecache:1.6.0.6
	ad-namecache-base:1.6
	netbsd-9-0-RC1:1.6
	phil-wifi-20191119:1.6
	netbsd-9:1.6.0.4
	netbsd-9-base:1.6
	phil-wifi-20190609:1.6
	netbsd-8-1-RELEASE:1.1
	netbsd-8-1-RC1:1.1
	isaki-audio2:1.6.0.2
	isaki-audio2-base:1.6
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	pgoyette-compat-0728:1.2
	netbsd-8-0-RELEASE:1.1
	phil-wifi:1.2.0.4
	phil-wifi-base:1.2
	pgoyette-compat-0625:1.2
	netbsd-8-0-RC2:1.1
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	netbsd-8-0-RC1:1.1
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	pgoyette-compat:1.2.0.2
	pgoyette-compat-base:1.2
	tls-maxphys:1.1.0.18
	tls-maxphys-base-20171202:1.1
	matt-nb8-mediatek:1.1.0.16
	matt-nb8-mediatek-base:1.1
	nick-nhusb-base-20170825:1.1
	perseant-stdc-iso10646:1.1.0.14
	perseant-stdc-iso10646-base:1.1
	netbsd-8:1.1.0.12
	netbsd-8-base:1.1
	prg-localcount2-base3:1.1
	prg-localcount2-base2:1.1
	prg-localcount2-base1:1.1
	prg-localcount2:1.1.0.10
	prg-localcount2-base:1.1
	pgoyette-localcount-20170426:1.1
	bouyer-socketcan-base1:1.1
	jdolecek-ncq:1.1.0.8
	jdolecek-ncq-base:1.1
	pgoyette-localcount-20170320:1.1
	nick-nhusb-base-20170204:1.1
	bouyer-socketcan:1.1.0.6
	bouyer-socketcan-base:1.1
	pgoyette-localcount-20170107:1.1
	nick-nhusb-base-20161204:1.1
	pgoyette-localcount-20161104:1.1
	nick-nhusb-base-20161004:1.1
	localcount-20160914:1.1
	pgoyette-localcount-20160806:1.1
	pgoyette-localcount-20160726:1.1
	pgoyette-localcount:1.1.0.4
	pgoyette-localcount-base:1.1
	nick-nhusb-base-20160907:1.1
	nick-nhusb-base-20160529:1.1
	nick-nhusb-base-20160422:1.1
	nick-nhusb-base-20160319:1.1
	nick-nhusb:1.1.0.2
	nick-nhusb-base-20151226:1.1;
locks; strict;
comment	@# @;


1.7
date	2023.09.25.21.59.38;	author oster;	state Exp;
branches;
next	1.6;
commitid	CeQzywyoWcsQtcGE;

1.6
date	2019.02.17.04.05.57;	author rin;	state Exp;
branches;
next	1.5;
commitid	viEUadQYccaOx4cB;

1.5
date	2019.02.04.21.57.48;	author mrg;	state Exp;
branches;
next	1.4;
commitid	cttCyolGvzZiUuaB;

1.4
date	2019.02.03.09.32.07;	author pgoyette;	state Exp;
branches;
next	1.3;
commitid	SgvgkDoJmhEqPiaB;

1.3
date	2019.02.03.08.02.25;	author pgoyette;	state Exp;
branches;
next	1.2;
commitid	z8Q3ORjcFXJekiaB;

1.2
date	2018.01.18.00.32.48;	author mrg;	state Exp;
branches
	1.2.4.1;
next	1.1;
commitid	pUaYOhbnzbSw5inA;

1.1
date	2015.12.23.08.14.06;	author pgoyette;	state Exp;
branches
	1.1.2.1
	1.1.18.1;
next	;
commitid	ydOHcfd7pwQrY2Oy;

1.2.4.1
date	2019.06.10.22.09.37;	author christos;	state Exp;
branches;
next	;
commitid	jtc8rnCzWiEEHGqB;

1.1.2.1
date	2015.12.23.08.14.06;	author skrll;	state dead;
branches;
next	1.1.2.2;
commitid	BTSqUD4SdJ5k7AOy;

1.1.2.2
date	2015.12.27.12.10.06;	author skrll;	state Exp;
branches;
next	;
commitid	BTSqUD4SdJ5k7AOy;

1.1.18.1
date	2015.12.23.08.14.06;	author jdolecek;	state dead;
branches;
next	1.1.18.2;
commitid	XcIYRZTAh1LmerhA;

1.1.18.2
date	2017.12.03.11.38.59;	author jdolecek;	state Exp;
branches;
next	;
commitid	XcIYRZTAh1LmerhA;


desc
@@


1.7
log
@

We no longer need the deprecated copyback functionality now that
incorporating a used spare is automatic.

Copyback has always been an issue, as to do a copyback all IO to
the array had to be suspended, and so was very, very unlikely to
have been used in anything resembling a production system.
@
text
@#	$NetBSD: Makefile,v 1.6 2019/02/17 04:05:57 rin Exp $

.include "../Makefile.inc"

IOCONF=	raid.ioconf

.PATH:	${S}/dev/raidframe

KMOD=	raid

SRCS+=	rf_acctrace.c           rf_alloclist.c         rf_aselect.c
SRCS+=	rf_callback.c           rf_chaindecluster.c
SRCS+=	rf_cvscan.c             rf_dagdegrd.c          rf_dagdegwr.c
SRCS+=	rf_dagffrd.c            rf_dagffwr.c           rf_dagfuncs.c
SRCS+=	rf_dagutils.c           rf_debugMem.c          rf_debugprint.c
SRCS+=	rf_decluster.c          rf_declusterPQ.c       rf_diskqueue.c
SRCS+=	rf_disks.c              rf_driver.c            rf_engine.c
SRCS+=	rf_evenodd.c            rf_evenodd_dagfuncs.c  rf_evenodd_dags.c
SRCS+=	rf_fifo.c               rf_interdecluster.c    rf_invertq.c
SRCS+=	rf_layout.c             rf_map.c               rf_mcpair.c
SRCS+=	rf_netbsdkintf.c        rf_nwayxor.c           rf_options.c
SRCS+=	rf_paritylog.c          rf_paritylogDiskMgr.c  rf_paritylogging.c
SRCS+=	rf_parityloggingdags.c  rf_paritymap.c         rf_parityscan.c
SRCS+=	rf_pq.c                 rf_pqdeg.c             rf_pqdegdags.c
SRCS+=	rf_psstatus.c           rf_raid0.c             rf_raid1.c
SRCS+=	rf_raid4.c              rf_raid5.c             rf_raid5_rotatedspare.c
SRCS+=	rf_reconbuffer.c        rf_reconmap.c          rf_reconstruct.c
SRCS+=	rf_reconutil.c          rf_revent.c            rf_shutdown.c
SRCS+=	rf_sstf.c               rf_states.c            rf_stripelocks.c
SRCS+=	rf_strutils.c           rf_utils.c

CPPFLAGS+=	-DRAID_AUTOCONFIG=1

# Include optional raid styles

CPPFLAGS+=	-DRF_INCLUDE_EVENODD=1
CPPFLAGS+=	-DRF_INCLUDE_RAID5_RS=1
CPPFLAGS+=	-DRF_INCLUDE_PARITYLOGGING=1      
CPPFLAGS+=	-DRF_INCLUDE_CHAINDECLUSTER=1     
CPPFLAGS+=	-DRF_INCLUDE_INTERDECLUSTER=1
CPPFLAGS+=	-DRF_INCLUDE_PARITY_DECLUSTERING=1
CPPFLAGS+=	-DRF_INCLUDE_PARITY_DECLUSTERING_DS=1

.include "${.CURDIR}/../../compat/netbsd32/netbsd32.mk"
.if ${COMPAT_USE_NETBSD32} != "no"
CPPFLAGS.rf_netbsdkintf.c+=	-DCOMPAT_NETBSD32
.endif

WARNS=	3

.include <bsd.kmodule.mk>
@


1.6
log
@Bump default value of WARNS for modules from 3 to 5, and
explicitly set WARNS for modules that fail with WARNS=5.

Also, turn on -Wno-missing-noreturn for clang for some files.

At the moment, among ~ 360 modules,
- 2 (lua and zfs) need WARNS=0
- 1 (solaris) needs WARNS=1
- 136 need WARNS=3 (mostly due to sign-compare)
- 4 need WARNS=4
- others can be compiled with WARNS=5

Discussed on tech-kern.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2019/02/04 21:57:48 mrg Exp $
d12 1
a12 1
SRCS+=	rf_callback.c           rf_chaindecluster.c    rf_copyback.c
@


1.5
log
@don't assume _LP64 == supports COMPAT_NETBSD32.

this is not true for alpha, ia64 and arm32 ports, and the first two
were not building because of it, and the latter would be missing
the oabi support (likely not a big deal, but still wrong.)

add a makefile fragment that tells you if it is supported and include
it where needed to define COMPAT_NETBSD32 when building the normal
kernel (ie, modules & rump.)


fixes alpha build, probably fixes ia64 build.


XXX: still leaves some netbsd32 code in rf_netbsdkintf.c, that should
     be moved into some hooks, but first the configuration setup
     needs to be moved into a common function the netbsd32 code can
     call into, vs living in the switch case itself.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2019/02/03 09:32:07 pgoyette Exp $
d49 2
@


1.4
log
@Remove some commented-out stuff accidentally left in the previous commit.

It's just comments, NFCI
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2019/02/03 08:02:25 pgoyette Exp $
d44 5
@


1.3
log
@Don't include the raidframe compat code in the main raid module, the
compat code lives in their own compat_raid_xx modules, which will now
be autoloaded if needed.

While here, extract the compat_netbsd32_raid code into its own module,
too.

Welcome to 8.99.34
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2018/01/18 00:32:48 mrg Exp $
a43 9
#XXX
#.if ${MACHINE_CPU} == "sparc64" || \
#    ${MACHINE_CPU} == "x86_64" || \
#    ${MACHINE_CPU} == "mips64"
#SRCS+=	rf_compat32.c
#CPPFLAGS+=	-DCOMPAT_NETBSD32
#.endif


@


1.2
log
@implement 32-bit compat support for raidframe.

convert several raidframe ioctls to be bitsize idempotent so that
they work the same in 32 and 64 bit worlds, allowing netbsd32 to
configure and query raid properly.  remove useless 'row' in a few
places.  add COMPAT_80 and put the old ioctls there.

raidframeio.h:
  RAIDFRAME_TEST_ACC
  - remove, unused
  RAIDFRAME_GET_COMPONENT_LABEL
  - convert to label not pointer to label
  RAIDFRAME_CHECK_RECON_STATUS_EXT
  RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT
  RAIDFRAME_CHECK_COPYBACK_STATUS_EXT
  - convert to progress info not pointer to info
  RAIDFRAME_GET_INFO
  - version entirely.
raidframevar.h:
  - rf_recon_req{} has row, flags and raidPtr removed (they're
    not a useful part of this interface.)
  - RF_Config_s{} and RF_DeviceConfig_s{} have numRow/rows removed.
  - RF_RaidDisk_s{} is re-ordered slightly to fix alignment
    padding - the actual data was already OK.
  - InstallSpareTable() loses row argument

rf_compat32.c has code for RF_Config_s{} in 32 bit mode, used
by RAIDFRAME_CONFIGURE and RAIDFRAME_GET_INFO32.

rf_compat80.c has code for rf_recon_req{}, RF_RaidDisk_s{} and
RF_DeviceConfig_s{} to handle RAIDFRAME_FAIL_DISK,
RAIDFRAME_GET_COMPONENT_LABEL, RAIDFRAME_CHECK_RECON_STATUS_EXT,
RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT,
RAIDFRAME_CHECK_COPYBACK_STATUS_EXT, RAIDFRAME_GET_INFO.

move several of the per-ioctl code blocks into separate functions.

add rf_recon_req_internal{} to replace old usage of global
rf_recon_req{} that had unused void * in the structure, ruining
it's 32/64 bit ABI.

add missing case for RAIDFRAME_GET_INFO50.

adjust raid tests to use the new .conf format, and add a case to
test the old method as well.

raidctl:
deal with lack of 'row' members in a couple of places.
fail request no longer takes row.
handle "START array" sections with just "numCol numSpare", ie
no "numRow" specified.  for now, generate old-style configuration
but update raidctl.8 to specify the new style (keeping reference
to the old style.)

note that: RF_ComponentLabel_s::{row,num_rows} and
RF_SingleComponent_s::row are obsolete but not removed yet.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2015/12/23 08:14:06 pgoyette Exp $
d30 1
a30 2
SRCS+=	rf_strutils.c           rf_utils.c             rf_compat50.c
SRCS+=	rf_compat80.c
d44 7
a50 9
CPPFLAGS+=	-DCOMPAT_50
CPPFLAGS+=	-DCOMPAT_80

.if ${MACHINE_CPU} == "sparc64" || \
    ${MACHINE_CPU} == "x86_64" || \
    ${MACHINE_CPU} == "mips64"
SRCS+=	rf_compat32.c
CPPFLAGS+=	-DCOMPAT_NETBSD32
.endif
@


1.2.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2019/02/17 04:05:57 rin Exp $
d30 2
a31 1
SRCS+=	rf_strutils.c           rf_utils.c
d45 8
a52 3
.include "${.CURDIR}/../../compat/netbsd32/netbsd32.mk"
.if ${COMPAT_USE_NETBSD32} != "no"
CPPFLAGS.rf_netbsdkintf.c+=	-DCOMPAT_NETBSD32
a54 1
WARNS=	3
@


1.1
log
@New files, in preparation for modularized version of raidframe driver.

(Driver changes to be committed on the weekend.)
@
text
@d1 1
a1 1
#	$NetBSD$
d31 1
d46 9
@


1.1.18.1
log
@file Makefile was added on branch tls-maxphys on 2017-12-03 11:38:59 +0000
@
text
@d1 46
@


1.1.18.2
log
@update from HEAD
@
text
@a0 46
#	$NetBSD$

.include "../Makefile.inc"

IOCONF=	raid.ioconf

.PATH:	${S}/dev/raidframe

KMOD=	raid

SRCS+=	rf_acctrace.c           rf_alloclist.c         rf_aselect.c
SRCS+=	rf_callback.c           rf_chaindecluster.c    rf_copyback.c
SRCS+=	rf_cvscan.c             rf_dagdegrd.c          rf_dagdegwr.c
SRCS+=	rf_dagffrd.c            rf_dagffwr.c           rf_dagfuncs.c
SRCS+=	rf_dagutils.c           rf_debugMem.c          rf_debugprint.c
SRCS+=	rf_decluster.c          rf_declusterPQ.c       rf_diskqueue.c
SRCS+=	rf_disks.c              rf_driver.c            rf_engine.c
SRCS+=	rf_evenodd.c            rf_evenodd_dagfuncs.c  rf_evenodd_dags.c
SRCS+=	rf_fifo.c               rf_interdecluster.c    rf_invertq.c
SRCS+=	rf_layout.c             rf_map.c               rf_mcpair.c
SRCS+=	rf_netbsdkintf.c        rf_nwayxor.c           rf_options.c
SRCS+=	rf_paritylog.c          rf_paritylogDiskMgr.c  rf_paritylogging.c
SRCS+=	rf_parityloggingdags.c  rf_paritymap.c         rf_parityscan.c
SRCS+=	rf_pq.c                 rf_pqdeg.c             rf_pqdegdags.c
SRCS+=	rf_psstatus.c           rf_raid0.c             rf_raid1.c
SRCS+=	rf_raid4.c              rf_raid5.c             rf_raid5_rotatedspare.c
SRCS+=	rf_reconbuffer.c        rf_reconmap.c          rf_reconstruct.c
SRCS+=	rf_reconutil.c          rf_revent.c            rf_shutdown.c
SRCS+=	rf_sstf.c               rf_states.c            rf_stripelocks.c
SRCS+=	rf_strutils.c           rf_utils.c             rf_compat50.c

CPPFLAGS+=	-DRAID_AUTOCONFIG=1

# Include optional raid styles

CPPFLAGS+=	-DRF_INCLUDE_EVENODD=1
CPPFLAGS+=	-DRF_INCLUDE_RAID5_RS=1
CPPFLAGS+=	-DRF_INCLUDE_PARITYLOGGING=1      
CPPFLAGS+=	-DRF_INCLUDE_CHAINDECLUSTER=1     
CPPFLAGS+=	-DRF_INCLUDE_INTERDECLUSTER=1
CPPFLAGS+=	-DRF_INCLUDE_PARITY_DECLUSTERING=1
CPPFLAGS+=	-DRF_INCLUDE_PARITY_DECLUSTERING_DS=1

CPPFLAGS+=	-DCOMPAT_50

.include <bsd.kmodule.mk>
@


1.1.2.1
log
@file Makefile was added on branch nick-nhusb on 2015-12-27 12:10:06 +0000
@
text
@d1 46
@


1.1.2.2
log
@Sync with HEAD (as of 26th Dec)
@
text
@a0 46
#	$NetBSD: Makefile,v 1.1 2015/12/23 08:14:06 pgoyette Exp $

.include "../Makefile.inc"

IOCONF=	raid.ioconf

.PATH:	${S}/dev/raidframe

KMOD=	raid

SRCS+=	rf_acctrace.c           rf_alloclist.c         rf_aselect.c
SRCS+=	rf_callback.c           rf_chaindecluster.c    rf_copyback.c
SRCS+=	rf_cvscan.c             rf_dagdegrd.c          rf_dagdegwr.c
SRCS+=	rf_dagffrd.c            rf_dagffwr.c           rf_dagfuncs.c
SRCS+=	rf_dagutils.c           rf_debugMem.c          rf_debugprint.c
SRCS+=	rf_decluster.c          rf_declusterPQ.c       rf_diskqueue.c
SRCS+=	rf_disks.c              rf_driver.c            rf_engine.c
SRCS+=	rf_evenodd.c            rf_evenodd_dagfuncs.c  rf_evenodd_dags.c
SRCS+=	rf_fifo.c               rf_interdecluster.c    rf_invertq.c
SRCS+=	rf_layout.c             rf_map.c               rf_mcpair.c
SRCS+=	rf_netbsdkintf.c        rf_nwayxor.c           rf_options.c
SRCS+=	rf_paritylog.c          rf_paritylogDiskMgr.c  rf_paritylogging.c
SRCS+=	rf_parityloggingdags.c  rf_paritymap.c         rf_parityscan.c
SRCS+=	rf_pq.c                 rf_pqdeg.c             rf_pqdegdags.c
SRCS+=	rf_psstatus.c           rf_raid0.c             rf_raid1.c
SRCS+=	rf_raid4.c              rf_raid5.c             rf_raid5_rotatedspare.c
SRCS+=	rf_reconbuffer.c        rf_reconmap.c          rf_reconstruct.c
SRCS+=	rf_reconutil.c          rf_revent.c            rf_shutdown.c
SRCS+=	rf_sstf.c               rf_states.c            rf_stripelocks.c
SRCS+=	rf_strutils.c           rf_utils.c             rf_compat50.c

CPPFLAGS+=	-DRAID_AUTOCONFIG=1

# Include optional raid styles

CPPFLAGS+=	-DRF_INCLUDE_EVENODD=1
CPPFLAGS+=	-DRF_INCLUDE_RAID5_RS=1
CPPFLAGS+=	-DRF_INCLUDE_PARITYLOGGING=1      
CPPFLAGS+=	-DRF_INCLUDE_CHAINDECLUSTER=1     
CPPFLAGS+=	-DRF_INCLUDE_INTERDECLUSTER=1
CPPFLAGS+=	-DRF_INCLUDE_PARITY_DECLUSTERING=1
CPPFLAGS+=	-DRF_INCLUDE_PARITY_DECLUSTERING_DS=1

CPPFLAGS+=	-DCOMPAT_50

.include <bsd.kmodule.mk>
@


