Commit e665d185 authored by David S. Miller's avatar David S. Miller

Merge davem@nuts.davemloft.net:/disk1/BK/sparc-2.6

into kernel.bkbits.net:/home/davem/sparc-2.6
parents 67da11af 39cf4035
...@@ -56,9 +56,6 @@ int smp_activated = 0; ...@@ -56,9 +56,6 @@ int smp_activated = 0;
volatile int __cpu_number_map[NR_CPUS]; volatile int __cpu_number_map[NR_CPUS];
volatile int __cpu_logical_map[NR_CPUS]; volatile int __cpu_logical_map[NR_CPUS];
cycles_t cacheflush_time = 0; /* XXX */ 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 /* The only guaranteed locking primitive available on all Sparc
* processors is 'ldstub [%reg + immediate], %dest_reg' which atomically * processors is 'ldstub [%reg + immediate], %dest_reg' which atomically
......
...@@ -7,5 +7,5 @@ EXTRA_AFLAGS := -ansi -DST_DIV0=0x02 ...@@ -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 \ 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 \ strlen.o checksum.o blockops.o memscan.o memcmp.o strncmp.o \
strncpy_from_user.o divdi3.o udivdi3.o strlen_user.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 \ copy_user.o locks.o atomic.o atomic32.o bitops.o debuglocks.o \
ashldi3.o rwsem.o muldi3.o bitext.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 ...@@ -120,6 +120,7 @@ CONFIG_FB=y
CONFIG_FB_CG6=y CONFIG_FB_CG6=y
# CONFIG_FB_RIVA is not set # CONFIG_FB_RIVA is not set
# CONFIG_FB_MATROX is not set # CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON_OLD is not set
# CONFIG_FB_RADEON is not set # CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set # CONFIG_FB_ATY is not set
...@@ -233,6 +234,7 @@ CONFIG_IDE_TASKFILE_IO=y ...@@ -233,6 +234,7 @@ CONFIG_IDE_TASKFILE_IO=y
# #
# IDE chipset support/bugfixes # IDE chipset support/bugfixes
# #
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_IDEPCI_SHARE_IRQ is not set
# CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_OFFBOARD is not set
...@@ -253,6 +255,7 @@ CONFIG_BLK_DEV_CY82C693=m ...@@ -253,6 +255,7 @@ CONFIG_BLK_DEV_CY82C693=m
CONFIG_BLK_DEV_CS5520=m CONFIG_BLK_DEV_CS5520=m
CONFIG_BLK_DEV_CS5530=m CONFIG_BLK_DEV_CS5530=m
CONFIG_BLK_DEV_HPT34X=m CONFIG_BLK_DEV_HPT34X=m
# CONFIG_HPT34X_AUTODMA is not set
CONFIG_BLK_DEV_HPT366=m CONFIG_BLK_DEV_HPT366=m
CONFIG_BLK_DEV_SC1200=m CONFIG_BLK_DEV_SC1200=m
CONFIG_BLK_DEV_PIIX=m CONFIG_BLK_DEV_PIIX=m
...@@ -340,15 +343,16 @@ CONFIG_SCSI_QLOGIC_FC=y ...@@ -340,15 +343,16 @@ CONFIG_SCSI_QLOGIC_FC=y
CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
# CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLOGIC_1280 is not set
CONFIG_SCSI_QLOGICPTI=m CONFIG_SCSI_QLOGICPTI=m
CONFIG_SCSI_QLA2XXX_CONFIG=y CONFIG_SCSI_QLA2XXX=y
CONFIG_SCSI_QLA2XXX=m # CONFIG_SCSI_QLA21XX is not set
CONFIG_SCSI_QLA21XX=m # CONFIG_SCSI_QLA22XX is not set
CONFIG_SCSI_QLA22XX=m # CONFIG_SCSI_QLA2300 is not set
CONFIG_SCSI_QLA23XX=m # CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_QLA6312 is not set
# CONFIG_SCSI_QLA6322 is not set
CONFIG_SCSI_DC395x=m CONFIG_SCSI_DC395x=m
CONFIG_SCSI_DC390T=m CONFIG_SCSI_DC390T=m
# CONFIG_SCSI_DC390T_NOGENSUPP is not set # CONFIG_SCSI_DC390T_NOGENSUPP is not set
# CONFIG_SCSI_NSP32 is not set
CONFIG_SCSI_DEBUG=m CONFIG_SCSI_DEBUG=m
CONFIG_SCSI_SUNESP=y CONFIG_SCSI_SUNESP=y
...@@ -382,6 +386,7 @@ CONFIG_MD_RAID6=m ...@@ -382,6 +386,7 @@ CONFIG_MD_RAID6=m
CONFIG_MD_MULTIPATH=m CONFIG_MD_MULTIPATH=m
CONFIG_BLK_DEV_DM=m CONFIG_BLK_DEV_DM=m
# CONFIG_DM_IOCTL_V4 is not set # CONFIG_DM_IOCTL_V4 is not set
CONFIG_DM_CRYPT=m
# #
# Fusion MPT device support # Fusion MPT device support
...@@ -615,7 +620,6 @@ CONFIG_XFRM_USER=m ...@@ -615,7 +620,6 @@ CONFIG_XFRM_USER=m
# #
CONFIG_IPV6_SCTP__=m CONFIG_IPV6_SCTP__=m
CONFIG_IP_SCTP=m CONFIG_IP_SCTP=m
# CONFIG_SCTP_ADLER32 is not set
# CONFIG_SCTP_DBG_MSG is not set # CONFIG_SCTP_DBG_MSG is not set
# CONFIG_SCTP_DBG_OBJCNT is not set # CONFIG_SCTP_DBG_OBJCNT is not set
# CONFIG_SCTP_HMAC_NONE is not set # CONFIG_SCTP_HMAC_NONE is not set
...@@ -649,6 +653,7 @@ CONFIG_NET_DIVERT=y ...@@ -649,6 +653,7 @@ CONFIG_NET_DIVERT=y
CONFIG_NET_SCHED=y CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HTB=m
CONFIG_NET_SCH_HFSC=m
CONFIG_NET_SCH_CSZ=m CONFIG_NET_SCH_CSZ=m
CONFIG_NET_SCH_ATM=y CONFIG_NET_SCH_ATM=y
CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_PRIO=m
...@@ -709,6 +714,8 @@ CONFIG_DE2104X=m ...@@ -709,6 +714,8 @@ CONFIG_DE2104X=m
CONFIG_TULIP=m CONFIG_TULIP=m
# CONFIG_TULIP_MWI is not set # CONFIG_TULIP_MWI is not set
# CONFIG_TULIP_MMIO is not set # CONFIG_TULIP_MMIO is not set
CONFIG_TULIP_NAPI=y
CONFIG_TULIP_NAPI_HW_MITIGATION=y
CONFIG_DE4X5=m CONFIG_DE4X5=m
CONFIG_WINBOND_840=m CONFIG_WINBOND_840=m
# CONFIG_DM9102 is not set # CONFIG_DM9102 is not set
...@@ -724,6 +731,7 @@ CONFIG_DGRS=m ...@@ -724,6 +731,7 @@ CONFIG_DGRS=m
CONFIG_EEPRO100=m CONFIG_EEPRO100=m
# CONFIG_EEPRO100_PIO is not set # CONFIG_EEPRO100_PIO is not set
CONFIG_E100=m CONFIG_E100=m
CONFIG_E100_NAPI=y
CONFIG_FEALNX=m CONFIG_FEALNX=m
CONFIG_NATSEMI=m CONFIG_NATSEMI=m
CONFIG_NE2K_PCI=m CONFIG_NE2K_PCI=m
...@@ -733,6 +741,7 @@ CONFIG_8139TOO=m ...@@ -733,6 +741,7 @@ CONFIG_8139TOO=m
# CONFIG_8139TOO_TUNE_TWISTER is not set # CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set # CONFIG_8139TOO_8129 is not set
# CONFIG_8139_OLD_RX_RESET is not set # CONFIG_8139_OLD_RX_RESET is not set
CONFIG_8139_RXBUF_IDX=1
CONFIG_SIS900=m CONFIG_SIS900=m
CONFIG_EPIC100=m CONFIG_EPIC100=m
CONFIG_SUNDANCE=m CONFIG_SUNDANCE=m
...@@ -800,6 +809,8 @@ CONFIG_HERMES=m ...@@ -800,6 +809,8 @@ CONFIG_HERMES=m
CONFIG_PLX_HERMES=m CONFIG_PLX_HERMES=m
CONFIG_TMD_HERMES=m CONFIG_TMD_HERMES=m
CONFIG_PCI_HERMES=m CONFIG_PCI_HERMES=m
CONFIG_ATMEL=m
CONFIG_PCI_ATMEL=m
CONFIG_NET_WIRELESS=y CONFIG_NET_WIRELESS=y
# #
...@@ -904,6 +915,7 @@ CONFIG_IRDA_FAST_RR=y ...@@ -904,6 +915,7 @@ CONFIG_IRDA_FAST_RR=y
# FIR device drivers # FIR device drivers
# #
# CONFIG_USB_IRDA is not set # CONFIG_USB_IRDA is not set
CONFIG_SIGMATEL_FIR=m
# CONFIG_TOSHIBA_FIR is not set # CONFIG_TOSHIBA_FIR is not set
# CONFIG_VLSI_FIR is not set # CONFIG_VLSI_FIR is not set
...@@ -936,17 +948,20 @@ CONFIG_BT_HCIVHCI=m ...@@ -936,17 +948,20 @@ CONFIG_BT_HCIVHCI=m
# #
# ISDN subsystem # ISDN subsystem
# #
CONFIG_ISDN_BOOL=y CONFIG_ISDN=m
#
# Old ISDN4Linux
#
# CONFIG_ISDN_I4L is not set
# #
# CAPI subsystem # CAPI subsystem
# #
CONFIG_ISDN_CAPI=m CONFIG_ISDN_CAPI=m
CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y # CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON is not set
CONFIG_ISDN_CAPI_MIDDLEWARE=y # CONFIG_ISDN_CAPI_MIDDLEWARE is not set
CONFIG_ISDN_CAPI_CAPI20=m CONFIG_ISDN_CAPI_CAPI20=m
CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
CONFIG_ISDN_CAPI_CAPIFS=m
# #
# CAPI hardware drivers # CAPI hardware drivers
...@@ -955,12 +970,18 @@ CONFIG_ISDN_CAPI_CAPIFS=m ...@@ -955,12 +970,18 @@ CONFIG_ISDN_CAPI_CAPIFS=m
# #
# Active AVM cards # Active AVM cards
# #
# CONFIG_CAPI_AVM is not set CONFIG_CAPI_AVM=y
# #
# Active Eicon DIVA Server cards # 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 # Telephony Support
...@@ -1080,6 +1101,8 @@ CONFIG_I2C_SENSOR=m ...@@ -1080,6 +1101,8 @@ CONFIG_I2C_SENSOR=m
CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1021=m
CONFIG_SENSORS_ASB100=m CONFIG_SENSORS_ASB100=m
CONFIG_SENSORS_EEPROM=m CONFIG_SENSORS_EEPROM=m
CONFIG_SENSORS_FSCHER=m
CONFIG_SENSORS_GL518SM=m
CONFIG_SENSORS_IT87=m CONFIG_SENSORS_IT87=m
CONFIG_SENSORS_LM75=m CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_LM78=m CONFIG_SENSORS_LM78=m
...@@ -1100,11 +1123,11 @@ CONFIG_EXT2_FS=y ...@@ -1100,11 +1123,11 @@ CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=m CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y CONFIG_EXT3_FS_SECURITY=y
CONFIG_JBD=m CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set # CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set # CONFIG_REISERFS_FS is not set
...@@ -1116,6 +1139,7 @@ CONFIG_FS_POSIX_ACL=y ...@@ -1116,6 +1139,7 @@ CONFIG_FS_POSIX_ACL=y
CONFIG_XFS_FS=m CONFIG_XFS_FS=m
# CONFIG_XFS_RT is not set # CONFIG_XFS_RT is not set
CONFIG_XFS_QUOTA=y CONFIG_XFS_QUOTA=y
CONFIG_XFS_SECURITY=y
CONFIG_XFS_POSIX_ACL=y CONFIG_XFS_POSIX_ACL=y
CONFIG_MINIX_FS=m CONFIG_MINIX_FS=m
CONFIG_ROMFS_FS=m CONFIG_ROMFS_FS=m
...@@ -1145,7 +1169,9 @@ CONFIG_VFAT_FS=m ...@@ -1145,7 +1169,9 @@ CONFIG_VFAT_FS=m
# #
CONFIG_PROC_FS=y CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=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=y
CONFIG_DEVPTS_FS_XATTR=y CONFIG_DEVPTS_FS_XATTR=y
# CONFIG_DEVPTS_FS_SECURITY is not set # CONFIG_DEVPTS_FS_SECURITY is not set
...@@ -1205,7 +1231,6 @@ CONFIG_NCP_FS=m ...@@ -1205,7 +1231,6 @@ CONFIG_NCP_FS=m
# CONFIG_NCPFS_EXTRAS is not set # CONFIG_NCPFS_EXTRAS is not set
CONFIG_CODA_FS=m CONFIG_CODA_FS=m
# CONFIG_CODA_FS_OLD_API is not set # CONFIG_CODA_FS_OLD_API is not set
# CONFIG_INTERMEZZO_FS is not set
CONFIG_AFS_FS=m CONFIG_AFS_FS=m
CONFIG_RXRPC=m CONFIG_RXRPC=m
...@@ -1386,6 +1411,7 @@ CONFIG_SND_VIRMIDI=m ...@@ -1386,6 +1411,7 @@ CONFIG_SND_VIRMIDI=m
# #
CONFIG_SND_ALI5451=m CONFIG_SND_ALI5451=m
CONFIG_SND_AZT3328=m CONFIG_SND_AZT3328=m
CONFIG_SND_BT87X=m
CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX=m
# CONFIG_SND_CS46XX_NEW_DSP is not set # CONFIG_SND_CS46XX_NEW_DSP is not set
CONFIG_SND_CS4281=m CONFIG_SND_CS4281=m
...@@ -1488,7 +1514,6 @@ CONFIG_USB_KBTAB=m ...@@ -1488,7 +1514,6 @@ CONFIG_USB_KBTAB=m
# USB Imaging devices # USB Imaging devices
# #
CONFIG_USB_MDC800=m CONFIG_USB_MDC800=m
CONFIG_USB_SCANNER=m
CONFIG_USB_MICROTEK=m CONFIG_USB_MICROTEK=m
CONFIG_USB_HPUSBSCSI=m CONFIG_USB_HPUSBSCSI=m
...@@ -1594,12 +1619,29 @@ CONFIG_USB_LCD=m ...@@ -1594,12 +1619,29 @@ CONFIG_USB_LCD=m
CONFIG_USB_LED=m CONFIG_USB_LED=m
CONFIG_USB_SPEEDTOUCH=m CONFIG_USB_SPEEDTOUCH=m
CONFIG_USB_TEST=m CONFIG_USB_TEST=m
#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set # 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 # Profiling support
...@@ -1619,6 +1661,7 @@ CONFIG_MAGIC_SYSRQ=y ...@@ -1619,6 +1661,7 @@ CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_DCFLUSH is not set # CONFIG_DEBUG_DCFLUSH is not set
# CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_INFO is not set
# CONFIG_STACK_DEBUG is not set # CONFIG_STACK_DEBUG is not set
# CONFIG_DEBUG_BOOTMEM is not set
CONFIG_HAVE_DEC_LOCK=y CONFIG_HAVE_DEC_LOCK=y
# #
......
...@@ -38,11 +38,11 @@ ...@@ -38,11 +38,11 @@
#include <asm/io.h> #include <asm/io.h>
#define DEFAULT_BASE 0x378 #define DEFAULT_BASE 0x378
static int base=0; static long base=0;
static unsigned char port_data = 0; static unsigned char port_data = 0;
/* --- Convenience defines for the parallel port: */ /* --- Convenience defines for the parallel port: */
#define BASE (unsigned int)(data) #define BASE (unsigned long)(data)
#define DATA BASE /* Centronics data port */ #define DATA BASE /* Centronics data port */
#define STAT (BASE+1) /* Centronics status port */ #define STAT (BASE+1) /* Centronics status port */
#define CTRL (BASE+2) /* Centronics control port */ #define CTRL (BASE+2) /* Centronics control port */
......
...@@ -124,7 +124,7 @@ static int bit_savi2c_getsda(void *data) ...@@ -124,7 +124,7 @@ static int bit_savi2c_getsda(void *data)
static int config_s4(struct pci_dev *dev) static int config_s4(struct pci_dev *dev)
{ {
unsigned int cadr; unsigned long cadr;
/* map memory */ /* map memory */
cadr = dev->resource[0].start; cadr = dev->resource[0].start;
......
...@@ -44,13 +44,13 @@ ...@@ -44,13 +44,13 @@
/* --- Convenience defines for the parallel port: */ /* --- Convenience defines for the parallel port: */
#define BASE (unsigned int)(data) #define BASE (unsigned long)(data)
#define DATA BASE /* Centronics data port */ #define DATA BASE /* Centronics data port */
#define STAT (BASE+1) /* Centronics status port */ #define STAT (BASE+1) /* Centronics status port */
#define CTRL (BASE+2) /* Centronics control port */ #define CTRL (BASE+2) /* Centronics control port */
#define DEFAULT_BASE 0x378 #define DEFAULT_BASE 0x378
static int base=0; static long base=0;
/* ----- local functions --------------------------------------------------- */ /* ----- local functions --------------------------------------------------- */
......
...@@ -144,7 +144,7 @@ static int bit_vooddc_getsda(void *data) ...@@ -144,7 +144,7 @@ static int bit_vooddc_getsda(void *data)
static int config_v3(struct pci_dev *dev) static int config_v3(struct pci_dev *dev)
{ {
unsigned int cadr; unsigned long cadr;
/* map Voodoo3 memory */ /* map Voodoo3 memory */
cadr = dev->resource[0].start; cadr = dev->resource[0].start;
......
...@@ -383,7 +383,7 @@ struct lm85_data { ...@@ -383,7 +383,7 @@ struct lm85_data {
u8 syncpwm3; /* Saved PWM3 for TACH 2,3,4 config */ u8 syncpwm3; /* Saved PWM3 for TACH 2,3,4 config */
u8 oppoint[3]; /* Register value */ u8 oppoint[3]; /* Register value */
u16 tmin_ctl; /* 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 */ u8 therm_limit; /* Register value */
u16 alarms; /* Register encoding, combined */ u16 alarms; /* Register encoding, combined */
struct lm85_autofan autofan[3]; struct lm85_autofan autofan[3];
......
...@@ -1149,8 +1149,8 @@ static int dst_attach (struct dvb_i2c_bus *i2c, void **data) ...@@ -1149,8 +1149,8 @@ static int dst_attach (struct dvb_i2c_bus *i2c, void **data)
} }
dst_init (dst); dst_init (dst);
dprintk("%s: register dst %8.8x bt %8.8x i2c %8.8x\n", __FUNCTION__, dprintk("%s: register dst %p bt %p i2c %p\n", __FUNCTION__,
(u32)dst, (u32)(dst->bt), (u32)(dst->i2c)); dst, dst->bt, dst->i2c);
info = &dst_info_sat; info = &dst_info_sat;
if (dst->dst_type == DST_TYPE_IS_TERR) if (dst->dst_type == DST_TYPE_IS_TERR)
...@@ -1166,7 +1166,7 @@ static int dst_attach (struct dvb_i2c_bus *i2c, void **data) ...@@ -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) static void dst_detach (struct dvb_i2c_bus *i2c, void *data)
{ {
dvb_unregister_frontend (dst_ioctl, i2c); 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) if (data)
kfree(data); kfree(data);
} }
......
...@@ -1186,7 +1186,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec) ...@@ -1186,7 +1186,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
firmware_size = fw_entry->size; firmware_size = fw_entry->size;
if (firmware_size < 60) { 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); __FUNCTION__, firmware_size);
return -1; return -1;
} }
......
...@@ -217,7 +217,7 @@ static int skfp_init_one(struct pci_dev *pdev, ...@@ -217,7 +217,7 @@ static int skfp_init_one(struct pci_dev *pdev,
{ {
struct net_device *dev; struct net_device *dev;
struct s_smc *smc; /* board pointer */ struct s_smc *smc; /* board pointer */
u32 port, len; unsigned long port, len;
int err; int err;
PRINTK(KERN_INFO "entering skfp_init_one\n"); PRINTK(KERN_INFO "entering skfp_init_one\n");
...@@ -240,7 +240,7 @@ static int skfp_init_one(struct pci_dev *pdev, ...@@ -240,7 +240,7 @@ static int skfp_init_one(struct pci_dev *pdev,
len = pci_resource_len(pdev, 0); len = pci_resource_len(pdev, 0);
if (len < 0x4000) { 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; err = -EIO;
goto err_out1; goto err_out1;
} }
......
...@@ -987,7 +987,7 @@ static void tx_timeout(struct net_device *dev) ...@@ -987,7 +987,7 @@ static void tx_timeout(struct net_device *dev)
int i; int i;
for (i=0; i<TX_RING_SIZE; i++) { for (i=0; i<TX_RING_SIZE; i++) {
printk(KERN_DEBUG "%02x %08llx %08x %08x(%02x) %08x %08x\n", 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].next_desc),
le32_to_cpu(np->tx_ring[i].status), le32_to_cpu(np->tx_ring[i].status),
(le32_to_cpu(np->tx_ring[i].status) >> 2) & 0xff, (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) ...@@ -1673,7 +1673,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
case SIOCDEVPRIVATE: case SIOCDEVPRIVATE:
for (i=0; i<TX_RING_SIZE; i++) { for (i=0; i<TX_RING_SIZE; i++) {
printk(KERN_DEBUG "%02x %08llx %08x %08x(%02x) %08x %08x\n", 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].next_desc),
le32_to_cpu(np->tx_ring[i].status), le32_to_cpu(np->tx_ring[i].status),
(le32_to_cpu(np->tx_ring[i].status) >> 2) (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) ...@@ -820,7 +820,7 @@ static void w9968cf_urb_complete(struct urb *urb, struct pt_regs *regs)
(*f)->length = cam->frame_tmp.length; (*f)->length = cam->frame_tmp.length;
memcpy((*f)->buffer, cam->frame_tmp.buffer, memcpy((*f)->buffer, cam->frame_tmp.buffer,
(*f)->length); (*f)->length);
DBG(6, "Switched from temp. frame to frame #%d", DBG(6, "Switched from temp. frame to frame #%zd",
(*f) - &cam->frame[0]) (*f) - &cam->frame[0])
} }
} }
...@@ -858,7 +858,7 @@ static void w9968cf_urb_complete(struct urb *urb, struct pt_regs *regs) ...@@ -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 */ } 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])) ((*f)==&cam->frame_tmp ? -1 : (*f)-&cam->frame[0]))
if (cam->vpp_flag & VPP_DECOMPRESSION) { if (cam->vpp_flag & VPP_DECOMPRESSION) {
...@@ -2075,7 +2075,7 @@ w9968cf_pop_frame(struct w9968cf_device* cam, struct w9968cf_frame_t** framep) ...@@ -2075,7 +2075,7 @@ w9968cf_pop_frame(struct w9968cf_device* cam, struct w9968cf_frame_t** framep)
spin_unlock(&cam->flist_lock); 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) ...@@ -2830,7 +2830,7 @@ w9968cf_read(struct file* filp, char* buf, size_t count, loff_t* f_pos)
fr->status = F_UNUSED; fr->status = F_UNUSED;
DBG(5, "%d bytes read.", count) DBG(5, "%zd bytes read.", count)
up(&cam->fileop_sem); up(&cam->fileop_sem);
return count; return count;
...@@ -3506,7 +3506,7 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) ...@@ -3506,7 +3506,7 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
kmalloc(sizeof(struct w9968cf_device), GFP_KERNEL); kmalloc(sizeof(struct w9968cf_device), GFP_KERNEL);
if (!cam) { 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)) sizeof(struct w9968cf_device))
err = -ENOMEM; err = -ENOMEM;
goto fail; goto fail;
......
...@@ -167,7 +167,9 @@ vxfs_bmap_indir(struct inode *ip, long indir, int size, long block) ...@@ -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 "\n\nTYPED_DEV4 detected!\n");
printk(KERN_INFO "block: %Lu\tsize: %Ld\tdev: %d\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; goto fail;
} }
default: default:
...@@ -228,7 +230,9 @@ vxfs_bmap_typed(struct inode *ip, long iblock) ...@@ -228,7 +230,9 @@ vxfs_bmap_typed(struct inode *ip, long iblock)
printk(KERN_INFO "\n\nTYPED_DEV4 detected!\n"); printk(KERN_INFO "\n\nTYPED_DEV4 detected!\n");
printk(KERN_INFO "block: %Lu\tsize: %Ld\tdev: %d\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; return 0;
} }
default: default:
......
...@@ -1793,7 +1793,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock ...@@ -1793,7 +1793,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
unsigned int strhashval; unsigned int strhashval;
dprintk("NFSD: nfsd4_lock: start=%Ld length=%Ld\n", 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; lock->lk_stateowner = NULL;
nfs4_lock_state(); nfs4_lock_state();
...@@ -2042,7 +2043,8 @@ nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock ...@@ -2042,7 +2043,8 @@ nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
int status; int status;
dprintk("NFSD: nfsd4_locku: start=%Ld length=%Ld\n", 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(); nfs4_lock_state();
if ((status = nfs4_preprocess_seqid_op(current_fh, if ((status = nfs4_preprocess_seqid_op(current_fh,
......
...@@ -269,7 +269,7 @@ smb_file_sendfile(struct file *file, loff_t *ppos, ...@@ -269,7 +269,7 @@ smb_file_sendfile(struct file *file, loff_t *ppos,
status = smb_revalidate_inode(dentry); status = smb_revalidate_inode(dentry);
if (status) { if (status) {
PARANOIA("%s/%s validation failed, error=%d\n", PARANOIA("%s/%s validation failed, error=%zd\n",
DENTRY_PATH(dentry), status); DENTRY_PATH(dentry), status);
goto out; goto out;
} }
......
...@@ -11,49 +11,16 @@ ...@@ -11,49 +11,16 @@
#define __ARCH_SPARC_ATOMIC__ #define __ARCH_SPARC_ATOMIC__
#include <linux/config.h> #include <linux/config.h>
#include <linux/spinlock.h>
typedef struct { volatile int counter; } atomic_t; typedef struct { volatile int counter; } atomic_t;
#ifdef __KERNEL__ #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) } #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_read(v) ((v)->counter)
#define atomic_add(i, v) ((void)__atomic_add_return( (int)(i), (v))) #define atomic_add(i, v) ((void)__atomic_add_return( (int)(i), (v)))
......
...@@ -11,16 +11,16 @@ ...@@ -11,16 +11,16 @@
#include <asm/page.h> /* IO address mapping routines need this */ #include <asm/page.h> /* IO address mapping routines need this */
#include <asm/system.h> #include <asm/system.h>
#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) #define page_to_phys(page) (((page) - mem_map) << PAGE_SHIFT)
static inline u32 flip_dword (u32 d) static inline u32 flip_dword (u32 l)
{ {
return ((d&0xff)<<24) | (((d>>8)&0xff)<<16) | (((d>>16)&0xff)<<8)| ((d>>24)&0xff); return ((l&0xff)<<24) | (((l>>8)&0xff)<<16) | (((l>>16)&0xff)<<8)| ((l>>24)&0xff);
} }
static inline u16 flip_word (u16 d) static inline u16 flip_word (u16 w)
{ {
return ((d&0xff) << 8) | ((d>>8)&0xff); return ((w&0xff) << 8) | ((w>>8)&0xff);
} }
/* /*
...@@ -56,14 +56,14 @@ static inline void __raw_writeb(u8 b, unsigned long addr) ...@@ -56,14 +56,14 @@ static inline void __raw_writeb(u8 b, unsigned long addr)
*(volatile u8 *)addr = b; *(volatile u8 *)addr = b;
} }
static inline void __raw_writew(u16 b, unsigned long addr) static inline void __raw_writew(u16 w, unsigned long addr)
{ {
*(volatile u16 *)addr = b; *(volatile u16 *)addr = w;
} }
static inline void __raw_writel(u32 b, unsigned long addr) static inline void __raw_writel(u32 l, unsigned long addr)
{ {
*(volatile u32 *)addr = b; *(volatile u32 *)addr = l;
} }
static inline u8 __readb(unsigned long addr) static inline u8 __readb(unsigned long addr)
...@@ -86,26 +86,26 @@ static inline void __writeb(u8 b, unsigned long addr) ...@@ -86,26 +86,26 @@ static inline void __writeb(u8 b, unsigned long addr)
*(volatile u8 *)addr = b; *(volatile u8 *)addr = b;
} }
static inline void __writew(u16 b, unsigned long addr) static inline void __writew(u16 w, unsigned long addr)
{ {
*(volatile u16 *)addr = flip_word(b); *(volatile u16 *)addr = flip_word(w);
} }
static inline void __writel(u32 b, unsigned long addr) static inline void __writel(u32 l, unsigned long addr)
{ {
*(volatile u32 *)addr = flip_dword(b); *(volatile u32 *)addr = flip_dword(l);
} }
#define readb(addr) __readb((unsigned long)(addr)) #define readb(__addr) __readb((unsigned long)(__addr))
#define readw(addr) __readw((unsigned long)(addr)) #define readw(__addr) __readw((unsigned long)(__addr))
#define readl(addr) __readl((unsigned long)(addr)) #define readl(__addr) __readl((unsigned long)(__addr))
#define readb_relaxed(addr) readb(addr) #define readb_relaxed(__addr) readb(__addr)
#define readw_relaxed(addr) readw(addr) #define readw_relaxed(__addr) readw(__addr)
#define readl_relaxed(addr) readl(addr) #define readl_relaxed(__addr) readl(__addr)
#define writeb(b, addr) __writeb((b),(unsigned long)(addr)) #define writeb(__b, __addr) __writeb((__b),(unsigned long)(__addr))
#define writew(b, addr) __writew((b),(unsigned long)(addr)) #define writew(__w, __addr) __writew((__w),(unsigned long)(__addr))
#define writel(b, addr) __writel((b),(unsigned long)(addr)) #define writel(__l, __addr) __writel((__l),(unsigned long)(__addr))
/* /*
* I/O space operations * I/O space operations
...@@ -124,22 +124,22 @@ static inline void __writel(u32 b, unsigned long addr) ...@@ -124,22 +124,22 @@ static inline void __writel(u32 b, unsigned long addr)
* mapped somewhere into virtual kernel space and we * mapped somewhere into virtual kernel space and we
* can use inb/outb again. * can use inb/outb again.
*/ */
#define inb_local(addr) __readb(addr) #define inb_local(__addr) __readb((unsigned long)(__addr))
#define inb(addr) __readb(addr) #define inb(__addr) __readb((unsigned long)(__addr))
#define inw(addr) __readw(addr) #define inw(__addr) __readw((unsigned long)(__addr))
#define inl(addr) __readl(addr) #define inl(__addr) __readl((unsigned long)(__addr))
#define outb_local(b, addr) __writeb(b, addr) #define outb_local(__b, __addr) __writeb(__b, (unsigned long)(__addr))
#define outb(b, addr) __writeb(b, addr) #define outb(__b, __addr) __writeb(__b, (unsigned long)(__addr))
#define outw(b, addr) __writew(b, addr) #define outw(__w, __addr) __writew(__w, (unsigned long)(__addr))
#define outl(b, addr) __writel(b, addr) #define outl(__l, __addr) __writel(__l, (unsigned long)(__addr))
#define inb_p inb #define inb_p(__addr) inb(__addr)
#define outb_p outb #define outb_p(__b, __addr) outb(__b, __addr)
#define inw_p inw #define inw_p(__addr) inw(__addr)
#define outw_p outw #define outw_p(__w, __addr) outw(__w, __addr)
#define inl_p inl #define inl_p(__addr) inl(__addr)
#define outl_p outl #define outl_p(__l, __addr) outl(__l, __addr)
extern void outsb(unsigned long addr, const void *src, unsigned long cnt); extern void outsb(unsigned long addr, const void *src, unsigned long cnt);
extern void outsw(unsigned long addr, const void *src, unsigned long cnt); extern void outsw(unsigned long addr, const void *src, unsigned long cnt);
...@@ -176,25 +176,25 @@ static inline void _sbus_writeb(u8 b, unsigned long addr) ...@@ -176,25 +176,25 @@ static inline void _sbus_writeb(u8 b, unsigned long addr)
*(volatile u8 *)addr = b; *(volatile u8 *)addr = b;
} }
static inline void _sbus_writew(u16 b, unsigned long addr) static inline void _sbus_writew(u16 w, unsigned long addr)
{ {
*(volatile u16 *)addr = b; *(volatile u16 *)addr = w;
} }
static inline void _sbus_writel(u32 b, unsigned long addr) static inline void _sbus_writel(u32 l, unsigned long addr)
{ {
*(volatile u32 *)addr = b; *(volatile u32 *)addr = l;
} }
/* /*
* The only reason for #define's is to hide casts to unsigned long. * The only reason for #define's is to hide casts to unsigned long.
*/ */
#define sbus_readb(a) _sbus_readb((unsigned long)(a)) #define sbus_readb(__addr) _sbus_readb((unsigned long)(__addr))
#define sbus_readw(a) _sbus_readw((unsigned long)(a)) #define sbus_readw(__addr) _sbus_readw((unsigned long)(__addr))
#define sbus_readl(a) _sbus_readl((unsigned long)(a)) #define sbus_readl(__addr) _sbus_readl((unsigned long)(__addr))
#define sbus_writeb(v, a) _sbus_writeb(v, (unsigned long)(a)) #define sbus_writeb(__b, __addr) _sbus_writeb(__b, (unsigned long)(__addr))
#define sbus_writew(v, a) _sbus_writew(v, (unsigned long)(a)) #define sbus_writew(__w, __addr) _sbus_writew(__w, (unsigned long)(__addr))
#define sbus_writel(v, a) _sbus_writel(v, (unsigned long)(a)) #define sbus_writel(__l, __addr) _sbus_writel(__l, (unsigned long)(__addr))
static inline void *sbus_memset_io(void *__dst, int c, __kernel_size_t n) static inline void *sbus_memset_io(void *__dst, int c, __kernel_size_t n)
{ {
......
...@@ -31,7 +31,7 @@ extern unsigned long pci_memspace_mask; ...@@ -31,7 +31,7 @@ extern unsigned long pci_memspace_mask;
#define bus_dvma_to_mem(__vaddr) ((__vaddr) & 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; u8 ret;
...@@ -42,7 +42,7 @@ static __inline__ u8 inb(unsigned long addr) ...@@ -42,7 +42,7 @@ static __inline__ u8 inb(unsigned long addr)
return ret; return ret;
} }
static __inline__ u16 inw(unsigned long addr) static __inline__ u16 _inw(unsigned long addr)
{ {
u16 ret; u16 ret;
...@@ -53,7 +53,7 @@ static __inline__ u16 inw(unsigned long addr) ...@@ -53,7 +53,7 @@ static __inline__ u16 inw(unsigned long addr)
return ret; return ret;
} }
static __inline__ u32 inl(unsigned long addr) static __inline__ u32 _inl(unsigned long addr)
{ {
u32 ret; u32 ret;
...@@ -64,33 +64,40 @@ static __inline__ u32 inl(unsigned long addr) ...@@ -64,33 +64,40 @@ static __inline__ u32 inl(unsigned long addr)
return ret; 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 */" __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */"
: /* no outputs */ : /* no outputs */
: "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); : "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 */" __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */"
: /* no outputs */ : /* no outputs */
: "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); : "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 */" __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */"
: /* no outputs */ : /* no outputs */
: "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L));
} }
#define inb_p inb #define inb(__addr) (_inb((unsigned long)(__addr)))
#define outb_p outb #define inw(__addr) (_inw((unsigned long)(__addr)))
#define inw_p inw #define inl(__addr) (_inl((unsigned long)(__addr)))
#define outw_p outw #define outb(__b, __addr) (_outb((u8)(__b), (unsigned long)(__addr)))
#define inl_p inl #define outw(__w, __addr) (_outw((u16)(__w), (unsigned long)(__addr)))
#define outl_p outl #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 outsb(unsigned long addr, const void *src, unsigned long count);
extern void outsw(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