[arch-commits] Commit in martian/trunk (PKGBUILD fastcall.patch)
Thomas Baechler
thomas at archlinux.org
Fri Jun 6 17:42:21 UTC 2008
Date: Friday, June 6, 2008 @ 13:42:20
Author: thomas
Revision: 2542
upgpkg: martian 20061203-13
Added:
martian/trunk/fastcall.patch
Modified:
martian/trunk/PKGBUILD
----------------+
PKGBUILD | 28 ++++------
fastcall.patch | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 160 insertions(+), 16 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2008-06-06 15:00:54 UTC (rev 2541)
+++ PKGBUILD 2008-06-06 17:42:20 UTC (rev 2542)
@@ -4,35 +4,31 @@
pkgname=martian
pkgver=20061203
-pkgrel=12
+pkgrel=13
license=("GPL" "custom:Agere Systems license")
arch=('i686')
-_kernver=2.6.24-ARCH
+_kernver=2.6.25-ARCH
pkgdesc="Alternative drivers for the Mars chipset Lucent LT Winmodem (PCI). For stock kernel26"
url="http://martian.barrelsoutofbond.org/"
install=martian.install
-source=(http://www.barrelsoutofbond.org/downloads/martian/martian-full-${pkgver}.tar.gz martian.rc.d
- kernel-2.6.24.patch)
-depends=('kernel26>=2.6.24.3-4' 'kernel26<=2.6.25-0' 'glibc' 'martian-utils')
+source=(http://www.barrelsoutofbond.org/downloads/martian/martian-full-${pkgver}.tar.gz
+ kernel-2.6.24.patch
+ fastcall.patch)
+depends=('kernel26>=2.6.25.3-1' 'kernel26<2.6.26' 'glibc' 'martian-utils')
options=('!strip')
replaces=('ltmodem')
-
+md5sums=('599dcd2441ce996bb466853cb95b9ec9'
+ 'c32376163dbc453a0488f5f9734f96c4'
+ '80d01bef7c0bed9f4fc61fb0e663124b')
+
build() {
#Build
cd $startdir/src/martian
patch -Np0 -i ../kernel-2.6.24.patch || return 1
+ patch -Np1 -i ../fastcall.patch || return 1
sed -i -e "s#\$(shell uname -r)#$_kernver#g" $startdir/src/martian/kmodule/Makefile
cd $startdir/src/martian && make KERNEL_DIR=/usr/src/linux-${_kernver} all || return 1
-#Install kernel modules
+ #Install kernel modules
install -D -m 644 $startdir/src/martian/kmodule/martian_dev.ko $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/net/martian_dev.ko
-
-#install helper app
-# install -D -m 755 $startdir/src/martian/helper/martian_helper $startdir/pkg/usr/sbin/martian_helper
-
-#Install rc script
-# install -D -m 755 $startdir/src/martian.rc.d $startdir/pkg/etc/rc.d/martian
-#
-# sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/martian.install
}
-
Added: fastcall.patch
===================================================================
--- fastcall.patch (rev 0)
+++ fastcall.patch 2008-06-06 17:42:20 UTC (rev 2542)
@@ -0,0 +1,148 @@
+diff -ru martian.orig/kmodule/marsio.c martian/kmodule/marsio.c
+--- martian.orig/kmodule/marsio.c 2006-12-01 13:13:01.000000000 +1100
++++ martian/kmodule/marsio.c 2008-06-06 20:26:32.000000000 +1000
+@@ -4,7 +4,7 @@
+ #include "kmartian.h"
+ #include "../martian.h"
+
+-u8 fastcall mars_read_register (struct martian_common *common, u8 reg)
++u8 __attribute__((fastcall)) mars_read_register (struct martian_common *common, u8 reg)
+ {
+ outb ( reg,
+
+@@ -16,13 +16,13 @@
+ return inb (common->BaseAddressData);
+ }
+
+-void fastcall mars_write_register (struct martian_common *common, u8 reg, u8 val)
++void __attribute__((fastcall)) mars_write_register (struct martian_common *common, u8 reg, u8 val)
+ {
+ outb (reg, common->BaseAddress);
+ return outb (val, common->BaseAddressData);
+ }
+
+-void fastcall mars_write_word (struct martian_common *common, u16 addr, u16 val)
++void __attribute__((fastcall)) mars_write_word (struct martian_common *common, u16 addr, u16 val)
+ {
+ addr = common->BaseAddress + addr;
+ outw (val, addr);
+@@ -248,7 +248,7 @@
+ // ASSERT (mfifo_ok(&mdev->dce_tx), mcb->kfifo_tx_bad++;);
+ }
+
+-int fastcall process_stream (struct martian *mdev) {
++int __attribute__((fastcall)) process_stream (struct martian *mdev) {
+ struct martian_common *mcb = mdev->common;
+ u32 io_dce_rx_rptr = mcb->io_dce_rx_rptr;
+ u32 io_dce_rx_wptr = mcb->io_dce_rx_wptr;
+diff -ru martian.orig/kmodule/marsio.h martian/kmodule/marsio.h
+--- martian.orig/kmodule/marsio.h 2006-07-20 11:57:08.000000000 +1000
++++ martian/kmodule/marsio.h 2008-06-06 20:26:54.000000000 +1000
+@@ -5,9 +5,9 @@
+ #ifndef __MARSIO_H
+ #define __MARSIO_H
+
+-u8 FASTCALL( mars_read_register (struct martian_common *common, u8 reg) );
+-void FASTCALL( mars_write_register (struct martian_common *common, u8 reg, u8 val) );
+-void FASTCALL( mars_write_word (struct martian_common *common, u16 addr, u16 val) );
+-int FASTCALL( process_stream (struct martian *mdev) );
++u8 __attribute__((fastcall))( mars_read_register (struct martian_common *common, u8 reg) );
++void __attribute__((fastcall))( mars_write_register (struct martian_common *common, u8 reg, u8 val) );
++void __attribute__((fastcall))( mars_write_word (struct martian_common *common, u16 addr, u16 val) );
++int __attribute__((fastcall))( process_stream (struct martian *mdev) );
+
+ #endif // __MARSIO_H
+diff -ru martian.orig/kmodule/mfifo.c martian/kmodule/mfifo.c
+--- martian.orig/kmodule/mfifo.c 2006-07-23 17:07:40.000000000 +1000
++++ martian/kmodule/mfifo.c 2008-06-06 20:27:12.000000000 +1000
+@@ -1,22 +1,22 @@
+ #include "mfifo.h"
+ #include <linux/string.h>
+
+-static void fastcall mfifo_wrap_bin (mfifo_t *fifo, int *ending) {
++static void __attribute__((fastcall)) mfifo_wrap_bin (mfifo_t *fifo, int *ending) {
+ *ending &= fifo->mask;
+ }
+
+-static int fastcall mfifo_space_bin (mfifo_t *fifo) {
++static int __attribute__((fastcall)) mfifo_space_bin (mfifo_t *fifo) {
+ return CIRC_SPACE (fifo->head, fifo->tail, fifo->size);
+ }
+
+-static void fastcall mfifo_wrap_gen (mfifo_t *fifo, int *ending) {
++static void __attribute__((fastcall)) mfifo_wrap_gen (mfifo_t *fifo, int *ending) {
+ if (*ending >= fifo->size)
+ *ending %= fifo->size;
+ else if (*ending < 0)
+ *ending = (*ending % fifo->size) + fifo->size;
+ }
+
+-static int fastcall mfifo_space_gen (mfifo_t *fifo) {
++static int __attribute__((fastcall)) mfifo_space_gen (mfifo_t *fifo) {
+ int head = fifo->head + 1;
+ int tail = (fifo->tail >= head) ? fifo->tail
+ : fifo->tail + fifo->size;
+@@ -25,36 +25,36 @@
+ }
+
+ /* set to the head */
+-static void fastcall mfifo_setu8 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_setu8 (mfifo_t *fifo, void *e) {
+ ((u8 *) fifo->buf) [fifo->head] = * (u8 *) e;
+ }
+
+-static void fastcall mfifo_setu16 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_setu16 (mfifo_t *fifo, void *e) {
+ ((u16 *) fifo->buf) [fifo->head] = * (u16 *) e;
+ }
+
+-static void fastcall mfifo_setu32 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_setu32 (mfifo_t *fifo, void *e) {
+ ((u32 *) fifo->buf) [fifo->head] = * (u32 *) e;
+ }
+
+-static void fastcall mfifo_setgen (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_setgen (mfifo_t *fifo, void *e) {
+ memcpy (fifo->head * fifo->esize + (char *) fifo->buf, e, fifo->esize);
+ }
+
+ /* get from tail */
+-static void fastcall mfifo_getu8 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_getu8 (mfifo_t *fifo, void *e) {
+ * (u8 *) e = ((u8 *) fifo->buf) [fifo->tail];
+ }
+
+-static void fastcall mfifo_getu16 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_getu16 (mfifo_t *fifo, void *e) {
+ * (u16 *) e = ((u16 *) fifo->buf) [fifo->tail];
+ }
+
+-static void fastcall mfifo_getu32 (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_getu32 (mfifo_t *fifo, void *e) {
+ * (u32 *) e = ((u32 *) fifo->buf) [fifo->tail];
+ }
+
+-static void fastcall mfifo_getgen (mfifo_t *fifo, void *e) {
++static void __attribute__((fastcall)) mfifo_getgen (mfifo_t *fifo, void *e) {
+ memcpy (e, fifo->tail * fifo->esize + (char *) fifo->buf, fifo->esize);
+ }
+
+diff -ru martian.orig/kmodule/mfifo.h martian/kmodule/mfifo.h
+--- martian.orig/kmodule/mfifo.h 2006-11-29 08:34:26.000000000 +1100
++++ martian/kmodule/mfifo.h 2008-06-06 20:27:20.000000000 +1000
+@@ -15,11 +15,11 @@
+ typedef struct _mfifo mfifo_t;
+
+ struct mfifo_ops {
+- void fastcall (*set) (mfifo_t *fifo, void *el);
+- void fastcall (*get) (mfifo_t *fifo, void *el);
++ void __attribute__((fastcall)) (*set) (mfifo_t *fifo, void *el);
++ void __attribute__((fastcall)) (*get) (mfifo_t *fifo, void *el);
+
+- void FASTCALL ((*wrap) (mfifo_t *fifo, int *ending) );
+- int FASTCALL ( (*space) (mfifo_t *fifo) );
++ void __attribute__((fastcall)) ((*wrap) (mfifo_t *fifo, int *ending) );
++ int __attribute__((fastcall)) ( (*space) (mfifo_t *fifo) );
+ };
+
+ struct _mfifo {
More information about the arch-commits
mailing list