From owner-svn-src-all@FreeBSD.ORG Sat Nov 10 16:02:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5DD39F; Sat, 10 Nov 2012 16:02:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CBA688FC08; Sat, 10 Nov 2012 16:02:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAAG2CmU051371; Sat, 10 Nov 2012 16:02:12 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAAG2CmV051370; Sat, 10 Nov 2012 16:02:12 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201211101602.qAAG2CmV051370@svn.freebsd.org> From: Dimitry Andric Date: Sat, 10 Nov 2012 16:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242873 - head/sys/dev/nve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Nov 2012 16:02:13 -0000 Author: dim Date: Sat Nov 10 16:02:12 2012 New Revision: 242873 URL: http://svnweb.freebsd.org/changeset/base/242873 Log: Fix all the inconsistent nve_os* function declarations and definitions in nve(4). The OS_API structure defined in os.h expects NV_API_CALL attributes, effectively regparm(0), on its function pointers, but all the functions were declared and defined without this attribute. MFC after: 1 week Modified: head/sys/dev/nve/if_nve.c Modified: head/sys/dev/nve/if_nve.c ============================================================================== --- head/sys/dev/nve/if_nve.c Sat Nov 10 15:21:39 2012 (r242872) +++ head/sys/dev/nve/if_nve.c Sat Nov 10 16:02:12 2012 (r242873) @@ -152,30 +152,30 @@ static int nve_miibus_writereg(devi static void nve_dmamap_cb(void *, bus_dma_segment_t *, int, int); static void nve_dmamap_tx_cb(void *, bus_dma_segment_t *, int, bus_size_t, int); -static NV_SINT32 nve_osalloc(PNV_VOID, PMEMORY_BLOCK); -static NV_SINT32 nve_osfree(PNV_VOID, PMEMORY_BLOCK); -static NV_SINT32 nve_osallocex(PNV_VOID, PMEMORY_BLOCKEX); -static NV_SINT32 nve_osfreeex(PNV_VOID, PMEMORY_BLOCKEX); -static NV_SINT32 nve_osclear(PNV_VOID, PNV_VOID, NV_SINT32); -static NV_SINT32 nve_osdelay(PNV_VOID, NV_UINT32); -static NV_SINT32 nve_osallocrxbuf(PNV_VOID, PMEMORY_BLOCK, PNV_VOID *); -static NV_SINT32 nve_osfreerxbuf(PNV_VOID, PMEMORY_BLOCK, PNV_VOID); -static NV_SINT32 nve_ospackettx(PNV_VOID, PNV_VOID, NV_UINT32); -static NV_SINT32 nve_ospacketrx(PNV_VOID, PNV_VOID, NV_UINT32, NV_UINT8 *, NV_UINT8); -static NV_SINT32 nve_oslinkchg(PNV_VOID, NV_SINT32); -static NV_SINT32 nve_osalloctimer(PNV_VOID, PNV_VOID *); -static NV_SINT32 nve_osfreetimer(PNV_VOID, PNV_VOID); -static NV_SINT32 nve_osinittimer(PNV_VOID, PNV_VOID, PTIMER_FUNC, PNV_VOID); -static NV_SINT32 nve_ossettimer(PNV_VOID, PNV_VOID, NV_UINT32); -static NV_SINT32 nve_oscanceltimer(PNV_VOID, PNV_VOID); - -static NV_SINT32 nve_ospreprocpkt(PNV_VOID, PNV_VOID, PNV_VOID *, NV_UINT8 *, NV_UINT8); -static PNV_VOID nve_ospreprocpktnopq(PNV_VOID, PNV_VOID); -static NV_SINT32 nve_osindicatepkt(PNV_VOID, PNV_VOID *, NV_UINT32); -static NV_SINT32 nve_oslockalloc(PNV_VOID, NV_SINT32, PNV_VOID *); -static NV_SINT32 nve_oslockacquire(PNV_VOID, NV_SINT32, PNV_VOID); -static NV_SINT32 nve_oslockrelease(PNV_VOID, NV_SINT32, PNV_VOID); -static PNV_VOID nve_osreturnbufvirt(PNV_VOID, PNV_VOID); +static NV_API_CALL NV_SINT32 nve_osalloc(PNV_VOID, PMEMORY_BLOCK); +static NV_API_CALL NV_SINT32 nve_osfree(PNV_VOID, PMEMORY_BLOCK); +static NV_API_CALL NV_SINT32 nve_osallocex(PNV_VOID, PMEMORY_BLOCKEX); +static NV_API_CALL NV_SINT32 nve_osfreeex(PNV_VOID, PMEMORY_BLOCKEX); +static NV_API_CALL NV_SINT32 nve_osclear(PNV_VOID, PNV_VOID, NV_SINT32); +static NV_API_CALL NV_SINT32 nve_osdelay(PNV_VOID, NV_UINT32); +static NV_API_CALL NV_SINT32 nve_osallocrxbuf(PNV_VOID, PMEMORY_BLOCK, PNV_VOID *); +static NV_API_CALL NV_SINT32 nve_osfreerxbuf(PNV_VOID, PMEMORY_BLOCK, PNV_VOID); +static NV_API_CALL NV_SINT32 nve_ospackettx(PNV_VOID, PNV_VOID, NV_UINT32); +static NV_API_CALL NV_SINT32 nve_ospacketrx(PNV_VOID, PNV_VOID, NV_UINT32, NV_UINT8 *, NV_UINT8); +static NV_API_CALL NV_SINT32 nve_oslinkchg(PNV_VOID, NV_SINT32); +static NV_API_CALL NV_SINT32 nve_osalloctimer(PNV_VOID, PNV_VOID *); +static NV_API_CALL NV_SINT32 nve_osfreetimer(PNV_VOID, PNV_VOID); +static NV_API_CALL NV_SINT32 nve_osinittimer(PNV_VOID, PNV_VOID, PTIMER_FUNC, PNV_VOID); +static NV_API_CALL NV_SINT32 nve_ossettimer(PNV_VOID, PNV_VOID, NV_UINT32); +static NV_API_CALL NV_SINT32 nve_oscanceltimer(PNV_VOID, PNV_VOID); + +static NV_API_CALL NV_SINT32 nve_ospreprocpkt(PNV_VOID, PNV_VOID, PNV_VOID *, NV_UINT8 *, NV_UINT8); +static NV_API_CALL PNV_VOID nve_ospreprocpktnopq(PNV_VOID, PNV_VOID); +static NV_API_CALL NV_SINT32 nve_osindicatepkt(PNV_VOID, PNV_VOID *, NV_UINT32); +static NV_API_CALL NV_SINT32 nve_oslockalloc(PNV_VOID, NV_SINT32, PNV_VOID *); +static NV_API_CALL NV_SINT32 nve_oslockacquire(PNV_VOID, NV_SINT32, PNV_VOID); +static NV_API_CALL NV_SINT32 nve_oslockrelease(PNV_VOID, NV_SINT32, PNV_VOID); +static NV_API_CALL PNV_VOID nve_osreturnbufvirt(PNV_VOID, PNV_VOID); static device_method_t nve_methods[] = { /* Device interface */ @@ -1342,7 +1342,7 @@ nve_watchdog(struct nve_softc *sc) /* --- Start of NVOSAPI interface --- */ /* Allocate DMA enabled general use memory for API */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osalloc(PNV_VOID ctx, PMEMORY_BLOCK mem) { struct nve_softc *sc; @@ -1370,7 +1370,7 @@ nve_osalloc(PNV_VOID ctx, PMEMORY_BLOCK } /* Free allocated memory */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osfree(PNV_VOID ctx, PMEMORY_BLOCK mem) { DEBUGOUT(NVE_DEBUG_API, "nve: nve_osfree - 0x%x - %d\n", @@ -1381,7 +1381,7 @@ nve_osfree(PNV_VOID ctx, PMEMORY_BLOCK m } /* Copied directly from nvnet.c */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osallocex(PNV_VOID ctx, PMEMORY_BLOCKEX mem_block_ex) { MEMORY_BLOCK mem_block; @@ -1427,7 +1427,7 @@ nve_osallocex(PNV_VOID ctx, PMEMORY_BLOC } /* Copied directly from nvnet.c */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osfreeex(PNV_VOID ctx, PMEMORY_BLOCKEX mem_block_ex) { MEMORY_BLOCK mem_block; @@ -1442,7 +1442,7 @@ nve_osfreeex(PNV_VOID ctx, PMEMORY_BLOCK } /* Clear memory region */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osclear(PNV_VOID ctx, PNV_VOID mem, NV_SINT32 length) { DEBUGOUT(NVE_DEBUG_API, "nve: nve_osclear\n"); @@ -1451,7 +1451,7 @@ nve_osclear(PNV_VOID ctx, PNV_VOID mem, } /* Sleep for a tick */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osdelay(PNV_VOID ctx, NV_UINT32 usec) { DELAY(usec); @@ -1459,7 +1459,7 @@ nve_osdelay(PNV_VOID ctx, NV_UINT32 usec } /* Allocate memory for rx buffer */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osallocrxbuf(PNV_VOID ctx, PMEMORY_BLOCK mem, PNV_VOID *id) { struct nve_softc *sc = ctx; @@ -1515,7 +1515,7 @@ fail: } /* Free the rx buffer */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osfreerxbuf(PNV_VOID ctx, PMEMORY_BLOCK mem, PNV_VOID id) { struct nve_softc *sc = ctx; @@ -1539,7 +1539,7 @@ nve_osfreerxbuf(PNV_VOID ctx, PMEMORY_BL } /* This gets called by the Nvidia API after our TX packet has been sent */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_ospackettx(PNV_VOID ctx, PNV_VOID id, NV_UINT32 success) { struct nve_softc *sc = ctx; @@ -1578,7 +1578,7 @@ fail: /* This gets called by the Nvidia API when a new packet has been received */ /* XXX What is newbuf used for? XXX */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_ospacketrx(PNV_VOID ctx, PNV_VOID data, NV_UINT32 success, NV_UINT8 *newbuf, NV_UINT8 priority) { @@ -1636,7 +1636,7 @@ nve_ospacketrx(PNV_VOID ctx, PNV_VOID da } /* This gets called by NVIDIA API when the PHY link state changes */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_oslinkchg(PNV_VOID ctx, NV_SINT32 enabled) { @@ -1646,7 +1646,7 @@ nve_oslinkchg(PNV_VOID ctx, NV_SINT32 en } /* Setup a watchdog timer */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osalloctimer(PNV_VOID ctx, PNV_VOID *timer) { struct nve_softc *sc = (struct nve_softc *)ctx; @@ -1660,7 +1660,7 @@ nve_osalloctimer(PNV_VOID ctx, PNV_VOID } /* Free the timer */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osfreetimer(PNV_VOID ctx, PNV_VOID timer) { @@ -1672,7 +1672,7 @@ nve_osfreetimer(PNV_VOID ctx, PNV_VOID t } /* Setup timer parameters */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osinittimer(PNV_VOID ctx, PNV_VOID timer, PTIMER_FUNC func, PNV_VOID parameters) { struct nve_softc *sc = (struct nve_softc *)ctx; @@ -1686,7 +1686,7 @@ nve_osinittimer(PNV_VOID ctx, PNV_VOID t } /* Set the timer to go off */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_ossettimer(PNV_VOID ctx, PNV_VOID timer, NV_UINT32 delay) { struct nve_softc *sc = ctx; @@ -1700,7 +1700,7 @@ nve_ossettimer(PNV_VOID ctx, PNV_VOID ti } /* Cancel the timer */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_oscanceltimer(PNV_VOID ctx, PNV_VOID timer) { @@ -1711,7 +1711,7 @@ nve_oscanceltimer(PNV_VOID ctx, PNV_VOID return (1); } -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_ospreprocpkt(PNV_VOID ctx, PNV_VOID readdata, PNV_VOID *id, NV_UINT8 *newbuffer, NV_UINT8 priority) { @@ -1722,7 +1722,7 @@ nve_ospreprocpkt(PNV_VOID ctx, PNV_VOID return (1); } -static PNV_VOID +static NV_API_CALL PNV_VOID nve_ospreprocpktnopq(PNV_VOID ctx, PNV_VOID readdata) { @@ -1732,7 +1732,7 @@ nve_ospreprocpktnopq(PNV_VOID ctx, PNV_V return (NULL); } -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_osindicatepkt(PNV_VOID ctx, PNV_VOID *id, NV_UINT32 pktno) { @@ -1743,7 +1743,7 @@ nve_osindicatepkt(PNV_VOID ctx, PNV_VOID } /* Allocate mutex context (already done in nve_attach) */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_oslockalloc(PNV_VOID ctx, NV_SINT32 type, PNV_VOID *pLock) { struct nve_softc *sc = (struct nve_softc *)ctx; @@ -1756,7 +1756,7 @@ nve_oslockalloc(PNV_VOID ctx, NV_SINT32 } /* Obtain a spin lock */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_oslockacquire(PNV_VOID ctx, NV_SINT32 type, PNV_VOID lock) { @@ -1766,7 +1766,7 @@ nve_oslockacquire(PNV_VOID ctx, NV_SINT3 } /* Release lock */ -static NV_SINT32 +static NV_API_CALL NV_SINT32 nve_oslockrelease(PNV_VOID ctx, NV_SINT32 type, PNV_VOID lock) { @@ -1776,7 +1776,7 @@ nve_oslockrelease(PNV_VOID ctx, NV_SINT3 } /* I have no idea what this is for */ -static PNV_VOID +static NV_API_CALL PNV_VOID nve_osreturnbufvirt(PNV_VOID ctx, PNV_VOID readdata) {