Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@penguin.transmeta.com>2002-02-20 20:14:52 -0800
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-02-20 20:14:52 -0800
commit52acd6ef6c8cf9c544cd0e14f6e5361f60c76278 (patch)
tree47059e5db82a84a7ab5d789ee58d1435d8cef26e
parent8847b8e61c030fded3e86cec0a3da3bea801f0df (diff)
parente8ce9cc9b7c9800ad6af25b77edfca6413a43698 (diff)
Merge bk://are.twiddle.net:8080/linux-alpha-2.5
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
-rw-r--r--arch/alpha/Makefile5
-rw-r--r--arch/alpha/kernel/core_titan.c1
-rw-r--r--arch/alpha/kernel/entry.S8
-rw-r--r--arch/alpha/kernel/process.c5
-rw-r--r--arch/alpha/kernel/proto.h6
-rw-r--r--arch/alpha/kernel/sys_titan.c7
-rw-r--r--drivers/atm/eni.c2
-rw-r--r--drivers/atm/firestream.c2
-rw-r--r--drivers/block/cciss.c2
-rw-r--r--drivers/input/gameport/cs461x.c2
-rw-r--r--drivers/input/gameport/emu10k1-gp.c2
-rw-r--r--drivers/input/gameport/pcigame.c2
-rw-r--r--drivers/isdn/hisax/hisax_fcpcipnp.c4
-rw-r--r--drivers/isdn/hisax/st5481_init.c2
-rw-r--r--drivers/isdn/tpam/tpam_main.c2
-rw-r--r--drivers/media/radio/radio-gemtek-pci.c2
-rw-r--r--drivers/media/radio/radio-maxiradio.c2
-rw-r--r--drivers/media/video/bttv-driver.c3
-rw-r--r--drivers/media/video/meye.c2
-rw-r--r--drivers/net/3c59x.c2
-rw-r--r--drivers/net/8139cp.c2
-rw-r--r--drivers/net/8139too.c2
-rw-r--r--drivers/net/arcnet/com20020-pci.c2
-rw-r--r--drivers/net/defxx.c2
-rw-r--r--drivers/net/dl2k.c2
-rw-r--r--drivers/net/eepro100.c2
-rw-r--r--drivers/net/epic100.c2
-rw-r--r--drivers/net/fealnx.c2
-rw-r--r--drivers/net/ioc3-eth.c2
-rw-r--r--drivers/net/irda/vlsi_ir.c2
-rw-r--r--drivers/net/natsemi.c2
-rw-r--r--drivers/net/ne2k-pci.c2
-rw-r--r--drivers/net/ns83820.c2
-rw-r--r--drivers/net/pci-skeleton.c2
-rw-r--r--drivers/net/pcmcia/xircom_cb.c2
-rw-r--r--drivers/net/pcmcia/xircom_tulip_cb.c2
-rw-r--r--drivers/net/sis900.c2
-rw-r--r--drivers/net/starfire.c2
-rw-r--r--drivers/net/sundance.c2
-rw-r--r--drivers/net/sungem.c2
-rw-r--r--drivers/net/tlan.c2
-rw-r--r--drivers/net/tokenring/lanstreamer.c2
-rw-r--r--drivers/net/tokenring/olympic.c2
-rw-r--r--drivers/net/via-rhine.c2
-rw-r--r--drivers/net/wan/farsync.c2
-rw-r--r--drivers/net/winbond-840.c2
-rw-r--r--drivers/net/wireless/airo.c2
-rw-r--r--drivers/net/wireless/orinoco_plx.c2
-rw-r--r--drivers/net/yellowfin.c2
-rw-r--r--drivers/parport/parport_serial.c2
-rw-r--r--drivers/pcmcia/pci_socket.c2
-rw-r--r--drivers/usb/uhci.c2
-rw-r--r--drivers/usb/usb-ohci.c2
-rw-r--r--drivers/video/cyber2000fb.c2
-rw-r--r--drivers/video/imsttfb.c2
-rw-r--r--drivers/video/neofb.c2
-rw-r--r--drivers/video/radeonfb.c2
-rw-r--r--drivers/video/riva/fbdev.c2
-rw-r--r--drivers/video/tdfxfb.c2
-rw-r--r--include/asm-alpha/bitops.h21
-rw-r--r--include/asm-alpha/mmu_context.h25
-rw-r--r--include/asm-alpha/spinlock.h12
-rw-r--r--include/asm-alpha/system.h142
-rw-r--r--include/math-emu/op-4.h2
-rw-r--r--sound/oss/btaudio.c2
-rw-r--r--sound/oss/emu10k1/main.c2
-rw-r--r--sound/oss/ymfpci.c2
67 files changed, 234 insertions, 115 deletions
diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile
index 4e40e6fb14d2..1436efdb8718 100644
--- a/arch/alpha/Makefile
+++ b/arch/alpha/Makefile
@@ -25,6 +25,11 @@ have_mcpu_ev6 := $(shell if $(CC) -mcpu=ev6 -S -o /dev/null -xc /dev/null > /dev
have_mcpu_ev67 := $(shell if $(CC) -mcpu=ev67 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi)
+have_msmall_data := $(shell if $(CC) -msmall-data -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi)
+ifeq ($(have_msmall_data),y)
+ CFLAGS := $(CFLAGS) -msmall-data
+endif
+
# Turn on the proper cpu optimizations.
ifeq ($(have_mcpu),y)
# If GENERIC, make sure to turn off any instruction set extensions that
diff --git a/arch/alpha/kernel/core_titan.c b/arch/alpha/kernel/core_titan.c
index d37a54816238..4b8168f97ca3 100644
--- a/arch/alpha/kernel/core_titan.c
+++ b/arch/alpha/kernel/core_titan.c
@@ -279,7 +279,6 @@ static void __init
titan_init_one_pachip_port(titan_pachip_port *port, int index)
{
struct pci_controller *hose;
- unsigned long sg_size;
hose = alloc_pci_controller();
if (index == 0)
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index 155fa05bad45..58e4aa037076 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -489,22 +489,22 @@ alpha_switch_to:
.prologue 0
bsr $1,do_switch_stack
call_pal PAL_swpctx
- unop
- bsr $1,undo_switch_stack
lda $8,0x3fff
- mov $17,$0
+ bsr $1,undo_switch_stack
bic $30,$8,$8
ret $31,($26),1
.end alpha_switch_to
+#ifdef CONFIG_SMP
.globl ret_from_fork
.align 3
.ent ret_from_fork
ret_from_fork:
lda $26,ret_from_sys_call
- mov $0,$16
+ mov $17,$16
jmp $31,schedule_tail
.end ret_from_fork
+#endif
/*
* Oh, well.. Disassembling OSF/1 binaries to find out how the
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 015eaa828cf7..4f5bb5924393 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -283,6 +283,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
unsigned long unused,
struct task_struct * p, struct pt_regs * regs)
{
+ extern void ret_from_sys_call(void);
extern void ret_from_fork(void);
struct thread_info *childti = p->thread_info;
@@ -304,7 +305,11 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
stack = ((struct switch_stack *) regs) - 1;
childstack = ((struct switch_stack *) childregs) - 1;
*childstack = *stack;
+#ifdef CONFIG_SMP
childstack->r26 = (unsigned long) ret_from_fork;
+#else
+ childstack->r26 = (unsigned long) ret_from_sys_call;
+#endif
childti->pcb.usp = usp;
childti->pcb.ksp = (unsigned long) childstack;
childti->pcb.flags = 1; /* set FEN, clear everything else */
diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h
index 170ee06fc5c2..746869cb1145 100644
--- a/arch/alpha/kernel/proto.h
+++ b/arch/alpha/kernel/proto.h
@@ -162,9 +162,9 @@ extern struct mcheck_info
unsigned char extra;
} __mcheck_info;
-#define mcheck_expected(cpu) (__mcheck_info.expected)
-#define mcheck_taken(cpu) (__mcheck_info.taken)
-#define mcheck_extra(cpu) (__mcheck_info.extra)
+#define mcheck_expected(cpu) ((void)(cpu), __mcheck_info.expected)
+#define mcheck_taken(cpu) ((void)(cpu), __mcheck_info.taken)
+#define mcheck_extra(cpu) ((void)(cpu), __mcheck_info.extra)
#endif
#define DEBUG_MCHECK 0 /* 0 = minimal, 1 = debug, 2 = debug+dump. */
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c
index 09920c74549d..846fb3d3251f 100644
--- a/arch/alpha/kernel/sys_titan.c
+++ b/arch/alpha/kernel/sys_titan.c
@@ -84,8 +84,8 @@ titan_update_irq_hw(unsigned long mask)
*dim3;
#else
volatile unsigned long *dimB;
- if (bcpu == 0) dimB = &cchip->dim0.csr;
- else if (bcpu == 1) dimB = &cchip->dim1.csr;
+ dimB = &cchip->dim0.csr;
+ if (bcpu == 1) dimB = &cchip->dim1.csr;
else if (bcpu == 2) dimB = &cchip->dim2.csr;
else if (bcpu == 3) dimB = &cchip->dim3.csr;
@@ -190,9 +190,6 @@ init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax)
static void __init
privateer_init_irq(void)
{
- extern asmlinkage void entInt(void);
- int cpu;
-
outb(0, DMA1_RESET_REG);
outb(0, DMA2_RESET_REG);
outb(DMA_MODE_CASCADE, DMA2_MODE_REG);
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index 9ca723bb68a2..638e8d0ef7ac 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -2310,7 +2310,7 @@ static struct pci_driver eni_driver = {
name: DEV_LABEL,
id_table: eni_pci_tbl,
probe: eni_init_one,
- remove: eni_remove_one,
+ remove: __devexit_p(eni_remove_one),
};
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index a6a9046dea8d..4db7ab6a36f9 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -2102,7 +2102,7 @@ static struct pci_driver firestream_driver = {
name: "firestream",
id_table: firestream_pci_tbl,
probe: firestream_init_one,
- remove: firestream_remove_one,
+ remove: __devexit_p(firestream_remove_one),
};
static int __init firestream_init_module (void)
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 7d3a5f665af9..47d9b0808280 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -2617,7 +2617,7 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev)
static struct pci_driver cciss_pci_driver = {
name: "cciss",
probe: cciss_init_one,
- remove: cciss_remove_one,
+ remove: __devexit_p(cciss_remove_one),
id_table: cciss_pci_device_id, /* id_table */
};
diff --git a/drivers/input/gameport/cs461x.c b/drivers/input/gameport/cs461x.c
index 7116b3453c04..6b096f0fe43a 100644
--- a/drivers/input/gameport/cs461x.c
+++ b/drivers/input/gameport/cs461x.c
@@ -313,7 +313,7 @@ static struct pci_driver cs461x_pci_driver = {
name: "PCI Gameport",
id_table: cs461x_pci_tbl,
probe: cs461x_pci_probe,
- remove: cs461x_pci_remove,
+ remove: __devexit_p(cs461x_pci_remove),
};
int __init js_cs461x_init(void)
diff --git a/drivers/input/gameport/emu10k1-gp.c b/drivers/input/gameport/emu10k1-gp.c
index 2489b11c6020..4763a02c7177 100644
--- a/drivers/input/gameport/emu10k1-gp.c
+++ b/drivers/input/gameport/emu10k1-gp.c
@@ -108,7 +108,7 @@ static struct pci_driver emu_driver = {
name: "Emu10k1 Gameport",
id_table: emu_tbl,
probe: emu_probe,
- remove: emu_remove,
+ remove: __devexit_p(emu_remove),
};
int __init emu_init(void)
diff --git a/drivers/input/gameport/pcigame.c b/drivers/input/gameport/pcigame.c
index 04e1bee04f9c..194814ca64fc 100644
--- a/drivers/input/gameport/pcigame.c
+++ b/drivers/input/gameport/pcigame.c
@@ -180,7 +180,7 @@ static struct pci_driver pcigame_driver = {
name: "pcigame",
id_table: pcigame_id_table,
probe: pcigame_probe,
- remove: pcigame_remove,
+ remove: __devexit_p(pcigame_remove),
};
int __init pcigame_init(void)
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c
index 3c5d5435395e..77c9a77d61d0 100644
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.c
@@ -945,14 +945,14 @@ static void __devexit fcpnp_remove(struct pci_dev *pdev)
static struct pci_driver fcpci_driver = {
name: "fcpci",
probe: fcpci_probe,
- remove: fcpci_remove,
+ remove: __devexit_p(fcpci_remove),
id_table: fcpci_ids,
};
static struct isapnp_driver fcpnp_driver = {
name: "fcpnp",
probe: fcpnp_probe,
- remove: fcpnp_remove,
+ remove: __devexit_p(fcpnp_remove),
id_table: fcpnp_ids,
};
diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c
index 28ea25bf56a3..8aad86d9d37d 100644
--- a/drivers/isdn/hisax/st5481_init.c
+++ b/drivers/isdn/hisax/st5481_init.c
@@ -178,7 +178,7 @@ MODULE_DEVICE_TABLE (usb, st5481_ids);
static struct usb_driver st5481_usb_driver = {
name: "st5481_usb",
probe: probe_st5481,
- disconnect: disconnect_st5481,
+ disconnect: __devexit_p(disconnect_st5481),
id_table: st5481_ids,
};
diff --git a/drivers/isdn/tpam/tpam_main.c b/drivers/isdn/tpam/tpam_main.c
index 9a000b3d1f63..4573cad5a0af 100644
--- a/drivers/isdn/tpam/tpam_main.c
+++ b/drivers/isdn/tpam/tpam_main.c
@@ -254,7 +254,7 @@ static struct pci_driver tpam_driver = {
name: "tpam",
id_table: tpam_pci_tbl,
probe: tpam_probe,
- remove: tpam_remove,
+ remove: __devexit_p(tpam_remove),
};
static int __init tpam_init(void) {
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c
index 68f612caa530..2885fd0a6aff 100644
--- a/drivers/media/radio/radio-gemtek-pci.c
+++ b/drivers/media/radio/radio-gemtek-pci.c
@@ -424,7 +424,7 @@ static struct pci_driver gemtek_pci_driver =
name: "gemtek_pci",
id_table: gemtek_pci_id,
probe: gemtek_pci_probe,
- remove: gemtek_pci_remove
+ remove: __devexit_p(gemtek_pci_remove)
};
static int __init gemtek_pci_init_module( void )
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c
index 1368ff2ed012..dec250a7d582 100644
--- a/drivers/media/radio/radio-maxiradio.c
+++ b/drivers/media/radio/radio-maxiradio.c
@@ -376,7 +376,7 @@ static struct pci_driver maxiradio_driver = {
name: "radio-maxiradio",
id_table: maxiradio_pci_tbl,
probe: maxiradio_init_one,
- remove: maxiradio_remove_one,
+ remove: __devexit_p(maxiradio_remove_one),
};
int __init maxiradio_radio_init(void)
diff --git a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c
index 44641b9ce187..8d182b5b9f3a 100644
--- a/drivers/media/video/bttv-driver.c
+++ b/drivers/media/video/bttv-driver.c
@@ -2798,7 +2798,8 @@ static void bttv_irq(int irq, void *dev_id, struct pt_regs * regs)
* Scan for a Bt848 card, request the irq and map the io memory
*/
-static void __devexit bttv_remove(struct pci_dev *pci_dev)
+/* Can't be marked __devexit with a reference from bttv_probe. */
+static void bttv_remove(struct pci_dev *pci_dev)
{
u8 command;
int j;
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index 62f649d7f210..014894936dd2 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -1424,7 +1424,7 @@ static struct pci_driver meye_driver = {
name: "meye",
id_table: meye_pci_tbl,
probe: meye_probe,
- remove: meye_remove,
+ remove: __devexit_p(meye_remove),
};
static int __init meye_init_module(void) {
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 01c369cbfb74..c31306fd995e 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -2916,7 +2916,7 @@ static void __devexit vortex_remove_one (struct pci_dev *pdev)
static struct pci_driver vortex_driver = {
name: "3c59x",
probe: vortex_init_one,
- remove: vortex_remove_one,
+ remove: __devexit_p(vortex_remove_one),
id_table: vortex_pci_tbl,
#ifdef CONFIG_PM
suspend: vortex_suspend,
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 944407bdaa5a..8f6ee6676ab3 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -1371,7 +1371,7 @@ static struct pci_driver cp_driver = {
name: DRV_NAME,
id_table: cp_pci_tbl,
probe: cp_init_one,
- remove: cp_remove_one,
+ remove: __devexit_p(cp_remove_one),
};
static int __init cp_init (void)
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index f9d076567706..b8df6899461c 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -2499,7 +2499,7 @@ static struct pci_driver rtl8139_pci_driver = {
name: DRV_NAME,
id_table: rtl8139_pci_tbl,
probe: rtl8139_init_one,
- remove: rtl8139_remove_one,
+ remove: __devexit_p(rtl8139_remove_one),
#ifdef CONFIG_PM
suspend: rtl8139_suspend,
resume: rtl8139_resume,
diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c
index a6b5bc7efe88..9a297615862d 100644
--- a/drivers/net/arcnet/com20020-pci.c
+++ b/drivers/net/arcnet/com20020-pci.c
@@ -160,7 +160,7 @@ static struct pci_driver com20020pci_driver = {
name: "com20020",
id_table: com20020pci_id_table,
probe: com20020pci_probe,
- remove: com20020pci_remove
+ remove: __devexit_p(com20020pci_remove)
};
static int __init com20020pci_init(void)
diff --git a/drivers/net/defxx.c b/drivers/net/defxx.c
index a54402308b84..97e5b891b1e7 100644
--- a/drivers/net/defxx.c
+++ b/drivers/net/defxx.c
@@ -3362,7 +3362,7 @@ MODULE_DEVICE_TABLE(pci, dfx_pci_tbl);
static struct pci_driver dfx_driver = {
name: "defxx",
probe: dfx_init_one,
- remove: dfx_remove_one,
+ remove: __devexit_p(dfx_remove_one),
id_table: dfx_pci_tbl,
};
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c
index efdffd67667e..8869df646b2a 100644
--- a/drivers/net/dl2k.c
+++ b/drivers/net/dl2k.c
@@ -1682,7 +1682,7 @@ static struct pci_driver rio_driver = {
name:"dl2k",
id_table:rio_pci_tbl,
probe:rio_probe1,
- remove:rio_remove1,
+ remove: __devexit_p(rio_remove1),
};
static int __init
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index f79245c07ec6..dd232b4e25e7 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -2288,7 +2288,7 @@ static struct pci_driver eepro100_driver = {
name: "eepro100",
id_table: eepro100_pci_tbl,
probe: eepro100_init_one,
- remove: eepro100_remove_one,
+ remove: __devexit_p(eepro100_remove_one),
#ifdef CONFIG_PM
suspend: eepro100_suspend,
resume: eepro100_resume,
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
index 2805d9d42f2f..4f9ad8cf8879 100644
--- a/drivers/net/epic100.c
+++ b/drivers/net/epic100.c
@@ -1533,7 +1533,7 @@ static struct pci_driver epic_driver = {
name: DRV_NAME,
id_table: epic_pci_tbl,
probe: epic_init_one,
- remove: epic_remove_one,
+ remove: __devexit_p(epic_remove_one),
#ifdef CONFIG_PM
suspend: epic_suspend,
resume: epic_resume,
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
index 473e59d9bde5..9aea4b32484f 100644
--- a/drivers/net/fealnx.c
+++ b/drivers/net/fealnx.c
@@ -1929,7 +1929,7 @@ static struct pci_driver fealnx_driver = {
name: "fealnx",
id_table: fealnx_pci_tbl,
probe: fealnx_init_one,
- remove: fealnx_remove_one,
+ remove: __devexit_p(fealnx_remove_one),
};
static int __init fealnx_init(void)
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index 1a3e62efe656..ac98e3ad7a2e 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -1516,7 +1516,7 @@ static struct pci_driver ioc3_driver = {
name: "ioc3-eth",
id_table: ioc3_pci_tbl,
probe: ioc3_probe,
- remove: ioc3_remove_one,
+ remove: __devexit_p(ioc3_remove_one),
};
static int __init ioc3_init_module(void)
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index e46fe529394a..000f8389272d 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -1291,7 +1291,7 @@ static struct pci_driver vlsi_irda_driver = {
name: drivername,
id_table: vlsi_irda_table,
probe: vlsi_irda_probe,
- remove: vlsi_irda_remove,
+ remove: __devexit_p(vlsi_irda_remove),
suspend: vlsi_irda_suspend,
resume: vlsi_irda_resume,
};
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index d3d57823aa0e..063e0cc2704b 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -2504,7 +2504,7 @@ static struct pci_driver natsemi_driver = {
name: DRV_NAME,
id_table: natsemi_pci_tbl,
probe: natsemi_probe1,
- remove: natsemi_remove1,
+ remove: __devexit_p(natsemi_remove1),
#ifdef CONFIG_PM
suspend: natsemi_suspend,
resume: natsemi_resume,
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c
index 0189756a64bb..d1addf61c7c0 100644
--- a/drivers/net/ne2k-pci.c
+++ b/drivers/net/ne2k-pci.c
@@ -642,7 +642,7 @@ static void __devexit ne2k_pci_remove_one (struct pci_dev *pdev)
static struct pci_driver ne2k_driver = {
name: DRV_NAME,
probe: ne2k_pci_init_one,
- remove: ne2k_pci_remove_one,
+ remove: __devexit_p(ne2k_pci_remove_one),
id_table: ne2k_pci_tbl,
};
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 5e72b5c6b2ed..1dbffb650357 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -1637,7 +1637,7 @@ static struct pci_driver driver = {
name: "ns83820",
id_table: ns83820_pci_tbl,
probe: ns83820_init_one,
- remove: ns83820_remove_one,
+ remove: __devexit_p(ns83820_remove_one),
#if 0 /* FIXME: implement */
suspend: ,
resume: ,
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c
index 957b71b82245..45c435f843d6 100644
--- a/drivers/net/pci-skeleton.c
+++ b/drivers/net/pci-skeleton.c
@@ -1956,7 +1956,7 @@ static struct pci_driver netdrv_pci_driver = {
name: MODNAME,
id_table: netdrv_pci_tbl,
probe: netdrv_init_one,
- remove: netdrv_remove_one,
+ remove: __devexit_p(netdrv_remove_one),
#ifdef CONFIG_PM
suspend: netdrv_suspend,
resume: netdrv_resume,
diff --git a/drivers/net/pcmcia/xircom_cb.c b/drivers/net/pcmcia/xircom_cb.c
index 9fb35d9d0ff6..cc15b93a4cde 100644
--- a/drivers/net/pcmcia/xircom_cb.c
+++ b/drivers/net/pcmcia/xircom_cb.c
@@ -170,7 +170,7 @@ static struct pci_driver xircom_ops = {
name: "xircom_cb",
id_table: xircom_pci_table,
probe: xircom_probe,
- remove: xircom_remove,
+ remove: __devexit_p(xircom_remove),
};
diff --git a/drivers/net/pcmcia/xircom_tulip_cb.c b/drivers/net/pcmcia/xircom_tulip_cb.c
index 81b91524db03..60973d670ce0 100644
--- a/drivers/net/pcmcia/xircom_tulip_cb.c
+++ b/drivers/net/pcmcia/xircom_tulip_cb.c
@@ -1709,7 +1709,7 @@ static struct pci_driver xircom_driver = {
name: DRV_NAME,
id_table: xircom_pci_table,
probe: xircom_init_one,
- remove: xircom_remove_one,
+ remove: __devexit_p(xircom_remove_one),
#ifdef CONFIG_PM
suspend: xircom_suspend,
resume: xircom_resume
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index ab7f222fbf66..af4ce801b507 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -2129,7 +2129,7 @@ static struct pci_driver sis900_pci_driver = {
name: SIS900_MODULE_NAME,
id_table: sis900_pci_tbl,
probe: sis900_probe,
- remove: sis900_remove,
+ remove: __devexit_p(sis900_remove),
};
static int __init sis900_init_module(void)
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index 57920334c0ce..e01635c9646e 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -1982,7 +1982,7 @@ static void __devexit starfire_remove_one (struct pci_dev *pdev)
static struct pci_driver starfire_driver = {
name: DRV_NAME,
probe: starfire_init_one,
- remove: starfire_remove_one,
+ remove: __devexit_p(starfire_remove_one),
id_table: starfire_pci_tbl,
};
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index 510573b723f4..e92d0c138c01 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -1463,7 +1463,7 @@ static struct pci_driver sundance_driver = {
name: DRV_NAME,
id_table: sundance_pci_tbl,
probe: sundance_probe1,
- remove: sundance_remove1,
+ remove: __devexit_p(sundance_remove1),
};
static int __init sundance_init(void)
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index cd8dce3f18f7..bbdc8ca9ae6f 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2835,7 +2835,7 @@ static struct pci_driver gem_driver = {
name: GEM_MODULE_NAME,
id_table: gem_pci_tbl,
probe: gem_init_one,
- remove: gem_remove_one,
+ remove: __devexit_p(gem_remove_one),
#ifdef CONFIG_PM
suspend: gem_suspend,
resume: gem_resume,
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c
index 59a9f0cd1f64..144f7c688177 100644
--- a/drivers/net/tlan.c
+++ b/drivers/net/tlan.c
@@ -431,7 +431,7 @@ static struct pci_driver tlan_driver = {
name: "tlan",
id_table: tlan_pci_tbl,
probe: tlan_init_one,
- remove: tlan_remove_one,
+ remove: __devexit_p(tlan_remove_one),
};
static int __init tlan_probe(void)
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
index bbae0d62254d..32a11e49beaa 100644
--- a/drivers/net/tokenring/lanstreamer.c
+++ b/drivers/net/tokenring/lanstreamer.c
@@ -1812,7 +1812,7 @@ static struct pci_driver streamer_pci_driver = {
name: "lanstreamer",
id_table: streamer_pci_tbl,
probe: streamer_init_one,
- remove: streamer_remove_one,
+ remove: __devexit_p(streamer_remove_one),
};
static int __init streamer_init_module(void) {
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
index 00044db1bb0f..2f6e3ca9cb5e 100644
--- a/drivers/net/tokenring/olympic.c
+++ b/drivers/net/tokenring/olympic.c
@@ -1760,7 +1760,7 @@ static struct pci_driver olympic_driver = {
name: "olympic",
id_table: olympic_pci_tbl,
probe: olympic_probe,
- remove: olympic_remove_one
+ remove: __devexit_p(olympic_remove_one)
};
static int __init olympic_pci_init(void)
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index 9d62e00518d6..90d533330785 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -1754,7 +1754,7 @@ static struct pci_driver via_rhine_driver = {
name: "via-rhine",
id_table: via_rhine_pci_tbl,
probe: via_rhine_init_one,
- remove: via_rhine_remove_one,
+ remove: __devexit_p(via_rhine_remove_one),
};
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index 031506a5c2da..64258f647ce4 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -1810,7 +1810,7 @@ static struct pci_driver fst_driver = {
name: FST_NAME,
id_table: fst_pci_dev_id,
probe: fst_add_one,
- remove: fst_remove_one,
+ remove: __devexit_p(fst_remove_one),
suspend: NULL,
resume: NULL,
};
diff --git a/drivers/net/winbond-840.c b/drivers/net/winbond-840.c
index 90055d16871c..7616fad688ec 100644
--- a/drivers/net/winbond-840.c
+++ b/drivers/net/winbond-840.c
@@ -1732,7 +1732,7 @@ static struct pci_driver w840_driver = {
name: DRV_NAME,
id_table: w840_pci_tbl,
probe: w840_probe1,
- remove: w840_remove1,
+ remove: __devexit_p(w840_remove1),
#ifdef CONFIG_PM
suspend: w840_suspend,
resume: w840_resume,
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 72f4225836d1..454ad2adfc8a 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -63,7 +63,7 @@ static struct pci_driver airo_driver = {
name: "airo",
id_table: card_ids,
probe: airo_pci_probe,
- remove: airo_pci_remove,
+ remove: __devexit_p(airo_pci_remove),
};
#endif /* CONFIG_PCI */
diff --git a/drivers/net/wireless/orinoco_plx.c b/drivers/net/wireless/orinoco_plx.c
index 751a1e7335f7..9c84936c43ad 100644
--- a/drivers/net/wireless/orinoco_plx.c
+++ b/drivers/net/wireless/orinoco_plx.c
@@ -279,7 +279,7 @@ static struct pci_driver orinoco_plx_driver = {
name:"orinoco_plx",
id_table:orinoco_plx_pci_id_table,
probe:orinoco_plx_init_one,
- remove:orinoco_plx_remove_one,
+ remove:__devexit_p(orinoco_plx_remove_one),
suspend:0,
resume:0
};
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
index 47cf83a5bf39..5ccf3c055315 100644
--- a/drivers/net/yellowfin.c
+++ b/drivers/net/yellowfin.c
@@ -1487,7 +1487,7 @@ static struct pci_driver yellowfin_driver = {
name: DRV_NAME,
id_table: yellowfin_pci_tbl,
probe: yellowfin_init_one,
- remove: yellowfin_remove_one,
+ remove: __devexit_p(yellowfin_remove_one),
};
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
index 6eb80f07f2ef..52649275cc9e 100644
--- a/drivers/parport/parport_serial.c
+++ b/drivers/parport/parport_serial.c
@@ -331,7 +331,7 @@ static struct pci_driver parport_serial_pci_driver = {
name: "parport_serial",
id_table: parport_serial_pci_tbl,
probe: parport_serial_pci_probe,
- remove: parport_serial_pci_remove,
+ remove: __devexit_p(parport_serial_pci_remove),
};
diff --git a/drivers/pcmcia/pci_socket.c b/drivers/pcmcia/pci_socket.c
index 7c6615a64160..d30df9b4203a 100644
--- a/drivers/pcmcia/pci_socket.c
+++ b/drivers/pcmcia/pci_socket.c
@@ -249,7 +249,7 @@ static struct pci_driver pci_cardbus_driver = {
name: "cardbus",
id_table: cardbus_table,
probe: cardbus_probe,
- remove: cardbus_remove,
+ remove: __devexit_p(cardbus_remove),
suspend: cardbus_suspend,
resume: cardbus_resume,
};
diff --git a/drivers/usb/uhci.c b/drivers/usb/uhci.c
index e668cf3f15e4..ec02802c4889 100644
--- a/drivers/usb/uhci.c
+++ b/drivers/usb/uhci.c
@@ -2996,7 +2996,7 @@ static struct pci_driver uhci_pci_driver = {
id_table: uhci_pci_ids,
probe: uhci_pci_probe,
- remove: uhci_pci_remove,
+ remove: __devexit_p(uhci_pci_remove),
#ifdef CONFIG_PM
suspend: uhci_pci_suspend,
diff --git a/drivers/usb/usb-ohci.c b/drivers/usb/usb-ohci.c
index 63fb3a7b1d15..28ef71243cd8 100644
--- a/drivers/usb/usb-ohci.c
+++ b/drivers/usb/usb-ohci.c
@@ -2859,7 +2859,7 @@ static struct pci_driver ohci_pci_driver = {
id_table: &ohci_pci_ids [0],
probe: ohci_pci_probe,
- remove: ohci_pci_remove,
+ remove: __devexit_p(ohci_pci_remove),
#ifdef CONFIG_PM
suspend: ohci_pci_suspend,
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index d83338cc3965..74553d1392f0 100644
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -1683,7 +1683,7 @@ static struct pci_device_id cyberpro_pci_table[] __devinitdata = {
static struct pci_driver cyberpro_driver = {
name: "CyberPro",
probe: cyberpro_probe,
- remove: cyberpro_remove,
+ remove: __devexit_p(cyberpro_remove),
suspend: cyberpro_suspend,
resume: cyberpro_resume,
id_table: cyberpro_pci_table
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
index b3ef1541d3fa..76be9abdb73a 100644
--- a/drivers/video/imsttfb.c
+++ b/drivers/video/imsttfb.c
@@ -1643,7 +1643,7 @@ static struct pci_driver imsttfb_pci_driver = {
name: "imsttfb",
id_table: imsttfb_pci_tbl,
probe: imsttfb_probe,
- remove: imsttfb_remove,
+ remove: __devexit_p(imsttfb_remove),
};
static struct fb_ops imsttfb_ops = {
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index 2550a8a20020..757512059647 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -2332,7 +2332,7 @@ static struct pci_driver neofb_driver = {
name: "neofb",
id_table: neofb_devices,
probe: neofb_probe,
- remove: neofb_remove
+ remove: __devexit_p(neofb_remove)
};
/* **************************** init-time only **************************** */
diff --git a/drivers/video/radeonfb.c b/drivers/video/radeonfb.c
index d89cdb282c45..218ae637bc26 100644
--- a/drivers/video/radeonfb.c
+++ b/drivers/video/radeonfb.c
@@ -619,7 +619,7 @@ static struct pci_driver radeonfb_driver = {
name: "radeonfb",
id_table: radeonfb_pci_table,
probe: radeonfb_pci_register,
- remove: radeonfb_pci_unregister,
+ remove: __devexit_p(radeonfb_pci_unregister),
};
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
index 2213a8595582..72d42b197aa5 100644
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -2082,7 +2082,7 @@ static struct pci_driver rivafb_driver = {
name: "rivafb",
id_table: rivafb_pci_tbl,
probe: rivafb_init_one,
- remove: rivafb_remove_one,
+ remove: __devexit_p(rivafb_remove_one),
};
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c
index 68b8ed57a7c3..c49378e82e9f 100644
--- a/drivers/video/tdfxfb.c
+++ b/drivers/video/tdfxfb.c
@@ -495,7 +495,7 @@ static struct pci_driver tdfxfb_driver = {
name: "tdfxfb",
id_table: tdfxfb_id_table,
probe: tdfxfb_probe,
- remove: tdfxfb_remove,
+ remove: __devexit_p(tdfxfb_remove),
};
MODULE_DEVICE_TABLE(pci, tdfxfb_id_table);
diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h
index 1ba4266c7376..d76bcde410da 100644
--- a/include/asm-alpha/bitops.h
+++ b/include/asm-alpha/bitops.h
@@ -460,6 +460,27 @@ found_middle:
#ifdef __KERNEL__
+/*
+ * Every architecture must define this function. It's the fastest
+ * way of searching a 140-bit bitmap where the first 100 bits are
+ * unlikely to be set. It's guaranteed that at least one of the 140
+ * bits is set.
+ */
+static inline unsigned long
+sched_find_first_bit(unsigned long b[3])
+{
+ unsigned long b0 = b[0], b1 = b[1], b2 = b[2];
+ unsigned long ofs;
+
+ ofs = (b1 ? 64 : 128);
+ b1 = (b1 ? b1 : b2);
+ ofs = (b0 ? 0 : ofs);
+ b0 = (b0 ? b0 : b1);
+
+ return __ffs(b0) + ofs;
+}
+
+
#define ext2_set_bit __test_and_set_bit
#define ext2_clear_bit __test_and_clear_bit
#define ext2_test_bit test_bit
diff --git a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h
index 94d26e7b60f3..01265ce73e37 100644
--- a/include/asm-alpha/mmu_context.h
+++ b/include/asm-alpha/mmu_context.h
@@ -21,31 +21,6 @@
#include <asm/io.h>
#endif
-/* ??? This does not belong here. */
-/*
- * Every architecture must define this function. It's the fastest
- * way of searching a 168-bit bitmap where the first 128 bits are
- * unlikely to be set. It's guaranteed that at least one of the 168
- * bits is set.
- */
-#if MAX_RT_PRIO != 128 || MAX_PRIO > 192
-# error update this function.
-#endif
-
-static inline int
-sched_find_first_bit(unsigned long *b)
-{
- unsigned long b0 = b[0], b1 = b[1], b2 = b[2];
- unsigned long offset = 128;
-
- if (unlikely(b0 | b1)) {
- b2 = (b0 ? b0 : b1);
- offset = (b0 ? 0 : 64);
- }
-
- return __ffs(b2) + offset;
-}
-
extern inline unsigned long
__reload_thread(struct pcb_struct *pcb)
diff --git a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h
index 619643e9c275..d928c653c4f7 100644
--- a/include/asm-alpha/spinlock.h
+++ b/include/asm-alpha/spinlock.h
@@ -121,8 +121,8 @@ static inline void _raw_write_lock(rwlock_t * lock)
" bne %1,6b\n"
" br 1b\n"
".previous"
- : "=m" (*(volatile int *)lock), "=&r" (regx)
- : "0" (*(volatile int *)lock) : "memory");
+ : "=m" (*lock), "=&r" (regx)
+ : "0" (*lock) : "memory");
}
static inline void _raw_read_lock(rwlock_t * lock)
@@ -141,8 +141,8 @@ static inline void _raw_read_lock(rwlock_t * lock)
" blbs %1,6b\n"
" br 1b\n"
".previous"
- : "=m" (*(volatile int *)lock), "=&r" (regx)
- : "m" (*(volatile int *)lock) : "memory");
+ : "=m" (*lock), "=&r" (regx)
+ : "m" (*lock) : "memory");
}
#endif /* CONFIG_DEBUG_RWLOCK */
@@ -164,8 +164,8 @@ static inline void _raw_read_unlock(rwlock_t * lock)
".subsection 2\n"
"6: br 1b\n"
".previous"
- : "=m" (*(volatile int *)lock), "=&r" (regx)
- : "m" (*(volatile int *)lock) : "memory");
+ : "=m" (*lock), "=&r" (regx)
+ : "m" (*lock) : "memory");
}
#endif /* _ALPHA_SPINLOCK_H */
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h
index bc06fe188985..ad6c9fbde6a5 100644
--- a/include/asm-alpha/system.h
+++ b/include/asm-alpha/system.h
@@ -131,15 +131,13 @@ extern void halt(void) __attribute__((noreturn));
#define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
#define prepare_to_switch() do { } while(0)
-#define switch_to(prev,next,last) \
-do { \
- unsigned long pcbb; \
- pcbb = virt_to_phys(&(next)->thread_info->pcb); \
- (last) = alpha_switch_to(pcbb, (prev)); \
- check_mmu_context(); \
+#define switch_to(prev,next) \
+do { \
+ alpha_switch_to(virt_to_phys(&(next)->thread_info->pcb), (prev)); \
+ check_mmu_context(); \
} while (0)
-extern struct task_struct* alpha_switch_to(unsigned long, struct task_struct*);
+extern void alpha_switch_to(unsigned long, struct task_struct*);
#define mb() \
__asm__ __volatile__("mb": : :"memory")
@@ -368,7 +366,59 @@ extern void __global_restore_flags(unsigned long flags);
* it must clobber "memory" (also for interrupts in UP).
*/
-extern __inline__ unsigned long
+static inline unsigned long
+__xchg_u8(volatile char *m, unsigned long val)
+{
+ unsigned long ret, tmp, addr64;
+
+ __asm__ __volatile__(
+ " andnot %4,7,%3\n"
+ " insbl %1,%4,%1\n"
+ "1: ldq_l %2,0(%3)\n"
+ " extbl %2,%4,%0\n"
+ " mskbl %2,%4,%2\n"
+ " or %1,%2,%2\n"
+ " stq_c %2,0(%3)\n"
+ " beq %2,2f\n"
+#ifdef CONFIG_SMP
+ " mb\n"
+#endif
+ ".subsection 2\n"
+ "2: br 1b\n"
+ ".previous"
+ : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
+ : "r" ((long)m), "1" (val) : "memory");
+
+ return ret;
+}
+
+static inline unsigned long
+__xchg_u16(volatile short *m, unsigned long val)
+{
+ unsigned long ret, tmp, addr64;
+
+ __asm__ __volatile__(
+ " andnot %4,7,%3\n"
+ " inswl %1,%4,%1\n"
+ "1: ldq_l %2,0(%3)\n"
+ " extwl %2,%4,%0\n"
+ " mskwl %2,%4,%2\n"
+ " or %1,%2,%2\n"
+ " stq_c %2,0(%3)\n"
+ " beq %2,2f\n"
+#ifdef CONFIG_SMP
+ " mb\n"
+#endif
+ ".subsection 2\n"
+ "2: br 1b\n"
+ ".previous"
+ : "=&r" (ret), "=&r" (val), "=&r" (tmp), "=&r" (addr64)
+ : "r" ((long)m), "1" (val) : "memory");
+
+ return ret;
+}
+
+static inline unsigned long
__xchg_u32(volatile int *m, unsigned long val)
{
unsigned long dummy;
@@ -390,7 +440,7 @@ __xchg_u32(volatile int *m, unsigned long val)
return val;
}
-extern __inline__ unsigned long
+static inline unsigned long
__xchg_u64(volatile long *m, unsigned long val)
{
unsigned long dummy;
@@ -416,10 +466,14 @@ __xchg_u64(volatile long *m, unsigned long val)
if something tries to do an invalid xchg(). */
extern void __xchg_called_with_bad_pointer(void);
-static __inline__ unsigned long
+static inline unsigned long
__xchg(volatile void *ptr, unsigned long x, int size)
{
switch (size) {
+ case 1:
+ return __xchg_u8(ptr, x);
+ case 2:
+ return __xchg_u16(ptr, x);
case 4:
return __xchg_u32(ptr, x);
case 8:
@@ -451,7 +505,65 @@ __xchg(volatile void *ptr, unsigned long x, int size)
#define __HAVE_ARCH_CMPXCHG 1
-extern __inline__ unsigned long
+static inline unsigned long
+__cmpxchg_u8(volatile char *m, long old, long new)
+{
+ unsigned long prev, tmp, cmp, addr64;
+
+ __asm__ __volatile__(
+ " andnot %5,7,%4\n"
+ " insbl %1,%5,%1\n"
+ "1: ldq_l %2,0(%4)\n"
+ " extbl %2,%5,%0\n"
+ " cmpeq %0,%6,%3\n"
+ " beq %3,2f\n"
+ " mskbl %2,%5,%2\n"
+ " or %1,%2,%2\n"
+ " stq_c %2,0(%4)\n"
+ " beq %2,3f\n"
+#ifdef CONFIG_SMP
+ " mb\n"
+#endif
+ "2:\n"
+ ".subsection 2\n"
+ "3: br 1b\n"
+ ".previous"
+ : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
+ : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
+
+ return prev;
+}
+
+static inline unsigned long
+__cmpxchg_u16(volatile short *m, long old, long new)
+{
+ unsigned long prev, tmp, cmp, addr64;
+
+ __asm__ __volatile__(
+ " andnot %5,7,%4\n"
+ " inswl %1,%5,%1\n"
+ "1: ldq_l %2,0(%4)\n"
+ " extwl %2,%5,%0\n"
+ " cmpeq %0,%6,%3\n"
+ " beq %3,2f\n"
+ " mskwl %2,%5,%2\n"
+ " or %1,%2,%2\n"
+ " stq_c %2,0(%4)\n"
+ " beq %2,3f\n"
+#ifdef CONFIG_SMP
+ " mb\n"
+#endif
+ "2:\n"
+ ".subsection 2\n"
+ "3: br 1b\n"
+ ".previous"
+ : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64)
+ : "r" ((long)m), "Ir" (old), "1" (new) : "memory");
+
+ return prev;
+}
+
+static inline unsigned long
__cmpxchg_u32(volatile int *m, int old, int new)
{
unsigned long prev, cmp;
@@ -476,7 +588,7 @@ __cmpxchg_u32(volatile int *m, int old, int new)
return prev;
}
-extern __inline__ unsigned long
+static inline unsigned long
__cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new)
{
unsigned long prev, cmp;
@@ -505,10 +617,14 @@ __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new)
if something tries to do an invalid cmpxchg(). */
extern void __cmpxchg_called_with_bad_pointer(void);
-static __inline__ unsigned long
+static inline unsigned long
__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
{
switch (size) {
+ case 1:
+ return __cmpxchg_u8(ptr, old, new);
+ case 2:
+ return __cmpxchg_u16(ptr, old, new);
case 4:
return __cmpxchg_u32(ptr, old, new);
case 8:
diff --git a/include/math-emu/op-4.h b/include/math-emu/op-4.h
index 2aa1356325ad..bb0305e59f63 100644
--- a/include/math-emu/op-4.h
+++ b/include/math-emu/op-4.h
@@ -645,7 +645,7 @@
X##_f[1] = (rsize <= _FP_W_TYPE_SIZE ? 0 : r >> _FP_W_TYPE_SIZE); \
X##_f[2] = (rsize <= 2*_FP_W_TYPE_SIZE ? 0 : r >> 2*_FP_W_TYPE_SIZE); \
X##_f[3] = (rsize <= 3*_FP_W_TYPE_SIZE ? 0 : r >> 3*_FP_W_TYPE_SIZE); \
- } while (0);
+ } while (0)
#define _FP_FRAC_CONV_4_1(dfs, sfs, D, S) \
do { \
diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c
index e70f65823a54..40a6966eae21 100644
--- a/sound/oss/btaudio.c
+++ b/sound/oss/btaudio.c
@@ -1030,7 +1030,7 @@ static struct pci_driver btaudio_pci_driver = {
name: "btaudio",
id_table: btaudio_pci_tbl,
probe: btaudio_probe,
- remove: btaudio_remove,
+ remove: __devexit_p(btaudio_remove),
};
int btaudio_init_module(void)
diff --git a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c
index bc53fcfd784b..69f192c8dce8 100644
--- a/sound/oss/emu10k1/main.c
+++ b/sound/oss/emu10k1/main.c
@@ -1127,7 +1127,7 @@ static struct pci_driver emu10k1_pci_driver = {
name: "emu10k1",
id_table: emu10k1_pci_tbl,
probe: emu10k1_probe,
- remove: emu10k1_remove,
+ remove: __devexit_p(emu10k1_remove),
};
static int __init emu10k1_init_module(void)
diff --git a/sound/oss/ymfpci.c b/sound/oss/ymfpci.c
index 8614108b1c18..c7bacf23aa34 100644
--- a/sound/oss/ymfpci.c
+++ b/sound/oss/ymfpci.c
@@ -2652,7 +2652,7 @@ static struct pci_driver ymfpci_driver = {
name: "ymfpci",
id_table: ymf_id_tbl,
probe: ymf_probe_one,
- remove: ymf_remove_one,
+ remove: __devexit_p(ymf_remove_one),
suspend: ymf_suspend,
resume: ymf_resume
};