Commit 5aff06e5 authored by David S. Miller's avatar David S. Miller

Merge nuts.davemloft.net:/disk1/BK/sparcwork-2.6

into nuts.davemloft.net:/disk1/BK/sparc-2.6
parents 59db5830 c75b4c2a
......@@ -56,9 +56,6 @@ int smp_activated = 0;
volatile int __cpu_number_map[NR_CPUS];
volatile int __cpu_logical_map[NR_CPUS];
cycles_t cacheflush_time = 0; /* XXX */
spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = {
[0 ... (ATOMIC_HASH_SIZE-1)] = SPIN_LOCK_UNLOCKED
};
/* The only guaranteed locking primitive available on all Sparc
* processors is 'ldstub [%reg + immediate], %dest_reg' which atomically
......
......@@ -7,5 +7,5 @@ EXTRA_AFLAGS := -ansi -DST_DIV0=0x02
lib-y := mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o memcpy.o memset.o \
strlen.o checksum.o blockops.o memscan.o memcmp.o strncmp.o \
strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \
copy_user.o locks.o atomic.o bitops.o debuglocks.o lshrdi3.o \
ashldi3.o rwsem.o muldi3.o bitext.o
copy_user.o locks.o atomic.o atomic32.o bitops.o debuglocks.o \
lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o
/*
* atomic32.c: 32-bit atomic_t implementation
*
* Copyright (C) 2004 Keith M Wesolowski
*
* Based on asm-parisc/atomic.h Copyright (C) 2000 Philipp Rumpf
*/
#include <asm/atomic.h>
#include <linux/spinlock.h>
#include <linux/module.h>
#ifdef CONFIG_SMP
#define ATOMIC_HASH_SIZE 4
#define ATOMIC_HASH(a) (&__atomic_hash[(((unsigned long)a)>>8) & (ATOMIC_HASH_SIZE-1)])
spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = {
[0 ... (ATOMIC_HASH_SIZE-1)] = SPIN_LOCK_UNLOCKED
};
#else /* SMP */
#define ATOMIC_HASH_SIZE 1
#define ATOMIC_HASH(a) 0
#endif /* SMP */
int __atomic_add_return(int i, atomic_t *v)
{
int ret;
unsigned long flags;
spin_lock_irqsave(ATOMIC_HASH(v), flags);
ret = (v->counter += i);
spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
return ret;
}
void atomic_set(atomic_t *v, int i)
{
unsigned long flags;
spin_lock_irqsave(ATOMIC_HASH(v), flags);
v->counter = i;
spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
}
EXPORT_SYMBOL(__atomic_add_return);
EXPORT_SYMBOL(atomic_set);
......@@ -120,6 +120,7 @@ CONFIG_FB=y
CONFIG_FB_CG6=y
# CONFIG_FB_RIVA is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON_OLD is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
......@@ -233,6 +234,7 @@ CONFIG_IDE_TASKFILE_IO=y
#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set
# CONFIG_BLK_DEV_OFFBOARD is not set
......@@ -253,6 +255,7 @@ CONFIG_BLK_DEV_CY82C693=m
CONFIG_BLK_DEV_CS5520=m
CONFIG_BLK_DEV_CS5530=m
CONFIG_BLK_DEV_HPT34X=m
# CONFIG_HPT34X_AUTODMA is not set
CONFIG_BLK_DEV_HPT366=m
CONFIG_BLK_DEV_SC1200=m
CONFIG_BLK_DEV_PIIX=m
......@@ -340,15 +343,16 @@ CONFIG_SCSI_QLOGIC_FC=y
CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
# CONFIG_SCSI_QLOGIC_1280 is not set
CONFIG_SCSI_QLOGICPTI=m
CONFIG_SCSI_QLA2XXX_CONFIG=y
CONFIG_SCSI_QLA2XXX=m
CONFIG_SCSI_QLA21XX=m
CONFIG_SCSI_QLA22XX=m
CONFIG_SCSI_QLA23XX=m
CONFIG_SCSI_QLA2XXX=y
# CONFIG_SCSI_QLA21XX is not set
# CONFIG_SCSI_QLA22XX is not set
# CONFIG_SCSI_QLA2300 is not set
# CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_QLA6312 is not set
# CONFIG_SCSI_QLA6322 is not set
CONFIG_SCSI_DC395x=m
CONFIG_SCSI_DC390T=m
# CONFIG_SCSI_DC390T_NOGENSUPP is not set
# CONFIG_SCSI_NSP32 is not set
CONFIG_SCSI_DEBUG=m
CONFIG_SCSI_SUNESP=y
......@@ -382,6 +386,7 @@ CONFIG_MD_RAID6=m
CONFIG_MD_MULTIPATH=m
CONFIG_BLK_DEV_DM=m
# CONFIG_DM_IOCTL_V4 is not set
CONFIG_DM_CRYPT=m
#
# Fusion MPT device support
......@@ -615,7 +620,6 @@ CONFIG_XFRM_USER=m
#
CONFIG_IPV6_SCTP__=m
CONFIG_IP_SCTP=m
# CONFIG_SCTP_ADLER32 is not set
# CONFIG_SCTP_DBG_MSG is not set
# CONFIG_SCTP_DBG_OBJCNT is not set
# CONFIG_SCTP_HMAC_NONE is not set
......@@ -649,6 +653,7 @@ CONFIG_NET_DIVERT=y
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
CONFIG_NET_SCH_HFSC=m
CONFIG_NET_SCH_CSZ=m
CONFIG_NET_SCH_ATM=y
CONFIG_NET_SCH_PRIO=m
......@@ -709,6 +714,8 @@ CONFIG_DE2104X=m
CONFIG_TULIP=m
# CONFIG_TULIP_MWI is not set
# CONFIG_TULIP_MMIO is not set
CONFIG_TULIP_NAPI=y
CONFIG_TULIP_NAPI_HW_MITIGATION=y
CONFIG_DE4X5=m
CONFIG_WINBOND_840=m
# CONFIG_DM9102 is not set
......@@ -733,6 +740,7 @@ CONFIG_8139TOO=m
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set
# CONFIG_8139_OLD_RX_RESET is not set
CONFIG_8139_RXBUF_IDX=1
CONFIG_SIS900=m
CONFIG_EPIC100=m
CONFIG_SUNDANCE=m
......@@ -800,6 +808,8 @@ CONFIG_HERMES=m
CONFIG_PLX_HERMES=m
CONFIG_TMD_HERMES=m
CONFIG_PCI_HERMES=m
CONFIG_ATMEL=m
CONFIG_PCI_ATMEL=m
CONFIG_NET_WIRELESS=y
#
......@@ -904,6 +914,7 @@ CONFIG_IRDA_FAST_RR=y
# FIR device drivers
#
# CONFIG_USB_IRDA is not set
CONFIG_SIGMATEL_FIR=m
# CONFIG_TOSHIBA_FIR is not set
# CONFIG_VLSI_FIR is not set
......@@ -936,17 +947,20 @@ CONFIG_BT_HCIVHCI=m
#
# ISDN subsystem
#
CONFIG_ISDN_BOOL=y
CONFIG_ISDN=m
#
# Old ISDN4Linux
#
# CONFIG_ISDN_I4L is not set
#
# CAPI subsystem
#
CONFIG_ISDN_CAPI=m
CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
CONFIG_ISDN_CAPI_MIDDLEWARE=y
# CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON is not set
# CONFIG_ISDN_CAPI_MIDDLEWARE is not set
CONFIG_ISDN_CAPI_CAPI20=m
CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
CONFIG_ISDN_CAPI_CAPIFS=m
#
# CAPI hardware drivers
......@@ -955,12 +969,18 @@ CONFIG_ISDN_CAPI_CAPIFS=m
#
# Active AVM cards
#
# CONFIG_CAPI_AVM is not set
CONFIG_CAPI_AVM=y
#
# Active Eicon DIVA Server cards
#
# CONFIG_CAPI_EICON is not set
CONFIG_CAPI_EICON=y
CONFIG_ISDN_DIVAS=m
CONFIG_ISDN_DIVAS_BRIPCI=y
CONFIG_ISDN_DIVAS_PRIPCI=y
CONFIG_ISDN_DIVAS_DIVACAPI=m
CONFIG_ISDN_DIVAS_USERIDI=m
CONFIG_ISDN_DIVAS_MAINT=m
#
# Telephony Support
......@@ -1080,6 +1100,8 @@ CONFIG_I2C_SENSOR=m
CONFIG_SENSORS_ADM1021=m
CONFIG_SENSORS_ASB100=m
CONFIG_SENSORS_EEPROM=m
CONFIG_SENSORS_FSCHER=m
CONFIG_SENSORS_GL518SM=m
CONFIG_SENSORS_IT87=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_LM78=m
......@@ -1100,11 +1122,11 @@ CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=m
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_JBD=m
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
......@@ -1116,6 +1138,7 @@ CONFIG_FS_POSIX_ACL=y
CONFIG_XFS_FS=m
# CONFIG_XFS_RT is not set
CONFIG_XFS_QUOTA=y
CONFIG_XFS_SECURITY=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_MINIX_FS=m
CONFIG_ROMFS_FS=m
......@@ -1145,7 +1168,9 @@ CONFIG_VFAT_FS=m
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVFS_FS=y
CONFIG_DEVFS_MOUNT=y
# CONFIG_DEVFS_DEBUG is not set
CONFIG_DEVPTS_FS=y
CONFIG_DEVPTS_FS_XATTR=y
# CONFIG_DEVPTS_FS_SECURITY is not set
......@@ -1205,7 +1230,6 @@ CONFIG_NCP_FS=m
# CONFIG_NCPFS_EXTRAS is not set
CONFIG_CODA_FS=m
# CONFIG_CODA_FS_OLD_API is not set
# CONFIG_INTERMEZZO_FS is not set
CONFIG_AFS_FS=m
CONFIG_RXRPC=m
......@@ -1386,6 +1410,7 @@ CONFIG_SND_VIRMIDI=m
#
CONFIG_SND_ALI5451=m
CONFIG_SND_AZT3328=m
CONFIG_SND_BT87X=m
CONFIG_SND_CS46XX=m
# CONFIG_SND_CS46XX_NEW_DSP is not set
CONFIG_SND_CS4281=m
......@@ -1488,7 +1513,6 @@ CONFIG_USB_KBTAB=m
# USB Imaging devices
#
CONFIG_USB_MDC800=m
CONFIG_USB_SCANNER=m
CONFIG_USB_MICROTEK=m
CONFIG_USB_HPUSBSCSI=m
......@@ -1594,12 +1618,29 @@ CONFIG_USB_LCD=m
CONFIG_USB_LED=m
CONFIG_USB_SPEEDTOUCH=m
CONFIG_USB_TEST=m
#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
# Watchdog
# Watchdog Cards
#
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set
#
# Watchdog Device Drivers
#
CONFIG_SOFT_WATCHDOG=m
#
# PCI-based Watchdog Cards
#
# CONFIG_SOFT_WATCHDOG is not set
CONFIG_PCIPCWATCHDOG=m
CONFIG_WDTPCI=m
CONFIG_WDT_501_PCI=y
#
# Profiling support
......@@ -1619,6 +1660,7 @@ CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_DCFLUSH is not set
# CONFIG_DEBUG_INFO is not set
# CONFIG_STACK_DEBUG is not set
# CONFIG_DEBUG_BOOTMEM is not set
CONFIG_HAVE_DEC_LOCK=y
#
......
......@@ -38,11 +38,11 @@
#include <asm/io.h>
#define DEFAULT_BASE 0x378
static int base=0;
static long base=0;
static unsigned char port_data = 0;
/* --- Convenience defines for the parallel port: */
#define BASE (unsigned int)(data)
#define BASE (unsigned long)(data)
#define DATA BASE /* Centronics data port */
#define STAT (BASE+1) /* Centronics status port */
#define CTRL (BASE+2) /* Centronics control port */
......
......@@ -124,7 +124,7 @@ static int bit_savi2c_getsda(void *data)
static int config_s4(struct pci_dev *dev)
{
unsigned int cadr;
unsigned long cadr;
/* map memory */
cadr = dev->resource[0].start;
......
......@@ -44,13 +44,13 @@
/* --- Convenience defines for the parallel port: */
#define BASE (unsigned int)(data)
#define BASE (unsigned long)(data)
#define DATA BASE /* Centronics data port */
#define STAT (BASE+1) /* Centronics status port */
#define CTRL (BASE+2) /* Centronics control port */
#define DEFAULT_BASE 0x378
static int base=0;
static long base=0;
/* ----- local functions --------------------------------------------------- */
......
......@@ -144,7 +144,7 @@ static int bit_vooddc_getsda(void *data)
static int config_v3(struct pci_dev *dev)
{
unsigned int cadr;
unsigned long cadr;
/* map Voodoo3 memory */
cadr = dev->resource[0].start;
......
......@@ -383,7 +383,7 @@ struct lm85_data {
u8 syncpwm3; /* Saved PWM3 for TACH 2,3,4 config */
u8 oppoint[3]; /* Register value */
u16 tmin_ctl; /* Register value */
u32 therm_total; /* Cummulative therm count */
unsigned long therm_total; /* Cummulative therm count */
u8 therm_limit; /* Register value */
u16 alarms; /* Register encoding, combined */
struct lm85_autofan autofan[3];
......
......@@ -1149,8 +1149,8 @@ static int dst_attach (struct dvb_i2c_bus *i2c, void **data)
}
dst_init (dst);
dprintk("%s: register dst %8.8x bt %8.8x i2c %8.8x\n", __FUNCTION__,
(u32)dst, (u32)(dst->bt), (u32)(dst->i2c));
dprintk("%s: register dst %p bt %p i2c %p\n", __FUNCTION__,
dst, dst->bt, dst->i2c);
info = &dst_info_sat;
if (dst->dst_type == DST_TYPE_IS_TERR)
......@@ -1166,7 +1166,7 @@ static int dst_attach (struct dvb_i2c_bus *i2c, void **data)
static void dst_detach (struct dvb_i2c_bus *i2c, void *data)
{
dvb_unregister_frontend (dst_ioctl, i2c);
dprintk("%s: unregister dst %8.8x\n", __FUNCTION__, (u32)(data));
dprintk("%s: unregister dst %p\n", __FUNCTION__, data);
if (data)
kfree(data);
}
......
......@@ -1186,7 +1186,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
firmware_size = fw_entry->size;
if (firmware_size < 60) {
printk("%s: firmware size too small for DSP code (%u < 60).\n",
printk("%s: firmware size too small for DSP code (%zu < 60).\n",
__FUNCTION__, firmware_size);
return -1;
}
......
......@@ -217,7 +217,7 @@ static int skfp_init_one(struct pci_dev *pdev,
{
struct net_device *dev;
struct s_smc *smc; /* board pointer */
u32 port, len;
unsigned long port, len;
int err;
PRINTK(KERN_INFO "entering skfp_init_one\n");
......@@ -240,7 +240,7 @@ static int skfp_init_one(struct pci_dev *pdev,
len = pci_resource_len(pdev, 0);
if (len < 0x4000) {
printk(KERN_ERR "skfp: Invalid PCI region size: %d\n", len);
printk(KERN_ERR "skfp: Invalid PCI region size: %lu\n", len);
err = -EIO;
goto err_out1;
}
......
......@@ -987,7 +987,7 @@ static void tx_timeout(struct net_device *dev)
int i;
for (i=0; i<TX_RING_SIZE; i++) {
printk(KERN_DEBUG "%02x %08llx %08x %08x(%02x) %08x %08x\n", i,
(unsigned long long)np->tx_ring_dma + i*sizeof(*np->tx_ring),
(unsigned long long)(np->tx_ring_dma + i*sizeof(*np->tx_ring)),
le32_to_cpu(np->tx_ring[i].next_desc),
le32_to_cpu(np->tx_ring[i].status),
(le32_to_cpu(np->tx_ring[i].status) >> 2) & 0xff,
......@@ -1673,7 +1673,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
case SIOCDEVPRIVATE:
for (i=0; i<TX_RING_SIZE; i++) {
printk(KERN_DEBUG "%02x %08llx %08x %08x(%02x) %08x %08x\n", i,
(unsigned long long)np->tx_ring_dma + i*sizeof(*np->tx_ring),
(unsigned long long)(np->tx_ring_dma + i*sizeof(*np->tx_ring)),
le32_to_cpu(np->tx_ring[i].next_desc),
le32_to_cpu(np->tx_ring[i].status),
(le32_to_cpu(np->tx_ring[i].status) >> 2)
......
......@@ -820,7 +820,7 @@ static void w9968cf_urb_complete(struct urb *urb, struct pt_regs *regs)
(*f)->length = cam->frame_tmp.length;
memcpy((*f)->buffer, cam->frame_tmp.buffer,
(*f)->length);
DBG(6, "Switched from temp. frame to frame #%d",
DBG(6, "Switched from temp. frame to frame #%zd",
(*f) - &cam->frame[0])
}
}
......@@ -858,7 +858,7 @@ static void w9968cf_urb_complete(struct urb *urb, struct pt_regs *regs)
} else if ((*f)->status == F_GRABBING) { /* end of frame */
DBG(6, "Frame #%d successfully grabbed.",
DBG(6, "Frame #%zd successfully grabbed.",
((*f)==&cam->frame_tmp ? -1 : (*f)-&cam->frame[0]))
if (cam->vpp_flag & VPP_DECOMPRESSION) {
......@@ -2075,7 +2075,7 @@ w9968cf_pop_frame(struct w9968cf_device* cam, struct w9968cf_frame_t** framep)
spin_unlock(&cam->flist_lock);
DBG(6,"Popped frame #%d from the list.",*framep-&cam->frame[0])
DBG(6,"Popped frame #%zd from the list.",*framep-&cam->frame[0])
}
......@@ -2830,7 +2830,7 @@ w9968cf_read(struct file* filp, char* buf, size_t count, loff_t* f_pos)
fr->status = F_UNUSED;
DBG(5, "%d bytes read.", count)
DBG(5, "%zd bytes read.", count)
up(&cam->fileop_sem);
return count;
......@@ -3506,7 +3506,7 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
kmalloc(sizeof(struct w9968cf_device), GFP_KERNEL);
if (!cam) {
DBG(1, "Couldn't allocate %d bytes of kernel memory.",
DBG(1, "Couldn't allocate %zd bytes of kernel memory.",
sizeof(struct w9968cf_device))
err = -ENOMEM;
goto fail;
......
......@@ -167,7 +167,9 @@ vxfs_bmap_indir(struct inode *ip, long indir, int size, long block)
printk(KERN_INFO "\n\nTYPED_DEV4 detected!\n");
printk(KERN_INFO "block: %Lu\tsize: %Ld\tdev: %d\n",
typ4->vd4_block, typ4->vd4_size, typ4->vd4_dev);
(unsigned long long) typ4->vd4_block,
(unsigned long long) typ4->vd4_size,
typ4->vd4_dev);
goto fail;
}
default:
......@@ -228,7 +230,9 @@ vxfs_bmap_typed(struct inode *ip, long iblock)
printk(KERN_INFO "\n\nTYPED_DEV4 detected!\n");
printk(KERN_INFO "block: %Lu\tsize: %Ld\tdev: %d\n",
typ4->vd4_block, typ4->vd4_size, typ4->vd4_dev);
(unsigned long long) typ4->vd4_block,
(unsigned long long) typ4->vd4_size,
typ4->vd4_dev);
return 0;
}
default:
......
......@@ -1793,7 +1793,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
unsigned int strhashval;
dprintk("NFSD: nfsd4_lock: start=%Ld length=%Ld\n",
lock->lk_offset, lock->lk_length);
(long long) lock->lk_offset,
(long long) lock->lk_length);
lock->lk_stateowner = NULL;
nfs4_lock_state();
......@@ -2042,7 +2043,8 @@ nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
int status;
dprintk("NFSD: nfsd4_locku: start=%Ld length=%Ld\n",
locku->lu_offset, locku->lu_length);
(long long) locku->lu_offset,
(long long) locku->lu_length);
nfs4_lock_state();
if ((status = nfs4_preprocess_seqid_op(current_fh,
......
......@@ -269,7 +269,7 @@ smb_file_sendfile(struct file *file, loff_t *ppos,
status = smb_revalidate_inode(dentry);
if (status) {
PARANOIA("%s/%s validation failed, error=%d\n",
PARANOIA("%s/%s validation failed, error=%zd\n",
DENTRY_PATH(dentry), status);
goto out;
}
......
......@@ -11,49 +11,16 @@
#define __ARCH_SPARC_ATOMIC__
#include <linux/config.h>
#include <linux/spinlock.h>
typedef struct { volatile int counter; } atomic_t;
#ifdef __KERNEL__
#ifdef CONFIG_SMP
#define ATOMIC_HASH_SIZE 4
#define ATOMIC_HASH(a) (&__atomic_hash[(((unsigned long)a)>>8) & (ATOMIC_HASH_SIZE-1)])
extern spinlock_t __atomic_hash[ATOMIC_HASH_SIZE];
#else /* SMP */
#define ATOMIC_HASH_SIZE 1
#define ATOMIC_HASH(a) 0
#endif /* SMP */
static inline int __atomic_add_return(int i, atomic_t *v)
{
int ret;
unsigned long flags;
spin_lock_irqsave(ATOMIC_HASH(v), flags);
ret = (v->counter += i);
spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
return ret;
}
static inline void atomic_set(atomic_t *v, int i)
{
unsigned long flags;
spin_lock_irqsave(ATOMIC_HASH(v), flags);
v->counter = i;
spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
}
#define ATOMIC_INIT(i) { (i) }
extern int __atomic_add_return(int, atomic_t *);
extern void atomic_set(atomic_t *, int);
#define atomic_read(v) ((v)->counter)
#define atomic_add(i, v) ((void)__atomic_add_return( (int)(i), (v)))
......
......@@ -31,7 +31,7 @@ extern unsigned long pci_memspace_mask;
#define bus_dvma_to_mem(__vaddr) ((__vaddr) & pci_memspace_mask)
static __inline__ u8 inb(unsigned long addr)
static __inline__ u8 _inb(unsigned long addr)
{
u8 ret;
......@@ -42,7 +42,7 @@ static __inline__ u8 inb(unsigned long addr)
return ret;
}
static __inline__ u16 inw(unsigned long addr)
static __inline__ u16 _inw(unsigned long addr)
{
u16 ret;
......@@ -53,7 +53,7 @@ static __inline__ u16 inw(unsigned long addr)
return ret;
}
static __inline__ u32 inl(unsigned long addr)
static __inline__ u32 _inl(unsigned long addr)
{
u32 ret;
......@@ -64,33 +64,40 @@ static __inline__ u32 inl(unsigned long addr)
return ret;
}
static __inline__ void outb(u8 b, unsigned long addr)
static __inline__ void _outb(u8 b, unsigned long addr)
{
__asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */"
: /* no outputs */
: "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L));
}
static __inline__ void outw(u16 w, unsigned long addr)
static __inline__ void _outw(u16 w, unsigned long addr)
{
__asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */"
: /* no outputs */
: "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L));
}
static __inline__ void outl(u32 l, unsigned long addr)
static __inline__ void _outl(u32 l, unsigned long addr)
{
__asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */"
: /* no outputs */
: "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L));
}
#define inb_p inb
#define outb_p outb
#define inw_p inw
#define outw_p outw
#define inl_p inl
#define outl_p outl
#define inb(__addr) (_inb((unsigned long)(__addr)))
#define inw(__addr) (_inw((unsigned long)(__addr)))
#define inl(__addr) (_inl((unsigned long)(__addr)))
#define outb(__b, __addr) (_outb((u8)(__b), (unsigned long)(__addr)))
#define outw(__w, __addr) (_outw((u16)(__w), (unsigned long)(__addr)))
#define outl(__l, __addr) (_outl((u32)(__l), (unsigned long)(__addr)))
#define inb_p(__addr) inb(__addr)
#define outb_p(__b, __addr) outb(__b, __addr)
#define inw_p(__addr) inw(__addr)
#define outw_p(__w, __addr) outw(__w, __addr)
#define inl_p(__addr) inl(__addr)
#define outl_p(__l, __addr) outl(__l, __addr)
extern void outsb(unsigned long addr, const void *src, unsigned long count);
extern void outsw(unsigned long addr, const void *src, unsigned long count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment