diff options
Diffstat (limited to 'include')
110 files changed, 657 insertions, 551 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 7b74b60a68a4..19c3ead2a90b 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -168,8 +168,7 @@ struct acpi_device_flags { | |||
168 | u32 power_manageable:1; | 168 | u32 power_manageable:1; |
169 | u32 performance_manageable:1; | 169 | u32 performance_manageable:1; |
170 | u32 wake_capable:1; /* Wakeup(_PRW) supported? */ | 170 | u32 wake_capable:1; /* Wakeup(_PRW) supported? */ |
171 | u32 force_power_state:1; | 171 | u32 reserved:20; |
172 | u32 reserved:19; | ||
173 | }; | 172 | }; |
174 | 173 | ||
175 | /* File System */ | 174 | /* File System */ |
diff --git a/include/asm-arm/arch-at91/board.h b/include/asm-arm/arch-at91/board.h index d96b10fd449f..c0d7075982c1 100644 --- a/include/asm-arm/arch-at91/board.h +++ b/include/asm-arm/arch-at91/board.h | |||
@@ -130,4 +130,7 @@ extern u8 at91_leds_cpu; | |||
130 | extern u8 at91_leds_timer; | 130 | extern u8 at91_leds_timer; |
131 | extern void __init at91_init_leds(u8 cpu_led, u8 timer_led); | 131 | extern void __init at91_init_leds(u8 cpu_led, u8 timer_led); |
132 | 132 | ||
133 | /* FIXME: this needs a better location, but gets stuff building again */ | ||
134 | extern int at91_suspend_entering_slow_clock(void); | ||
135 | |||
133 | #endif | 136 | #endif |
diff --git a/include/asm-arm/arch-davinci/gpio.h b/include/asm-arm/arch-davinci/gpio.h index ea24a0e0bfd6..ff8de30b2fb3 100644 --- a/include/asm-arm/arch-davinci/gpio.h +++ b/include/asm-arm/arch-davinci/gpio.h | |||
@@ -13,6 +13,9 @@ | |||
13 | #ifndef __DAVINCI_GPIO_H | 13 | #ifndef __DAVINCI_GPIO_H |
14 | #define __DAVINCI_GPIO_H | 14 | #define __DAVINCI_GPIO_H |
15 | 15 | ||
16 | #include <linux/io.h> | ||
17 | #include <asm/hardware.h> | ||
18 | |||
16 | /* | 19 | /* |
17 | * basic gpio routines | 20 | * basic gpio routines |
18 | * | 21 | * |
diff --git a/include/asm-arm/arch-pxa/mfp-pxa300.h b/include/asm-arm/arch-pxa/mfp-pxa300.h index 7513c7a3402d..822a27cd7864 100644 --- a/include/asm-arm/arch-pxa/mfp-pxa300.h +++ b/include/asm-arm/arch-pxa/mfp-pxa300.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * PXA300/PXA310 specific MFP configuration definitions | 4 | * PXA300/PXA310 specific MFP configuration definitions |
5 | * | 5 | * |
6 | * Copyright (C) 2007 Marvell International Ltd. | 6 | * Copyright (C) 2007 Marvell International Ltd. |
7 | * 2007-08-21: eric miao <eric.y.miao@gmail.com> | 7 | * 2007-08-21: eric miao <eric.miao@marvell.com> |
8 | * initial version | 8 | * initial version |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/asm-arm/arch-pxa/mfp-pxa320.h b/include/asm-arm/arch-pxa/mfp-pxa320.h index ae8ba34194cf..488a5bbc49e9 100644 --- a/include/asm-arm/arch-pxa/mfp-pxa320.h +++ b/include/asm-arm/arch-pxa/mfp-pxa320.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * PXA320 specific MFP configuration definitions | 4 | * PXA320 specific MFP configuration definitions |
5 | * | 5 | * |
6 | * Copyright (C) 2007 Marvell International Ltd. | 6 | * Copyright (C) 2007 Marvell International Ltd. |
7 | * 2007-08-21: eric miao <eric.y.miao@gmail.com> | 7 | * 2007-08-21: eric miao <eric.miao@marvell.com> |
8 | * initial version | 8 | * initial version |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/asm-arm/arch-pxa/mfp.h b/include/asm-arm/arch-pxa/mfp.h index 60291742ffdd..ac4157af5a8e 100644 --- a/include/asm-arm/arch-pxa/mfp.h +++ b/include/asm-arm/arch-pxa/mfp.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2007 Marvell International Ltd. | 6 | * Copyright (C) 2007 Marvell International Ltd. |
7 | * | 7 | * |
8 | * 2007-8-21: eric miao <eric.y.miao@gmail.com> | 8 | * 2007-8-21: eric miao <eric.miao@marvell.com> |
9 | * initial version | 9 | * initial version |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/asm-arm/flat.h b/include/asm-arm/flat.h index 16f5375e57b8..9918aa46d9e5 100644 --- a/include/asm-arm/flat.h +++ b/include/asm-arm/flat.h | |||
@@ -11,8 +11,9 @@ | |||
11 | #define flat_argvp_envp_on_stack() 1 | 11 | #define flat_argvp_envp_on_stack() 1 |
12 | #define flat_old_ram_flag(flags) (flags) | 12 | #define flat_old_ram_flag(flags) (flags) |
13 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | 13 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
14 | #define flat_get_addr_from_rp(rp, relval, flags) get_unaligned(rp) | 14 | #define flat_get_addr_from_rp(rp, relval, flags, persistent) get_unaligned(rp) |
15 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) | 15 | #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) |
16 | #define flat_get_relocate_addr(rel) (rel) | 16 | #define flat_get_relocate_addr(rel) (rel) |
17 | #define flat_set_persistent(relval, p) 0 | ||
17 | 18 | ||
18 | #endif /* __ARM_FLAT_H__ */ | 19 | #endif /* __ARM_FLAT_H__ */ |
diff --git a/include/asm-arm/plat-s3c/regs-nand.h b/include/asm-arm/plat-s3c/regs-nand.h index b824d371ae0b..d742205ac172 100644 --- a/include/asm-arm/plat-s3c/regs-nand.h +++ b/include/asm-arm/plat-s3c/regs-nand.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28) | 35 | #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28) |
36 | #define S3C2440_NFMECC0 S3C2410_NFREG(0x2C) | 36 | #define S3C2440_NFMECC0 S3C2410_NFREG(0x2C) |
37 | #define S3C2440_NFMECC1 S3C2410_NFREG(0x30) | 37 | #define S3C2440_NFMECC1 S3C2410_NFREG(0x30) |
38 | #define S3C2440_NFSECC S3C24E10_NFREG(0x34) | 38 | #define S3C2440_NFSECC S3C2410_NFREG(0x34) |
39 | #define S3C2440_NFSBLK S3C2410_NFREG(0x38) | 39 | #define S3C2440_NFSBLK S3C2410_NFREG(0x38) |
40 | #define S3C2440_NFEBLK S3C2410_NFREG(0x3C) | 40 | #define S3C2440_NFEBLK S3C2410_NFREG(0x3C) |
41 | 41 | ||
diff --git a/include/asm-avr32/dma-mapping.h b/include/asm-avr32/dma-mapping.h index a7131630c057..57dc672bab8e 100644 --- a/include/asm-avr32/dma-mapping.h +++ b/include/asm-avr32/dma-mapping.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/device.h> | 5 | #include <linux/device.h> |
6 | #include <asm/scatterlist.h> | 6 | #include <linux/scatterlist.h> |
7 | #include <asm/processor.h> | 7 | #include <asm/processor.h> |
8 | #include <asm/cacheflush.h> | 8 | #include <asm/cacheflush.h> |
9 | #include <asm/io.h> | 9 | #include <asm/io.h> |
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index 14cb8d35924e..0212e180b90e 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
@@ -80,6 +80,7 @@ extern int atomic_sub32(void); | |||
80 | extern int atomic_ior32(void); | 80 | extern int atomic_ior32(void); |
81 | extern int atomic_and32(void); | 81 | extern int atomic_and32(void); |
82 | extern int atomic_xor32(void); | 82 | extern int atomic_xor32(void); |
83 | extern void safe_user_instruction(void); | ||
83 | extern void sigreturn_stub(void); | 84 | extern void sigreturn_stub(void); |
84 | 85 | ||
85 | extern void *l1_data_A_sram_alloc(size_t); | 86 | extern void *l1_data_A_sram_alloc(size_t); |
diff --git a/include/asm-blackfin/fixed_code.h b/include/asm-blackfin/fixed_code.h index e6df84ee1557..37db66c7030d 100644 --- a/include/asm-blackfin/fixed_code.h +++ b/include/asm-blackfin/fixed_code.h | |||
@@ -17,4 +17,6 @@ | |||
17 | 17 | ||
18 | #define ATOMIC_SEQS_END 0x480 | 18 | #define ATOMIC_SEQS_END 0x480 |
19 | 19 | ||
20 | #define FIXED_CODE_END 0x480 | 20 | #define SAFE_USER_INSTRUCTION 0x480 |
21 | |||
22 | #define FIXED_CODE_END 0x490 | ||
diff --git a/include/asm-blackfin/gptimers.h b/include/asm-blackfin/gptimers.h index c97ab03e43a6..8265ea473d5b 100644 --- a/include/asm-blackfin/gptimers.h +++ b/include/asm-blackfin/gptimers.h | |||
@@ -197,6 +197,8 @@ uint32_t get_gptimer_period (int timer_id); | |||
197 | uint32_t get_gptimer_count (int timer_id); | 197 | uint32_t get_gptimer_count (int timer_id); |
198 | uint16_t get_gptimer_intr (int timer_id); | 198 | uint16_t get_gptimer_intr (int timer_id); |
199 | void clear_gptimer_intr (int timer_id); | 199 | void clear_gptimer_intr (int timer_id); |
200 | uint16_t get_gptimer_over (int timer_id); | ||
201 | void clear_gptimer_over (int timer_id); | ||
200 | void set_gptimer_config (int timer_id, uint16_t config); | 202 | void set_gptimer_config (int timer_id, uint16_t config); |
201 | uint16_t get_gptimer_config (int timer_id); | 203 | uint16_t get_gptimer_config (int timer_id); |
202 | void set_gptimer_pulse_hi (int timer_id); | 204 | void set_gptimer_pulse_hi (int timer_id); |
diff --git a/include/asm-blackfin/mach-bf527/defBF52x_base.h b/include/asm-blackfin/mach-bf527/defBF52x_base.h index d6c24c54699d..fc69cf93f149 100644 --- a/include/asm-blackfin/mach-bf527/defBF52x_base.h +++ b/include/asm-blackfin/mach-bf527/defBF52x_base.h | |||
@@ -1718,55 +1718,55 @@ | |||
1718 | 1718 | ||
1719 | /* Bit masks for HOST_CONTROL */ | 1719 | /* Bit masks for HOST_CONTROL */ |
1720 | 1720 | ||
1721 | #define HOST_EN 0x1 /* Host Enable */ | 1721 | #define HOST_CNTR_HOST_EN 0x1 /* Host Enable */ |
1722 | #define nHOST_EN 0x0 | 1722 | #define HOST_CNTR_nHOST_EN 0x0 |
1723 | #define HOST_END 0x2 /* Host Endianess */ | 1723 | #define HOST_CNTR_HOST_END 0x2 /* Host Endianess */ |
1724 | #define nHOST_END 0x0 | 1724 | #define HOST_CNTR_nHOST_END 0x0 |
1725 | #define DATA_SIZE 0x4 /* Data Size */ | 1725 | #define HOST_CNTR_DATA_SIZE 0x4 /* Data Size */ |
1726 | #define nDATA_SIZE 0x0 | 1726 | #define HOST_CNTR_nDATA_SIZE 0x0 |
1727 | #define HOST_RST 0x8 /* Host Reset */ | 1727 | #define HOST_CNTR_HOST_RST 0x8 /* Host Reset */ |
1728 | #define nHOST_RST 0x0 | 1728 | #define HOST_CNTR_nHOST_RST 0x0 |
1729 | #define HRDY_OVR 0x20 /* Host Ready Override */ | 1729 | #define HOST_CNTR_HRDY_OVR 0x20 /* Host Ready Override */ |
1730 | #define nHRDY_OVR 0x0 | 1730 | #define HOST_CNTR_nHRDY_OVR 0x0 |
1731 | #define INT_MODE 0x40 /* Interrupt Mode */ | 1731 | #define HOST_CNTR_INT_MODE 0x40 /* Interrupt Mode */ |
1732 | #define nINT_MODE 0x0 | 1732 | #define HOST_CNTR_nINT_MODE 0x0 |
1733 | #define BT_EN 0x80 /* Bus Timeout Enable */ | 1733 | #define HOST_CNTR_BT_EN 0x80 /* Bus Timeout Enable */ |
1734 | #define nBT_EN 0x0 | 1734 | #define HOST_CNTR_ nBT_EN 0x0 |
1735 | #define EHW 0x100 /* Enable Host Write */ | 1735 | #define HOST_CNTR_EHW 0x100 /* Enable Host Write */ |
1736 | #define nEHW 0x0 | 1736 | #define HOST_CNTR_nEHW 0x0 |
1737 | #define EHR 0x200 /* Enable Host Read */ | 1737 | #define HOST_CNTR_EHR 0x200 /* Enable Host Read */ |
1738 | #define nEHR 0x0 | 1738 | #define HOST_CNTR_nEHR 0x0 |
1739 | #define BDR 0x400 /* Burst DMA Requests */ | 1739 | #define HOST_CNTR_BDR 0x400 /* Burst DMA Requests */ |
1740 | #define nBDR 0x0 | 1740 | #define HOST_CNTR_nBDR 0x0 |
1741 | 1741 | ||
1742 | /* Bit masks for HOST_STATUS */ | 1742 | /* Bit masks for HOST_STATUS */ |
1743 | 1743 | ||
1744 | #define READY 0x1 /* DMA Ready */ | 1744 | #define HOST_STAT_READY 0x1 /* DMA Ready */ |
1745 | #define nREADY 0x0 | 1745 | #define HOST_STAT_nREADY 0x0 |
1746 | #define FIFOFULL 0x2 /* FIFO Full */ | 1746 | #define HOST_STAT_FIFOFULL 0x2 /* FIFO Full */ |
1747 | #define nFIFOFULL 0x0 | 1747 | #define HOST_STAT_nFIFOFULL 0x0 |
1748 | #define FIFOEMPTY 0x4 /* FIFO Empty */ | 1748 | #define HOST_STAT_FIFOEMPTY 0x4 /* FIFO Empty */ |
1749 | #define nFIFOEMPTY 0x0 | 1749 | #define HOST_STAT_nFIFOEMPTY 0x0 |
1750 | #define COMPLETE 0x8 /* DMA Complete */ | 1750 | #define HOST_STAT_COMPLETE 0x8 /* DMA Complete */ |
1751 | #define nCOMPLETE 0x0 | 1751 | #define HOST_STAT_nCOMPLETE 0x0 |
1752 | #define HSHK 0x10 /* Host Handshake */ | 1752 | #define HOST_STAT_HSHK 0x10 /* Host Handshake */ |
1753 | #define nHSHK 0x0 | 1753 | #define HOST_STAT_nHSHK 0x0 |
1754 | #define TIMEOUT 0x20 /* Host Timeout */ | 1754 | #define HOST_STAT_TIMEOUT 0x20 /* Host Timeout */ |
1755 | #define nTIMEOUT 0x0 | 1755 | #define HOST_STAT_nTIMEOUT 0x0 |
1756 | #define HIRQ 0x40 /* Host Interrupt Request */ | 1756 | #define HOST_STAT_HIRQ 0x40 /* Host Interrupt Request */ |
1757 | #define nHIRQ 0x0 | 1757 | #define HOST_STAT_nHIRQ 0x0 |
1758 | #define ALLOW_CNFG 0x80 /* Allow New Configuration */ | 1758 | #define HOST_STAT_ALLOW_CNFG 0x80 /* Allow New Configuration */ |
1759 | #define nALLOW_CNFG 0x0 | 1759 | #define HOST_STAT_nALLOW_CNFG 0x0 |
1760 | #define DMA_DIR 0x100 /* DMA Direction */ | 1760 | #define HOST_STAT_DMA_DIR 0x100 /* DMA Direction */ |
1761 | #define nDMA_DIR 0x0 | 1761 | #define HOST_STAT_nDMA_DIR 0x0 |
1762 | #define BTE 0x200 /* Bus Timeout Enabled */ | 1762 | #define HOST_STAT_BTE 0x200 /* Bus Timeout Enabled */ |
1763 | #define nBTE 0x0 | 1763 | #define HOST_STAT_nBTE 0x0 |
1764 | #define HOSTRD_DONE 0x8000 /* Host Read Completion Interrupt */ | 1764 | #define HOST_STAT_HOSTRD_DONE 0x8000 /* Host Read Completion Interrupt */ |
1765 | #define nHOSTRD_DONE 0x0 | 1765 | #define HOST_STAT_nHOSTRD_DONE 0x0 |
1766 | 1766 | ||
1767 | /* Bit masks for HOST_TIMEOUT */ | 1767 | /* Bit masks for HOST_TIMEOUT */ |
1768 | 1768 | ||
1769 | #define COUNT_TIMEOUT 0x7ff /* Host Timeout count */ | 1769 | #define HOST_COUNT_TIMEOUT 0x7ff /* Host Timeout count */ |
1770 | 1770 | ||
1771 | /* Bit masks for CNT_CONFIG */ | 1771 | /* Bit masks for CNT_CONFIG */ |
1772 | 1772 | ||
diff --git a/include/asm-blackfin/mach-bf527/dma.h b/include/asm-blackfin/mach-bf527/dma.h index a41627ae9134..2dfee12864f6 100644 --- a/include/asm-blackfin/mach-bf527/dma.h +++ b/include/asm-blackfin/mach-bf527/dma.h | |||
@@ -35,7 +35,6 @@ | |||
35 | #define MAX_BLACKFIN_DMA_CHANNEL 16 | 35 | #define MAX_BLACKFIN_DMA_CHANNEL 16 |
36 | 36 | ||
37 | #define CH_PPI 0 /* PPI receive/transmit or NFC */ | 37 | #define CH_PPI 0 /* PPI receive/transmit or NFC */ |
38 | #define CH_NFC 0 /* PPI receive/transmit or NFC */ | ||
39 | #define CH_EMAC_RX 1 /* Ethernet MAC receive or HOSTDP */ | 38 | #define CH_EMAC_RX 1 /* Ethernet MAC receive or HOSTDP */ |
40 | #define CH_EMAC_HOSTDP 1 /* Ethernet MAC receive or HOSTDP */ | 39 | #define CH_EMAC_HOSTDP 1 /* Ethernet MAC receive or HOSTDP */ |
41 | #define CH_EMAC_TX 2 /* Ethernet MAC transmit or NFC */ | 40 | #define CH_EMAC_TX 2 /* Ethernet MAC transmit or NFC */ |
@@ -54,6 +53,12 @@ | |||
54 | #define CH_MEM_STREAM1_DEST 14 /* TX */ | 53 | #define CH_MEM_STREAM1_DEST 14 /* TX */ |
55 | #define CH_MEM_STREAM1_SRC 15 /* RX */ | 54 | #define CH_MEM_STREAM1_SRC 15 /* RX */ |
56 | 55 | ||
56 | #if defined(CONFIG_BF527_NAND_D_PORTF) | ||
57 | #define CH_NFC CH_PPI /* PPI receive/transmit or NFC */ | ||
58 | #elif defined(CONFIG_BF527_NAND_D_PORTH) | ||
59 | #define CH_NFC CH_EMAC_TX /* PPI receive/transmit or NFC */ | ||
60 | #endif | ||
61 | |||
57 | extern int channel2irq(unsigned int channel); | 62 | extern int channel2irq(unsigned int channel); |
58 | extern struct dma_register *base_addr[]; | 63 | extern struct dma_register *base_addr[]; |
59 | 64 | ||
diff --git a/include/asm-blackfin/mach-bf548/defBF549.h b/include/asm-blackfin/mach-bf548/defBF549.h index 4e46d657e50e..fcb72b41e007 100644 --- a/include/asm-blackfin/mach-bf548/defBF549.h +++ b/include/asm-blackfin/mach-bf548/defBF549.h | |||
@@ -1671,7 +1671,7 @@ | |||
1671 | /* Bit masks for MXVR_DMAx_CONFIG */ | 1671 | /* Bit masks for MXVR_DMAx_CONFIG */ |
1672 | 1672 | ||
1673 | #define MDMAEN 0x1 /* DMA Channel Enable */ | 1673 | #define MDMAEN 0x1 /* DMA Channel Enable */ |
1674 | #define DD 0x2 /* DMA Channel Direction */ | 1674 | #define DMADD 0x2 /* DMA Channel Direction */ |
1675 | #define BY4SWAPEN 0x20 /* DMA Channel Four Byte Swap Enable */ | 1675 | #define BY4SWAPEN 0x20 /* DMA Channel Four Byte Swap Enable */ |
1676 | #define LCHAN 0x3c0 /* DMA Channel Logical Channel */ | 1676 | #define LCHAN 0x3c0 /* DMA Channel Logical Channel */ |
1677 | #define BITSWAPEN 0x400 /* DMA Channel Bit Swap Enable */ | 1677 | #define BITSWAPEN 0x400 /* DMA Channel Bit Swap Enable */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF54x_base.h b/include/asm-blackfin/mach-bf548/defBF54x_base.h index 1d365c844ffe..da979cb62f7d 100644 --- a/include/asm-blackfin/mach-bf548/defBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/defBF54x_base.h | |||
@@ -2252,6 +2252,13 @@ | |||
2252 | #define PLL_OFF 0x2 /* Disable PLL */ | 2252 | #define PLL_OFF 0x2 /* Disable PLL */ |
2253 | #define DF 0x1 /* Divide Frequency */ | 2253 | #define DF 0x1 /* Divide Frequency */ |
2254 | 2254 | ||
2255 | /* SWRST Masks */ | ||
2256 | #define SYSTEM_RESET 0x0007 /* Initiates A System Software Reset */ | ||
2257 | #define DOUBLE_FAULT 0x0008 /* Core Double Fault Causes Reset */ | ||
2258 | #define RESET_DOUBLE 0x2000 /* SW Reset Generated By Core Double-Fault */ | ||
2259 | #define RESET_WDOG 0x4000 /* SW Reset Generated By Watchdog Timer */ | ||
2260 | #define RESET_SOFTWARE 0x8000 /* SW Reset Occurred Since Last Read Of SWRST */ | ||
2261 | |||
2255 | /* Bit masks for PLL_STAT */ | 2262 | /* Bit masks for PLL_STAT */ |
2256 | 2263 | ||
2257 | #define PLL_LOCKED 0x20 /* PLL Locked Status */ | 2264 | #define PLL_LOCKED 0x20 /* PLL Locked Status */ |
diff --git a/include/asm-blackfin/mach-bf548/portmux.h b/include/asm-blackfin/mach-bf548/portmux.h index b382deb501a7..6b485120015f 100644 --- a/include/asm-blackfin/mach-bf548/portmux.h +++ b/include/asm-blackfin/mach-bf548/portmux.h | |||
@@ -267,4 +267,18 @@ | |||
267 | #define P_AMC_BG (P_DEFINED | P_IDENT(GPIO_PJ12) | P_FUNCT(0)) | 267 | #define P_AMC_BG (P_DEFINED | P_IDENT(GPIO_PJ12) | P_FUNCT(0)) |
268 | #define P_AMC_BGH (P_DEFINED | P_IDENT(GPIO_PJ13) | P_FUNCT(0)) | 268 | #define P_AMC_BGH (P_DEFINED | P_IDENT(GPIO_PJ13) | P_FUNCT(0)) |
269 | 269 | ||
270 | |||
271 | #define P_NAND_D0 (P_DONTCARE) | ||
272 | #define P_NAND_D1 (P_DONTCARE) | ||
273 | #define P_NAND_D2 (P_DONTCARE) | ||
274 | #define P_NAND_D3 (P_DONTCARE) | ||
275 | #define P_NAND_D4 (P_DONTCARE) | ||
276 | #define P_NAND_D5 (P_DONTCARE) | ||
277 | #define P_NAND_D6 (P_DONTCARE) | ||
278 | #define P_NAND_D7 (P_DONTCARE) | ||
279 | #define P_NAND_WE (P_DONTCARE) | ||
280 | #define P_NAND_RE (P_DONTCARE) | ||
281 | #define P_NAND_CLE (P_DONTCARE) | ||
282 | #define P_NAND_ALE (P_DONTCARE) | ||
283 | |||
270 | #endif /* _MACH_PORTMUX_H_ */ | 284 | #endif /* _MACH_PORTMUX_H_ */ |
diff --git a/include/asm-blackfin/mach-bf561/defBF561.h b/include/asm-blackfin/mach-bf561/defBF561.h index bf7dc4e00065..7945e8a3a841 100644 --- a/include/asm-blackfin/mach-bf561/defBF561.h +++ b/include/asm-blackfin/mach-bf561/defBF561.h | |||
@@ -55,6 +55,9 @@ | |||
55 | /* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ | 55 | /* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ |
56 | #define SWRST SICA_SWRST | 56 | #define SWRST SICA_SWRST |
57 | #define SYSCR SICA_SYSCR | 57 | #define SYSCR SICA_SYSCR |
58 | #define RESET_DOUBLE (SWRST_DBL_FAULT_B|SWRST_DBL_FAULT_A) | ||
59 | #define RESET_WDOG (SWRST_WDT_B|SWRST_WDT_A) | ||
60 | #define RESET_SOFTWARE (SWRST_OCCURRED) | ||
58 | 61 | ||
59 | /* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ | 62 | /* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ |
60 | #define SICA_SWRST 0xFFC00100 /* Software Reset register */ | 63 | #define SICA_SWRST 0xFFC00100 /* Software Reset register */ |
diff --git a/include/asm-frv/scatterlist.h b/include/asm-frv/scatterlist.h index 99ba76edc42a..2e7143b5a7ad 100644 --- a/include/asm-frv/scatterlist.h +++ b/include/asm-frv/scatterlist.h | |||
@@ -16,8 +16,7 @@ | |||
16 | * | 16 | * |
17 | * can be rewritten as | 17 | * can be rewritten as |
18 | * | 18 | * |
19 | * sg_set_page(virt_to_page(some_ptr)); | 19 | * sg_set_buf(sg, some_ptr, length); |
20 | * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK; | ||
21 | * | 20 | * |
22 | * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens | 21 | * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens |
23 | */ | 22 | */ |
diff --git a/include/asm-ia64/percpu.h b/include/asm-ia64/percpu.h index 43a7aac414e0..c4f1e328a5ba 100644 --- a/include/asm-ia64/percpu.h +++ b/include/asm-ia64/percpu.h | |||
@@ -46,7 +46,7 @@ | |||
46 | #ifdef CONFIG_SMP | 46 | #ifdef CONFIG_SMP |
47 | 47 | ||
48 | extern unsigned long __per_cpu_offset[NR_CPUS]; | 48 | extern unsigned long __per_cpu_offset[NR_CPUS]; |
49 | #define per_cpu_offset(x) (__per_cpu_offset(x)) | 49 | #define per_cpu_offset(x) (__per_cpu_offset[x]) |
50 | 50 | ||
51 | /* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */ | 51 | /* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */ |
52 | DECLARE_PER_CPU(unsigned long, local_per_cpu_offset); | 52 | DECLARE_PER_CPU(unsigned long, local_per_cpu_offset); |
diff --git a/include/asm-ia64/smp.h b/include/asm-ia64/smp.h index 471cc2ee9ac4..4fa733dd417a 100644 --- a/include/asm-ia64/smp.h +++ b/include/asm-ia64/smp.h | |||
@@ -60,7 +60,6 @@ extern cpumask_t cpu_online_map; | |||
60 | extern cpumask_t cpu_core_map[NR_CPUS]; | 60 | extern cpumask_t cpu_core_map[NR_CPUS]; |
61 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); | 61 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); |
62 | extern int smp_num_siblings; | 62 | extern int smp_num_siblings; |
63 | extern int smp_num_cpucores; | ||
64 | extern void __iomem *ipi_base_addr; | 63 | extern void __iomem *ipi_base_addr; |
65 | extern unsigned char smp_int_redirect; | 64 | extern unsigned char smp_int_redirect; |
66 | 65 | ||
diff --git a/include/asm-mips/i8253.h b/include/asm-mips/i8253.h index affb32ce4af9..032ca73f181b 100644 --- a/include/asm-mips/i8253.h +++ b/include/asm-mips/i8253.h | |||
@@ -5,25 +5,14 @@ | |||
5 | #ifndef __ASM_I8253_H | 5 | #ifndef __ASM_I8253_H |
6 | #define __ASM_I8253_H | 6 | #define __ASM_I8253_H |
7 | 7 | ||
8 | #include <linux/spinlock.h> | ||
9 | |||
8 | /* i8253A PIT registers */ | 10 | /* i8253A PIT registers */ |
9 | #define PIT_MODE 0x43 | 11 | #define PIT_MODE 0x43 |
10 | #define PIT_CH0 0x40 | 12 | #define PIT_CH0 0x40 |
11 | #define PIT_CH2 0x42 | 13 | #define PIT_CH2 0x42 |
12 | 14 | ||
13 | /* i8259A PIC registers */ | 15 | extern spinlock_t i8253_lock; |
14 | #define PIC_MASTER_CMD 0x20 | ||
15 | #define PIC_MASTER_IMR 0x21 | ||
16 | #define PIC_MASTER_ISR PIC_MASTER_CMD | ||
17 | #define PIC_MASTER_POLL PIC_MASTER_ISR | ||
18 | #define PIC_MASTER_OCW3 PIC_MASTER_ISR | ||
19 | #define PIC_SLAVE_CMD 0xa0 | ||
20 | #define PIC_SLAVE_IMR 0xa1 | ||
21 | |||
22 | /* i8259A PIC related value */ | ||
23 | #define PIC_CASCADE_IR 2 | ||
24 | #define MASTER_ICW4_DEFAULT 0x01 | ||
25 | #define SLAVE_ICW4_DEFAULT 0x01 | ||
26 | #define PIC_ICW4_AEOI 2 | ||
27 | 16 | ||
28 | extern void setup_pit_timer(void); | 17 | extern void setup_pit_timer(void); |
29 | 18 | ||
diff --git a/include/asm-mips/ip32/ip32_ints.h b/include/asm-mips/ip32/ip32_ints.h index 042f821899a8..ab5612f90f6f 100644 --- a/include/asm-mips/ip32/ip32_ints.h +++ b/include/asm-mips/ip32/ip32_ints.h | |||
@@ -22,10 +22,12 @@ enum ip32_irq_no { | |||
22 | * CPU interrupts are 0 ... 7 | 22 | * CPU interrupts are 0 ... 7 |
23 | */ | 23 | */ |
24 | 24 | ||
25 | CRIME_IRQ_BASE = MIPS_CPU_IRQ_BASE, | ||
26 | |||
25 | /* | 27 | /* |
26 | * MACE | 28 | * MACE |
27 | */ | 29 | */ |
28 | MACE_VID_IN1_IRQ = MIPS_CPU_IRQ_BASE + 8, | 30 | MACE_VID_IN1_IRQ = CRIME_IRQ_BASE, |
29 | MACE_VID_IN2_IRQ, | 31 | MACE_VID_IN2_IRQ, |
30 | MACE_VID_OUT_IRQ, | 32 | MACE_VID_OUT_IRQ, |
31 | MACE_ETHERNET_IRQ, | 33 | MACE_ETHERNET_IRQ, |
diff --git a/include/asm-mips/jmr3927/jmr3927.h b/include/asm-mips/jmr3927/jmr3927.h index b2dc35f56181..81602c8047eb 100644 --- a/include/asm-mips/jmr3927/jmr3927.h +++ b/include/asm-mips/jmr3927/jmr3927.h | |||
@@ -132,9 +132,7 @@ | |||
132 | #define JMR3927_IRQ_IRC_DMA (JMR3927_IRQ_IRC + TX3927_IR_DMA) | 132 | #define JMR3927_IRQ_IRC_DMA (JMR3927_IRQ_IRC + TX3927_IR_DMA) |
133 | #define JMR3927_IRQ_IRC_PIO (JMR3927_IRQ_IRC + TX3927_IR_PIO) | 133 | #define JMR3927_IRQ_IRC_PIO (JMR3927_IRQ_IRC + TX3927_IR_PIO) |
134 | #define JMR3927_IRQ_IRC_PCI (JMR3927_IRQ_IRC + TX3927_IR_PCI) | 134 | #define JMR3927_IRQ_IRC_PCI (JMR3927_IRQ_IRC + TX3927_IR_PCI) |
135 | #define JMR3927_IRQ_IRC_TMR0 (JMR3927_IRQ_IRC + TX3927_IR_TMR0) | 135 | #define JMR3927_IRQ_IRC_TMR(ch) (JMR3927_IRQ_IRC + TX3927_IR_TMR(ch)) |
136 | #define JMR3927_IRQ_IRC_TMR1 (JMR3927_IRQ_IRC + TX3927_IR_TMR1) | ||
137 | #define JMR3927_IRQ_IRC_TMR2 (JMR3927_IRQ_IRC + TX3927_IR_TMR2) | ||
138 | #define JMR3927_IRQ_IOC_PCIA (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIA) | 136 | #define JMR3927_IRQ_IOC_PCIA (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIA) |
139 | #define JMR3927_IRQ_IOC_PCIB (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIB) | 137 | #define JMR3927_IRQ_IOC_PCIB (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIB) |
140 | #define JMR3927_IRQ_IOC_PCIC (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIC) | 138 | #define JMR3927_IRQ_IOC_PCIC (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIC) |
@@ -148,17 +146,12 @@ | |||
148 | #define JMR3927_IRQ_IOCINT JMR3927_IRQ_IRC_INT1 | 146 | #define JMR3927_IRQ_IOCINT JMR3927_IRQ_IRC_INT1 |
149 | /* TC35815 100M Ether (JMR-TX3912:JPW4:2-3 Short) */ | 147 | /* TC35815 100M Ether (JMR-TX3912:JPW4:2-3 Short) */ |
150 | #define JMR3927_IRQ_ETHER0 JMR3927_IRQ_IRC_INT3 | 148 | #define JMR3927_IRQ_ETHER0 JMR3927_IRQ_IRC_INT3 |
151 | /* Clock Tick (10ms) */ | ||
152 | #define JMR3927_IRQ_TICK JMR3927_IRQ_IRC_TMR0 | ||
153 | 149 | ||
154 | /* Clocks */ | 150 | /* Clocks */ |
155 | #define JMR3927_CORECLK 132710400 /* 132.7MHz */ | 151 | #define JMR3927_CORECLK 132710400 /* 132.7MHz */ |
156 | #define JMR3927_GBUSCLK (JMR3927_CORECLK / 2) /* 66.35MHz */ | 152 | #define JMR3927_GBUSCLK (JMR3927_CORECLK / 2) /* 66.35MHz */ |
157 | #define JMR3927_IMCLK (JMR3927_CORECLK / 4) /* 33.17MHz */ | 153 | #define JMR3927_IMCLK (JMR3927_CORECLK / 4) /* 33.17MHz */ |
158 | 154 | ||
159 | #define jmr3927_tmrptr tx3927_tmrptr(0) /* TMR0 */ | ||
160 | |||
161 | |||
162 | /* | 155 | /* |
163 | * TX3927 Pin Configuration: | 156 | * TX3927 Pin Configuration: |
164 | * | 157 | * |
diff --git a/include/asm-mips/jmr3927/tx3927.h b/include/asm-mips/jmr3927/tx3927.h index 211bcf47fffb..338f99882a39 100644 --- a/include/asm-mips/jmr3927/tx3927.h +++ b/include/asm-mips/jmr3927/tx3927.h | |||
@@ -222,9 +222,7 @@ struct tx3927_ccfg_reg { | |||
222 | #define TX3927_IR_DMA 8 | 222 | #define TX3927_IR_DMA 8 |
223 | #define TX3927_IR_PIO 9 | 223 | #define TX3927_IR_PIO 9 |
224 | #define TX3927_IR_PCI 10 | 224 | #define TX3927_IR_PCI 10 |
225 | #define TX3927_IR_TMR0 13 | 225 | #define TX3927_IR_TMR(ch) (13 + (ch)) |
226 | #define TX3927_IR_TMR1 14 | ||
227 | #define TX3927_IR_TMR2 15 | ||
228 | #define TX3927_NUM_IR 16 | 226 | #define TX3927_NUM_IR 16 |
229 | 227 | ||
230 | /* | 228 | /* |
diff --git a/include/asm-mips/jmr3927/txx927.h b/include/asm-mips/jmr3927/txx927.h index 58a8ff6be815..0474fe8dac3f 100644 --- a/include/asm-mips/jmr3927/txx927.h +++ b/include/asm-mips/jmr3927/txx927.h | |||
@@ -10,22 +10,6 @@ | |||
10 | #ifndef __ASM_TXX927_H | 10 | #ifndef __ASM_TXX927_H |
11 | #define __ASM_TXX927_H | 11 | #define __ASM_TXX927_H |
12 | 12 | ||
13 | struct txx927_tmr_reg { | ||
14 | volatile unsigned long tcr; | ||
15 | volatile unsigned long tisr; | ||
16 | volatile unsigned long cpra; | ||
17 | volatile unsigned long cprb; | ||
18 | volatile unsigned long itmr; | ||
19 | volatile unsigned long unused0[3]; | ||
20 | volatile unsigned long ccdr; | ||
21 | volatile unsigned long unused1[3]; | ||
22 | volatile unsigned long pgmr; | ||
23 | volatile unsigned long unused2[3]; | ||
24 | volatile unsigned long wtmr; | ||
25 | volatile unsigned long unused3[43]; | ||
26 | volatile unsigned long trr; | ||
27 | }; | ||
28 | |||
29 | struct txx927_sio_reg { | 13 | struct txx927_sio_reg { |
30 | volatile unsigned long lcr; | 14 | volatile unsigned long lcr; |
31 | volatile unsigned long dicr; | 15 | volatile unsigned long dicr; |
@@ -51,27 +35,6 @@ struct txx927_pio_reg { | |||
51 | }; | 35 | }; |
52 | 36 | ||
53 | /* | 37 | /* |
54 | * TMR | ||
55 | */ | ||
56 | /* TMTCR : Timer Control */ | ||
57 | #define TXx927_TMTCR_TCE 0x00000080 | ||
58 | #define TXx927_TMTCR_CCDE 0x00000040 | ||
59 | #define TXx927_TMTCR_CRE 0x00000020 | ||
60 | #define TXx927_TMTCR_ECES 0x00000008 | ||
61 | #define TXx927_TMTCR_CCS 0x00000004 | ||
62 | #define TXx927_TMTCR_TMODE_MASK 0x00000003 | ||
63 | #define TXx927_TMTCR_TMODE_ITVL 0x00000000 | ||
64 | |||
65 | /* TMTISR : Timer Int. Status */ | ||
66 | #define TXx927_TMTISR_TPIBS 0x00000004 | ||
67 | #define TXx927_TMTISR_TPIAS 0x00000002 | ||
68 | #define TXx927_TMTISR_TIIS 0x00000001 | ||
69 | |||
70 | /* TMTITMR : Interval Timer Mode */ | ||
71 | #define TXx927_TMTITMR_TIIE 0x00008000 | ||
72 | #define TXx927_TMTITMR_TZCE 0x00000001 | ||
73 | |||
74 | /* | ||
75 | * SIO | 38 | * SIO |
76 | */ | 39 | */ |
77 | /* SILCR : Line Control */ | 40 | /* SILCR : Line Control */ |
diff --git a/include/asm-mips/mach-au1x00/timex.h b/include/asm-mips/mach-au1x00/timex.h deleted file mode 100644 index e3ada66cb636..000000000000 --- a/include/asm-mips/mach-au1x00/timex.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2003 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_AU1X00_TIMEX_H | ||
9 | #define __ASM_MACH_AU1X00_TIMEX_H | ||
10 | |||
11 | #define CLOCK_TICK_RATE ((HZ * 100000UL) / 2) | ||
12 | |||
13 | #endif /* __ASM_MACH_AU1X00_TIMEX_H */ | ||
diff --git a/include/asm-mips/mach-cobalt/irq.h b/include/asm-mips/mach-cobalt/irq.h index 179d0e850b59..57c8c9ac5851 100644 --- a/include/asm-mips/mach-cobalt/irq.h +++ b/include/asm-mips/mach-cobalt/irq.h | |||
@@ -35,7 +35,7 @@ | |||
35 | * 4 - ethernet | 35 | * 4 - ethernet |
36 | * 5 - 16550 UART | 36 | * 5 - 16550 UART |
37 | * 6 - cascade i8259 | 37 | * 6 - cascade i8259 |
38 | * 7 - CP0 counter (unused) | 38 | * 7 - CP0 counter |
39 | */ | 39 | */ |
40 | #define MIPS_CPU_IRQ_BASE 16 | 40 | #define MIPS_CPU_IRQ_BASE 16 |
41 | 41 | ||
@@ -48,7 +48,6 @@ | |||
48 | #define SCSI_IRQ (MIPS_CPU_IRQ_BASE + 5) | 48 | #define SCSI_IRQ (MIPS_CPU_IRQ_BASE + 5) |
49 | #define I8259_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 6) | 49 | #define I8259_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 6) |
50 | 50 | ||
51 | |||
52 | #define GT641XX_IRQ_BASE 24 | 51 | #define GT641XX_IRQ_BASE 24 |
53 | 52 | ||
54 | #include <asm/irq_gt641xx.h> | 53 | #include <asm/irq_gt641xx.h> |
diff --git a/include/asm-mips/mach-generic/timex.h b/include/asm-mips/mach-generic/timex.h deleted file mode 100644 index 48b4cfaa0d50..000000000000 --- a/include/asm-mips/mach-generic/timex.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2003, 2005 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_GENERIC_TIMEX_H | ||
9 | #define __ASM_MACH_GENERIC_TIMEX_H | ||
10 | |||
11 | #define CLOCK_TICK_RATE 500000 | ||
12 | |||
13 | #endif /* __ASM_MACH_GENERIC_TIMEX_H */ | ||
diff --git a/include/asm-mips/mach-jazz/timex.h b/include/asm-mips/mach-jazz/timex.h deleted file mode 100644 index 93affa33dfa8..000000000000 --- a/include/asm-mips/mach-jazz/timex.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2003 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_JAZZ_TIMEX_H | ||
9 | #define __ASM_MACH_JAZZ_TIMEX_H | ||
10 | |||
11 | /* | ||
12 | * Jazz is still using the R4030 100Hz counter | ||
13 | */ | ||
14 | #define CLOCK_TICK_RATE 100 | ||
15 | |||
16 | #endif /* __ASM_MACH_JAZZ_TIMEX_H */ | ||
diff --git a/include/asm-mips/mach-qemu/timex.h b/include/asm-mips/mach-qemu/timex.h deleted file mode 100644 index cd543693fb0a..000000000000 --- a/include/asm-mips/mach-qemu/timex.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2005 Daniel Jacobowitz | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_QEMU_TIMEX_H | ||
9 | #define __ASM_MACH_QEMU_TIMEX_H | ||
10 | |||
11 | /* | ||
12 | * We use a simulated i8254 PIC... | ||
13 | */ | ||
14 | #define CLOCK_TICK_RATE 1193182 | ||
15 | |||
16 | #endif /* __ASM_MACH_QEMU_TIMEX_H */ | ||
diff --git a/include/asm-mips/mach-rm/timex.h b/include/asm-mips/mach-rm/timex.h deleted file mode 100644 index 11ff6cb0f214..000000000000 --- a/include/asm-mips/mach-rm/timex.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2003, 2005 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_RM200_TIMEX_H | ||
9 | #define __ASM_MACH_RM200_TIMEX_H | ||
10 | |||
11 | #define CLOCK_TICK_RATE 1193182 | ||
12 | |||
13 | #endif /* __ASM_MACH_RM200_TIMEX_H */ | ||
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h index bc47af313bcd..ee1663e64da1 100644 --- a/include/asm-mips/time.h +++ b/include/asm-mips/time.h | |||
@@ -10,15 +10,10 @@ | |||
10 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
11 | * Free Software Foundation; either version 2 of the License, or (at your | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
12 | * option) any later version. | 12 | * option) any later version. |
13 | * | ||
14 | * Please refer to Documentation/mips/time.README. | ||
15 | */ | 13 | */ |
16 | #ifndef _ASM_TIME_H | 14 | #ifndef _ASM_TIME_H |
17 | #define _ASM_TIME_H | 15 | #define _ASM_TIME_H |
18 | 16 | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/linkage.h> | ||
21 | #include <linux/ptrace.h> | ||
22 | #include <linux/rtc.h> | 17 | #include <linux/rtc.h> |
23 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
24 | #include <linux/clockchips.h> | 19 | #include <linux/clockchips.h> |
@@ -38,27 +33,13 @@ extern int rtc_mips_set_mmss(unsigned long); | |||
38 | /* | 33 | /* |
39 | * Timer interrupt functions. | 34 | * Timer interrupt functions. |
40 | * mips_timer_state is needed for high precision timer calibration. | 35 | * mips_timer_state is needed for high precision timer calibration. |
41 | * mips_timer_ack may be NULL if the interrupt is self-recoverable. | ||
42 | */ | 36 | */ |
43 | extern int (*mips_timer_state)(void); | 37 | extern int (*mips_timer_state)(void); |
44 | 38 | ||
45 | /* | 39 | /* |
46 | * High precision timer clocksource. | ||
47 | * If .read is NULL, an R4k-compatible timer setup is attempted. | ||
48 | */ | ||
49 | extern struct clocksource clocksource_mips; | ||
50 | |||
51 | /* | ||
52 | * profiling and process accouting is done separately in local_timer_interrupt | ||
53 | */ | ||
54 | extern void local_timer_interrupt(int irq, void *dev_id); | ||
55 | |||
56 | /* | ||
57 | * board specific routines required by time_init(). | 40 | * board specific routines required by time_init(). |
58 | */ | 41 | */ |
59 | struct irqaction; | ||
60 | extern void plat_time_init(void); | 42 | extern void plat_time_init(void); |
61 | extern void plat_timer_setup(struct irqaction *irq); | ||
62 | 43 | ||
63 | /* | 44 | /* |
64 | * mips_hpt_frequency - must be set if you intend to use an R4k-compatible | 45 | * mips_hpt_frequency - must be set if you intend to use an R4k-compatible |
@@ -78,6 +59,7 @@ extern int (*perf_irq)(void); | |||
78 | */ | 59 | */ |
79 | #ifdef CONFIG_CEVT_R4K | 60 | #ifdef CONFIG_CEVT_R4K |
80 | extern void mips_clockevent_init(void); | 61 | extern void mips_clockevent_init(void); |
62 | extern unsigned int __weak get_c0_compare_int(void); | ||
81 | #else | 63 | #else |
82 | static inline void mips_clockevent_init(void) | 64 | static inline void mips_clockevent_init(void) |
83 | { | 65 | { |
diff --git a/include/asm-mips/timex.h b/include/asm-mips/timex.h index 87c68ae76ff8..5816ad1569d6 100644 --- a/include/asm-mips/timex.h +++ b/include/asm-mips/timex.h | |||
@@ -13,27 +13,12 @@ | |||
13 | #include <asm/mipsregs.h> | 13 | #include <asm/mipsregs.h> |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * This is the frequency of the timer used for Linux's timer interrupt. | 16 | * This is the clock rate of the i8253 PIT. A MIPS system may not have |
17 | * The value should be defined as accurate as possible or under certain | 17 | * a PIT by the symbol is used all over the kernel including some APIs. |
18 | * circumstances Linux timekeeping might become inaccurate or fail. | 18 | * So keeping it defined to the number for the PIT is the only sane thing |
19 | * | 19 | * for now. |
20 | * For many system the exact clockrate of the timer isn't known but due to | ||
21 | * the way this value is used we can get away with a wrong value as long | ||
22 | * as this value is: | ||
23 | * | ||
24 | * - a multiple of HZ | ||
25 | * - a divisor of the actual rate | ||
26 | * | ||
27 | * 500000 is a good such cheat value. | ||
28 | * | ||
29 | * The obscure number 1193182 is the same as used by the original i8254 | ||
30 | * time in legacy PC hardware; the chip unfortunately also found in a | ||
31 | * bunch of MIPS systems. The last remaining user of the i8254 for the | ||
32 | * timer interrupt is the RM200; it's a very standard system so there is | ||
33 | * no reason to make this a separate architecture. | ||
34 | */ | 20 | */ |
35 | 21 | #define CLOCK_TICK_RATE 1193182 | |
36 | #include <timex.h> | ||
37 | 22 | ||
38 | /* | 23 | /* |
39 | * Standard way to access the cycle counter. | 24 | * Standard way to access the cycle counter. |
diff --git a/include/asm-mips/tx4927/tx4927_pci.h b/include/asm-mips/tx4927/tx4927_pci.h index f98b2bb719d5..3f1e470192e3 100644 --- a/include/asm-mips/tx4927/tx4927_pci.h +++ b/include/asm-mips/tx4927/tx4927_pci.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #define __ASM_TX4927_TX4927_PCI_H | 9 | #define __ASM_TX4927_TX4927_PCI_H |
10 | 10 | ||
11 | #define TX4927_CCFG_TOE 0x00004000 | 11 | #define TX4927_CCFG_TOE 0x00004000 |
12 | #define TX4927_CCFG_TINTDIS 0x01000000 | ||
12 | 13 | ||
13 | #define TX4927_PCIMEM 0x08000000 | 14 | #define TX4927_PCIMEM 0x08000000 |
14 | #define TX4927_PCIMEM_SIZE 0x08000000 | 15 | #define TX4927_PCIMEM_SIZE 0x08000000 |
@@ -20,6 +21,8 @@ | |||
20 | #define TX4927_PCIC_REG 0xff1fd000 | 21 | #define TX4927_PCIC_REG 0xff1fd000 |
21 | #define TX4927_CCFG_REG 0xff1fe000 | 22 | #define TX4927_CCFG_REG 0xff1fe000 |
22 | #define TX4927_IRC_REG 0xff1ff600 | 23 | #define TX4927_IRC_REG 0xff1ff600 |
24 | #define TX4927_NR_TMR 3 | ||
25 | #define TX4927_TMR_REG(ch) (0xff1ff000 + (ch) * 0x100) | ||
23 | #define TX4927_CE3 0x17f00000 /* 1M */ | 26 | #define TX4927_CE3 0x17f00000 /* 1M */ |
24 | #define TX4927_PCIRESET_ADDR 0xbc00f006 | 27 | #define TX4927_PCIRESET_ADDR 0xbc00f006 |
25 | #define TX4927_PCI_CLK_ADDR (KSEG1 + TX4927_CE3 + 0x00040020) | 28 | #define TX4927_PCI_CLK_ADDR (KSEG1 + TX4927_CE3 + 0x00040020) |
diff --git a/include/asm-mips/tx4938/tx4938.h b/include/asm-mips/tx4938/tx4938.h index 650b010761f9..f7c448b90578 100644 --- a/include/asm-mips/tx4938/tx4938.h +++ b/include/asm-mips/tx4938/tx4938.h | |||
@@ -641,7 +641,6 @@ struct tx4938_ccfg_reg { | |||
641 | #define tx4938_pcicptr ((struct tx4938_pcic_reg *)TX4938_PCIC_REG) | 641 | #define tx4938_pcicptr ((struct tx4938_pcic_reg *)TX4938_PCIC_REG) |
642 | #define tx4938_pcic1ptr ((struct tx4938_pcic_reg *)TX4938_PCIC1_REG) | 642 | #define tx4938_pcic1ptr ((struct tx4938_pcic_reg *)TX4938_PCIC1_REG) |
643 | #define tx4938_ccfgptr ((struct tx4938_ccfg_reg *)TX4938_CCFG_REG) | 643 | #define tx4938_ccfgptr ((struct tx4938_ccfg_reg *)TX4938_CCFG_REG) |
644 | #define tx4938_tmrptr(ch) ((struct tx4938_tmr_reg *)TX4938_TMR_REG(ch)) | ||
645 | #define tx4938_sioptr(ch) ((struct tx4938_sio_reg *)TX4938_SIO_REG(ch)) | 644 | #define tx4938_sioptr(ch) ((struct tx4938_sio_reg *)TX4938_SIO_REG(ch)) |
646 | #define tx4938_pioptr ((struct tx4938_pio_reg *)TX4938_PIO_REG) | 645 | #define tx4938_pioptr ((struct tx4938_pio_reg *)TX4938_PIO_REG) |
647 | #define tx4938_aclcptr ((struct tx4938_aclc_reg *)TX4938_ACLC_REG) | 646 | #define tx4938_aclcptr ((struct tx4938_aclc_reg *)TX4938_ACLC_REG) |
diff --git a/include/asm-mips/txx9tmr.h b/include/asm-mips/txx9tmr.h new file mode 100644 index 000000000000..67f70a8f09bd --- /dev/null +++ b/include/asm-mips/txx9tmr.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * include/asm-mips/txx9tmr.h | ||
3 | * TX39/TX49 timer controller definitions. | ||
4 | * | ||
5 | * This file is subject to the terms and conditions of the GNU General Public | ||
6 | * License. See the file "COPYING" in the main directory of this archive | ||
7 | * for more details. | ||
8 | */ | ||
9 | #ifndef __ASM_TXX9TMR_H | ||
10 | #define __ASM_TXX9TMR_H | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | |||
14 | struct txx9_tmr_reg { | ||
15 | u32 tcr; | ||
16 | u32 tisr; | ||
17 | u32 cpra; | ||
18 | u32 cprb; | ||
19 | u32 itmr; | ||
20 | u32 unused0[3]; | ||
21 | u32 ccdr; | ||
22 | u32 unused1[3]; | ||
23 | u32 pgmr; | ||
24 | u32 unused2[3]; | ||
25 | u32 wtmr; | ||
26 | u32 unused3[43]; | ||
27 | u32 trr; | ||
28 | }; | ||
29 | |||
30 | /* TMTCR : Timer Control */ | ||
31 | #define TXx9_TMTCR_TCE 0x00000080 | ||
32 | #define TXx9_TMTCR_CCDE 0x00000040 | ||
33 | #define TXx9_TMTCR_CRE 0x00000020 | ||
34 | #define TXx9_TMTCR_ECES 0x00000008 | ||
35 | #define TXx9_TMTCR_CCS 0x00000004 | ||
36 | #define TXx9_TMTCR_TMODE_MASK 0x00000003 | ||
37 | #define TXx9_TMTCR_TMODE_ITVL 0x00000000 | ||
38 | #define TXx9_TMTCR_TMODE_PGEN 0x00000001 | ||
39 | #define TXx9_TMTCR_TMODE_WDOG 0x00000002 | ||
40 | |||
41 | /* TMTISR : Timer Int. Status */ | ||
42 | #define TXx9_TMTISR_TPIBS 0x00000004 | ||
43 | #define TXx9_TMTISR_TPIAS 0x00000002 | ||
44 | #define TXx9_TMTISR_TIIS 0x00000001 | ||
45 | |||
46 | /* TMITMR : Interval Timer Mode */ | ||
47 | #define TXx9_TMITMR_TIIE 0x00008000 | ||
48 | #define TXx9_TMITMR_TZCE 0x00000001 | ||
49 | |||
50 | /* TMWTMR : Watchdog Timer Mode */ | ||
51 | #define TXx9_TMWTMR_TWIE 0x00008000 | ||
52 | #define TXx9_TMWTMR_WDIS 0x00000080 | ||
53 | #define TXx9_TMWTMR_TWC 0x00000001 | ||
54 | |||
55 | void txx9_clocksource_init(unsigned long baseaddr, | ||
56 | unsigned int imbusclk); | ||
57 | void txx9_clockevent_init(unsigned long baseaddr, int irq, | ||
58 | unsigned int imbusclk); | ||
59 | void txx9_tmr_init(unsigned long baseaddr); | ||
60 | |||
61 | #ifdef CONFIG_CPU_TX39XX | ||
62 | #define TXX9_TIMER_BITS 24 | ||
63 | #else | ||
64 | #define TXX9_TIMER_BITS 32 | ||
65 | #endif | ||
66 | |||
67 | #endif /* __ASM_TXX9TMR_H */ | ||
diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h index 7a18649d1ccb..01e5cf51ba9b 100644 --- a/include/asm-sh/cache.h +++ b/include/asm-sh/cache.h | |||
@@ -18,9 +18,8 @@ | |||
18 | #define SH_CACHE_ASSOC 8 | 18 | #define SH_CACHE_ASSOC 8 |
19 | 19 | ||
20 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 20 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
21 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | ||
22 | 21 | ||
23 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | 22 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) |
24 | 23 | ||
25 | #ifndef __ASSEMBLY__ | 24 | #ifndef __ASSEMBLY__ |
26 | struct cache_info { | 25 | struct cache_info { |
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index c61d902b8bff..11850f65c922 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -41,7 +41,7 @@ static inline int generic_irq_demux(int irq) | |||
41 | #define irq_canonicalize(irq) (irq) | 41 | #define irq_canonicalize(irq) (irq) |
42 | #define irq_demux(irq) sh_mv.mv_irq_demux(irq) | 42 | #define irq_demux(irq) sh_mv.mv_irq_demux(irq) |
43 | 43 | ||
44 | #ifdef CONFIG_4KSTACKS | 44 | #ifdef CONFIG_IRQSTACKS |
45 | extern void irq_ctx_init(int cpu); | 45 | extern void irq_ctx_init(int cpu); |
46 | extern void irq_ctx_exit(int cpu); | 46 | extern void irq_ctx_exit(int cpu); |
47 | # define __ARCH_HAS_DO_SOFTIRQ | 47 | # define __ARCH_HAS_DO_SOFTIRQ |
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index cb3d46c59eab..3aa8b07da47d 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -128,7 +128,6 @@ typedef struct { unsigned long pgd; } pgd_t; | |||
128 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) | 128 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) |
129 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 129 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
130 | 130 | ||
131 | #define phys_to_page(phys) (pfn_to_page(phys >> PAGE_SHIFT)) | ||
132 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 131 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
133 | 132 | ||
134 | /* PFN start number, because of __MEMORY_START */ | 133 | /* PFN start number, because of __MEMORY_START */ |
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index cf0dd2b648c2..0b1d7c665659 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h | |||
@@ -399,7 +399,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
399 | #define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK) | 399 | #define pmd_bad(x) (pmd_val(x) & ~PAGE_MASK) |
400 | 400 | ||
401 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | 401 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) |
402 | #define pte_page(x) phys_to_page(pte_val(x)&PTE_PHYS_MASK) | 402 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
403 | 403 | ||
404 | /* | 404 | /* |
405 | * The following only work if pte_present() is true. | 405 | * The following only work if pte_present() is true. |
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index 4f2922a1979c..ab0028db645a 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
@@ -71,7 +71,7 @@ struct sh_cpuinfo { | |||
71 | struct cache_info scache; /* Secondary cache */ | 71 | struct cache_info scache; /* Secondary cache */ |
72 | 72 | ||
73 | unsigned long flags; | 73 | unsigned long flags; |
74 | } __attribute__ ((aligned(SMP_CACHE_BYTES))); | 74 | } __attribute__ ((aligned(L1_CACHE_BYTES))); |
75 | 75 | ||
76 | extern struct sh_cpuinfo cpu_data[]; | 76 | extern struct sh_cpuinfo cpu_data[]; |
77 | #define boot_cpu_data cpu_data[0] | 77 | #define boot_cpu_data cpu_data[0] |
diff --git a/include/asm-sh/setup.h b/include/asm-sh/setup.h index 586a9711a75d..55a2bd328d99 100644 --- a/include/asm-sh/setup.h +++ b/include/asm-sh/setup.h | |||
@@ -5,6 +5,20 @@ | |||
5 | 5 | ||
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | 7 | ||
8 | /* | ||
9 | * This is set up by the setup-routine at boot-time | ||
10 | */ | ||
11 | #define PARAM ((unsigned char *)empty_zero_page) | ||
12 | |||
13 | #define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000)) | ||
14 | #define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004)) | ||
15 | #define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008)) | ||
16 | #define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c)) | ||
17 | #define INITRD_START (*(unsigned long *) (PARAM+0x010)) | ||
18 | #define INITRD_SIZE (*(unsigned long *) (PARAM+0x014)) | ||
19 | /* ... */ | ||
20 | #define COMMAND_LINE ((char *) (PARAM+0x100)) | ||
21 | |||
8 | int setup_early_printk(char *); | 22 | int setup_early_printk(char *); |
9 | void sh_mv_setup(void); | 23 | void sh_mv_setup(void); |
10 | 24 | ||
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h index 1438b763a5ea..18f8dd642ac5 100644 --- a/include/asm-sh64/dma-mapping.h +++ b/include/asm-sh64/dma-mapping.h | |||
@@ -42,8 +42,9 @@ static inline void dma_free_coherent(struct device *dev, size_t size, | |||
42 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 42 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
43 | enum dma_data_direction dir) | 43 | enum dma_data_direction dir) |
44 | { | 44 | { |
45 | unsigned long s = (unsigned long) vaddr & L1_CACHE_ALIGN_MASK; | 45 | unsigned long start = (unsigned long) vaddr; |
46 | unsigned long e = (vaddr + size) & L1_CACHE_ALIGN_MASK; | 46 | unsigned long s = start & L1_CACHE_ALIGN_MASK; |
47 | unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK; | ||
47 | 48 | ||
48 | for (; s <= e; s += L1_CACHE_BYTES) | 49 | for (; s <= e; s += L1_CACHE_BYTES) |
49 | asm volatile ("ocbp %0, 0" : : "r" (s)); | 50 | asm volatile ("ocbp %0, 0" : : "r" (s)); |
diff --git a/include/asm-sh64/pci.h b/include/asm-sh64/pci.h index 57a67cf7a5c4..18055dbbb4b5 100644 --- a/include/asm-sh64/pci.h +++ b/include/asm-sh64/pci.h | |||
@@ -72,15 +72,6 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
72 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 72 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | /* These macros should be used after a pci_map_sg call has been done | ||
76 | * to get bus addresses of each of the SG entries and their lengths. | ||
77 | * You should only work with the number of sg entries pci_map_sg | ||
78 | * returns, or alternatively stop on the first sg_dma_len(sg) which | ||
79 | * is 0. | ||
80 | */ | ||
81 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
82 | #define sg_dma_len(sg) ((sg)->length) | ||
83 | |||
84 | #ifdef CONFIG_PCI | 75 | #ifdef CONFIG_PCI |
85 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 76 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
86 | enum pci_dma_burst_strategy *strat, | 77 | enum pci_dma_burst_strategy *strat, |
diff --git a/include/asm-sh64/scatterlist.h b/include/asm-sh64/scatterlist.h index 5109251970e7..7f729bbfce43 100644 --- a/include/asm-sh64/scatterlist.h +++ b/include/asm-sh64/scatterlist.h | |||
@@ -23,6 +23,15 @@ struct scatterlist { | |||
23 | unsigned int length; | 23 | unsigned int length; |
24 | }; | 24 | }; |
25 | 25 | ||
26 | /* These macros should be used after a pci_map_sg call has been done | ||
27 | * to get bus addresses of each of the SG entries and their lengths. | ||
28 | * You should only work with the number of sg entries pci_map_sg | ||
29 | * returns, or alternatively stop on the first sg_dma_len(sg) which | ||
30 | * is 0. | ||
31 | */ | ||
32 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
33 | #define sg_dma_len(sg) ((sg)->length) | ||
34 | |||
26 | #define ISA_DMA_THRESHOLD (0xffffffff) | 35 | #define ISA_DMA_THRESHOLD (0xffffffff) |
27 | 36 | ||
28 | #endif /* !__ASM_SH64_SCATTERLIST_H */ | 37 | #endif /* !__ASM_SH64_SCATTERLIST_H */ |
diff --git a/include/asm-sparc/atomic.h b/include/asm-sparc/atomic.h index bdca5416d8b0..3328950dbfe6 100644 --- a/include/asm-sparc/atomic.h +++ b/include/asm-sparc/atomic.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* atomic.h: These still suck, but the I-cache hit rate is higher. | 1 | /* atomic.h: These still suck, but the I-cache hit rate is higher. |
2 | * | 2 | * |
3 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 2000 Anton Blanchard (anton@linuxcare.com.au) | 4 | * Copyright (C) 2000 Anton Blanchard (anton@linuxcare.com.au) |
5 | * Copyright (C) 2007 Kyle McMartin (kyle@parisc-linux.org) | 5 | * Copyright (C) 2007 Kyle McMartin (kyle@parisc-linux.org) |
6 | * | 6 | * |
@@ -33,7 +33,7 @@ extern void __cmpxchg_called_with_bad_pointer(void); | |||
33 | extern unsigned long __cmpxchg_u32(volatile u32 *m, u32 old, u32 new_); | 33 | extern unsigned long __cmpxchg_u32(volatile u32 *m, u32 old, u32 new_); |
34 | 34 | ||
35 | /* don't worry...optimizer will get rid of most of this */ | 35 | /* don't worry...optimizer will get rid of most of this */ |
36 | static __inline__ unsigned long | 36 | static inline unsigned long |
37 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) | 37 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) |
38 | { | 38 | { |
39 | switch(size) { | 39 | switch(size) { |
diff --git a/include/asm-sparc/dma.h b/include/asm-sparc/dma.h index 407b3614468a..959d6c8a71ae 100644 --- a/include/asm-sparc/dma.h +++ b/include/asm-sparc/dma.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: dma.h,v 1.35 1999/12/27 06:37:09 anton Exp $ | 1 | /* include/asm-sparc/dma.h |
2 | * include/asm-sparc/dma.h | ||
3 | * | 2 | * |
4 | * Copyright 1995 (C) David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright 1995 (C) David S. Miller (davem@davemloft.net) |
5 | */ | 4 | */ |
6 | 5 | ||
7 | #ifndef _ASM_SPARC_DMA_H | 6 | #ifndef _ASM_SPARC_DMA_H |
@@ -21,14 +20,14 @@ | |||
21 | struct page; | 20 | struct page; |
22 | extern spinlock_t dma_spin_lock; | 21 | extern spinlock_t dma_spin_lock; |
23 | 22 | ||
24 | static __inline__ unsigned long claim_dma_lock(void) | 23 | static inline unsigned long claim_dma_lock(void) |
25 | { | 24 | { |
26 | unsigned long flags; | 25 | unsigned long flags; |
27 | spin_lock_irqsave(&dma_spin_lock, flags); | 26 | spin_lock_irqsave(&dma_spin_lock, flags); |
28 | return flags; | 27 | return flags; |
29 | } | 28 | } |
30 | 29 | ||
31 | static __inline__ void release_dma_lock(unsigned long flags) | 30 | static inline void release_dma_lock(unsigned long flags) |
32 | { | 31 | { |
33 | spin_unlock_irqrestore(&dma_spin_lock, flags); | 32 | spin_unlock_irqrestore(&dma_spin_lock, flags); |
34 | } | 33 | } |
diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h index 5da1eef0f706..dbe7a586be5b 100644 --- a/include/asm-sparc/floppy.h +++ b/include/asm-sparc/floppy.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* asm-sparc/floppy.h: Sparc specific parts of the Floppy driver. | 1 | /* asm-sparc/floppy.h: Sparc specific parts of the Floppy driver. |
2 | * | 2 | * |
3 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1995 David S. Miller (davem@davemloft.net) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef __ASM_SPARC_FLOPPY_H | 6 | #ifndef __ASM_SPARC_FLOPPY_H |
@@ -232,12 +232,12 @@ extern char *pdma_base; | |||
232 | extern unsigned long pdma_areasize; | 232 | extern unsigned long pdma_areasize; |
233 | 233 | ||
234 | /* Common routines to all controller types on the Sparc. */ | 234 | /* Common routines to all controller types on the Sparc. */ |
235 | static __inline__ void virtual_dma_init(void) | 235 | static inline void virtual_dma_init(void) |
236 | { | 236 | { |
237 | /* nothing... */ | 237 | /* nothing... */ |
238 | } | 238 | } |
239 | 239 | ||
240 | static __inline__ void sun_fd_disable_dma(void) | 240 | static inline void sun_fd_disable_dma(void) |
241 | { | 241 | { |
242 | doing_pdma = 0; | 242 | doing_pdma = 0; |
243 | if (pdma_base) { | 243 | if (pdma_base) { |
@@ -246,7 +246,7 @@ static __inline__ void sun_fd_disable_dma(void) | |||
246 | } | 246 | } |
247 | } | 247 | } |
248 | 248 | ||
249 | static __inline__ void sun_fd_set_dma_mode(int mode) | 249 | static inline void sun_fd_set_dma_mode(int mode) |
250 | { | 250 | { |
251 | switch(mode) { | 251 | switch(mode) { |
252 | case DMA_MODE_READ: | 252 | case DMA_MODE_READ: |
@@ -261,17 +261,17 @@ static __inline__ void sun_fd_set_dma_mode(int mode) | |||
261 | } | 261 | } |
262 | } | 262 | } |
263 | 263 | ||
264 | static __inline__ void sun_fd_set_dma_addr(char *buffer) | 264 | static inline void sun_fd_set_dma_addr(char *buffer) |
265 | { | 265 | { |
266 | pdma_vaddr = buffer; | 266 | pdma_vaddr = buffer; |
267 | } | 267 | } |
268 | 268 | ||
269 | static __inline__ void sun_fd_set_dma_count(int length) | 269 | static inline void sun_fd_set_dma_count(int length) |
270 | { | 270 | { |
271 | pdma_size = length; | 271 | pdma_size = length; |
272 | } | 272 | } |
273 | 273 | ||
274 | static __inline__ void sun_fd_enable_dma(void) | 274 | static inline void sun_fd_enable_dma(void) |
275 | { | 275 | { |
276 | pdma_vaddr = mmu_lockarea(pdma_vaddr, pdma_size); | 276 | pdma_vaddr = mmu_lockarea(pdma_vaddr, pdma_size); |
277 | pdma_base = pdma_vaddr; | 277 | pdma_base = pdma_vaddr; |
diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h index 404022765fc7..4076cb5d1581 100644 --- a/include/asm-sparc/ide.h +++ b/include/asm-sparc/ide.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: ide.h,v 1.7 2002/01/16 20:58:40 davem Exp $ | 1 | /* ide.h: SPARC PCI specific IDE glue. |
2 | * ide.h: SPARC PCI specific IDE glue. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1997 David S. Miller (davem@davemloft.net) |
5 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) |
6 | * Adaptation from sparc64 version to sparc by Pete Zaitcev. | 5 | * Adaptation from sparc64 version to sparc by Pete Zaitcev. |
7 | */ | 6 | */ |
@@ -31,7 +30,7 @@ | |||
31 | #define __ide_mm_outsw __ide_outsw | 30 | #define __ide_mm_outsw __ide_outsw |
32 | #define __ide_mm_outsl __ide_outsl | 31 | #define __ide_mm_outsl __ide_outsl |
33 | 32 | ||
34 | static __inline__ void __ide_insw(unsigned long port, | 33 | static inline void __ide_insw(unsigned long port, |
35 | void *dst, | 34 | void *dst, |
36 | unsigned long count) | 35 | unsigned long count) |
37 | { | 36 | { |
@@ -62,7 +61,7 @@ static __inline__ void __ide_insw(unsigned long port, | |||
62 | /* __flush_dcache_range((unsigned long)dst, end); */ /* P3 see hme */ | 61 | /* __flush_dcache_range((unsigned long)dst, end); */ /* P3 see hme */ |
63 | } | 62 | } |
64 | 63 | ||
65 | static __inline__ void __ide_outsw(unsigned long port, | 64 | static inline void __ide_outsw(unsigned long port, |
66 | const void *src, | 65 | const void *src, |
67 | unsigned long count) | 66 | unsigned long count) |
68 | { | 67 | { |
diff --git a/include/asm-sparc/posix_types.h b/include/asm-sparc/posix_types.h index 9ef1b3db4cbf..62c8fa7b36d4 100644 --- a/include/asm-sparc/posix_types.h +++ b/include/asm-sparc/posix_types.h | |||
@@ -49,7 +49,7 @@ typedef struct { | |||
49 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 49 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) |
50 | 50 | ||
51 | #undef __FD_SET | 51 | #undef __FD_SET |
52 | static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) | 52 | static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) |
53 | { | 53 | { |
54 | unsigned long _tmp = fd / __NFDBITS; | 54 | unsigned long _tmp = fd / __NFDBITS; |
55 | unsigned long _rem = fd % __NFDBITS; | 55 | unsigned long _rem = fd % __NFDBITS; |
@@ -57,7 +57,7 @@ static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) | |||
57 | } | 57 | } |
58 | 58 | ||
59 | #undef __FD_CLR | 59 | #undef __FD_CLR |
60 | static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) | 60 | static inline void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) |
61 | { | 61 | { |
62 | unsigned long _tmp = fd / __NFDBITS; | 62 | unsigned long _tmp = fd / __NFDBITS; |
63 | unsigned long _rem = fd % __NFDBITS; | 63 | unsigned long _rem = fd % __NFDBITS; |
@@ -65,7 +65,7 @@ static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) | |||
65 | } | 65 | } |
66 | 66 | ||
67 | #undef __FD_ISSET | 67 | #undef __FD_ISSET |
68 | static __inline__ int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) | 68 | static inline int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) |
69 | { | 69 | { |
70 | unsigned long _tmp = fd / __NFDBITS; | 70 | unsigned long _tmp = fd / __NFDBITS; |
71 | unsigned long _rem = fd % __NFDBITS; | 71 | unsigned long _rem = fd % __NFDBITS; |
@@ -77,7 +77,7 @@ static __inline__ int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) | |||
77 | * for 256 and 1024-bit fd_sets respectively) | 77 | * for 256 and 1024-bit fd_sets respectively) |
78 | */ | 78 | */ |
79 | #undef __FD_ZERO | 79 | #undef __FD_ZERO |
80 | static __inline__ void __FD_ZERO(__kernel_fd_set *p) | 80 | static inline void __FD_ZERO(__kernel_fd_set *p) |
81 | { | 81 | { |
82 | unsigned long *tmp = p->fds_bits; | 82 | unsigned long *tmp = p->fds_bits; |
83 | int i; | 83 | int i; |
diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h index 8c259de02614..2655d142b22d 100644 --- a/include/asm-sparc/system.h +++ b/include/asm-sparc/system.h | |||
@@ -1,5 +1,3 @@ | |||
1 | /* $Id: system.h,v 1.86 2001/10/30 04:57:10 davem Exp $ */ | ||
2 | |||
3 | #ifndef __SPARC_SYSTEM_H | 1 | #ifndef __SPARC_SYSTEM_H |
4 | #define __SPARC_SYSTEM_H | 2 | #define __SPARC_SYSTEM_H |
5 | 3 | ||
@@ -56,7 +54,7 @@ extern void sun_do_break(void); | |||
56 | extern int serial_console; | 54 | extern int serial_console; |
57 | extern int stop_a_enabled; | 55 | extern int stop_a_enabled; |
58 | 56 | ||
59 | static __inline__ int con_is_present(void) | 57 | static inline int con_is_present(void) |
60 | { | 58 | { |
61 | return serial_console ? 0 : 1; | 59 | return serial_console ? 0 : 1; |
62 | } | 60 | } |
@@ -217,7 +215,7 @@ static inline unsigned long xchg_u32(__volatile__ unsigned long *m, unsigned lon | |||
217 | 215 | ||
218 | extern void __xchg_called_with_bad_pointer(void); | 216 | extern void __xchg_called_with_bad_pointer(void); |
219 | 217 | ||
220 | static __inline__ unsigned long __xchg(unsigned long x, __volatile__ void * ptr, int size) | 218 | static inline unsigned long __xchg(unsigned long x, __volatile__ void * ptr, int size) |
221 | { | 219 | { |
222 | switch (size) { | 220 | switch (size) { |
223 | case 4: | 221 | case 4: |
diff --git a/include/asm-sparc64/atomic.h b/include/asm-sparc64/atomic.h index 3fb4e1f7f186..2c71ec4a3b18 100644 --- a/include/asm-sparc64/atomic.h +++ b/include/asm-sparc64/atomic.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: atomic.h,v 1.22 2001/07/11 23:56:07 davem Exp $ | 1 | /* atomic.h: Thankfully the V9 is at least reasonable for this |
2 | * atomic.h: Thankfully the V9 is at least reasonable for this | ||
3 | * stuff. | 2 | * stuff. |
4 | * | 3 | * |
5 | * Copyright (C) 1996, 1997, 2000 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 1996, 1997, 2000 David S. Miller (davem@redhat.com) |
@@ -74,7 +73,7 @@ extern int atomic64_sub_ret(int, atomic64_t *); | |||
74 | #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) | 73 | #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) |
75 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | 74 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) |
76 | 75 | ||
77 | static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | 76 | static inline int atomic_add_unless(atomic_t *v, int a, int u) |
78 | { | 77 | { |
79 | int c, old; | 78 | int c, old; |
80 | c = atomic_read(v); | 79 | c = atomic_read(v); |
@@ -95,7 +94,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
95 | ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) | 94 | ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) |
96 | #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) | 95 | #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) |
97 | 96 | ||
98 | static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | 97 | static inline int atomic64_add_unless(atomic64_t *v, long a, long u) |
99 | { | 98 | { |
100 | long c, old; | 99 | long c, old; |
101 | c = atomic64_read(v); | 100 | c = atomic64_read(v); |
diff --git a/include/asm-sparc64/backoff.h b/include/asm-sparc64/backoff.h index 0e32f8b62fd2..dadd6c385c6c 100644 --- a/include/asm-sparc64/backoff.h +++ b/include/asm-sparc64/backoff.h | |||
@@ -21,7 +21,9 @@ | |||
21 | #else | 21 | #else |
22 | 22 | ||
23 | #define BACKOFF_SETUP(reg) | 23 | #define BACKOFF_SETUP(reg) |
24 | #define BACKOFF_SPIN(reg, tmp, label) | 24 | #define BACKOFF_SPIN(reg, tmp, label) \ |
25 | ba,pt %xcc, label; \ | ||
26 | nop; | ||
25 | 27 | ||
26 | #endif | 28 | #endif |
27 | 29 | ||
diff --git a/include/asm-sparc64/byteorder.h b/include/asm-sparc64/byteorder.h index c69b08af5fe0..3943022906fd 100644 --- a/include/asm-sparc64/byteorder.h +++ b/include/asm-sparc64/byteorder.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: byteorder.h,v 1.8 1997/12/18 02:44:14 ecd Exp $ */ | ||
2 | #ifndef _SPARC64_BYTEORDER_H | 1 | #ifndef _SPARC64_BYTEORDER_H |
3 | #define _SPARC64_BYTEORDER_H | 2 | #define _SPARC64_BYTEORDER_H |
4 | 3 | ||
@@ -7,7 +6,7 @@ | |||
7 | 6 | ||
8 | #ifdef __GNUC__ | 7 | #ifdef __GNUC__ |
9 | 8 | ||
10 | static __inline__ __u16 ___arch__swab16p(const __u16 *addr) | 9 | static inline __u16 ___arch__swab16p(const __u16 *addr) |
11 | { | 10 | { |
12 | __u16 ret; | 11 | __u16 ret; |
13 | 12 | ||
@@ -17,7 +16,7 @@ static __inline__ __u16 ___arch__swab16p(const __u16 *addr) | |||
17 | return ret; | 16 | return ret; |
18 | } | 17 | } |
19 | 18 | ||
20 | static __inline__ __u32 ___arch__swab32p(const __u32 *addr) | 19 | static inline __u32 ___arch__swab32p(const __u32 *addr) |
21 | { | 20 | { |
22 | __u32 ret; | 21 | __u32 ret; |
23 | 22 | ||
@@ -27,7 +26,7 @@ static __inline__ __u32 ___arch__swab32p(const __u32 *addr) | |||
27 | return ret; | 26 | return ret; |
28 | } | 27 | } |
29 | 28 | ||
30 | static __inline__ __u64 ___arch__swab64p(const __u64 *addr) | 29 | static inline __u64 ___arch__swab64p(const __u64 *addr) |
31 | { | 30 | { |
32 | __u64 ret; | 31 | __u64 ret; |
33 | 32 | ||
diff --git a/include/asm-sparc64/fpumacro.h b/include/asm-sparc64/fpumacro.h index d583e5efd75d..cc463fec806f 100644 --- a/include/asm-sparc64/fpumacro.h +++ b/include/asm-sparc64/fpumacro.h | |||
@@ -16,7 +16,7 @@ struct fpustate { | |||
16 | 16 | ||
17 | #define FPUSTATE (struct fpustate *)(current_thread_info()->fpregs) | 17 | #define FPUSTATE (struct fpustate *)(current_thread_info()->fpregs) |
18 | 18 | ||
19 | static __inline__ unsigned long fprs_read(void) | 19 | static inline unsigned long fprs_read(void) |
20 | { | 20 | { |
21 | unsigned long retval; | 21 | unsigned long retval; |
22 | 22 | ||
@@ -25,7 +25,7 @@ static __inline__ unsigned long fprs_read(void) | |||
25 | return retval; | 25 | return retval; |
26 | } | 26 | } |
27 | 27 | ||
28 | static __inline__ void fprs_write(unsigned long val) | 28 | static inline void fprs_write(unsigned long val) |
29 | { | 29 | { |
30 | __asm__ __volatile__("wr %0, 0x0, %%fprs" : : "r" (val)); | 30 | __asm__ __volatile__("wr %0, 0x0, %%fprs" : : "r" (val)); |
31 | } | 31 | } |
diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h index 876312fe82cc..df1097d6ffbe 100644 --- a/include/asm-sparc64/futex.h +++ b/include/asm-sparc64/futex.h | |||
@@ -17,7 +17,8 @@ | |||
17 | "3:\n" \ | 17 | "3:\n" \ |
18 | " .section .fixup,#alloc,#execinstr\n" \ | 18 | " .section .fixup,#alloc,#execinstr\n" \ |
19 | " .align 4\n" \ | 19 | " .align 4\n" \ |
20 | "4: ba 3b\n" \ | 20 | "4: sethi %%hi(3b), %0\n" \ |
21 | " jmpl %0 + %%lo(3b), %%g0\n" \ | ||
21 | " mov %5, %0\n" \ | 22 | " mov %5, %0\n" \ |
22 | " .previous\n" \ | 23 | " .previous\n" \ |
23 | " .section __ex_table,\"a\"\n" \ | 24 | " .section __ex_table,\"a\"\n" \ |
@@ -91,7 +92,8 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | |||
91 | "2:\n" | 92 | "2:\n" |
92 | " .section .fixup,#alloc,#execinstr\n" | 93 | " .section .fixup,#alloc,#execinstr\n" |
93 | " .align 4\n" | 94 | " .align 4\n" |
94 | "3: ba 2b\n" | 95 | "3: sethi %%hi(2b), %0\n" |
96 | " jmpl %0 + %%lo(2b), %%g0\n" | ||
95 | " mov %4, %0\n" | 97 | " mov %4, %0\n" |
96 | " .previous\n" | 98 | " .previous\n" |
97 | " .section __ex_table,\"a\"\n" | 99 | " .section __ex_table,\"a\"\n" |
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index cd7ef3097ac2..c299b853b5ba 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: io.h,v 1.47 2001/12/13 10:36:02 davem Exp $ */ | ||
2 | #ifndef __SPARC64_IO_H | 1 | #ifndef __SPARC64_IO_H |
3 | #define __SPARC64_IO_H | 2 | #define __SPARC64_IO_H |
4 | 3 | ||
@@ -19,7 +18,7 @@ extern unsigned long kern_base, kern_size; | |||
19 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 18 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
20 | #define BIO_VMERGE_BOUNDARY 8192 | 19 | #define BIO_VMERGE_BOUNDARY 8192 |
21 | 20 | ||
22 | static __inline__ u8 _inb(unsigned long addr) | 21 | static inline u8 _inb(unsigned long addr) |
23 | { | 22 | { |
24 | u8 ret; | 23 | u8 ret; |
25 | 24 | ||
@@ -30,7 +29,7 @@ static __inline__ u8 _inb(unsigned long addr) | |||
30 | return ret; | 29 | return ret; |
31 | } | 30 | } |
32 | 31 | ||
33 | static __inline__ u16 _inw(unsigned long addr) | 32 | static inline u16 _inw(unsigned long addr) |
34 | { | 33 | { |
35 | u16 ret; | 34 | u16 ret; |
36 | 35 | ||
@@ -41,7 +40,7 @@ static __inline__ u16 _inw(unsigned long addr) | |||
41 | return ret; | 40 | return ret; |
42 | } | 41 | } |
43 | 42 | ||
44 | static __inline__ u32 _inl(unsigned long addr) | 43 | static inline u32 _inl(unsigned long addr) |
45 | { | 44 | { |
46 | u32 ret; | 45 | u32 ret; |
47 | 46 | ||
@@ -52,21 +51,21 @@ static __inline__ u32 _inl(unsigned long addr) | |||
52 | return ret; | 51 | return ret; |
53 | } | 52 | } |
54 | 53 | ||
55 | static __inline__ void _outb(u8 b, unsigned long addr) | 54 | static inline void _outb(u8 b, unsigned long addr) |
56 | { | 55 | { |
57 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */" | 56 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */" |
58 | : /* no outputs */ | 57 | : /* no outputs */ |
59 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 58 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); |
60 | } | 59 | } |
61 | 60 | ||
62 | static __inline__ void _outw(u16 w, unsigned long addr) | 61 | static inline void _outw(u16 w, unsigned long addr) |
63 | { | 62 | { |
64 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */" | 63 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */" |
65 | : /* no outputs */ | 64 | : /* no outputs */ |
66 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 65 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); |
67 | } | 66 | } |
68 | 67 | ||
69 | static __inline__ void _outl(u32 l, unsigned long addr) | 68 | static inline void _outl(u32 l, unsigned long addr) |
70 | { | 69 | { |
71 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */" | 70 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */" |
72 | : /* no outputs */ | 71 | : /* no outputs */ |
@@ -205,7 +204,7 @@ static inline void _writeq(u64 q, volatile void __iomem *addr) | |||
205 | #define writeq(__q, __addr) _writeq(__q, __addr) | 204 | #define writeq(__q, __addr) _writeq(__q, __addr) |
206 | 205 | ||
207 | /* Now versions without byte-swapping. */ | 206 | /* Now versions without byte-swapping. */ |
208 | static __inline__ u8 _raw_readb(unsigned long addr) | 207 | static inline u8 _raw_readb(unsigned long addr) |
209 | { | 208 | { |
210 | u8 ret; | 209 | u8 ret; |
211 | 210 | ||
@@ -216,7 +215,7 @@ static __inline__ u8 _raw_readb(unsigned long addr) | |||
216 | return ret; | 215 | return ret; |
217 | } | 216 | } |
218 | 217 | ||
219 | static __inline__ u16 _raw_readw(unsigned long addr) | 218 | static inline u16 _raw_readw(unsigned long addr) |
220 | { | 219 | { |
221 | u16 ret; | 220 | u16 ret; |
222 | 221 | ||
@@ -227,7 +226,7 @@ static __inline__ u16 _raw_readw(unsigned long addr) | |||
227 | return ret; | 226 | return ret; |
228 | } | 227 | } |
229 | 228 | ||
230 | static __inline__ u32 _raw_readl(unsigned long addr) | 229 | static inline u32 _raw_readl(unsigned long addr) |
231 | { | 230 | { |
232 | u32 ret; | 231 | u32 ret; |
233 | 232 | ||
@@ -238,7 +237,7 @@ static __inline__ u32 _raw_readl(unsigned long addr) | |||
238 | return ret; | 237 | return ret; |
239 | } | 238 | } |
240 | 239 | ||
241 | static __inline__ u64 _raw_readq(unsigned long addr) | 240 | static inline u64 _raw_readq(unsigned long addr) |
242 | { | 241 | { |
243 | u64 ret; | 242 | u64 ret; |
244 | 243 | ||
@@ -249,28 +248,28 @@ static __inline__ u64 _raw_readq(unsigned long addr) | |||
249 | return ret; | 248 | return ret; |
250 | } | 249 | } |
251 | 250 | ||
252 | static __inline__ void _raw_writeb(u8 b, unsigned long addr) | 251 | static inline void _raw_writeb(u8 b, unsigned long addr) |
253 | { | 252 | { |
254 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_raw_writeb */" | 253 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_raw_writeb */" |
255 | : /* no outputs */ | 254 | : /* no outputs */ |
256 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 255 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); |
257 | } | 256 | } |
258 | 257 | ||
259 | static __inline__ void _raw_writew(u16 w, unsigned long addr) | 258 | static inline void _raw_writew(u16 w, unsigned long addr) |
260 | { | 259 | { |
261 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_raw_writew */" | 260 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_raw_writew */" |
262 | : /* no outputs */ | 261 | : /* no outputs */ |
263 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 262 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); |
264 | } | 263 | } |
265 | 264 | ||
266 | static __inline__ void _raw_writel(u32 l, unsigned long addr) | 265 | static inline void _raw_writel(u32 l, unsigned long addr) |
267 | { | 266 | { |
268 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_raw_writel */" | 267 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_raw_writel */" |
269 | : /* no outputs */ | 268 | : /* no outputs */ |
270 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 269 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); |
271 | } | 270 | } |
272 | 271 | ||
273 | static __inline__ void _raw_writeq(u64 q, unsigned long addr) | 272 | static inline void _raw_writeq(u64 q, unsigned long addr) |
274 | { | 273 | { |
275 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_raw_writeq */" | 274 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_raw_writeq */" |
276 | : /* no outputs */ | 275 | : /* no outputs */ |
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 182dba05c702..30cb76b47be1 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: irq.h,v 1.21 2002/01/23 11:27:36 davem Exp $ | 1 | /* irq.h: IRQ registers on the 64-bit Sparc. |
2 | * irq.h: IRQ registers on the 64-bit Sparc. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) |
5 | * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) |
6 | */ | 5 | */ |
7 | 6 | ||
@@ -67,21 +66,21 @@ extern void virt_irq_free(unsigned int virt_irq); | |||
67 | 66 | ||
68 | extern void fixup_irqs(void); | 67 | extern void fixup_irqs(void); |
69 | 68 | ||
70 | static __inline__ void set_softint(unsigned long bits) | 69 | static inline void set_softint(unsigned long bits) |
71 | { | 70 | { |
72 | __asm__ __volatile__("wr %0, 0x0, %%set_softint" | 71 | __asm__ __volatile__("wr %0, 0x0, %%set_softint" |
73 | : /* No outputs */ | 72 | : /* No outputs */ |
74 | : "r" (bits)); | 73 | : "r" (bits)); |
75 | } | 74 | } |
76 | 75 | ||
77 | static __inline__ void clear_softint(unsigned long bits) | 76 | static inline void clear_softint(unsigned long bits) |
78 | { | 77 | { |
79 | __asm__ __volatile__("wr %0, 0x0, %%clear_softint" | 78 | __asm__ __volatile__("wr %0, 0x0, %%clear_softint" |
80 | : /* No outputs */ | 79 | : /* No outputs */ |
81 | : "r" (bits)); | 80 | : "r" (bits)); |
82 | } | 81 | } |
83 | 82 | ||
84 | static __inline__ unsigned long get_softint(void) | 83 | static inline unsigned long get_softint(void) |
85 | { | 84 | { |
86 | unsigned long retval; | 85 | unsigned long retval; |
87 | 86 | ||
diff --git a/include/asm-sparc64/mostek.h b/include/asm-sparc64/mostek.h index d14dd8988161..c5652de2ace2 100644 --- a/include/asm-sparc64/mostek.h +++ b/include/asm-sparc64/mostek.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: mostek.h,v 1.4 2001/01/11 15:07:09 davem Exp $ | 1 | /* mostek.h: Describes the various Mostek time of day clock registers. |
2 | * mostek.h: Describes the various Mostek time of day clock registers. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1995 David S. Miller (davem@davemloft.net) |
5 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) | 4 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) |
6 | */ | 5 | */ |
7 | 6 | ||
@@ -38,7 +37,7 @@ | |||
38 | * | 37 | * |
39 | * We now deal with physical addresses for I/O to the chip. -DaveM | 38 | * We now deal with physical addresses for I/O to the chip. -DaveM |
40 | */ | 39 | */ |
41 | static __inline__ u8 mostek_read(void __iomem *addr) | 40 | static inline u8 mostek_read(void __iomem *addr) |
42 | { | 41 | { |
43 | u8 ret; | 42 | u8 ret; |
44 | 43 | ||
@@ -48,7 +47,7 @@ static __inline__ u8 mostek_read(void __iomem *addr) | |||
48 | return ret; | 47 | return ret; |
49 | } | 48 | } |
50 | 49 | ||
51 | static __inline__ void mostek_write(void __iomem *addr, u8 val) | 50 | static inline void mostek_write(void __iomem *addr, u8 val) |
52 | { | 51 | { |
53 | __asm__ __volatile__("stba %0, [%1] %2" | 52 | __asm__ __volatile__("stba %0, [%1] %2" |
54 | : /* no outputs */ | 53 | : /* no outputs */ |
diff --git a/include/asm-sparc64/ns87303.h b/include/asm-sparc64/ns87303.h index 6d58fdf349b5..686defe6aaa0 100644 --- a/include/asm-sparc64/ns87303.h +++ b/include/asm-sparc64/ns87303.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: ns87303.h,v 1.3 2000/01/09 15:16:34 ecd Exp $ | 1 | /* ns87303.h: Configuration Register Description for the |
2 | * ns87303.h: Configuration Register Description for the | ||
3 | * National Semiconductor PC87303 (SuperIO). | 2 | * National Semiconductor PC87303 (SuperIO). |
4 | * | 3 | * |
5 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
@@ -85,7 +84,7 @@ | |||
85 | 84 | ||
86 | extern spinlock_t ns87303_lock; | 85 | extern spinlock_t ns87303_lock; |
87 | 86 | ||
88 | static __inline__ int ns87303_modify(unsigned long port, unsigned int index, | 87 | static inline int ns87303_modify(unsigned long port, unsigned int index, |
89 | unsigned char clr, unsigned char set) | 88 | unsigned char clr, unsigned char set) |
90 | { | 89 | { |
91 | static unsigned char reserved[] = { | 90 | static unsigned char reserved[] = { |
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index 8116e8f6062c..e9555b246c8d 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: parport.h,v 1.11 2001/05/11 07:54:24 davem Exp $ | 1 | /* parport.h: sparc64 specific parport initialization and dma. |
2 | * parport.h: sparc64 specific parport initialization and dma. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1999 Eddie C. Dost (ecd@skynet.be) | 3 | * Copyright (C) 1999 Eddie C. Dost (ecd@skynet.be) |
5 | */ | 4 | */ |
@@ -42,7 +41,7 @@ static struct sparc_ebus_info { | |||
42 | 41 | ||
43 | static DECLARE_BITMAP(dma_slot_map, PARPORT_PC_MAX_PORTS); | 42 | static DECLARE_BITMAP(dma_slot_map, PARPORT_PC_MAX_PORTS); |
44 | 43 | ||
45 | static __inline__ int request_dma(unsigned int dmanr, const char *device_id) | 44 | static inline int request_dma(unsigned int dmanr, const char *device_id) |
46 | { | 45 | { |
47 | if (dmanr >= PARPORT_PC_MAX_PORTS) | 46 | if (dmanr >= PARPORT_PC_MAX_PORTS) |
48 | return -EINVAL; | 47 | return -EINVAL; |
@@ -51,7 +50,7 @@ static __inline__ int request_dma(unsigned int dmanr, const char *device_id) | |||
51 | return 0; | 50 | return 0; |
52 | } | 51 | } |
53 | 52 | ||
54 | static __inline__ void free_dma(unsigned int dmanr) | 53 | static inline void free_dma(unsigned int dmanr) |
55 | { | 54 | { |
56 | if (dmanr >= PARPORT_PC_MAX_PORTS) { | 55 | if (dmanr >= PARPORT_PC_MAX_PORTS) { |
57 | printk(KERN_WARNING "Trying to free DMA%d\n", dmanr); | 56 | printk(KERN_WARNING "Trying to free DMA%d\n", dmanr); |
@@ -63,7 +62,7 @@ static __inline__ void free_dma(unsigned int dmanr) | |||
63 | } | 62 | } |
64 | } | 63 | } |
65 | 64 | ||
66 | static __inline__ void enable_dma(unsigned int dmanr) | 65 | static inline void enable_dma(unsigned int dmanr) |
67 | { | 66 | { |
68 | ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1); | 67 | ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1); |
69 | 68 | ||
@@ -73,32 +72,32 @@ static __inline__ void enable_dma(unsigned int dmanr) | |||
73 | BUG(); | 72 | BUG(); |
74 | } | 73 | } |
75 | 74 | ||
76 | static __inline__ void disable_dma(unsigned int dmanr) | 75 | static inline void disable_dma(unsigned int dmanr) |
77 | { | 76 | { |
78 | ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 0); | 77 | ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 0); |
79 | } | 78 | } |
80 | 79 | ||
81 | static __inline__ void clear_dma_ff(unsigned int dmanr) | 80 | static inline void clear_dma_ff(unsigned int dmanr) |
82 | { | 81 | { |
83 | /* nothing */ | 82 | /* nothing */ |
84 | } | 83 | } |
85 | 84 | ||
86 | static __inline__ void set_dma_mode(unsigned int dmanr, char mode) | 85 | static inline void set_dma_mode(unsigned int dmanr, char mode) |
87 | { | 86 | { |
88 | ebus_dma_prepare(&sparc_ebus_dmas[dmanr].info, (mode != DMA_MODE_WRITE)); | 87 | ebus_dma_prepare(&sparc_ebus_dmas[dmanr].info, (mode != DMA_MODE_WRITE)); |
89 | } | 88 | } |
90 | 89 | ||
91 | static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int addr) | 90 | static inline void set_dma_addr(unsigned int dmanr, unsigned int addr) |
92 | { | 91 | { |
93 | sparc_ebus_dmas[dmanr].addr = addr; | 92 | sparc_ebus_dmas[dmanr].addr = addr; |
94 | } | 93 | } |
95 | 94 | ||
96 | static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) | 95 | static inline void set_dma_count(unsigned int dmanr, unsigned int count) |
97 | { | 96 | { |
98 | sparc_ebus_dmas[dmanr].count = count; | 97 | sparc_ebus_dmas[dmanr].count = count; |
99 | } | 98 | } |
100 | 99 | ||
101 | static __inline__ unsigned int get_dma_residue(unsigned int dmanr) | 100 | static inline unsigned int get_dma_residue(unsigned int dmanr) |
102 | { | 101 | { |
103 | return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info); | 102 | return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info); |
104 | } | 103 | } |
diff --git a/include/asm-sparc64/posix_types.h b/include/asm-sparc64/posix_types.h index c86b9452c683..3426a65ecd35 100644 --- a/include/asm-sparc64/posix_types.h +++ b/include/asm-sparc64/posix_types.h | |||
@@ -53,7 +53,7 @@ typedef struct { | |||
53 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 53 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) |
54 | 54 | ||
55 | #undef __FD_SET | 55 | #undef __FD_SET |
56 | static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) | 56 | static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) |
57 | { | 57 | { |
58 | unsigned long _tmp = fd / __NFDBITS; | 58 | unsigned long _tmp = fd / __NFDBITS; |
59 | unsigned long _rem = fd % __NFDBITS; | 59 | unsigned long _rem = fd % __NFDBITS; |
@@ -61,7 +61,7 @@ static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) | |||
61 | } | 61 | } |
62 | 62 | ||
63 | #undef __FD_CLR | 63 | #undef __FD_CLR |
64 | static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) | 64 | static inline void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) |
65 | { | 65 | { |
66 | unsigned long _tmp = fd / __NFDBITS; | 66 | unsigned long _tmp = fd / __NFDBITS; |
67 | unsigned long _rem = fd % __NFDBITS; | 67 | unsigned long _rem = fd % __NFDBITS; |
@@ -69,7 +69,7 @@ static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | #undef __FD_ISSET | 71 | #undef __FD_ISSET |
72 | static __inline__ int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) | 72 | static inline int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) |
73 | { | 73 | { |
74 | unsigned long _tmp = fd / __NFDBITS; | 74 | unsigned long _tmp = fd / __NFDBITS; |
75 | unsigned long _rem = fd % __NFDBITS; | 75 | unsigned long _rem = fd % __NFDBITS; |
@@ -81,7 +81,7 @@ static __inline__ int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p) | |||
81 | * for 256 and 1024-bit fd_sets respectively) | 81 | * for 256 and 1024-bit fd_sets respectively) |
82 | */ | 82 | */ |
83 | #undef __FD_ZERO | 83 | #undef __FD_ZERO |
84 | static __inline__ void __FD_ZERO(__kernel_fd_set *p) | 84 | static inline void __FD_ZERO(__kernel_fd_set *p) |
85 | { | 85 | { |
86 | unsigned long *tmp = p->fds_bits; | 86 | unsigned long *tmp = p->fds_bits; |
87 | int i; | 87 | int i; |
diff --git a/include/asm-sparc64/sbus.h b/include/asm-sparc64/sbus.h index 0151cad486f3..24a04a55cf85 100644 --- a/include/asm-sparc64/sbus.h +++ b/include/asm-sparc64/sbus.h | |||
@@ -29,12 +29,12 @@ | |||
29 | * numbers + offsets, and vice versa. | 29 | * numbers + offsets, and vice versa. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | static __inline__ unsigned long sbus_devaddr(int slotnum, unsigned long offset) | 32 | static inline unsigned long sbus_devaddr(int slotnum, unsigned long offset) |
33 | { | 33 | { |
34 | return (unsigned long) (SUN_SBUS_BVADDR+((slotnum)<<28)+(offset)); | 34 | return (unsigned long) (SUN_SBUS_BVADDR+((slotnum)<<28)+(offset)); |
35 | } | 35 | } |
36 | 36 | ||
37 | static __inline__ int sbus_dev_slot(unsigned long dev_addr) | 37 | static inline int sbus_dev_slot(unsigned long dev_addr) |
38 | { | 38 | { |
39 | return (int) (((dev_addr)-SUN_SBUS_BVADDR)>>28); | 39 | return (int) (((dev_addr)-SUN_SBUS_BVADDR)>>28); |
40 | } | 40 | } |
diff --git a/include/asm-sparc64/spitfire.h b/include/asm-sparc64/spitfire.h index cf7807813e85..63b7040e8134 100644 --- a/include/asm-sparc64/spitfire.h +++ b/include/asm-sparc64/spitfire.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: spitfire.h,v 1.18 2001/11/29 16:42:10 kanoj Exp $ | 1 | /* spitfire.h: SpitFire/BlackBird/Cheetah inline MMU operations. |
2 | * spitfire.h: SpitFire/BlackBird/Cheetah inline MMU operations. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) |
5 | */ | 4 | */ |
6 | 5 | ||
7 | #ifndef _SPARC64_SPITFIRE_H | 6 | #ifndef _SPARC64_SPITFIRE_H |
@@ -67,7 +66,7 @@ extern void cheetah_enable_pcache(void); | |||
67 | /* The data cache is write through, so this just invalidates the | 66 | /* The data cache is write through, so this just invalidates the |
68 | * specified line. | 67 | * specified line. |
69 | */ | 68 | */ |
70 | static __inline__ void spitfire_put_dcache_tag(unsigned long addr, unsigned long tag) | 69 | static inline void spitfire_put_dcache_tag(unsigned long addr, unsigned long tag) |
71 | { | 70 | { |
72 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" | 71 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" |
73 | "membar #Sync" | 72 | "membar #Sync" |
@@ -81,7 +80,7 @@ static __inline__ void spitfire_put_dcache_tag(unsigned long addr, unsigned long | |||
81 | * a flush instruction (to any address) is sufficient to handle | 80 | * a flush instruction (to any address) is sufficient to handle |
82 | * this issue after the line is invalidated. | 81 | * this issue after the line is invalidated. |
83 | */ | 82 | */ |
84 | static __inline__ void spitfire_put_icache_tag(unsigned long addr, unsigned long tag) | 83 | static inline void spitfire_put_icache_tag(unsigned long addr, unsigned long tag) |
85 | { | 84 | { |
86 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" | 85 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" |
87 | "membar #Sync" | 86 | "membar #Sync" |
@@ -89,7 +88,7 @@ static __inline__ void spitfire_put_icache_tag(unsigned long addr, unsigned long | |||
89 | : "r" (tag), "r" (addr), "i" (ASI_IC_TAG)); | 88 | : "r" (tag), "r" (addr), "i" (ASI_IC_TAG)); |
90 | } | 89 | } |
91 | 90 | ||
92 | static __inline__ unsigned long spitfire_get_dtlb_data(int entry) | 91 | static inline unsigned long spitfire_get_dtlb_data(int entry) |
93 | { | 92 | { |
94 | unsigned long data; | 93 | unsigned long data; |
95 | 94 | ||
@@ -103,7 +102,7 @@ static __inline__ unsigned long spitfire_get_dtlb_data(int entry) | |||
103 | return data; | 102 | return data; |
104 | } | 103 | } |
105 | 104 | ||
106 | static __inline__ unsigned long spitfire_get_dtlb_tag(int entry) | 105 | static inline unsigned long spitfire_get_dtlb_tag(int entry) |
107 | { | 106 | { |
108 | unsigned long tag; | 107 | unsigned long tag; |
109 | 108 | ||
@@ -113,7 +112,7 @@ static __inline__ unsigned long spitfire_get_dtlb_tag(int entry) | |||
113 | return tag; | 112 | return tag; |
114 | } | 113 | } |
115 | 114 | ||
116 | static __inline__ void spitfire_put_dtlb_data(int entry, unsigned long data) | 115 | static inline void spitfire_put_dtlb_data(int entry, unsigned long data) |
117 | { | 116 | { |
118 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" | 117 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" |
119 | "membar #Sync" | 118 | "membar #Sync" |
@@ -122,7 +121,7 @@ static __inline__ void spitfire_put_dtlb_data(int entry, unsigned long data) | |||
122 | "i" (ASI_DTLB_DATA_ACCESS)); | 121 | "i" (ASI_DTLB_DATA_ACCESS)); |
123 | } | 122 | } |
124 | 123 | ||
125 | static __inline__ unsigned long spitfire_get_itlb_data(int entry) | 124 | static inline unsigned long spitfire_get_itlb_data(int entry) |
126 | { | 125 | { |
127 | unsigned long data; | 126 | unsigned long data; |
128 | 127 | ||
@@ -136,7 +135,7 @@ static __inline__ unsigned long spitfire_get_itlb_data(int entry) | |||
136 | return data; | 135 | return data; |
137 | } | 136 | } |
138 | 137 | ||
139 | static __inline__ unsigned long spitfire_get_itlb_tag(int entry) | 138 | static inline unsigned long spitfire_get_itlb_tag(int entry) |
140 | { | 139 | { |
141 | unsigned long tag; | 140 | unsigned long tag; |
142 | 141 | ||
@@ -146,7 +145,7 @@ static __inline__ unsigned long spitfire_get_itlb_tag(int entry) | |||
146 | return tag; | 145 | return tag; |
147 | } | 146 | } |
148 | 147 | ||
149 | static __inline__ void spitfire_put_itlb_data(int entry, unsigned long data) | 148 | static inline void spitfire_put_itlb_data(int entry, unsigned long data) |
150 | { | 149 | { |
151 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" | 150 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" |
152 | "membar #Sync" | 151 | "membar #Sync" |
@@ -155,7 +154,7 @@ static __inline__ void spitfire_put_itlb_data(int entry, unsigned long data) | |||
155 | "i" (ASI_ITLB_DATA_ACCESS)); | 154 | "i" (ASI_ITLB_DATA_ACCESS)); |
156 | } | 155 | } |
157 | 156 | ||
158 | static __inline__ void spitfire_flush_dtlb_nucleus_page(unsigned long page) | 157 | static inline void spitfire_flush_dtlb_nucleus_page(unsigned long page) |
159 | { | 158 | { |
160 | __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" | 159 | __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" |
161 | "membar #Sync" | 160 | "membar #Sync" |
@@ -163,7 +162,7 @@ static __inline__ void spitfire_flush_dtlb_nucleus_page(unsigned long page) | |||
163 | : "r" (page | 0x20), "i" (ASI_DMMU_DEMAP)); | 162 | : "r" (page | 0x20), "i" (ASI_DMMU_DEMAP)); |
164 | } | 163 | } |
165 | 164 | ||
166 | static __inline__ void spitfire_flush_itlb_nucleus_page(unsigned long page) | 165 | static inline void spitfire_flush_itlb_nucleus_page(unsigned long page) |
167 | { | 166 | { |
168 | __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" | 167 | __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" |
169 | "membar #Sync" | 168 | "membar #Sync" |
@@ -172,7 +171,7 @@ static __inline__ void spitfire_flush_itlb_nucleus_page(unsigned long page) | |||
172 | } | 171 | } |
173 | 172 | ||
174 | /* Cheetah has "all non-locked" tlb flushes. */ | 173 | /* Cheetah has "all non-locked" tlb flushes. */ |
175 | static __inline__ void cheetah_flush_dtlb_all(void) | 174 | static inline void cheetah_flush_dtlb_all(void) |
176 | { | 175 | { |
177 | __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" | 176 | __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" |
178 | "membar #Sync" | 177 | "membar #Sync" |
@@ -180,7 +179,7 @@ static __inline__ void cheetah_flush_dtlb_all(void) | |||
180 | : "r" (0x80), "i" (ASI_DMMU_DEMAP)); | 179 | : "r" (0x80), "i" (ASI_DMMU_DEMAP)); |
181 | } | 180 | } |
182 | 181 | ||
183 | static __inline__ void cheetah_flush_itlb_all(void) | 182 | static inline void cheetah_flush_itlb_all(void) |
184 | { | 183 | { |
185 | __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" | 184 | __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" |
186 | "membar #Sync" | 185 | "membar #Sync" |
@@ -202,7 +201,7 @@ static __inline__ void cheetah_flush_itlb_all(void) | |||
202 | * ASI_{D,I}TLB_DATA_ACCESS loads, doing the load twice fixes | 201 | * ASI_{D,I}TLB_DATA_ACCESS loads, doing the load twice fixes |
203 | * the problem for me. -DaveM | 202 | * the problem for me. -DaveM |
204 | */ | 203 | */ |
205 | static __inline__ unsigned long cheetah_get_ldtlb_data(int entry) | 204 | static inline unsigned long cheetah_get_ldtlb_data(int entry) |
206 | { | 205 | { |
207 | unsigned long data; | 206 | unsigned long data; |
208 | 207 | ||
@@ -215,7 +214,7 @@ static __inline__ unsigned long cheetah_get_ldtlb_data(int entry) | |||
215 | return data; | 214 | return data; |
216 | } | 215 | } |
217 | 216 | ||
218 | static __inline__ unsigned long cheetah_get_litlb_data(int entry) | 217 | static inline unsigned long cheetah_get_litlb_data(int entry) |
219 | { | 218 | { |
220 | unsigned long data; | 219 | unsigned long data; |
221 | 220 | ||
@@ -228,7 +227,7 @@ static __inline__ unsigned long cheetah_get_litlb_data(int entry) | |||
228 | return data; | 227 | return data; |
229 | } | 228 | } |
230 | 229 | ||
231 | static __inline__ unsigned long cheetah_get_ldtlb_tag(int entry) | 230 | static inline unsigned long cheetah_get_ldtlb_tag(int entry) |
232 | { | 231 | { |
233 | unsigned long tag; | 232 | unsigned long tag; |
234 | 233 | ||
@@ -240,7 +239,7 @@ static __inline__ unsigned long cheetah_get_ldtlb_tag(int entry) | |||
240 | return tag; | 239 | return tag; |
241 | } | 240 | } |
242 | 241 | ||
243 | static __inline__ unsigned long cheetah_get_litlb_tag(int entry) | 242 | static inline unsigned long cheetah_get_litlb_tag(int entry) |
244 | { | 243 | { |
245 | unsigned long tag; | 244 | unsigned long tag; |
246 | 245 | ||
@@ -252,7 +251,7 @@ static __inline__ unsigned long cheetah_get_litlb_tag(int entry) | |||
252 | return tag; | 251 | return tag; |
253 | } | 252 | } |
254 | 253 | ||
255 | static __inline__ void cheetah_put_ldtlb_data(int entry, unsigned long data) | 254 | static inline void cheetah_put_ldtlb_data(int entry, unsigned long data) |
256 | { | 255 | { |
257 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" | 256 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" |
258 | "membar #Sync" | 257 | "membar #Sync" |
@@ -262,7 +261,7 @@ static __inline__ void cheetah_put_ldtlb_data(int entry, unsigned long data) | |||
262 | "i" (ASI_DTLB_DATA_ACCESS)); | 261 | "i" (ASI_DTLB_DATA_ACCESS)); |
263 | } | 262 | } |
264 | 263 | ||
265 | static __inline__ void cheetah_put_litlb_data(int entry, unsigned long data) | 264 | static inline void cheetah_put_litlb_data(int entry, unsigned long data) |
266 | { | 265 | { |
267 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" | 266 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" |
268 | "membar #Sync" | 267 | "membar #Sync" |
@@ -272,7 +271,7 @@ static __inline__ void cheetah_put_litlb_data(int entry, unsigned long data) | |||
272 | "i" (ASI_ITLB_DATA_ACCESS)); | 271 | "i" (ASI_ITLB_DATA_ACCESS)); |
273 | } | 272 | } |
274 | 273 | ||
275 | static __inline__ unsigned long cheetah_get_dtlb_data(int entry, int tlb) | 274 | static inline unsigned long cheetah_get_dtlb_data(int entry, int tlb) |
276 | { | 275 | { |
277 | unsigned long data; | 276 | unsigned long data; |
278 | 277 | ||
@@ -284,7 +283,7 @@ static __inline__ unsigned long cheetah_get_dtlb_data(int entry, int tlb) | |||
284 | return data; | 283 | return data; |
285 | } | 284 | } |
286 | 285 | ||
287 | static __inline__ unsigned long cheetah_get_dtlb_tag(int entry, int tlb) | 286 | static inline unsigned long cheetah_get_dtlb_tag(int entry, int tlb) |
288 | { | 287 | { |
289 | unsigned long tag; | 288 | unsigned long tag; |
290 | 289 | ||
@@ -294,7 +293,7 @@ static __inline__ unsigned long cheetah_get_dtlb_tag(int entry, int tlb) | |||
294 | return tag; | 293 | return tag; |
295 | } | 294 | } |
296 | 295 | ||
297 | static __inline__ void cheetah_put_dtlb_data(int entry, unsigned long data, int tlb) | 296 | static inline void cheetah_put_dtlb_data(int entry, unsigned long data, int tlb) |
298 | { | 297 | { |
299 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" | 298 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" |
300 | "membar #Sync" | 299 | "membar #Sync" |
@@ -304,7 +303,7 @@ static __inline__ void cheetah_put_dtlb_data(int entry, unsigned long data, int | |||
304 | "i" (ASI_DTLB_DATA_ACCESS)); | 303 | "i" (ASI_DTLB_DATA_ACCESS)); |
305 | } | 304 | } |
306 | 305 | ||
307 | static __inline__ unsigned long cheetah_get_itlb_data(int entry) | 306 | static inline unsigned long cheetah_get_itlb_data(int entry) |
308 | { | 307 | { |
309 | unsigned long data; | 308 | unsigned long data; |
310 | 309 | ||
@@ -317,7 +316,7 @@ static __inline__ unsigned long cheetah_get_itlb_data(int entry) | |||
317 | return data; | 316 | return data; |
318 | } | 317 | } |
319 | 318 | ||
320 | static __inline__ unsigned long cheetah_get_itlb_tag(int entry) | 319 | static inline unsigned long cheetah_get_itlb_tag(int entry) |
321 | { | 320 | { |
322 | unsigned long tag; | 321 | unsigned long tag; |
323 | 322 | ||
@@ -327,7 +326,7 @@ static __inline__ unsigned long cheetah_get_itlb_tag(int entry) | |||
327 | return tag; | 326 | return tag; |
328 | } | 327 | } |
329 | 328 | ||
330 | static __inline__ void cheetah_put_itlb_data(int entry, unsigned long data) | 329 | static inline void cheetah_put_itlb_data(int entry, unsigned long data) |
331 | { | 330 | { |
332 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" | 331 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" |
333 | "membar #Sync" | 332 | "membar #Sync" |
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h index 3f175fa7e6d2..99a669c190c7 100644 --- a/include/asm-sparc64/system.h +++ b/include/asm-sparc64/system.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: system.h,v 1.69 2002/02/09 19:49:31 davem Exp $ */ | ||
2 | #ifndef __SPARC64_SYSTEM_H | 1 | #ifndef __SPARC64_SYSTEM_H |
3 | #define __SPARC64_SYSTEM_H | 2 | #define __SPARC64_SYSTEM_H |
4 | 3 | ||
@@ -179,7 +178,9 @@ do { if (test_thread_flag(TIF_PERFCTR)) { \ | |||
179 | "ldx [%%g6 + %9], %%g4\n\t" \ | 178 | "ldx [%%g6 + %9], %%g4\n\t" \ |
180 | "brz,pt %%o7, 1f\n\t" \ | 179 | "brz,pt %%o7, 1f\n\t" \ |
181 | " mov %%g7, %0\n\t" \ | 180 | " mov %%g7, %0\n\t" \ |
182 | "b,a ret_from_syscall\n\t" \ | 181 | "sethi %%hi(ret_from_syscall), %%g1\n\t" \ |
182 | "jmpl %%g1 + %%lo(ret_from_syscall), %%g0\n\t" \ | ||
183 | " nop\n\t" \ | ||
183 | "1:\n\t" \ | 184 | "1:\n\t" \ |
184 | : "=&r" (last), "=r" (current), "=r" (current_thread_info_reg), \ | 185 | : "=&r" (last), "=r" (current), "=r" (current_thread_info_reg), \ |
185 | "=r" (__local_per_cpu_offset) \ | 186 | "=r" (__local_per_cpu_offset) \ |
@@ -240,7 +241,7 @@ static inline unsigned long xchg64(__volatile__ unsigned long *m, unsigned long | |||
240 | 241 | ||
241 | extern void __xchg_called_with_bad_pointer(void); | 242 | extern void __xchg_called_with_bad_pointer(void); |
242 | 243 | ||
243 | static __inline__ unsigned long __xchg(unsigned long x, __volatile__ void * ptr, | 244 | static inline unsigned long __xchg(unsigned long x, __volatile__ void * ptr, |
244 | int size) | 245 | int size) |
245 | { | 246 | { |
246 | switch (size) { | 247 | switch (size) { |
@@ -263,7 +264,7 @@ extern void die_if_kernel(char *str, struct pt_regs *regs) __attribute__ ((noret | |||
263 | 264 | ||
264 | #define __HAVE_ARCH_CMPXCHG 1 | 265 | #define __HAVE_ARCH_CMPXCHG 1 |
265 | 266 | ||
266 | static __inline__ unsigned long | 267 | static inline unsigned long |
267 | __cmpxchg_u32(volatile int *m, int old, int new) | 268 | __cmpxchg_u32(volatile int *m, int old, int new) |
268 | { | 269 | { |
269 | __asm__ __volatile__("membar #StoreLoad | #LoadLoad\n" | 270 | __asm__ __volatile__("membar #StoreLoad | #LoadLoad\n" |
@@ -276,7 +277,7 @@ __cmpxchg_u32(volatile int *m, int old, int new) | |||
276 | return new; | 277 | return new; |
277 | } | 278 | } |
278 | 279 | ||
279 | static __inline__ unsigned long | 280 | static inline unsigned long |
280 | __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) | 281 | __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) |
281 | { | 282 | { |
282 | __asm__ __volatile__("membar #StoreLoad | #LoadLoad\n" | 283 | __asm__ __volatile__("membar #StoreLoad | #LoadLoad\n" |
@@ -293,7 +294,7 @@ __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) | |||
293 | if something tries to do an invalid cmpxchg(). */ | 294 | if something tries to do an invalid cmpxchg(). */ |
294 | extern void __cmpxchg_called_with_bad_pointer(void); | 295 | extern void __cmpxchg_called_with_bad_pointer(void); |
295 | 296 | ||
296 | static __inline__ unsigned long | 297 | static inline unsigned long |
297 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | 298 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) |
298 | { | 299 | { |
299 | switch (size) { | 300 | switch (size) { |
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h index afe236ba555b..93720e7b0289 100644 --- a/include/asm-sparc64/uaccess.h +++ b/include/asm-sparc64/uaccess.h | |||
@@ -123,7 +123,8 @@ __asm__ __volatile__( \ | |||
123 | ".section .fixup,#alloc,#execinstr\n\t" \ | 123 | ".section .fixup,#alloc,#execinstr\n\t" \ |
124 | ".align 4\n" \ | 124 | ".align 4\n" \ |
125 | "3:\n\t" \ | 125 | "3:\n\t" \ |
126 | "b 2b\n\t" \ | 126 | "sethi %%hi(2b), %0\n\t" \ |
127 | "jmpl %0 + %%lo(2b), %%g0\n\t" \ | ||
127 | " mov %3, %0\n\n\t" \ | 128 | " mov %3, %0\n\n\t" \ |
128 | ".previous\n\t" \ | 129 | ".previous\n\t" \ |
129 | ".section __ex_table,\"a\"\n\t" \ | 130 | ".section __ex_table,\"a\"\n\t" \ |
@@ -165,8 +166,9 @@ __asm__ __volatile__( \ | |||
165 | ".section .fixup,#alloc,#execinstr\n\t" \ | 166 | ".section .fixup,#alloc,#execinstr\n\t" \ |
166 | ".align 4\n" \ | 167 | ".align 4\n" \ |
167 | "3:\n\t" \ | 168 | "3:\n\t" \ |
169 | "sethi %%hi(2b), %0\n\t" \ | ||
168 | "clr %1\n\t" \ | 170 | "clr %1\n\t" \ |
169 | "b 2b\n\t" \ | 171 | "jmpl %0 + %%lo(2b), %%g0\n\t" \ |
170 | " mov %3, %0\n\n\t" \ | 172 | " mov %3, %0\n\n\t" \ |
171 | ".previous\n\t" \ | 173 | ".previous\n\t" \ |
172 | ".section __ex_table,\"a\"\n\t" \ | 174 | ".section __ex_table,\"a\"\n\t" \ |
diff --git a/include/asm-sparc64/upa.h b/include/asm-sparc64/upa.h index 7ae09a22e408..5b1633223f92 100644 --- a/include/asm-sparc64/upa.h +++ b/include/asm-sparc64/upa.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: upa.h,v 1.3 1999/09/21 14:39:47 davem Exp $ */ | ||
2 | #ifndef _SPARC64_UPA_H | 1 | #ifndef _SPARC64_UPA_H |
3 | #define _SPARC64_UPA_H | 2 | #define _SPARC64_UPA_H |
4 | 3 | ||
@@ -25,7 +24,7 @@ | |||
25 | 24 | ||
26 | /* UPA I/O space accessors */ | 25 | /* UPA I/O space accessors */ |
27 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) | 26 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) |
28 | static __inline__ unsigned char _upa_readb(unsigned long addr) | 27 | static inline unsigned char _upa_readb(unsigned long addr) |
29 | { | 28 | { |
30 | unsigned char ret; | 29 | unsigned char ret; |
31 | 30 | ||
@@ -36,7 +35,7 @@ static __inline__ unsigned char _upa_readb(unsigned long addr) | |||
36 | return ret; | 35 | return ret; |
37 | } | 36 | } |
38 | 37 | ||
39 | static __inline__ unsigned short _upa_readw(unsigned long addr) | 38 | static inline unsigned short _upa_readw(unsigned long addr) |
40 | { | 39 | { |
41 | unsigned short ret; | 40 | unsigned short ret; |
42 | 41 | ||
@@ -47,7 +46,7 @@ static __inline__ unsigned short _upa_readw(unsigned long addr) | |||
47 | return ret; | 46 | return ret; |
48 | } | 47 | } |
49 | 48 | ||
50 | static __inline__ unsigned int _upa_readl(unsigned long addr) | 49 | static inline unsigned int _upa_readl(unsigned long addr) |
51 | { | 50 | { |
52 | unsigned int ret; | 51 | unsigned int ret; |
53 | 52 | ||
@@ -58,7 +57,7 @@ static __inline__ unsigned int _upa_readl(unsigned long addr) | |||
58 | return ret; | 57 | return ret; |
59 | } | 58 | } |
60 | 59 | ||
61 | static __inline__ unsigned long _upa_readq(unsigned long addr) | 60 | static inline unsigned long _upa_readq(unsigned long addr) |
62 | { | 61 | { |
63 | unsigned long ret; | 62 | unsigned long ret; |
64 | 63 | ||
@@ -69,28 +68,28 @@ static __inline__ unsigned long _upa_readq(unsigned long addr) | |||
69 | return ret; | 68 | return ret; |
70 | } | 69 | } |
71 | 70 | ||
72 | static __inline__ void _upa_writeb(unsigned char b, unsigned long addr) | 71 | static inline void _upa_writeb(unsigned char b, unsigned long addr) |
73 | { | 72 | { |
74 | __asm__ __volatile__("stba\t%0, [%1] %2\t/* upa_writeb */" | 73 | __asm__ __volatile__("stba\t%0, [%1] %2\t/* upa_writeb */" |
75 | : /* no outputs */ | 74 | : /* no outputs */ |
76 | : "r" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 75 | : "r" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); |
77 | } | 76 | } |
78 | 77 | ||
79 | static __inline__ void _upa_writew(unsigned short w, unsigned long addr) | 78 | static inline void _upa_writew(unsigned short w, unsigned long addr) |
80 | { | 79 | { |
81 | __asm__ __volatile__("stha\t%0, [%1] %2\t/* upa_writew */" | 80 | __asm__ __volatile__("stha\t%0, [%1] %2\t/* upa_writew */" |
82 | : /* no outputs */ | 81 | : /* no outputs */ |
83 | : "r" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 82 | : "r" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); |
84 | } | 83 | } |
85 | 84 | ||
86 | static __inline__ void _upa_writel(unsigned int l, unsigned long addr) | 85 | static inline void _upa_writel(unsigned int l, unsigned long addr) |
87 | { | 86 | { |
88 | __asm__ __volatile__("stwa\t%0, [%1] %2\t/* upa_writel */" | 87 | __asm__ __volatile__("stwa\t%0, [%1] %2\t/* upa_writel */" |
89 | : /* no outputs */ | 88 | : /* no outputs */ |
90 | : "r" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 89 | : "r" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); |
91 | } | 90 | } |
92 | 91 | ||
93 | static __inline__ void _upa_writeq(unsigned long q, unsigned long addr) | 92 | static inline void _upa_writeq(unsigned long q, unsigned long addr) |
94 | { | 93 | { |
95 | __asm__ __volatile__("stxa\t%0, [%1] %2\t/* upa_writeq */" | 94 | __asm__ __volatile__("stxa\t%0, [%1] %2\t/* upa_writeq */" |
96 | : /* no outputs */ | 95 | : /* no outputs */ |
diff --git a/include/asm-sparc64/visasm.h b/include/asm-sparc64/visasm.h index a74078551e0f..34f2ec64933b 100644 --- a/include/asm-sparc64/visasm.h +++ b/include/asm-sparc64/visasm.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: visasm.h,v 1.5 2001/04/24 01:09:12 davem Exp $ */ | ||
2 | #ifndef _SPARC64_VISASM_H | 1 | #ifndef _SPARC64_VISASM_H |
3 | #define _SPARC64_VISASM_H | 2 | #define _SPARC64_VISASM_H |
4 | 3 | ||
@@ -44,7 +43,7 @@ | |||
44 | wr %o5, 0, %fprs; | 43 | wr %o5, 0, %fprs; |
45 | 44 | ||
46 | #ifndef __ASSEMBLY__ | 45 | #ifndef __ASSEMBLY__ |
47 | static __inline__ void save_and_clear_fpu(void) { | 46 | static inline void save_and_clear_fpu(void) { |
48 | __asm__ __volatile__ ( | 47 | __asm__ __volatile__ ( |
49 | " rd %%fprs, %%o5\n" | 48 | " rd %%fprs, %%o5\n" |
50 | " andcc %%o5, %0, %%g0\n" | 49 | " andcc %%o5, %0, %%g0\n" |
diff --git a/include/asm-um/unistd.h b/include/asm-um/unistd.h index 732c83f04c3d..38bd9d94ee46 100644 --- a/include/asm-um/unistd.h +++ b/include/asm-um/unistd.h | |||
@@ -14,7 +14,6 @@ extern int um_execve(const char *file, char *const argv[], char *const env[]); | |||
14 | 14 | ||
15 | #ifdef __KERNEL__ | 15 | #ifdef __KERNEL__ |
16 | /* We get __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 from the base arch */ | 16 | /* We get __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 from the base arch */ |
17 | #define __ARCH_WANT_IPC_PARSE_VERSION | ||
18 | #define __ARCH_WANT_OLD_READDIR | 17 | #define __ARCH_WANT_OLD_READDIR |
19 | #define __ARCH_WANT_SYS_ALARM | 18 | #define __ARCH_WANT_SYS_ALARM |
20 | #define __ARCH_WANT_SYS_GETHOSTNAME | 19 | #define __ARCH_WANT_SYS_GETHOSTNAME |
diff --git a/include/asm-x86/bitops_32.h b/include/asm-x86/bitops_32.h index 36ebb5b02b4f..0b40f6d20bea 100644 --- a/include/asm-x86/bitops_32.h +++ b/include/asm-x86/bitops_32.h | |||
@@ -183,9 +183,12 @@ static inline int test_and_set_bit(int nr, volatile unsigned long * addr) | |||
183 | * @nr: Bit to set | 183 | * @nr: Bit to set |
184 | * @addr: Address to count from | 184 | * @addr: Address to count from |
185 | * | 185 | * |
186 | * This is the same as test_and_set_bit on x86 | 186 | * This is the same as test_and_set_bit on x86. |
187 | */ | 187 | */ |
188 | #define test_and_set_bit_lock test_and_set_bit | 188 | static inline int test_and_set_bit_lock(int nr, volatile unsigned long *addr) |
189 | { | ||
190 | return test_and_set_bit(nr, addr); | ||
191 | } | ||
189 | 192 | ||
190 | /** | 193 | /** |
191 | * __test_and_set_bit - Set a bit and return its old value | 194 | * __test_and_set_bit - Set a bit and return its old value |
diff --git a/include/asm-x86/bitops_64.h b/include/asm-x86/bitops_64.h index b4d47940b959..766bcc0470a6 100644 --- a/include/asm-x86/bitops_64.h +++ b/include/asm-x86/bitops_64.h | |||
@@ -29,7 +29,7 @@ | |||
29 | * Note that @nr may be almost arbitrarily large; this function is not | 29 | * Note that @nr may be almost arbitrarily large; this function is not |
30 | * restricted to acting on a single-word quantity. | 30 | * restricted to acting on a single-word quantity. |
31 | */ | 31 | */ |
32 | static __inline__ void set_bit(int nr, volatile void * addr) | 32 | static inline void set_bit(int nr, volatile void *addr) |
33 | { | 33 | { |
34 | __asm__ __volatile__( LOCK_PREFIX | 34 | __asm__ __volatile__( LOCK_PREFIX |
35 | "btsl %1,%0" | 35 | "btsl %1,%0" |
@@ -46,7 +46,7 @@ static __inline__ void set_bit(int nr, volatile void * addr) | |||
46 | * If it's called on the same region of memory simultaneously, the effect | 46 | * If it's called on the same region of memory simultaneously, the effect |
47 | * may be that only one operation succeeds. | 47 | * may be that only one operation succeeds. |
48 | */ | 48 | */ |
49 | static __inline__ void __set_bit(int nr, volatile void * addr) | 49 | static inline void __set_bit(int nr, volatile void *addr) |
50 | { | 50 | { |
51 | __asm__ volatile( | 51 | __asm__ volatile( |
52 | "btsl %1,%0" | 52 | "btsl %1,%0" |
@@ -64,7 +64,7 @@ static __inline__ void __set_bit(int nr, volatile void * addr) | |||
64 | * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() | 64 | * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() |
65 | * in order to ensure changes are visible on other processors. | 65 | * in order to ensure changes are visible on other processors. |
66 | */ | 66 | */ |
67 | static __inline__ void clear_bit(int nr, volatile void * addr) | 67 | static inline void clear_bit(int nr, volatile void *addr) |
68 | { | 68 | { |
69 | __asm__ __volatile__( LOCK_PREFIX | 69 | __asm__ __volatile__( LOCK_PREFIX |
70 | "btrl %1,%0" | 70 | "btrl %1,%0" |
@@ -86,7 +86,7 @@ static inline void clear_bit_unlock(unsigned long nr, volatile unsigned long *ad | |||
86 | clear_bit(nr, addr); | 86 | clear_bit(nr, addr); |
87 | } | 87 | } |
88 | 88 | ||
89 | static __inline__ void __clear_bit(int nr, volatile void * addr) | 89 | static inline void __clear_bit(int nr, volatile void *addr) |
90 | { | 90 | { |
91 | __asm__ __volatile__( | 91 | __asm__ __volatile__( |
92 | "btrl %1,%0" | 92 | "btrl %1,%0" |
@@ -124,7 +124,7 @@ static inline void __clear_bit_unlock(unsigned long nr, volatile unsigned long * | |||
124 | * If it's called on the same region of memory simultaneously, the effect | 124 | * If it's called on the same region of memory simultaneously, the effect |
125 | * may be that only one operation succeeds. | 125 | * may be that only one operation succeeds. |
126 | */ | 126 | */ |
127 | static __inline__ void __change_bit(int nr, volatile void * addr) | 127 | static inline void __change_bit(int nr, volatile void *addr) |
128 | { | 128 | { |
129 | __asm__ __volatile__( | 129 | __asm__ __volatile__( |
130 | "btcl %1,%0" | 130 | "btcl %1,%0" |
@@ -141,7 +141,7 @@ static __inline__ void __change_bit(int nr, volatile void * addr) | |||
141 | * Note that @nr may be almost arbitrarily large; this function is not | 141 | * Note that @nr may be almost arbitrarily large; this function is not |
142 | * restricted to acting on a single-word quantity. | 142 | * restricted to acting on a single-word quantity. |
143 | */ | 143 | */ |
144 | static __inline__ void change_bit(int nr, volatile void * addr) | 144 | static inline void change_bit(int nr, volatile void *addr) |
145 | { | 145 | { |
146 | __asm__ __volatile__( LOCK_PREFIX | 146 | __asm__ __volatile__( LOCK_PREFIX |
147 | "btcl %1,%0" | 147 | "btcl %1,%0" |
@@ -157,7 +157,7 @@ static __inline__ void change_bit(int nr, volatile void * addr) | |||
157 | * This operation is atomic and cannot be reordered. | 157 | * This operation is atomic and cannot be reordered. |
158 | * It also implies a memory barrier. | 158 | * It also implies a memory barrier. |
159 | */ | 159 | */ |
160 | static __inline__ int test_and_set_bit(int nr, volatile void * addr) | 160 | static inline int test_and_set_bit(int nr, volatile void *addr) |
161 | { | 161 | { |
162 | int oldbit; | 162 | int oldbit; |
163 | 163 | ||
@@ -173,9 +173,12 @@ static __inline__ int test_and_set_bit(int nr, volatile void * addr) | |||
173 | * @nr: Bit to set | 173 | * @nr: Bit to set |
174 | * @addr: Address to count from | 174 | * @addr: Address to count from |
175 | * | 175 | * |
176 | * This is the same as test_and_set_bit on x86 | 176 | * This is the same as test_and_set_bit on x86. |
177 | */ | 177 | */ |
178 | #define test_and_set_bit_lock test_and_set_bit | 178 | static inline int test_and_set_bit_lock(int nr, volatile void *addr) |
179 | { | ||
180 | return test_and_set_bit(nr, addr); | ||
181 | } | ||
179 | 182 | ||
180 | /** | 183 | /** |
181 | * __test_and_set_bit - Set a bit and return its old value | 184 | * __test_and_set_bit - Set a bit and return its old value |
@@ -186,7 +189,7 @@ static __inline__ int test_and_set_bit(int nr, volatile void * addr) | |||
186 | * If two examples of this operation race, one can appear to succeed | 189 | * If two examples of this operation race, one can appear to succeed |
187 | * but actually fail. You must protect multiple accesses with a lock. | 190 | * but actually fail. You must protect multiple accesses with a lock. |
188 | */ | 191 | */ |
189 | static __inline__ int __test_and_set_bit(int nr, volatile void * addr) | 192 | static inline int __test_and_set_bit(int nr, volatile void *addr) |
190 | { | 193 | { |
191 | int oldbit; | 194 | int oldbit; |
192 | 195 | ||
@@ -205,7 +208,7 @@ static __inline__ int __test_and_set_bit(int nr, volatile void * addr) | |||
205 | * This operation is atomic and cannot be reordered. | 208 | * This operation is atomic and cannot be reordered. |
206 | * It also implies a memory barrier. | 209 | * It also implies a memory barrier. |
207 | */ | 210 | */ |
208 | static __inline__ int test_and_clear_bit(int nr, volatile void * addr) | 211 | static inline int test_and_clear_bit(int nr, volatile void *addr) |
209 | { | 212 | { |
210 | int oldbit; | 213 | int oldbit; |
211 | 214 | ||
@@ -225,7 +228,7 @@ static __inline__ int test_and_clear_bit(int nr, volatile void * addr) | |||
225 | * If two examples of this operation race, one can appear to succeed | 228 | * If two examples of this operation race, one can appear to succeed |
226 | * but actually fail. You must protect multiple accesses with a lock. | 229 | * but actually fail. You must protect multiple accesses with a lock. |
227 | */ | 230 | */ |
228 | static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) | 231 | static inline int __test_and_clear_bit(int nr, volatile void *addr) |
229 | { | 232 | { |
230 | int oldbit; | 233 | int oldbit; |
231 | 234 | ||
@@ -237,7 +240,7 @@ static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) | |||
237 | } | 240 | } |
238 | 241 | ||
239 | /* WARNING: non atomic and it can be reordered! */ | 242 | /* WARNING: non atomic and it can be reordered! */ |
240 | static __inline__ int __test_and_change_bit(int nr, volatile void * addr) | 243 | static inline int __test_and_change_bit(int nr, volatile void *addr) |
241 | { | 244 | { |
242 | int oldbit; | 245 | int oldbit; |
243 | 246 | ||
@@ -256,7 +259,7 @@ static __inline__ int __test_and_change_bit(int nr, volatile void * addr) | |||
256 | * This operation is atomic and cannot be reordered. | 259 | * This operation is atomic and cannot be reordered. |
257 | * It also implies a memory barrier. | 260 | * It also implies a memory barrier. |
258 | */ | 261 | */ |
259 | static __inline__ int test_and_change_bit(int nr, volatile void * addr) | 262 | static inline int test_and_change_bit(int nr, volatile void *addr) |
260 | { | 263 | { |
261 | int oldbit; | 264 | int oldbit; |
262 | 265 | ||
@@ -273,15 +276,15 @@ static __inline__ int test_and_change_bit(int nr, volatile void * addr) | |||
273 | * @nr: bit number to test | 276 | * @nr: bit number to test |
274 | * @addr: Address to start counting from | 277 | * @addr: Address to start counting from |
275 | */ | 278 | */ |
276 | static int test_bit(int nr, const volatile void * addr); | 279 | static int test_bit(int nr, const volatile void *addr); |
277 | #endif | 280 | #endif |
278 | 281 | ||
279 | static __inline__ int constant_test_bit(int nr, const volatile void * addr) | 282 | static inline int constant_test_bit(int nr, const volatile void *addr) |
280 | { | 283 | { |
281 | return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; | 284 | return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; |
282 | } | 285 | } |
283 | 286 | ||
284 | static __inline__ int variable_test_bit(int nr, volatile const void * addr) | 287 | static inline int variable_test_bit(int nr, volatile const void *addr) |
285 | { | 288 | { |
286 | int oldbit; | 289 | int oldbit; |
287 | 290 | ||
@@ -299,10 +302,10 @@ static __inline__ int variable_test_bit(int nr, volatile const void * addr) | |||
299 | 302 | ||
300 | #undef ADDR | 303 | #undef ADDR |
301 | 304 | ||
302 | extern long find_first_zero_bit(const unsigned long * addr, unsigned long size); | 305 | extern long find_first_zero_bit(const unsigned long *addr, unsigned long size); |
303 | extern long find_next_zero_bit (const unsigned long * addr, long size, long offset); | 306 | extern long find_next_zero_bit(const unsigned long *addr, long size, long offset); |
304 | extern long find_first_bit(const unsigned long * addr, unsigned long size); | 307 | extern long find_first_bit(const unsigned long *addr, unsigned long size); |
305 | extern long find_next_bit(const unsigned long * addr, long size, long offset); | 308 | extern long find_next_bit(const unsigned long *addr, long size, long offset); |
306 | 309 | ||
307 | /* return index of first bet set in val or max when no bit is set */ | 310 | /* return index of first bet set in val or max when no bit is set */ |
308 | static inline long __scanbit(unsigned long val, unsigned long max) | 311 | static inline long __scanbit(unsigned long val, unsigned long max) |
@@ -363,7 +366,7 @@ static inline void __clear_bit_string(unsigned long *bitmap, unsigned long i, | |||
363 | * | 366 | * |
364 | * Undefined if no zero exists, so code should check against ~0UL first. | 367 | * Undefined if no zero exists, so code should check against ~0UL first. |
365 | */ | 368 | */ |
366 | static __inline__ unsigned long ffz(unsigned long word) | 369 | static inline unsigned long ffz(unsigned long word) |
367 | { | 370 | { |
368 | __asm__("bsfq %1,%0" | 371 | __asm__("bsfq %1,%0" |
369 | :"=r" (word) | 372 | :"=r" (word) |
@@ -377,7 +380,7 @@ static __inline__ unsigned long ffz(unsigned long word) | |||
377 | * | 380 | * |
378 | * Undefined if no bit exists, so code should check against 0 first. | 381 | * Undefined if no bit exists, so code should check against 0 first. |
379 | */ | 382 | */ |
380 | static __inline__ unsigned long __ffs(unsigned long word) | 383 | static inline unsigned long __ffs(unsigned long word) |
381 | { | 384 | { |
382 | __asm__("bsfq %1,%0" | 385 | __asm__("bsfq %1,%0" |
383 | :"=r" (word) | 386 | :"=r" (word) |
@@ -391,7 +394,7 @@ static __inline__ unsigned long __ffs(unsigned long word) | |||
391 | * | 394 | * |
392 | * Undefined if no zero exists, so code should check against ~0UL first. | 395 | * Undefined if no zero exists, so code should check against ~0UL first. |
393 | */ | 396 | */ |
394 | static __inline__ unsigned long __fls(unsigned long word) | 397 | static inline unsigned long __fls(unsigned long word) |
395 | { | 398 | { |
396 | __asm__("bsrq %1,%0" | 399 | __asm__("bsrq %1,%0" |
397 | :"=r" (word) | 400 | :"=r" (word) |
@@ -411,7 +414,7 @@ static __inline__ unsigned long __fls(unsigned long word) | |||
411 | * the libc and compiler builtin ffs routines, therefore | 414 | * the libc and compiler builtin ffs routines, therefore |
412 | * differs in spirit from the above ffz (man ffs). | 415 | * differs in spirit from the above ffz (man ffs). |
413 | */ | 416 | */ |
414 | static __inline__ int ffs(int x) | 417 | static inline int ffs(int x) |
415 | { | 418 | { |
416 | int r; | 419 | int r; |
417 | 420 | ||
@@ -427,7 +430,7 @@ static __inline__ int ffs(int x) | |||
427 | * | 430 | * |
428 | * This is defined the same way as fls. | 431 | * This is defined the same way as fls. |
429 | */ | 432 | */ |
430 | static __inline__ int fls64(__u64 x) | 433 | static inline int fls64(__u64 x) |
431 | { | 434 | { |
432 | if (x == 0) | 435 | if (x == 0) |
433 | return 0; | 436 | return 0; |
@@ -440,7 +443,7 @@ static __inline__ int fls64(__u64 x) | |||
440 | * | 443 | * |
441 | * This is defined the same way as ffs. | 444 | * This is defined the same way as ffs. |
442 | */ | 445 | */ |
443 | static __inline__ int fls(int x) | 446 | static inline int fls(int x) |
444 | { | 447 | { |
445 | int r; | 448 | int r; |
446 | 449 | ||
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h new file mode 100644 index 000000000000..f704c50519b8 --- /dev/null +++ b/include/asm-x86/gart.h | |||
@@ -0,0 +1,29 @@ | |||
1 | #ifndef _ASM_X8664_IOMMU_H | ||
2 | #define _ASM_X8664_IOMMU_H 1 | ||
3 | |||
4 | extern void pci_iommu_shutdown(void); | ||
5 | extern void no_iommu_init(void); | ||
6 | extern int force_iommu, no_iommu; | ||
7 | extern int iommu_detected; | ||
8 | #ifdef CONFIG_GART_IOMMU | ||
9 | extern void gart_iommu_init(void); | ||
10 | extern void gart_iommu_shutdown(void); | ||
11 | extern void __init gart_parse_options(char *); | ||
12 | extern void gart_iommu_hole_init(void); | ||
13 | extern int fallback_aper_order; | ||
14 | extern int fallback_aper_force; | ||
15 | extern int gart_iommu_aperture; | ||
16 | extern int gart_iommu_aperture_allowed; | ||
17 | extern int gart_iommu_aperture_disabled; | ||
18 | extern int fix_aperture; | ||
19 | #else | ||
20 | #define gart_iommu_aperture 0 | ||
21 | #define gart_iommu_aperture_allowed 0 | ||
22 | |||
23 | static inline void gart_iommu_shutdown(void) | ||
24 | { | ||
25 | } | ||
26 | |||
27 | #endif | ||
28 | |||
29 | #endif | ||
diff --git a/include/asm-x86/iommu.h b/include/asm-x86/iommu.h index 5af471f228ee..07862fdd23c0 100644 --- a/include/asm-x86/iommu.h +++ b/include/asm-x86/iommu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_X8664_IOMMU_H | 1 | #ifndef _ASM_X8664_GART_H |
2 | #define _ASM_X8664_IOMMU_H 1 | 2 | #define _ASM_X8664_GART_H 1 |
3 | 3 | ||
4 | extern void pci_iommu_shutdown(void); | 4 | extern void pci_iommu_shutdown(void); |
5 | extern void no_iommu_init(void); | 5 | extern void no_iommu_init(void); |
diff --git a/include/asm-x86/lguest_hcall.h b/include/asm-x86/lguest_hcall.h index f948491eb56a..9c5092b6aa9f 100644 --- a/include/asm-x86/lguest_hcall.h +++ b/include/asm-x86/lguest_hcall.h | |||
@@ -18,12 +18,17 @@ | |||
18 | #define LHCALL_LOAD_TLS 16 | 18 | #define LHCALL_LOAD_TLS 16 |
19 | #define LHCALL_NOTIFY 17 | 19 | #define LHCALL_NOTIFY 17 |
20 | 20 | ||
21 | #define LGUEST_TRAP_ENTRY 0x1F | ||
22 | |||
23 | #ifndef __ASSEMBLY__ | ||
24 | #include <asm/hw_irq.h> | ||
25 | |||
21 | /*G:031 First, how does our Guest contact the Host to ask for privileged | 26 | /*G:031 First, how does our Guest contact the Host to ask for privileged |
22 | * operations? There are two ways: the direct way is to make a "hypercall", | 27 | * operations? There are two ways: the direct way is to make a "hypercall", |
23 | * to make requests of the Host Itself. | 28 | * to make requests of the Host Itself. |
24 | * | 29 | * |
25 | * Our hypercall mechanism uses the highest unused trap code (traps 32 and | 30 | * Our hypercall mechanism uses the highest unused trap code (traps 32 and |
26 | * above are used by real hardware interrupts). Seventeen hypercalls are | 31 | * above are used by real hardware interrupts). Fifteen hypercalls are |
27 | * available: the hypercall number is put in the %eax register, and the | 32 | * available: the hypercall number is put in the %eax register, and the |
28 | * arguments (when required) are placed in %edx, %ebx and %ecx. If a return | 33 | * arguments (when required) are placed in %edx, %ebx and %ecx. If a return |
29 | * value makes sense, it's returned in %eax. | 34 | * value makes sense, it's returned in %eax. |
@@ -31,20 +36,15 @@ | |||
31 | * Grossly invalid calls result in Sudden Death at the hands of the vengeful | 36 | * Grossly invalid calls result in Sudden Death at the hands of the vengeful |
32 | * Host, rather than returning failure. This reflects Winston Churchill's | 37 | * Host, rather than returning failure. This reflects Winston Churchill's |
33 | * definition of a gentleman: "someone who is only rude intentionally". */ | 38 | * definition of a gentleman: "someone who is only rude intentionally". */ |
34 | #define LGUEST_TRAP_ENTRY 0x1F | ||
35 | |||
36 | #ifndef __ASSEMBLY__ | ||
37 | #include <asm/hw_irq.h> | ||
38 | |||
39 | static inline unsigned long | 39 | static inline unsigned long |
40 | hcall(unsigned long call, | 40 | hcall(unsigned long call, |
41 | unsigned long arg1, unsigned long arg2, unsigned long arg3) | 41 | unsigned long arg1, unsigned long arg2, unsigned long arg3) |
42 | { | 42 | { |
43 | /* "int" is the Intel instruction to trigger a trap. */ | 43 | /* "int" is the Intel instruction to trigger a trap. */ |
44 | asm volatile("int $" __stringify(LGUEST_TRAP_ENTRY) | 44 | asm volatile("int $" __stringify(LGUEST_TRAP_ENTRY) |
45 | /* The call is in %eax (aka "a"), and can be replaced */ | 45 | /* The call in %eax (aka "a") might be overwritten */ |
46 | : "=a"(call) | 46 | : "=a"(call) |
47 | /* The other arguments are in %eax, %edx, %ebx & %ecx */ | 47 | /* The arguments are in %eax, %edx, %ebx & %ecx */ |
48 | : "a"(call), "d"(arg1), "b"(arg2), "c"(arg3) | 48 | : "a"(call), "d"(arg1), "b"(arg2), "c"(arg3) |
49 | /* "memory" means this might write somewhere in memory. | 49 | /* "memory" means this might write somewhere in memory. |
50 | * This isn't true for all calls, but it's safe to tell | 50 | * This isn't true for all calls, but it's safe to tell |
diff --git a/include/asm-x86/pci_64.h b/include/asm-x86/pci_64.h index 9baa46d9f594..ef54226a9325 100644 --- a/include/asm-x86/pci_64.h +++ b/include/asm-x86/pci_64.h | |||
@@ -37,7 +37,7 @@ extern int iommu_setup(char *opt); | |||
37 | */ | 37 | */ |
38 | #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) | 38 | #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) |
39 | 39 | ||
40 | #if defined(CONFIG_IOMMU) || defined(CONFIG_CALGARY_IOMMU) | 40 | #if defined(CONFIG_GART_IOMMU) || defined(CONFIG_CALGARY_IOMMU) |
41 | 41 | ||
42 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ | 42 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ |
43 | dma_addr_t ADDR_NAME; | 43 | dma_addr_t ADDR_NAME; |
diff --git a/include/asm-x86/smp_32.h b/include/asm-x86/smp_32.h index 7056d8684522..e10b7affdfe5 100644 --- a/include/asm-x86/smp_32.h +++ b/include/asm-x86/smp_32.h | |||
@@ -94,9 +94,12 @@ static inline void smp_send_reschedule(int cpu) | |||
94 | { | 94 | { |
95 | smp_ops.smp_send_reschedule(cpu); | 95 | smp_ops.smp_send_reschedule(cpu); |
96 | } | 96 | } |
97 | extern int smp_call_function_mask(cpumask_t mask, | 97 | static inline int smp_call_function_mask(cpumask_t mask, |
98 | void (*func) (void *info), void *info, | 98 | void (*func) (void *info), void *info, |
99 | int wait); | 99 | int wait) |
100 | { | ||
101 | return smp_ops.smp_call_function_mask(mask, func, info, wait); | ||
102 | } | ||
100 | 103 | ||
101 | void native_smp_prepare_boot_cpu(void); | 104 | void native_smp_prepare_boot_cpu(void); |
102 | void native_smp_prepare_cpus(unsigned int max_cpus); | 105 | void native_smp_prepare_cpus(unsigned int max_cpus); |
diff --git a/include/asm-xtensa/dma-mapping.h b/include/asm-xtensa/dma-mapping.h index 8bd9d2c02a24..3c7d537dd15d 100644 --- a/include/asm-xtensa/dma-mapping.h +++ b/include/asm-xtensa/dma-mapping.h | |||
@@ -11,10 +11,10 @@ | |||
11 | #ifndef _XTENSA_DMA_MAPPING_H | 11 | #ifndef _XTENSA_DMA_MAPPING_H |
12 | #define _XTENSA_DMA_MAPPING_H | 12 | #define _XTENSA_DMA_MAPPING_H |
13 | 13 | ||
14 | #include <asm/scatterlist.h> | ||
15 | #include <asm/cache.h> | 14 | #include <asm/cache.h> |
16 | #include <asm/io.h> | 15 | #include <asm/io.h> |
17 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/scatterlist.h> | ||
18 | 18 | ||
19 | /* | 19 | /* |
20 | * DMA-consistent mapping functions. | 20 | * DMA-consistent mapping functions. |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 6a65231bc785..37bfa19d8064 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -149,6 +149,7 @@ header-y += ticable.h | |||
149 | header-y += times.h | 149 | header-y += times.h |
150 | header-y += tiocl.h | 150 | header-y += tiocl.h |
151 | header-y += tipc.h | 151 | header-y += tipc.h |
152 | header-y += tipc_config.h | ||
152 | header-y += toshiba.h | 153 | header-y += toshiba.h |
153 | header-y += ultrasound.h | 154 | header-y += ultrasound.h |
154 | header-y += un.h | 155 | header-y += un.h |
@@ -325,6 +326,7 @@ unifdef-y += sonypi.h | |||
325 | unifdef-y += soundcard.h | 326 | unifdef-y += soundcard.h |
326 | unifdef-y += stat.h | 327 | unifdef-y += stat.h |
327 | unifdef-y += stddef.h | 328 | unifdef-y += stddef.h |
329 | unifdef-y += string.h | ||
328 | unifdef-y += synclink.h | 330 | unifdef-y += synclink.h |
329 | unifdef-y += sysctl.h | 331 | unifdef-y += sysctl.h |
330 | unifdef-y += tcp.h | 332 | unifdef-y += tcp.h |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 8263a7b74d34..61535e72834d 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -43,6 +43,7 @@ enum { | |||
43 | ATA_MAX_SECTORS_128 = 128, | 43 | ATA_MAX_SECTORS_128 = 128, |
44 | ATA_MAX_SECTORS = 256, | 44 | ATA_MAX_SECTORS = 256, |
45 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ | 45 | ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ |
46 | ATA_MAX_SECTORS_TAPE = 65535, | ||
46 | 47 | ||
47 | ATA_ID_WORDS = 256, | 48 | ATA_ID_WORDS = 256, |
48 | ATA_ID_SERNO = 10, | 49 | ATA_ID_SERNO = 10, |
@@ -180,6 +181,7 @@ enum { | |||
180 | ATA_CMD_VERIFY_EXT = 0x42, | 181 | ATA_CMD_VERIFY_EXT = 0x42, |
181 | ATA_CMD_STANDBYNOW1 = 0xE0, | 182 | ATA_CMD_STANDBYNOW1 = 0xE0, |
182 | ATA_CMD_IDLEIMMEDIATE = 0xE1, | 183 | ATA_CMD_IDLEIMMEDIATE = 0xE1, |
184 | ATA_CMD_SLEEP = 0xE6, | ||
183 | ATA_CMD_INIT_DEV_PARAMS = 0x91, | 185 | ATA_CMD_INIT_DEV_PARAMS = 0x91, |
184 | ATA_CMD_READ_NATIVE_MAX = 0xF8, | 186 | ATA_CMD_READ_NATIVE_MAX = 0xF8, |
185 | ATA_CMD_READ_NATIVE_MAX_EXT = 0x27, | 187 | ATA_CMD_READ_NATIVE_MAX_EXT = 0x27, |
@@ -235,6 +237,7 @@ enum { | |||
235 | 237 | ||
236 | /* SETFEATURE Sector counts for SATA features */ | 238 | /* SETFEATURE Sector counts for SATA features */ |
237 | SATA_AN = 0x05, /* Asynchronous Notification */ | 239 | SATA_AN = 0x05, /* Asynchronous Notification */ |
240 | SATA_DIPM = 0x03, /* Device Initiated Power Management */ | ||
238 | 241 | ||
239 | /* ATAPI stuff */ | 242 | /* ATAPI stuff */ |
240 | ATAPI_PKT_DMA = (1 << 0), | 243 | ATAPI_PKT_DMA = (1 << 0), |
@@ -377,6 +380,26 @@ struct ata_taskfile { | |||
377 | 380 | ||
378 | #define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) | 381 | #define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) |
379 | 382 | ||
383 | static inline bool ata_id_has_hipm(const u16 *id) | ||
384 | { | ||
385 | u16 val = id[76]; | ||
386 | |||
387 | if (val == 0 || val == 0xffff) | ||
388 | return false; | ||
389 | |||
390 | return val & (1 << 9); | ||
391 | } | ||
392 | |||
393 | static inline bool ata_id_has_dipm(const u16 *id) | ||
394 | { | ||
395 | u16 val = id[78]; | ||
396 | |||
397 | if (val == 0 || val == 0xffff) | ||
398 | return false; | ||
399 | |||
400 | return val & (1 << 3); | ||
401 | } | ||
402 | |||
380 | static inline int ata_id_has_fua(const u16 *id) | 403 | static inline int ata_id_has_fua(const u16 *id) |
381 | { | 404 | { |
382 | if ((id[84] & 0xC000) != 0x4000) | 405 | if ((id[84] & 0xC000) != 0x4000) |
@@ -522,6 +545,11 @@ static inline int atapi_cdb_len(const u16 *dev_id) | |||
522 | } | 545 | } |
523 | } | 546 | } |
524 | 547 | ||
548 | static inline int atapi_command_packet_set(const u16 *dev_id) | ||
549 | { | ||
550 | return (dev_id[0] >> 8) & 0x1f; | ||
551 | } | ||
552 | |||
525 | static inline int is_atapi_taskfile(const struct ata_taskfile *tf) | 553 | static inline int is_atapi_taskfile(const struct ata_taskfile *tf) |
526 | { | 554 | { |
527 | return (tf->protocol == ATA_PROT_ATAPI) || | 555 | return (tf->protocol == ATA_PROT_ATAPI) || |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index bbf906a0b419..8396db24d019 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -341,7 +341,6 @@ enum blk_queue_state { | |||
341 | struct blk_queue_tag { | 341 | struct blk_queue_tag { |
342 | struct request **tag_index; /* map of busy tags */ | 342 | struct request **tag_index; /* map of busy tags */ |
343 | unsigned long *tag_map; /* bit map of free/busy tags */ | 343 | unsigned long *tag_map; /* bit map of free/busy tags */ |
344 | struct list_head busy_list; /* fifo list of busy tags */ | ||
345 | int busy; /* current depth */ | 344 | int busy; /* current depth */ |
346 | int max_depth; /* what we will send to device */ | 345 | int max_depth; /* what we will send to device */ |
347 | int real_max_depth; /* what the array can hold */ | 346 | int real_max_depth; /* what the array can hold */ |
@@ -435,6 +434,7 @@ struct request_queue | |||
435 | unsigned int dma_alignment; | 434 | unsigned int dma_alignment; |
436 | 435 | ||
437 | struct blk_queue_tag *queue_tags; | 436 | struct blk_queue_tag *queue_tags; |
437 | struct list_head tag_busy_list; | ||
438 | 438 | ||
439 | unsigned int nr_sorted; | 439 | unsigned int nr_sorted; |
440 | unsigned int in_flight; | 440 | unsigned int in_flight; |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index c83534ee1e79..0365ec9fc0c9 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -59,7 +59,6 @@ extern void *__alloc_bootmem_core(struct bootmem_data *bdata, | |||
59 | unsigned long align, | 59 | unsigned long align, |
60 | unsigned long goal, | 60 | unsigned long goal, |
61 | unsigned long limit); | 61 | unsigned long limit); |
62 | extern void *alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size); | ||
63 | 62 | ||
64 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | 63 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE |
65 | extern void reserve_bootmem(unsigned long addr, unsigned long size); | 64 | extern void reserve_bootmem(unsigned long addr, unsigned long size); |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index c811c8b979ac..c68b67b86ef1 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -101,6 +101,12 @@ extern void __chk_io_ptr(const volatile void __iomem *); | |||
101 | #undef __must_check | 101 | #undef __must_check |
102 | #define __must_check | 102 | #define __must_check |
103 | #endif | 103 | #endif |
104 | #ifndef CONFIG_ENABLE_WARN_DEPRECATED | ||
105 | #undef __deprecated | ||
106 | #undef __deprecated_for_modules | ||
107 | #define __deprecated | ||
108 | #define __deprecated_for_modules | ||
109 | #endif | ||
104 | 110 | ||
105 | /* | 111 | /* |
106 | * Allow us to avoid 'defined but not used' warnings on functions and data, | 112 | * Allow us to avoid 'defined but not used' warnings on functions and data, |
diff --git a/include/linux/completion.h b/include/linux/completion.h index 268c5a4a2bd4..33d6aaf94447 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h | |||
@@ -42,15 +42,15 @@ static inline void init_completion(struct completion *x) | |||
42 | init_waitqueue_head(&x->wait); | 42 | init_waitqueue_head(&x->wait); |
43 | } | 43 | } |
44 | 44 | ||
45 | extern void FASTCALL(wait_for_completion(struct completion *)); | 45 | extern void wait_for_completion(struct completion *); |
46 | extern int FASTCALL(wait_for_completion_interruptible(struct completion *x)); | 46 | extern int wait_for_completion_interruptible(struct completion *x); |
47 | extern unsigned long FASTCALL(wait_for_completion_timeout(struct completion *x, | 47 | extern unsigned long wait_for_completion_timeout(struct completion *x, |
48 | unsigned long timeout)); | 48 | unsigned long timeout); |
49 | extern unsigned long FASTCALL(wait_for_completion_interruptible_timeout( | 49 | extern unsigned long wait_for_completion_interruptible_timeout( |
50 | struct completion *x, unsigned long timeout)); | 50 | struct completion *x, unsigned long timeout); |
51 | 51 | ||
52 | extern void FASTCALL(complete(struct completion *)); | 52 | extern void complete(struct completion *); |
53 | extern void FASTCALL(complete_all(struct completion *)); | 53 | extern void complete_all(struct completion *); |
54 | 54 | ||
55 | #define INIT_COMPLETION(x) ((x).done = 0) | 55 | #define INIT_COMPLETION(x) ((x).done = 0) |
56 | 56 | ||
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index f3fc4392e93d..333c3ea82a5d 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -144,6 +144,8 @@ enum dccp_reset_codes { | |||
144 | DCCP_RESET_CODE_TOO_BUSY, | 144 | DCCP_RESET_CODE_TOO_BUSY, |
145 | DCCP_RESET_CODE_BAD_INIT_COOKIE, | 145 | DCCP_RESET_CODE_BAD_INIT_COOKIE, |
146 | DCCP_RESET_CODE_AGGRESSION_PENALTY, | 146 | DCCP_RESET_CODE_AGGRESSION_PENALTY, |
147 | |||
148 | DCCP_MAX_RESET_CODES /* Leave at the end! */ | ||
147 | }; | 149 | }; |
148 | 150 | ||
149 | /* DCCP options */ | 151 | /* DCCP options */ |
@@ -270,10 +272,9 @@ static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen) | |||
270 | return memset(skb_transport_header(skb), 0, headlen); | 272 | return memset(skb_transport_header(skb), 0, headlen); |
271 | } | 273 | } |
272 | 274 | ||
273 | static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb) | 275 | static inline struct dccp_hdr_ext *dccp_hdrx(const struct dccp_hdr *dh) |
274 | { | 276 | { |
275 | return (struct dccp_hdr_ext *)(skb_transport_header(skb) + | 277 | return (struct dccp_hdr_ext *)((unsigned char *)dh + sizeof(*dh)); |
276 | sizeof(struct dccp_hdr)); | ||
277 | } | 278 | } |
278 | 279 | ||
279 | static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh) | 280 | static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh) |
@@ -287,13 +288,12 @@ static inline unsigned int dccp_basic_hdr_len(const struct sk_buff *skb) | |||
287 | return __dccp_basic_hdr_len(dh); | 288 | return __dccp_basic_hdr_len(dh); |
288 | } | 289 | } |
289 | 290 | ||
290 | static inline __u64 dccp_hdr_seq(const struct sk_buff *skb) | 291 | static inline __u64 dccp_hdr_seq(const struct dccp_hdr *dh) |
291 | { | 292 | { |
292 | const struct dccp_hdr *dh = dccp_hdr(skb); | ||
293 | __u64 seq_nr = ntohs(dh->dccph_seq); | 293 | __u64 seq_nr = ntohs(dh->dccph_seq); |
294 | 294 | ||
295 | if (dh->dccph_x != 0) | 295 | if (dh->dccph_x != 0) |
296 | seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(skb)->dccph_seq_low); | 296 | seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(dh)->dccph_seq_low); |
297 | else | 297 | else |
298 | seq_nr += (u32)dh->dccph_seq2 << 16; | 298 | seq_nr += (u32)dh->dccph_seq2 << 16; |
299 | 299 | ||
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index d2a96cbf4f0e..cf79853967ff 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h | |||
@@ -32,18 +32,13 @@ | |||
32 | * On x86-64 make the 64bit structure have the same alignment as the | 32 | * On x86-64 make the 64bit structure have the same alignment as the |
33 | * 32bit structure. This makes 32bit emulation easier. | 33 | * 32bit structure. This makes 32bit emulation easier. |
34 | * | 34 | * |
35 | * UML/x86_64 needs the same packing as x86_64 - UML + UML_X86 + | 35 | * UML/x86_64 needs the same packing as x86_64 |
36 | * 64_BIT adds up to UML/x86_64. | ||
37 | */ | 36 | */ |
38 | #ifdef __x86_64__ | 37 | #ifdef __x86_64__ |
39 | #define EPOLL_PACKED __attribute__((packed)) | 38 | #define EPOLL_PACKED __attribute__((packed)) |
40 | #else | 39 | #else |
41 | #if defined(CONFIG_UML) && defined(CONFIG_UML_X86) && defined(CONFIG_64BIT) | ||
42 | #define EPOLL_PACKED __attribute__((packed)) | ||
43 | #else | ||
44 | #define EPOLL_PACKED | 40 | #define EPOLL_PACKED |
45 | #endif | 41 | #endif |
46 | #endif | ||
47 | 42 | ||
48 | struct epoll_event { | 43 | struct epoll_event { |
49 | __u32 events; | 44 | __u32 events; |
diff --git a/include/linux/input.h b/include/linux/input.h index 62268929856c..b45f240a8c45 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -527,6 +527,9 @@ struct input_absinfo { | |||
527 | #define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ | 527 | #define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ |
528 | #define KEY_LOGOFF 0x1b1 /* AL Logoff */ | 528 | #define KEY_LOGOFF 0x1b1 /* AL Logoff */ |
529 | 529 | ||
530 | #define KEY_DOLLAR 0x1b2 | ||
531 | #define KEY_EURO 0x1b3 | ||
532 | |||
530 | #define KEY_DEL_EOL 0x1c0 | 533 | #define KEY_DEL_EOL 0x1c0 |
531 | #define KEY_DEL_EOS 0x1c1 | 534 | #define KEY_DEL_EOS 0x1c1 |
532 | #define KEY_INS_LINE 0x1c2 | 535 | #define KEY_INS_LINE 0x1c2 |
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 56ae438ae510..6e8cec503380 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
@@ -173,7 +173,7 @@ static inline int ipmi_demangle_device_id(const unsigned char *data, | |||
173 | id->firmware_revision_2 = data[3]; | 173 | id->firmware_revision_2 = data[3]; |
174 | id->ipmi_version = data[4]; | 174 | id->ipmi_version = data[4]; |
175 | id->additional_device_support = data[5]; | 175 | id->additional_device_support = data[5]; |
176 | if (data_len >= 6) { | 176 | if (data_len >= 11) { |
177 | id->manufacturer_id = (data[6] | (data[7] << 8) | | 177 | id->manufacturer_id = (data[6] | (data[7] << 8) | |
178 | (data[8] << 16)); | 178 | (data[8] << 16)); |
179 | id->product_id = data[9] | (data[10] << 8); | 179 | id->product_id = data[9] | (data[10] << 8); |
diff --git a/include/linux/lguest.h b/include/linux/lguest.h index 8beb29134626..175e63f4a8c0 100644 --- a/include/linux/lguest.h +++ b/include/linux/lguest.h | |||
@@ -12,8 +12,8 @@ | |||
12 | #define LG_CLOCK_MAX_DELTA ULONG_MAX | 12 | #define LG_CLOCK_MAX_DELTA ULONG_MAX |
13 | 13 | ||
14 | /*G:032 The second method of communicating with the Host is to via "struct | 14 | /*G:032 The second method of communicating with the Host is to via "struct |
15 | * lguest_data". The Guest's very first hypercall is to tell the Host where | 15 | * lguest_data". Once the Guest's initialization hypercall tells the Host where |
16 | * this is, and then the Guest and Host both publish information in it. :*/ | 16 | * this is, the Guest and Host both publish information in it. :*/ |
17 | struct lguest_data | 17 | struct lguest_data |
18 | { | 18 | { |
19 | /* 512 == enabled (same as eflags in normal hardware). The Guest | 19 | /* 512 == enabled (same as eflags in normal hardware). The Guest |
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h index 61e1e3e6b1cc..697104da91f1 100644 --- a/include/linux/lguest_launcher.h +++ b/include/linux/lguest_launcher.h | |||
@@ -1,17 +1,7 @@ | |||
1 | #ifndef _ASM_LGUEST_USER | 1 | #ifndef _LINUX_LGUEST_LAUNCHER |
2 | #define _ASM_LGUEST_USER | 2 | #define _LINUX_LGUEST_LAUNCHER |
3 | /* Everything the "lguest" userspace program needs to know. */ | 3 | /* Everything the "lguest" userspace program needs to know. */ |
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | /* They can register up to 32 arrays of lguest_dma. */ | ||
6 | #define LGUEST_MAX_DMA 32 | ||
7 | /* At most we can dma 16 lguest_dma in one op. */ | ||
8 | #define LGUEST_MAX_DMA_SECTIONS 16 | ||
9 | |||
10 | /* How many devices? Assume each one wants up to two dma arrays per device. */ | ||
11 | #define LGUEST_MAX_DEVICES (LGUEST_MAX_DMA/2) | ||
12 | |||
13 | /* Where the Host expects the Guest to SEND_DMA console output to. */ | ||
14 | #define LGUEST_CONSOLE_DMA_KEY 0 | ||
15 | 5 | ||
16 | /*D:010 | 6 | /*D:010 |
17 | * Drivers | 7 | * Drivers |
@@ -20,7 +10,11 @@ | |||
20 | * real devices (think of the damage it could do!) we provide virtual devices. | 10 | * real devices (think of the damage it could do!) we provide virtual devices. |
21 | * We could emulate a PCI bus with various devices on it, but that is a fairly | 11 | * We could emulate a PCI bus with various devices on it, but that is a fairly |
22 | * complex burden for the Host and suboptimal for the Guest, so we have our own | 12 | * complex burden for the Host and suboptimal for the Guest, so we have our own |
23 | * "lguest" bus and simple drivers. | 13 | * simple lguest bus and we use "virtio" drivers. These drivers need a set of |
14 | * routines from us which will actually do the virtual I/O, but they handle all | ||
15 | * the net/block/console stuff themselves. This means that if we want to add | ||
16 | * a new device, we simply need to write a new virtio driver and create support | ||
17 | * for it in the Launcher: this code won't need to change. | ||
24 | * | 18 | * |
25 | * Devices are described by a simplified ID, a status byte, and some "config" | 19 | * Devices are described by a simplified ID, a status byte, and some "config" |
26 | * bytes which describe this device's configuration. This is placed by the | 20 | * bytes which describe this device's configuration. This is placed by the |
@@ -51,9 +45,9 @@ struct lguest_vqconfig { | |||
51 | /* Write command first word is a request. */ | 45 | /* Write command first word is a request. */ |
52 | enum lguest_req | 46 | enum lguest_req |
53 | { | 47 | { |
54 | LHREQ_INITIALIZE, /* + pfnlimit, pgdir, start, pageoffset */ | 48 | LHREQ_INITIALIZE, /* + base, pfnlimit, pgdir, start */ |
55 | LHREQ_GETDMA, /* No longer used */ | 49 | LHREQ_GETDMA, /* No longer used */ |
56 | LHREQ_IRQ, /* + irq */ | 50 | LHREQ_IRQ, /* + irq */ |
57 | LHREQ_BREAK, /* + on/off flag (on blocks until someone does off) */ | 51 | LHREQ_BREAK, /* + on/off flag (on blocks until someone does off) */ |
58 | }; | 52 | }; |
59 | #endif /* _ASM_LGUEST_USER */ | 53 | #endif /* _LINUX_LGUEST_LAUNCHER */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 6fd24e03622e..1e277852ba42 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -133,11 +133,14 @@ enum { | |||
133 | ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */ | 133 | ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */ |
134 | ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */ | 134 | ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */ |
135 | ATA_DFLAG_AN = (1 << 7), /* AN configured */ | 135 | ATA_DFLAG_AN = (1 << 7), /* AN configured */ |
136 | ATA_DFLAG_HIPM = (1 << 8), /* device supports HIPM */ | ||
137 | ATA_DFLAG_DIPM = (1 << 9), /* device supports DIPM */ | ||
136 | ATA_DFLAG_CFG_MASK = (1 << 12) - 1, | 138 | ATA_DFLAG_CFG_MASK = (1 << 12) - 1, |
137 | 139 | ||
138 | ATA_DFLAG_PIO = (1 << 12), /* device limited to PIO mode */ | 140 | ATA_DFLAG_PIO = (1 << 12), /* device limited to PIO mode */ |
139 | ATA_DFLAG_NCQ_OFF = (1 << 13), /* device limited to non-NCQ mode */ | 141 | ATA_DFLAG_NCQ_OFF = (1 << 13), /* device limited to non-NCQ mode */ |
140 | ATA_DFLAG_SPUNDOWN = (1 << 14), /* XXX: for spindown_compat */ | 142 | ATA_DFLAG_SPUNDOWN = (1 << 14), /* XXX: for spindown_compat */ |
143 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ | ||
141 | ATA_DFLAG_INIT_MASK = (1 << 16) - 1, | 144 | ATA_DFLAG_INIT_MASK = (1 << 16) - 1, |
142 | 145 | ||
143 | ATA_DFLAG_DETACH = (1 << 16), | 146 | ATA_DFLAG_DETACH = (1 << 16), |
@@ -185,6 +188,7 @@ enum { | |||
185 | ATA_FLAG_ACPI_SATA = (1 << 17), /* need native SATA ACPI layout */ | 188 | ATA_FLAG_ACPI_SATA = (1 << 17), /* need native SATA ACPI layout */ |
186 | ATA_FLAG_AN = (1 << 18), /* controller supports AN */ | 189 | ATA_FLAG_AN = (1 << 18), /* controller supports AN */ |
187 | ATA_FLAG_PMP = (1 << 19), /* controller supports PMP */ | 190 | ATA_FLAG_PMP = (1 << 19), /* controller supports PMP */ |
191 | ATA_FLAG_IPM = (1 << 20), /* driver can handle IPM */ | ||
188 | 192 | ||
189 | /* The following flag belongs to ap->pflags but is kept in | 193 | /* The following flag belongs to ap->pflags but is kept in |
190 | * ap->flags because it's referenced in many LLDs and will be | 194 | * ap->flags because it's referenced in many LLDs and will be |
@@ -217,6 +221,7 @@ enum { | |||
217 | ATA_QCFLAG_IO = (1 << 3), /* standard IO command */ | 221 | ATA_QCFLAG_IO = (1 << 3), /* standard IO command */ |
218 | ATA_QCFLAG_RESULT_TF = (1 << 4), /* result TF requested */ | 222 | ATA_QCFLAG_RESULT_TF = (1 << 4), /* result TF requested */ |
219 | ATA_QCFLAG_CLEAR_EXCL = (1 << 5), /* clear excl_link on completion */ | 223 | ATA_QCFLAG_CLEAR_EXCL = (1 << 5), /* clear excl_link on completion */ |
224 | ATA_QCFLAG_QUIET = (1 << 6), /* don't report device error */ | ||
220 | 225 | ||
221 | ATA_QCFLAG_FAILED = (1 << 16), /* cmd failed and is owned by EH */ | 226 | ATA_QCFLAG_FAILED = (1 << 16), /* cmd failed and is owned by EH */ |
222 | ATA_QCFLAG_SENSE_VALID = (1 << 17), /* sense data valid */ | 227 | ATA_QCFLAG_SENSE_VALID = (1 << 17), /* sense data valid */ |
@@ -234,6 +239,13 @@ enum { | |||
234 | ATA_TMOUT_INTERNAL = 30 * HZ, | 239 | ATA_TMOUT_INTERNAL = 30 * HZ, |
235 | ATA_TMOUT_INTERNAL_QUICK = 5 * HZ, | 240 | ATA_TMOUT_INTERNAL_QUICK = 5 * HZ, |
236 | 241 | ||
242 | /* FIXME: GoVault needs 2s but we can't afford that without | ||
243 | * parallel probing. 800ms is enough for iVDR disk | ||
244 | * HHD424020F7SV00. Increase to 2secs when parallel probing | ||
245 | * is in place. | ||
246 | */ | ||
247 | ATA_TMOUT_FF_WAIT = 4 * HZ / 5, | ||
248 | |||
237 | /* ATA bus states */ | 249 | /* ATA bus states */ |
238 | BUS_UNKNOWN = 0, | 250 | BUS_UNKNOWN = 0, |
239 | BUS_DMA = 1, | 251 | BUS_DMA = 1, |
@@ -294,6 +306,7 @@ enum { | |||
294 | ATA_EHI_RESUME_LINK = (1 << 1), /* resume link (reset modifier) */ | 306 | ATA_EHI_RESUME_LINK = (1 << 1), /* resume link (reset modifier) */ |
295 | ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ | 307 | ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ |
296 | ATA_EHI_QUIET = (1 << 3), /* be quiet */ | 308 | ATA_EHI_QUIET = (1 << 3), /* be quiet */ |
309 | ATA_EHI_LPM = (1 << 4), /* link power management action */ | ||
297 | 310 | ||
298 | ATA_EHI_DID_SOFTRESET = (1 << 16), /* already soft-reset this port */ | 311 | ATA_EHI_DID_SOFTRESET = (1 << 16), /* already soft-reset this port */ |
299 | ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */ | 312 | ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */ |
@@ -325,6 +338,7 @@ enum { | |||
325 | ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ | 338 | ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ |
326 | ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ | 339 | ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ |
327 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ | 340 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ |
341 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ | ||
328 | 342 | ||
329 | /* DMA mask for user DMA control: User visible values; DO NOT | 343 | /* DMA mask for user DMA control: User visible values; DO NOT |
330 | renumber */ | 344 | renumber */ |
@@ -370,6 +384,18 @@ typedef int (*ata_reset_fn_t)(struct ata_link *link, unsigned int *classes, | |||
370 | unsigned long deadline); | 384 | unsigned long deadline); |
371 | typedef void (*ata_postreset_fn_t)(struct ata_link *link, unsigned int *classes); | 385 | typedef void (*ata_postreset_fn_t)(struct ata_link *link, unsigned int *classes); |
372 | 386 | ||
387 | /* | ||
388 | * host pm policy: If you alter this, you also need to alter libata-scsi.c | ||
389 | * (for the ascii descriptions) | ||
390 | */ | ||
391 | enum link_pm { | ||
392 | NOT_AVAILABLE, | ||
393 | MIN_POWER, | ||
394 | MAX_PERFORMANCE, | ||
395 | MEDIUM_POWER, | ||
396 | }; | ||
397 | extern struct class_device_attribute class_device_attr_link_power_management_policy; | ||
398 | |||
373 | struct ata_ioports { | 399 | struct ata_ioports { |
374 | void __iomem *cmd_addr; | 400 | void __iomem *cmd_addr; |
375 | void __iomem *data_addr; | 401 | void __iomem *data_addr; |
@@ -616,6 +642,7 @@ struct ata_port { | |||
616 | 642 | ||
617 | pm_message_t pm_mesg; | 643 | pm_message_t pm_mesg; |
618 | int *pm_result; | 644 | int *pm_result; |
645 | enum link_pm pm_policy; | ||
619 | 646 | ||
620 | struct timer_list fastdrain_timer; | 647 | struct timer_list fastdrain_timer; |
621 | unsigned long fastdrain_cnt; | 648 | unsigned long fastdrain_cnt; |
@@ -683,7 +710,8 @@ struct ata_port_operations { | |||
683 | 710 | ||
684 | int (*port_suspend) (struct ata_port *ap, pm_message_t mesg); | 711 | int (*port_suspend) (struct ata_port *ap, pm_message_t mesg); |
685 | int (*port_resume) (struct ata_port *ap); | 712 | int (*port_resume) (struct ata_port *ap); |
686 | 713 | int (*enable_pm) (struct ata_port *ap, enum link_pm policy); | |
714 | void (*disable_pm) (struct ata_port *ap); | ||
687 | int (*port_start) (struct ata_port *ap); | 715 | int (*port_start) (struct ata_port *ap); |
688 | void (*port_stop) (struct ata_port *ap); | 716 | void (*port_stop) (struct ata_port *ap); |
689 | 717 | ||
@@ -799,6 +827,7 @@ extern void ata_host_resume(struct ata_host *host); | |||
799 | extern int ata_ratelimit(void); | 827 | extern int ata_ratelimit(void); |
800 | extern int ata_busy_sleep(struct ata_port *ap, | 828 | extern int ata_busy_sleep(struct ata_port *ap, |
801 | unsigned long timeout_pat, unsigned long timeout); | 829 | unsigned long timeout_pat, unsigned long timeout); |
830 | extern void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline); | ||
802 | extern int ata_wait_ready(struct ata_port *ap, unsigned long deadline); | 831 | extern int ata_wait_ready(struct ata_port *ap, unsigned long deadline); |
803 | extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, | 832 | extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, |
804 | void *data, unsigned long delay); | 833 | void *data, unsigned long delay); |
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h index 3f272396642b..30e11aa3c1c9 100644 --- a/include/linux/mv643xx_eth.h +++ b/include/linux/mv643xx_eth.h | |||
@@ -8,6 +8,9 @@ | |||
8 | #define MV643XX_ETH_NAME "mv643xx_eth" | 8 | #define MV643XX_ETH_NAME "mv643xx_eth" |
9 | #define MV643XX_ETH_SHARED_REGS 0x2000 | 9 | #define MV643XX_ETH_SHARED_REGS 0x2000 |
10 | #define MV643XX_ETH_SHARED_REGS_SIZE 0x2000 | 10 | #define MV643XX_ETH_SHARED_REGS_SIZE 0x2000 |
11 | #define MV643XX_ETH_BAR_4 0x2220 | ||
12 | #define MV643XX_ETH_SIZE_REG_4 0x2224 | ||
13 | #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 | ||
11 | 14 | ||
12 | struct mv643xx_eth_platform_data { | 15 | struct mv643xx_eth_platform_data { |
13 | int port_number; | 16 | int port_number; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c4de536cefa3..1e6af4f174b6 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -390,7 +390,7 @@ static inline void napi_complete(struct napi_struct *n) | |||
390 | static inline void napi_disable(struct napi_struct *n) | 390 | static inline void napi_disable(struct napi_struct *n) |
391 | { | 391 | { |
392 | while (test_and_set_bit(NAPI_STATE_SCHED, &n->state)) | 392 | while (test_and_set_bit(NAPI_STATE_SCHED, &n->state)) |
393 | msleep_interruptible(1); | 393 | msleep(1); |
394 | } | 394 | } |
395 | 395 | ||
396 | /** | 396 | /** |
@@ -669,6 +669,8 @@ struct net_device | |||
669 | #define HAVE_SET_MAC_ADDR | 669 | #define HAVE_SET_MAC_ADDR |
670 | int (*set_mac_address)(struct net_device *dev, | 670 | int (*set_mac_address)(struct net_device *dev, |
671 | void *addr); | 671 | void *addr); |
672 | #define HAVE_VALIDATE_ADDR | ||
673 | int (*validate_addr)(struct net_device *dev); | ||
672 | #define HAVE_PRIVATE_IOCTL | 674 | #define HAVE_PRIVATE_IOCTL |
673 | int (*do_ioctl)(struct net_device *dev, | 675 | int (*do_ioctl)(struct net_device *dev, |
674 | struct ifreq *ifr, int cmd); | 676 | struct ifreq *ifr, int cmd); |
@@ -737,6 +739,16 @@ static inline void *netdev_priv(const struct net_device *dev) | |||
737 | */ | 739 | */ |
738 | #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev)) | 740 | #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev)) |
739 | 741 | ||
742 | /** | ||
743 | * netif_napi_add - initialize a napi context | ||
744 | * @dev: network device | ||
745 | * @napi: napi context | ||
746 | * @poll: polling function | ||
747 | * @weight: default weight | ||
748 | * | ||
749 | * netif_napi_add() must be used to initialize a napi context prior to calling | ||
750 | * *any* of the other napi related functions. | ||
751 | */ | ||
740 | static inline void netif_napi_add(struct net_device *dev, | 752 | static inline void netif_napi_add(struct net_device *dev, |
741 | struct napi_struct *napi, | 753 | struct napi_struct *napi, |
742 | int (*poll)(struct napi_struct *, int), | 754 | int (*poll)(struct napi_struct *, int), |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 4e10a074ca56..e44aac8cf5ff 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1236,6 +1236,10 @@ | |||
1236 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 | 1236 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 |
1237 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C | 1237 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C |
1238 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 | 1238 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 |
1239 | #define PCI_DEVICE_ID_NVIDIA_NVENET_32 0x0760 | ||
1240 | #define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761 | ||
1241 | #define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762 | ||
1242 | #define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763 | ||
1239 | 1243 | ||
1240 | #define PCI_VENDOR_ID_IMS 0x10e0 | 1244 | #define PCI_VENDOR_ID_IMS 0x10e0 |
1241 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 | 1245 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 |
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index df7ddcee7c4b..32326c293d7b 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_SCATTERLIST_H | 1 | #ifndef _LINUX_SCATTERLIST_H |
2 | #define _LINUX_SCATTERLIST_H | 2 | #define _LINUX_SCATTERLIST_H |
3 | 3 | ||
4 | #include <asm/types.h> | ||
4 | #include <asm/scatterlist.h> | 5 | #include <asm/scatterlist.h> |
5 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
6 | #include <linux/string.h> | 7 | #include <linux/string.h> |
@@ -26,18 +27,16 @@ | |||
26 | #define SG_MAGIC 0x87654321 | 27 | #define SG_MAGIC 0x87654321 |
27 | 28 | ||
28 | /** | 29 | /** |
29 | * sg_set_page - Set sg entry to point at given page | 30 | * sg_assign_page - Assign a given page to an SG entry |
30 | * @sg: SG entry | 31 | * @sg: SG entry |
31 | * @page: The page | 32 | * @page: The page |
32 | * | 33 | * |
33 | * Description: | 34 | * Description: |
34 | * Use this function to set an sg entry pointing at a page, never assign | 35 | * Assign page to sg entry. Also see sg_set_page(), the most commonly used |
35 | * the page directly. We encode sg table information in the lower bits | 36 | * variant. |
36 | * of the page pointer. See sg_page() for looking up the page belonging | ||
37 | * to an sg entry. | ||
38 | * | 37 | * |
39 | **/ | 38 | **/ |
40 | static inline void sg_set_page(struct scatterlist *sg, struct page *page) | 39 | static inline void sg_assign_page(struct scatterlist *sg, struct page *page) |
41 | { | 40 | { |
42 | unsigned long page_link = sg->page_link & 0x3; | 41 | unsigned long page_link = sg->page_link & 0x3; |
43 | 42 | ||
@@ -52,6 +51,28 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page) | |||
52 | sg->page_link = page_link | (unsigned long) page; | 51 | sg->page_link = page_link | (unsigned long) page; |
53 | } | 52 | } |
54 | 53 | ||
54 | /** | ||
55 | * sg_set_page - Set sg entry to point at given page | ||
56 | * @sg: SG entry | ||
57 | * @page: The page | ||
58 | * @len: Length of data | ||
59 | * @offset: Offset into page | ||
60 | * | ||
61 | * Description: | ||
62 | * Use this function to set an sg entry pointing at a page, never assign | ||
63 | * the page directly. We encode sg table information in the lower bits | ||
64 | * of the page pointer. See sg_page() for looking up the page belonging | ||
65 | * to an sg entry. | ||
66 | * | ||
67 | **/ | ||
68 | static inline void sg_set_page(struct scatterlist *sg, struct page *page, | ||
69 | unsigned int len, unsigned int offset) | ||
70 | { | ||
71 | sg_assign_page(sg, page); | ||
72 | sg->offset = offset; | ||
73 | sg->length = len; | ||
74 | } | ||
75 | |||
55 | #define sg_page(sg) ((struct page *) ((sg)->page_link & ~0x3)) | 76 | #define sg_page(sg) ((struct page *) ((sg)->page_link & ~0x3)) |
56 | 77 | ||
57 | /** | 78 | /** |
@@ -64,9 +85,7 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page) | |||
64 | static inline void sg_set_buf(struct scatterlist *sg, const void *buf, | 85 | static inline void sg_set_buf(struct scatterlist *sg, const void *buf, |
65 | unsigned int buflen) | 86 | unsigned int buflen) |
66 | { | 87 | { |
67 | sg_set_page(sg, virt_to_page(buf)); | 88 | sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf)); |
68 | sg->offset = offset_in_page(buf); | ||
69 | sg->length = buflen; | ||
70 | } | 89 | } |
71 | 90 | ||
72 | /* | 91 | /* |
@@ -131,7 +150,7 @@ static inline struct scatterlist *sg_last(struct scatterlist *sgl, | |||
131 | struct scatterlist *ret = &sgl[nents - 1]; | 150 | struct scatterlist *ret = &sgl[nents - 1]; |
132 | #else | 151 | #else |
133 | struct scatterlist *sg, *ret = NULL; | 152 | struct scatterlist *sg, *ret = NULL; |
134 | int i; | 153 | unsigned int i; |
135 | 154 | ||
136 | for_each_sg(sgl, sg, nents, i) | 155 | for_each_sg(sgl, sg, nents, i) |
137 | ret = sg; | 156 | ret = sg; |
@@ -160,7 +179,11 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, | |||
160 | #ifndef ARCH_HAS_SG_CHAIN | 179 | #ifndef ARCH_HAS_SG_CHAIN |
161 | BUG(); | 180 | BUG(); |
162 | #endif | 181 | #endif |
163 | prv[prv_nents - 1].page_link = (unsigned long) sgl | 0x01; | 182 | /* |
183 | * Set lowest bit to indicate a link pointer, and make sure to clear | ||
184 | * the termination bit if it happens to be set. | ||
185 | */ | ||
186 | prv[prv_nents - 1].page_link = ((unsigned long) sgl | 0x01) & ~0x02; | ||
164 | } | 187 | } |
165 | 188 | ||
166 | /** | 189 | /** |
@@ -220,7 +243,7 @@ static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) | |||
220 | sg_mark_end(sgl, nents); | 243 | sg_mark_end(sgl, nents); |
221 | #ifdef CONFIG_DEBUG_SG | 244 | #ifdef CONFIG_DEBUG_SG |
222 | { | 245 | { |
223 | int i; | 246 | unsigned int i; |
224 | for (i = 0; i < nents; i++) | 247 | for (i = 0; i < nents; i++) |
225 | sgl[i].sg_magic = SG_MAGIC; | 248 | sgl[i].sg_magic = SG_MAGIC; |
226 | } | 249 | } |
@@ -237,7 +260,7 @@ static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents) | |||
237 | * on the sg page. | 260 | * on the sg page. |
238 | * | 261 | * |
239 | **/ | 262 | **/ |
240 | static inline unsigned long sg_phys(struct scatterlist *sg) | 263 | static inline dma_addr_t sg_phys(struct scatterlist *sg) |
241 | { | 264 | { |
242 | return page_to_phys(sg_page(sg)) + sg->offset; | 265 | return page_to_phys(sg_page(sg)) + sg->offset; |
243 | } | 266 | } |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 13df99fb2769..155d7438f7ad 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -828,12 +828,17 @@ struct sched_class { | |||
828 | struct task_struct * (*pick_next_task) (struct rq *rq); | 828 | struct task_struct * (*pick_next_task) (struct rq *rq); |
829 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); | 829 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); |
830 | 830 | ||
831 | #ifdef CONFIG_SMP | ||
831 | unsigned long (*load_balance) (struct rq *this_rq, int this_cpu, | 832 | unsigned long (*load_balance) (struct rq *this_rq, int this_cpu, |
832 | struct rq *busiest, | 833 | struct rq *busiest, unsigned long max_load_move, |
833 | unsigned long max_nr_move, unsigned long max_load_move, | ||
834 | struct sched_domain *sd, enum cpu_idle_type idle, | 834 | struct sched_domain *sd, enum cpu_idle_type idle, |
835 | int *all_pinned, int *this_best_prio); | 835 | int *all_pinned, int *this_best_prio); |
836 | 836 | ||
837 | int (*move_one_task) (struct rq *this_rq, int this_cpu, | ||
838 | struct rq *busiest, struct sched_domain *sd, | ||
839 | enum cpu_idle_type idle); | ||
840 | #endif | ||
841 | |||
837 | void (*set_curr_task) (struct rq *rq); | 842 | void (*set_curr_task) (struct rq *rq); |
838 | void (*task_tick) (struct rq *rq, struct task_struct *p); | 843 | void (*task_tick) (struct rq *rq, struct task_struct *p); |
839 | void (*task_new) (struct rq *rq, struct task_struct *p); | 844 | void (*task_new) (struct rq *rq, struct task_struct *p); |
@@ -1004,6 +1009,7 @@ struct task_struct { | |||
1004 | unsigned int rt_priority; | 1009 | unsigned int rt_priority; |
1005 | cputime_t utime, stime, utimescaled, stimescaled; | 1010 | cputime_t utime, stime, utimescaled, stimescaled; |
1006 | cputime_t gtime; | 1011 | cputime_t gtime; |
1012 | cputime_t prev_utime, prev_stime; | ||
1007 | unsigned long nvcsw, nivcsw; /* context switch counts */ | 1013 | unsigned long nvcsw, nivcsw; /* context switch counts */ |
1008 | struct timespec start_time; /* monotonic time */ | 1014 | struct timespec start_time; /* monotonic time */ |
1009 | struct timespec real_start_time; /* boot based time */ | 1015 | struct timespec real_start_time; /* boot based time */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index fd4e12f24270..94e49915a8c0 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -994,7 +994,7 @@ static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len) | |||
994 | * | 994 | * |
995 | * Return the number of bytes of free space at the head of an &sk_buff. | 995 | * Return the number of bytes of free space at the head of an &sk_buff. |
996 | */ | 996 | */ |
997 | static inline int skb_headroom(const struct sk_buff *skb) | 997 | static inline unsigned int skb_headroom(const struct sk_buff *skb) |
998 | { | 998 | { |
999 | return skb->data - skb->head; | 999 | return skb->data - skb->head; |
1000 | } | 1000 | } |
@@ -1347,7 +1347,7 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, | |||
1347 | * Returns true if modifying the header part of the cloned buffer | 1347 | * Returns true if modifying the header part of the cloned buffer |
1348 | * does not requires the data to be copied. | 1348 | * does not requires the data to be copied. |
1349 | */ | 1349 | */ |
1350 | static inline int skb_clone_writable(struct sk_buff *skb, int len) | 1350 | static inline int skb_clone_writable(struct sk_buff *skb, unsigned int len) |
1351 | { | 1351 | { |
1352 | return !skb_header_cloned(skb) && | 1352 | return !skb_header_cloned(skb) && |
1353 | skb_headroom(skb) + len <= skb->hdr_len; | 1353 | skb_headroom(skb) + len <= skb->hdr_len; |
diff --git a/include/linux/string.h b/include/linux/string.h index 836062b7582a..c5d3fcad7b57 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -3,16 +3,14 @@ | |||
3 | 3 | ||
4 | /* We don't want strings.h stuff being user by user stuff by accident */ | 4 | /* We don't want strings.h stuff being user by user stuff by accident */ |
5 | 5 | ||
6 | #ifdef __KERNEL__ | 6 | #ifndef __KERNEL__ |
7 | #include <string.h> | ||
8 | #else | ||
7 | 9 | ||
8 | #include <linux/compiler.h> /* for inline */ | 10 | #include <linux/compiler.h> /* for inline */ |
9 | #include <linux/types.h> /* for size_t */ | 11 | #include <linux/types.h> /* for size_t */ |
10 | #include <linux/stddef.h> /* for NULL */ | 12 | #include <linux/stddef.h> /* for NULL */ |
11 | 13 | ||
12 | #ifdef __cplusplus | ||
13 | extern "C" { | ||
14 | #endif | ||
15 | |||
16 | extern char *strndup_user(const char __user *, long); | 14 | extern char *strndup_user(const char __user *, long); |
17 | 15 | ||
18 | /* | 16 | /* |
@@ -111,9 +109,5 @@ extern void *kmemdup(const void *src, size_t len, gfp_t gfp); | |||
111 | extern char **argv_split(gfp_t gfp, const char *str, int *argcp); | 109 | extern char **argv_split(gfp_t gfp, const char *str, int *argcp); |
112 | extern void argv_free(char **argv); | 110 | extern void argv_free(char **argv); |
113 | 111 | ||
114 | #ifdef __cplusplus | ||
115 | } | ||
116 | #endif | ||
117 | |||
118 | #endif | 112 | #endif |
119 | #endif /* _LINUX_STRING_H_ */ | 113 | #endif /* _LINUX_STRING_H_ */ |
diff --git a/include/linux/sunrpc/rpc_rdma.h b/include/linux/sunrpc/rpc_rdma.h index 0013a0d8dc6b..87b895d5c786 100644 --- a/include/linux/sunrpc/rpc_rdma.h +++ b/include/linux/sunrpc/rpc_rdma.h | |||
@@ -41,17 +41,17 @@ | |||
41 | #define _LINUX_SUNRPC_RPC_RDMA_H | 41 | #define _LINUX_SUNRPC_RPC_RDMA_H |
42 | 42 | ||
43 | struct rpcrdma_segment { | 43 | struct rpcrdma_segment { |
44 | uint32_t rs_handle; /* Registered memory handle */ | 44 | __be32 rs_handle; /* Registered memory handle */ |
45 | uint32_t rs_length; /* Length of the chunk in bytes */ | 45 | __be32 rs_length; /* Length of the chunk in bytes */ |
46 | uint64_t rs_offset; /* Chunk virtual address or offset */ | 46 | __be64 rs_offset; /* Chunk virtual address or offset */ |
47 | }; | 47 | }; |
48 | 48 | ||
49 | /* | 49 | /* |
50 | * read chunk(s), encoded as a linked list. | 50 | * read chunk(s), encoded as a linked list. |
51 | */ | 51 | */ |
52 | struct rpcrdma_read_chunk { | 52 | struct rpcrdma_read_chunk { |
53 | uint32_t rc_discrim; /* 1 indicates presence */ | 53 | __be32 rc_discrim; /* 1 indicates presence */ |
54 | uint32_t rc_position; /* Position in XDR stream */ | 54 | __be32 rc_position; /* Position in XDR stream */ |
55 | struct rpcrdma_segment rc_target; | 55 | struct rpcrdma_segment rc_target; |
56 | }; | 56 | }; |
57 | 57 | ||
@@ -66,29 +66,29 @@ struct rpcrdma_write_chunk { | |||
66 | * write chunk(s), encoded as a counted array. | 66 | * write chunk(s), encoded as a counted array. |
67 | */ | 67 | */ |
68 | struct rpcrdma_write_array { | 68 | struct rpcrdma_write_array { |
69 | uint32_t wc_discrim; /* 1 indicates presence */ | 69 | __be32 wc_discrim; /* 1 indicates presence */ |
70 | uint32_t wc_nchunks; /* Array count */ | 70 | __be32 wc_nchunks; /* Array count */ |
71 | struct rpcrdma_write_chunk wc_array[0]; | 71 | struct rpcrdma_write_chunk wc_array[0]; |
72 | }; | 72 | }; |
73 | 73 | ||
74 | struct rpcrdma_msg { | 74 | struct rpcrdma_msg { |
75 | uint32_t rm_xid; /* Mirrors the RPC header xid */ | 75 | __be32 rm_xid; /* Mirrors the RPC header xid */ |
76 | uint32_t rm_vers; /* Version of this protocol */ | 76 | __be32 rm_vers; /* Version of this protocol */ |
77 | uint32_t rm_credit; /* Buffers requested/granted */ | 77 | __be32 rm_credit; /* Buffers requested/granted */ |
78 | uint32_t rm_type; /* Type of message (enum rpcrdma_proc) */ | 78 | __be32 rm_type; /* Type of message (enum rpcrdma_proc) */ |
79 | union { | 79 | union { |
80 | 80 | ||
81 | struct { /* no chunks */ | 81 | struct { /* no chunks */ |
82 | uint32_t rm_empty[3]; /* 3 empty chunk lists */ | 82 | __be32 rm_empty[3]; /* 3 empty chunk lists */ |
83 | } rm_nochunks; | 83 | } rm_nochunks; |
84 | 84 | ||
85 | struct { /* no chunks and padded */ | 85 | struct { /* no chunks and padded */ |
86 | uint32_t rm_align; /* Padding alignment */ | 86 | __be32 rm_align; /* Padding alignment */ |
87 | uint32_t rm_thresh; /* Padding threshold */ | 87 | __be32 rm_thresh; /* Padding threshold */ |
88 | uint32_t rm_pempty[3]; /* 3 empty chunk lists */ | 88 | __be32 rm_pempty[3]; /* 3 empty chunk lists */ |
89 | } rm_padded; | 89 | } rm_padded; |
90 | 90 | ||
91 | uint32_t rm_chunks[0]; /* read, write and reply chunks */ | 91 | __be32 rm_chunks[0]; /* read, write and reply chunks */ |
92 | 92 | ||
93 | } rm_body; | 93 | } rm_body; |
94 | }; | 94 | }; |
diff --git a/include/linux/types.h b/include/linux/types.h index 4f0dad21c917..f4f8d19158e4 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -37,6 +37,8 @@ typedef __kernel_gid32_t gid_t; | |||
37 | typedef __kernel_uid16_t uid16_t; | 37 | typedef __kernel_uid16_t uid16_t; |
38 | typedef __kernel_gid16_t gid16_t; | 38 | typedef __kernel_gid16_t gid16_t; |
39 | 39 | ||
40 | typedef unsigned long uintptr_t; | ||
41 | |||
40 | #ifdef CONFIG_UID16 | 42 | #ifdef CONFIG_UID16 |
41 | /* This is defined by include/asm-{arch}/posix_types.h */ | 43 | /* This is defined by include/asm-{arch}/posix_types.h */ |
42 | typedef __kernel_old_uid_t old_uid_t; | 44 | typedef __kernel_old_uid_t old_uid_t; |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 8228b57eb18f..4427dcd1e53a 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include <net/inet_connection_sock.h> | 27 | #include <net/inet_connection_sock.h> |
28 | #include <net/inet_sock.h> | 28 | #include <net/inet_sock.h> |
29 | #include <net/route.h> | ||
30 | #include <net/sock.h> | 29 | #include <net/sock.h> |
31 | #include <net/tcp_states.h> | 30 | #include <net/tcp_states.h> |
32 | 31 | ||
@@ -266,11 +265,6 @@ out: | |||
266 | wake_up(&hashinfo->lhash_wait); | 265 | wake_up(&hashinfo->lhash_wait); |
267 | } | 266 | } |
268 | 267 | ||
269 | static inline int inet_iif(const struct sk_buff *skb) | ||
270 | { | ||
271 | return ((struct rtable *)skb->dst)->rt_iif; | ||
272 | } | ||
273 | |||
274 | extern struct sock *__inet_lookup_listener(struct inet_hashinfo *hashinfo, | 268 | extern struct sock *__inet_lookup_listener(struct inet_hashinfo *hashinfo, |
275 | const __be32 daddr, | 269 | const __be32 daddr, |
276 | const unsigned short hnum, | 270 | const unsigned short hnum, |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 62daf214931f..70013c5f4e59 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <net/flow.h> | 24 | #include <net/flow.h> |
25 | #include <net/sock.h> | 25 | #include <net/sock.h> |
26 | #include <net/request_sock.h> | 26 | #include <net/request_sock.h> |
27 | #include <net/route.h> | ||
27 | 28 | ||
28 | /** struct ip_options - IP Options | 29 | /** struct ip_options - IP Options |
29 | * | 30 | * |
@@ -190,4 +191,10 @@ static inline int inet_sk_ehashfn(const struct sock *sk) | |||
190 | return inet_ehashfn(laddr, lport, faddr, fport); | 191 | return inet_ehashfn(laddr, lport, faddr, fport); |
191 | } | 192 | } |
192 | 193 | ||
194 | |||
195 | static inline int inet_iif(const struct sk_buff *skb) | ||
196 | { | ||
197 | return ((struct rtable *)skb->dst)->rt_iif; | ||
198 | } | ||
199 | |||
193 | #endif /* _INET_SOCK_H */ | 200 | #endif /* _INET_SOCK_H */ |
diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h index 8dabdd603fe1..eea2e6152389 100644 --- a/include/net/irda/ircomm_tty.h +++ b/include/net/irda/ircomm_tty.h | |||
@@ -127,7 +127,6 @@ extern int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, | |||
127 | unsigned int cmd, unsigned long arg); | 127 | unsigned int cmd, unsigned long arg); |
128 | extern void ircomm_tty_set_termios(struct tty_struct *tty, | 128 | extern void ircomm_tty_set_termios(struct tty_struct *tty, |
129 | struct ktermios *old_termios); | 129 | struct ktermios *old_termios); |
130 | extern hashbin_t *ircomm_tty; | ||
131 | 130 | ||
132 | #endif | 131 | #endif |
133 | 132 | ||
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 93aa87d32804..1fd449a6530b 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -51,13 +51,12 @@ static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) | |||
51 | } | 51 | } |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #ifdef CONFIG_NET_NS | ||
54 | extern void __put_net(struct net *net); | 55 | extern void __put_net(struct net *net); |
55 | 56 | ||
56 | static inline struct net *get_net(struct net *net) | 57 | static inline struct net *get_net(struct net *net) |
57 | { | 58 | { |
58 | #ifdef CONFIG_NET | ||
59 | atomic_inc(&net->count); | 59 | atomic_inc(&net->count); |
60 | #endif | ||
61 | return net; | 60 | return net; |
62 | } | 61 | } |
63 | 62 | ||
@@ -75,26 +74,44 @@ static inline struct net *maybe_get_net(struct net *net) | |||
75 | 74 | ||
76 | static inline void put_net(struct net *net) | 75 | static inline void put_net(struct net *net) |
77 | { | 76 | { |
78 | #ifdef CONFIG_NET | ||
79 | if (atomic_dec_and_test(&net->count)) | 77 | if (atomic_dec_and_test(&net->count)) |
80 | __put_net(net); | 78 | __put_net(net); |
81 | #endif | ||
82 | } | 79 | } |
83 | 80 | ||
84 | static inline struct net *hold_net(struct net *net) | 81 | static inline struct net *hold_net(struct net *net) |
85 | { | 82 | { |
86 | #ifdef CONFIG_NET | ||
87 | atomic_inc(&net->use_count); | 83 | atomic_inc(&net->use_count); |
88 | #endif | ||
89 | return net; | 84 | return net; |
90 | } | 85 | } |
91 | 86 | ||
92 | static inline void release_net(struct net *net) | 87 | static inline void release_net(struct net *net) |
93 | { | 88 | { |
94 | #ifdef CONFIG_NET | ||
95 | atomic_dec(&net->use_count); | 89 | atomic_dec(&net->use_count); |
96 | #endif | ||
97 | } | 90 | } |
91 | #else | ||
92 | static inline struct net *get_net(struct net *net) | ||
93 | { | ||
94 | return net; | ||
95 | } | ||
96 | |||
97 | static inline void put_net(struct net *net) | ||
98 | { | ||
99 | } | ||
100 | |||
101 | static inline struct net *hold_net(struct net *net) | ||
102 | { | ||
103 | return net; | ||
104 | } | ||
105 | |||
106 | static inline void release_net(struct net *net) | ||
107 | { | ||
108 | } | ||
109 | |||
110 | static inline struct net *maybe_get_net(struct net *net) | ||
111 | { | ||
112 | return net; | ||
113 | } | ||
114 | #endif | ||
98 | 115 | ||
99 | #define for_each_net(VAR) \ | 116 | #define for_each_net(VAR) \ |
100 | list_for_each_entry(VAR, &net_namespace_list, list) | 117 | list_for_each_entry(VAR, &net_namespace_list, list) |
@@ -102,11 +119,9 @@ static inline void release_net(struct net *net) | |||
102 | #ifdef CONFIG_NET_NS | 119 | #ifdef CONFIG_NET_NS |
103 | #define __net_init | 120 | #define __net_init |
104 | #define __net_exit | 121 | #define __net_exit |
105 | #define __net_initdata | ||
106 | #else | 122 | #else |
107 | #define __net_init __init | 123 | #define __net_init __init |
108 | #define __net_exit __exit_refok | 124 | #define __net_exit __exit_refok |
109 | #define __net_initdata __initdata | ||
110 | #endif | 125 | #endif |
111 | 126 | ||
112 | struct pernet_operations { | 127 | struct pernet_operations { |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index a02ec9e5fea5..c9265518a378 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -316,4 +316,19 @@ static inline u32 qdisc_l2t(struct qdisc_rate_table* rtab, unsigned int pktlen) | |||
316 | return rtab->data[slot]; | 316 | return rtab->data[slot]; |
317 | } | 317 | } |
318 | 318 | ||
319 | #ifdef CONFIG_NET_CLS_ACT | ||
320 | static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask) | ||
321 | { | ||
322 | struct sk_buff *n = skb_clone(skb, gfp_mask); | ||
323 | |||
324 | if (n) { | ||
325 | n->tc_verd = SET_TC_VERD(n->tc_verd, 0); | ||
326 | n->tc_verd = CLR_TC_OK2MUNGE(n->tc_verd); | ||
327 | n->tc_verd = CLR_TC_MUNGED(n->tc_verd); | ||
328 | n->iif = skb->iif; | ||
329 | } | ||
330 | return n; | ||
331 | } | ||
332 | #endif | ||
333 | |||
319 | #endif | 334 | #endif |
diff --git a/include/net/sctp/auth.h b/include/net/sctp/auth.h index 4945954a16af..5db261a1e85e 100644 --- a/include/net/sctp/auth.h +++ b/include/net/sctp/auth.h | |||
@@ -88,7 +88,6 @@ static inline void sctp_auth_key_hold(struct sctp_auth_bytes *key) | |||
88 | 88 | ||
89 | void sctp_auth_key_put(struct sctp_auth_bytes *key); | 89 | void sctp_auth_key_put(struct sctp_auth_bytes *key); |
90 | struct sctp_shared_key *sctp_auth_shkey_create(__u16 key_id, gfp_t gfp); | 90 | struct sctp_shared_key *sctp_auth_shkey_create(__u16 key_id, gfp_t gfp); |
91 | void sctp_auth_shkey_free(struct sctp_shared_key *sh_key); | ||
92 | void sctp_auth_destroy_keys(struct list_head *keys); | 91 | void sctp_auth_destroy_keys(struct list_head *keys); |
93 | int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp); | 92 | int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp); |
94 | struct sctp_shared_key *sctp_auth_get_shkey( | 93 | struct sctp_shared_key *sctp_auth_get_shkey( |
@@ -104,7 +103,7 @@ struct sctp_hmac *sctp_auth_asoc_get_hmac(const struct sctp_association *asoc); | |||
104 | void sctp_auth_asoc_set_default_hmac(struct sctp_association *asoc, | 103 | void sctp_auth_asoc_set_default_hmac(struct sctp_association *asoc, |
105 | struct sctp_hmac_algo_param *hmacs); | 104 | struct sctp_hmac_algo_param *hmacs); |
106 | int sctp_auth_asoc_verify_hmac_id(const struct sctp_association *asoc, | 105 | int sctp_auth_asoc_verify_hmac_id(const struct sctp_association *asoc, |
107 | __u16 hmac_id); | 106 | __be16 hmac_id); |
108 | int sctp_auth_send_cid(sctp_cid_t chunk, const struct sctp_association *asoc); | 107 | int sctp_auth_send_cid(sctp_cid_t chunk, const struct sctp_association *asoc); |
109 | int sctp_auth_recv_cid(sctp_cid_t chunk, const struct sctp_association *asoc); | 108 | int sctp_auth_recv_cid(sctp_cid_t chunk, const struct sctp_association *asoc); |
110 | void sctp_auth_calculate_hmac(const struct sctp_association *asoc, | 109 | void sctp_auth_calculate_hmac(const struct sctp_association *asoc, |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 119f5a1ed499..93eb708609e7 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -156,7 +156,6 @@ int sctp_primitive_ASCONF(struct sctp_association *, void *arg); | |||
156 | __u32 sctp_start_cksum(__u8 *ptr, __u16 count); | 156 | __u32 sctp_start_cksum(__u8 *ptr, __u16 count); |
157 | __u32 sctp_update_cksum(__u8 *ptr, __u16 count, __u32 cksum); | 157 | __u32 sctp_update_cksum(__u8 *ptr, __u16 count, __u32 cksum); |
158 | __u32 sctp_end_cksum(__u32 cksum); | 158 | __u32 sctp_end_cksum(__u32 cksum); |
159 | __u32 sctp_update_copy_cksum(__u8 *, __u8 *, __u16 count, __u32 cksum); | ||
160 | 159 | ||
161 | /* | 160 | /* |
162 | * sctp/input.c | 161 | * sctp/input.c |
diff --git a/include/net/sock.h b/include/net/sock.h index 43fc3fa50d62..20de3fa7ae40 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -779,7 +779,7 @@ extern void FASTCALL(release_sock(struct sock *sk)); | |||
779 | 779 | ||
780 | extern struct sock *sk_alloc(struct net *net, int family, | 780 | extern struct sock *sk_alloc(struct net *net, int family, |
781 | gfp_t priority, | 781 | gfp_t priority, |
782 | struct proto *prot, int zero_it); | 782 | struct proto *prot); |
783 | extern void sk_free(struct sock *sk); | 783 | extern void sk_free(struct sock *sk); |
784 | extern struct sock *sk_clone(const struct sock *sk, | 784 | extern struct sock *sk_clone(const struct sock *sk, |
785 | const gfp_t priority); | 785 | const gfp_t priority); |
@@ -993,20 +993,6 @@ static inline void sock_graft(struct sock *sk, struct socket *parent) | |||
993 | write_unlock_bh(&sk->sk_callback_lock); | 993 | write_unlock_bh(&sk->sk_callback_lock); |
994 | } | 994 | } |
995 | 995 | ||
996 | static inline void sock_copy(struct sock *nsk, const struct sock *osk) | ||
997 | { | ||
998 | #ifdef CONFIG_SECURITY_NETWORK | ||
999 | void *sptr = nsk->sk_security; | ||
1000 | #endif | ||
1001 | |||
1002 | memcpy(nsk, osk, osk->sk_prot->obj_size); | ||
1003 | get_net(nsk->sk_net); | ||
1004 | #ifdef CONFIG_SECURITY_NETWORK | ||
1005 | nsk->sk_security = sptr; | ||
1006 | security_sk_clone(osk, nsk); | ||
1007 | #endif | ||
1008 | } | ||
1009 | |||
1010 | extern int sock_i_uid(struct sock *sk); | 996 | extern int sock_i_uid(struct sock *sk); |
1011 | extern unsigned long sock_i_ino(struct sock *sk); | 997 | extern unsigned long sock_i_ino(struct sock *sk); |
1012 | 998 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 92049e681258..d695cea7730d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -803,7 +803,7 @@ static inline int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight) | |||
803 | return left <= tcp_max_burst(tp); | 803 | return left <= tcp_max_burst(tp); |
804 | } | 804 | } |
805 | 805 | ||
806 | static inline void tcp_minshall_update(struct tcp_sock *tp, int mss, | 806 | static inline void tcp_minshall_update(struct tcp_sock *tp, unsigned int mss, |
807 | const struct sk_buff *skb) | 807 | const struct sk_buff *skb) |
808 | { | 808 | { |
809 | if (skb->len < mss) | 809 | if (skb->len < mss) |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 688f6f5d3285..58dfa82889aa 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -37,6 +37,8 @@ | |||
37 | extern struct sock *xfrm_nl; | 37 | extern struct sock *xfrm_nl; |
38 | extern u32 sysctl_xfrm_aevent_etime; | 38 | extern u32 sysctl_xfrm_aevent_etime; |
39 | extern u32 sysctl_xfrm_aevent_rseqth; | 39 | extern u32 sysctl_xfrm_aevent_rseqth; |
40 | extern int sysctl_xfrm_larval_drop; | ||
41 | extern u32 sysctl_xfrm_acq_expires; | ||
40 | 42 | ||
41 | extern struct mutex xfrm_cfg_mutex; | 43 | extern struct mutex xfrm_cfg_mutex; |
42 | 44 | ||