freebsd-dev/sys/dev
Tom Rhodes a122cca953 These are changes to allow to use the Intel C/C++ compiler (lang/icc)
to build the kernel. It doesn't affect the operation if gcc.

Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as
icc v8 may define __GNUC__ some parts may look strange but are
necessary.

Additional changes:
 - in_cksum.[ch]:
   * use a generic C version instead of the assembly version in the !gcc
     case (ASM code breaks with the optimizations icc does)
     -> no bad checksums with an icc compiled kernel
     Help from:		andre, grehan, das
     Stolen from: 	alpha version via ppc version
     The entire checksum code should IMHO be replaced with the DragonFly
     version (because it isn't guaranteed future revisions of gcc will
     include similar optimizations) as in:
        ---snip---
          Revision  Changes    Path
          1.12      +1 -0      src/sys/conf/files.i386
          1.4       +142 -558  src/sys/i386/i386/in_cksum.c
          1.5       +33 -69    src/sys/i386/include/in_cksum.h
          1.5       +2 -0      src/sys/netinet/igmp.c
          1.6       +0 -1      src/sys/netinet/in.h
          1.6       +2 -0      src/sys/netinet/ip_icmp.c

          1.4       +3 -4      src/contrib/ipfilter/ip_compat.h
          1.3       +1 -2      src/sbin/natd/icmp.c
          1.4       +0 -1      src/sbin/natd/natd.c
          1.48      +1 -0      src/sys/conf/files
          1.2       +0 -1      src/sys/conf/files.amd64
          1.13      +0 -1      src/sys/conf/files.i386
          1.5       +0 -1      src/sys/conf/files.pc98
          1.7       +1 -1      src/sys/contrib/ipfilter/netinet/fil.c
          1.10      +2 -3      src/sys/contrib/ipfilter/netinet/ip_compat.h
          1.10      +1 -1      src/sys/contrib/ipfilter/netinet/ip_fil.c
          1.7       +1 -1      src/sys/dev/netif/txp/if_txp.c
          1.7       +1 -1      src/sys/net/ip_mroute/ip_mroute.c
          1.7       +1 -2      src/sys/net/ipfw/ip_fw2.c
          1.6       +1 -2      src/sys/netinet/igmp.c
          1.4       +158 -116  src/sys/netinet/in_cksum.c
          1.6       +1 -1      src/sys/netinet/ip_gre.c
          1.7       +1 -2      src/sys/netinet/ip_icmp.c
          1.10      +1 -1      src/sys/netinet/ip_input.c
          1.10      +1 -2      src/sys/netinet/ip_output.c
          1.13      +1 -2      src/sys/netinet/tcp_input.c
          1.9       +1 -2      src/sys/netinet/tcp_output.c
          1.10      +1 -1      src/sys/netinet/tcp_subr.c
          1.10      +1 -1      src/sys/netinet/tcp_syncache.c
          1.9       +1 -2      src/sys/netinet/udp_usrreq.c

          1.5       +1 -2      src/sys/netinet6/ipsec.c
          1.5       +1 -2      src/sys/netproto/ipsec/ipsec.c
          1.5       +1 -1      src/sys/netproto/ipsec/ipsec_input.c
          1.4       +1 -2      src/sys/netproto/ipsec/ipsec_output.c

          and finally remove
            sys/i386/i386        in_cksum.c
            sys/i386/include     in_cksum.h
        ---snip---
 - endian.h:
   * DTRT in C++ mode
 - quad.h:
   * we don't use gcc v1 anymore, remove support for it
   Suggested by:	bde (long ago)
 - assym.h:
   * avoid zero-length arrays (remove dependency on a gcc specific
     feature)
     This change changes the contents of the object file, but as it's
     only used to generate some values for a header, and the generator
     knows how to handle this, there's no impact in the gcc case.
   Explained by:	bde
   Submitted by:	Marius Strobl <marius@alchemy.franken.de>
 - aicasm.c:
   * minor change to teach it about the way icc spells "-nostdinc"
   Not approved by:	gibbs (no reply to my mail)
 - bump __FreeBSD_version (lang/icc needs to know about the changes)

Incarnations of this patch survive gcc compiles since a loooong time,
I use it on my desktop. An icc compiled kernel works since Nov. 2003
(exceptions: snd_* if used as modules), it survives a build of the
entire ports collection with icc.

Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.

Reviewed by:	-arch
Submitted by:	netchild
2004-03-12 21:45:33 +00:00
..
aac kthread_exit() no longer requires Giant, so don't force callers to acquire 2004-03-05 22:42:17 +00:00
acpi_support Add support for quirks for acpi tables. Key off OEM vendor and revision. 2004-03-03 03:02:17 +00:00
acpica Simplify some logic in converting a buffer to an integer. 2004-03-09 05:44:47 +00:00
adlink Lock Giant around the body of the adlink_loran() function used by the 2004-03-05 22:41:22 +00:00
advansys Make the extern for adv_mcode match the reality: it's u_int8_t, but 2004-03-10 20:52:47 +00:00
agp Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
aha Save the device so we can do a device_printf. 2003-11-13 04:14:53 +00:00
ahb Make this at least compile on 64 bit platforms. Its been breaking 2003-07-30 20:09:22 +00:00
aic Use __FBSDID(). 2003-08-24 17:55:58 +00:00
aic7xxx These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
amd Setting pccb->ccb_h.status to CAM_REQ_CMP one time is enough. 2004-01-21 10:49:42 +00:00
amr Check that amrd_sc is non-NULL before dereferencing it, not after. 2004-02-22 10:00:05 +00:00
an Remove the HACK section it breaks the older firmware and doesn't totally 2004-01-10 03:02:04 +00:00
ar Get rid of the last two uses of NG_NODELEN + 1 in the base system by 2004-01-26 16:41:21 +00:00
asr Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
ata Add yet another VIA pci id. 2004-03-11 14:08:11 +00:00
ath Make this compile on amd64. 2004-02-06 00:10:54 +00:00
atkbdc Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
awi Correct beacon (src/bssid) for hostap and adhoc mode. 2004-01-15 13:30:06 +00:00
bfe When we get a packet error, move on, don't go into an infinite loop 2004-03-02 05:43:42 +00:00
bge Fix typo in a comment 2004-01-13 11:31:09 +00:00
bktr Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
buslogic Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
cardbus Make the cardbus driver a derived class of the pci driver. In theory, this 2003-11-01 12:45:03 +00:00
ciss Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
cm Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
cnw Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
cs o Add sysctl to allow ignoring checksum of eeprom. 2003-11-04 02:59:57 +00:00
ct Use __FBSDID(). 2003-08-24 17:55:58 +00:00
ctau Nursemaid: Fix tinderbox builds by removing the shadowing of the global 2004-03-04 14:16:12 +00:00
cx These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
cy Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
dc Some integrated Davicom cards in sparc64 boxes have an all zeros 2004-01-08 19:08:27 +00:00
dcons Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
de Stop setting ifp->if_output to ether_output() since ether_ifattach() 2004-03-11 14:04:59 +00:00
dec Use __FBSDID(). 2003-08-24 17:55:58 +00:00
digi Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
dpt Device megapatch 1/6: 2004-02-21 19:42:58 +00:00
drm Prefer uintptr_t to intptr_t. 2004-03-03 08:27:33 +00:00
ed Adjust ed(4) for 64-bit platforms should it get newbus'ified. 2004-03-03 06:48:42 +00:00
eisa Use __FBSDID(). 2003-08-24 17:55:58 +00:00
em Only reset the phy when it is absolutely required. 2004-02-10 21:31:09 +00:00
en All three of these drivers abused cv_waitq_empty in the same way by spinning 2004-02-29 09:26:01 +00:00
ep MFp4: 2003-11-02 20:13:39 +00:00
ex Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
exca Card type stuff was backwards, so assume io for the moment. mem needs 2003-10-07 04:29:04 +00:00
fatm Fix 0 / NULL mixup (this module isn't in LINT!) 2003-12-24 05:24:24 +00:00
fb Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
fdc Remove unused FDNUMTOUNIT() macro 2004-02-29 10:21:40 +00:00
fe Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
firewire Check that xfer != NULL before dereferencing it, not after. 2004-02-22 01:10:11 +00:00
fxp Sometimes cardbus attachments don't attach, so while we track down 2003-11-28 05:28:29 +00:00
gem Add new Apple GEM PCI id. 2004-02-02 01:11:39 +00:00
gfb Catch a few places where NULL (pointer) was used where 0 (integer) was 2003-12-23 02:36:43 +00:00
gx Avoid overwriting capability bits marked earlier 2004-01-18 10:15:48 +00:00
harp Make sure that the first mbuf in the chain passed to atm_intr 2004-02-21 13:01:54 +00:00
hatm All three of these drivers abused cv_waitq_empty in the same way by spinning 2004-02-29 09:26:01 +00:00
hfa Unbreak after the change to use vm_paddr_t. Since vm_paddr_t is 2004-02-22 16:27:28 +00:00
hifn Use the external clock input for our PLL. 2004-03-10 10:10:46 +00:00
hme Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
ic Add a header for the i8259A register definitions. This is based on 2004-01-06 18:59:37 +00:00
ichsmb These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
ida Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
idt Use contigmalloc() instead of vm_page_alloc_contig(). Pass M_ZERO to 2004-01-14 06:14:35 +00:00
ie Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_ndis Don't set ifp->if_output to ether_output(), since ether_ifattach() 2004-03-12 17:05:06 +00:00
iicbus Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
iir These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
ips Switch from using mutexes to using semaphores to protect against early 2004-02-28 19:14:41 +00:00
isp These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
ispfw Update firmware sets for the 12160, 2200 and 2300 cards to the (more or 2004-01-14 18:38:03 +00:00
joy Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
kbd Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
led Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
lge Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
lnc Peter prefers it this way, bde might also[*]. I just want to have a chance 2004-03-03 08:33:34 +00:00
matcd Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
mc146818
mca Use __FBSDID(). 2003-08-24 17:55:58 +00:00
mcd These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
md Fix a long-standing deadlock issue with vnode backed md(4) devices: 2004-03-10 20:41:09 +00:00
mii Make sure set the media type in the phy, we cannot trust it to have chosen 2004-01-17 10:44:39 +00:00
mk48txx Use __FBSDID(). 2003-08-24 17:55:58 +00:00
mlx Change another pointer name that was missed in the previous commit. 2004-03-01 21:45:49 +00:00
mly Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
mpt These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
mse Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
musycc Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
my Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
ncv Const poison string accessor functions. 2003-10-26 00:51:40 +00:00
nge Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
nmdm Add clone_setup() function rather than rely on lazy initialization. 2004-03-11 12:58:55 +00:00
nsp Use __FBSDID(). 2003-08-24 17:55:58 +00:00
null Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
ofw Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
owi Nursemaid: Fix compilation. 2003-12-10 15:09:38 +00:00
patm Eliminate multiple __FBSDID and sys/cdefs.h. 2004-03-10 17:03:27 +00:00
pccard Sync to pccarddevs 1.81. 2004-01-21 16:03:40 +00:00
pccbb kthread_exit() no longer requires Giant, so don't force callers to acquire 2004-03-05 22:42:17 +00:00
pcf fix another LP64 problem. READ_IVAR takes a pointer to an uintptr_t, not 2003-06-20 07:22:54 +00:00
pci Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
pcic Use __FBSDID(). 2003-08-24 17:55:58 +00:00
pdq Use contigmalloc() and contigfree() instead of vm_page_alloc_contig() and 2004-01-13 20:36:03 +00:00
ppbus Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
ppc Forgot an added file in the last commit. 2003-08-01 05:02:55 +00:00
pst Change the disk(9) API in order to make device removal more robust. 2004-02-18 21:36:53 +00:00
puc Expand the mask for the Avlab Technology, PCI IO 2S entry to cover the 2004-02-04 18:01:02 +00:00
raidframe Don't free k_cfg until we're finished using it -- reverse the order of 2004-02-22 09:55:48 +00:00
random kthread_exit() no longer requires Giant, so don't force callers to acquire 2004-03-05 22:42:17 +00:00
ray fix warnings. NULL -> 0 2003-12-24 19:00:49 +00:00
rc Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
re Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
rndtest Use __FBSDID(). 2003-08-24 17:55:58 +00:00
rp Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
sab Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
safe Compile on amd64. (pointer/int mismatches and printf int vs long ) 2004-02-05 01:35:33 +00:00
sbni Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
sbsh Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
scd These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
sf Stop setting ifp->if_output to ether_output() since ether_ifattach() 2004-03-11 14:04:59 +00:00
si Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
sio Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
sk Stop setting ifp->if_output to ether_output() since ether_ifattach() 2004-03-11 14:04:59 +00:00
smbus Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
sn Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
snc Do if_xname conversion. I missed this one because it's pc98 only. 2003-11-01 23:24:38 +00:00
snp Add clone_setup() function rather than rely on lazy initialization. 2004-03-11 12:58:55 +00:00
sound Augment /dev/sndstat with the module names, if applicable. 2004-03-06 15:52:42 +00:00
speaker Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
sr Get rid of the last two uses of NG_NODELEN + 1 in the base system by 2004-01-26 16:41:21 +00:00
stg Fix some becuase -> because typos. 2003-12-17 16:12:01 +00:00
streams Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
sym unifdef old interface support out to prevent false positives. 2003-12-07 05:17:13 +00:00
syscons Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
tdfx Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
tga Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
ti Stop setting ifp->if_output to ether_output() since ether_ifattach() 2004-03-11 14:04:59 +00:00
trm Use one bus_dma_tag_t for all pSRB instead of creating one for each. 2004-03-07 17:23:39 +00:00
twe Check that twed_sc is non-NULL before dereferencing it, not after. 2004-02-22 09:58:34 +00:00
tx Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
txp Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
uart Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
ubsec Use __FBSDID(). 2003-08-24 17:55:58 +00:00
usb Sync to 1.166 of usbdevs 2004-03-07 05:34:36 +00:00
utopia kthread_exit() no longer requires Giant, so don't force callers to acquire 2004-03-05 22:42:17 +00:00
vinum Properly count references of our dev_t to avoid triggering a KASSERT in 2004-03-11 14:11:08 +00:00
vr Stop setting ifp->if_output to ether_output() since ether_ifattach() 2004-03-11 14:04:59 +00:00
vx Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
watchdog Add a generic watchdog facility which through a single device entry 2004-02-28 20:06:59 +00:00
wds Use __FBSDID(). 2003-08-24 17:55:58 +00:00
wi update radiotap support to reflect recent changes: 2003-12-28 06:58:52 +00:00
wl Drop the driver lock around calls to if_input to avoid a LOR when 2003-11-14 19:00:32 +00:00
xe Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
zs Device megapatch 4/6: 2004-02-21 21:10:55 +00:00