diff options
Diffstat (limited to 'include')
99 files changed, 1290 insertions, 369 deletions
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index 22b53e369f59..8393bf374b2b 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h | |||
| @@ -339,13 +339,6 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) | |||
| 339 | #define kern_addr_valid(addr) (1) | 339 | #define kern_addr_valid(addr) (1) |
| 340 | #endif | 340 | #endif |
| 341 | 341 | ||
| 342 | #define io_remap_page_range(vma, start, busaddr, size, prot) \ | ||
| 343 | ({ \ | ||
| 344 | void *va = (void __force *)ioremap(busaddr, size); \ | ||
| 345 | unsigned long pfn = virt_to_phys(va) >> PAGE_SHIFT; \ | ||
| 346 | remap_pfn_range(vma, start, pfn, size, prot); \ | ||
| 347 | }) | ||
| 348 | |||
| 349 | #define io_remap_pfn_range(vma, start, pfn, size, prot) \ | 342 | #define io_remap_pfn_range(vma, start, pfn, size, prot) \ |
| 350 | remap_pfn_range(vma, start, pfn, size, prot) | 343 | remap_pfn_range(vma, start, pfn, size, prot) |
| 351 | 344 | ||
diff --git a/include/asm-arm/arch-pxa/akita.h b/include/asm-arm/arch-pxa/akita.h new file mode 100644 index 000000000000..4a1fbcfccc39 --- /dev/null +++ b/include/asm-arm/arch-pxa/akita.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * Hardware specific definitions for SL-C1000 (Akita) | ||
| 3 | * | ||
| 4 | * Copyright (c) 2005 Richard Purdie | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | /* Akita IO Expander GPIOs */ | ||
| 13 | |||
| 14 | #define AKITA_IOEXP_RESERVED_7 (1 << 7) | ||
| 15 | #define AKITA_IOEXP_IR_ON (1 << 6) | ||
| 16 | #define AKITA_IOEXP_AKIN_PULLUP (1 << 5) | ||
| 17 | #define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4) | ||
| 18 | #define AKITA_IOEXP_BACKLIGHT_ON (1 << 3) | ||
| 19 | #define AKITA_IOEXP_MIC_BIAS (1 << 2) | ||
| 20 | #define AKITA_IOEXP_RESERVED_1 (1 << 1) | ||
| 21 | #define AKITA_IOEXP_RESERVED_0 (1 << 0) | ||
| 22 | |||
| 23 | /* Direction Bitfield 0=output 1=input */ | ||
| 24 | #define AKITA_IOEXP_IO_DIR 0 | ||
| 25 | /* Default Values */ | ||
| 26 | #define AKITA_IOEXP_IO_OUT (AKITA_IOEXP_IR_ON | AKITA_IOEXP_AKIN_PULLUP) | ||
| 27 | |||
| 28 | void akita_set_ioexp(struct device *dev, unsigned char bitmask); | ||
| 29 | void akita_reset_ioexp(struct device *dev, unsigned char bitmask); | ||
| 30 | |||
diff --git a/include/asm-arm/arch-pxa/corgi.h b/include/asm-arm/arch-pxa/corgi.h index 4b7aa0b8391e..e554caa0d18b 100644 --- a/include/asm-arm/arch-pxa/corgi.h +++ b/include/asm-arm/arch-pxa/corgi.h | |||
| @@ -106,17 +106,5 @@ extern struct platform_device corgiscoop_device; | |||
| 106 | extern struct platform_device corgissp_device; | 106 | extern struct platform_device corgissp_device; |
| 107 | extern struct platform_device corgifb_device; | 107 | extern struct platform_device corgifb_device; |
| 108 | 108 | ||
| 109 | /* | ||
| 110 | * External Functions | ||
| 111 | */ | ||
| 112 | extern unsigned long corgi_ssp_ads7846_putget(unsigned long); | ||
| 113 | extern unsigned long corgi_ssp_ads7846_get(void); | ||
| 114 | extern void corgi_ssp_ads7846_put(unsigned long data); | ||
| 115 | extern void corgi_ssp_ads7846_lock(void); | ||
| 116 | extern void corgi_ssp_ads7846_unlock(void); | ||
| 117 | extern void corgi_ssp_lcdtg_send (unsigned char adrs, unsigned char data); | ||
| 118 | extern void corgi_ssp_blduty_set(int duty); | ||
| 119 | extern int corgi_ssp_max1111_get(unsigned long data); | ||
| 120 | |||
| 121 | #endif /* __ASM_ARCH_CORGI_H */ | 109 | #endif /* __ASM_ARCH_CORGI_H */ |
| 122 | 110 | ||
diff --git a/include/asm-arm/arch-pxa/sharpsl.h b/include/asm-arm/arch-pxa/sharpsl.h new file mode 100644 index 000000000000..311f2bb5386a --- /dev/null +++ b/include/asm-arm/arch-pxa/sharpsl.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* | ||
| 2 | * SharpSL SSP Driver | ||
| 3 | */ | ||
| 4 | |||
| 5 | unsigned long corgi_ssp_ads7846_putget(unsigned long); | ||
| 6 | unsigned long corgi_ssp_ads7846_get(void); | ||
| 7 | void corgi_ssp_ads7846_put(unsigned long data); | ||
| 8 | void corgi_ssp_ads7846_lock(void); | ||
| 9 | void corgi_ssp_ads7846_unlock(void); | ||
| 10 | void corgi_ssp_lcdtg_send (unsigned char adrs, unsigned char data); | ||
| 11 | void corgi_ssp_blduty_set(int duty); | ||
| 12 | int corgi_ssp_max1111_get(unsigned long data); | ||
| 13 | |||
| 14 | /* | ||
| 15 | * SharpSL Touchscreen Driver | ||
| 16 | */ | ||
| 17 | |||
| 18 | struct corgits_machinfo { | ||
| 19 | unsigned long (*get_hsync_len)(void); | ||
| 20 | void (*put_hsync)(void); | ||
| 21 | void (*wait_hsync)(void); | ||
| 22 | }; | ||
| 23 | |||
| 24 | /* | ||
| 25 | * SharpSL Backlight | ||
| 26 | */ | ||
| 27 | |||
| 28 | struct corgibl_machinfo { | ||
| 29 | int max_intensity; | ||
| 30 | void (*set_bl_intensity)(int intensity); | ||
| 31 | }; | ||
| 32 | |||
diff --git a/include/asm-arm/arch-pxa/spitz.h b/include/asm-arm/arch-pxa/spitz.h new file mode 100644 index 000000000000..62e1fe4d025f --- /dev/null +++ b/include/asm-arm/arch-pxa/spitz.h | |||
| @@ -0,0 +1,158 @@ | |||
| 1 | /* | ||
| 2 | * Hardware specific definitions for SL-Cx000 series of PDAs | ||
| 3 | * | ||
| 4 | * Copyright (c) 2005 Alexander Wykes | ||
| 5 | * Copyright (c) 2005 Richard Purdie | ||
| 6 | * | ||
| 7 | * Based on Sharp's 2.4 kernel patches | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License version 2 as | ||
| 11 | * published by the Free Software Foundation. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | #ifndef __ASM_ARCH_SPITZ_H | ||
| 15 | #define __ASM_ARCH_SPITZ_H 1 | ||
| 16 | #endif | ||
| 17 | |||
| 18 | /* Spitz/Akita GPIOs */ | ||
| 19 | |||
| 20 | #define SPITZ_GPIO_KEY_INT (0) /* Key Interrupt */ | ||
| 21 | #define SPITZ_GPIO_RESET (1) | ||
| 22 | #define SPITZ_GPIO_nSD_DETECT (9) | ||
| 23 | #define SPITZ_GPIO_TP_INT (11) /* Touch Panel interrupt */ | ||
| 24 | #define SPITZ_GPIO_AK_INT (13) /* Remote Control */ | ||
| 25 | #define SPITZ_GPIO_ADS7846_CS (14) | ||
| 26 | #define SPITZ_GPIO_SYNC (16) | ||
| 27 | #define SPITZ_GPIO_MAX1111_CS (20) | ||
| 28 | #define SPITZ_GPIO_FATAL_BAT (21) | ||
| 29 | #define SPITZ_GPIO_HSYNC (22) | ||
| 30 | #define SPITZ_GPIO_nSD_CLK (32) | ||
| 31 | #define SPITZ_GPIO_USB_DEVICE (35) | ||
| 32 | #define SPITZ_GPIO_USB_HOST (37) | ||
| 33 | #define SPITZ_GPIO_USB_CONNECT (41) | ||
| 34 | #define SPITZ_GPIO_LCDCON_CS (53) | ||
| 35 | #define SPITZ_GPIO_nPCE (54) | ||
| 36 | #define SPITZ_GPIO_nSD_WP (81) | ||
| 37 | #define SPITZ_GPIO_ON_RESET (89) | ||
| 38 | #define SPITZ_GPIO_BAT_COVER (90) | ||
| 39 | #define SPITZ_GPIO_CF_CD (94) | ||
| 40 | #define SPITZ_GPIO_ON_KEY (95) | ||
| 41 | #define SPITZ_GPIO_SWA (97) | ||
| 42 | #define SPITZ_GPIO_SWB (96) | ||
| 43 | #define SPITZ_GPIO_CHRG_FULL (101) | ||
| 44 | #define SPITZ_GPIO_CO (101) | ||
| 45 | #define SPITZ_GPIO_CF_IRQ (105) | ||
| 46 | #define SPITZ_GPIO_AC_IN (115) | ||
| 47 | #define SPITZ_GPIO_HP_IN (116) | ||
| 48 | |||
| 49 | /* Spitz Only GPIOs */ | ||
| 50 | |||
| 51 | #define SPITZ_GPIO_CF2_IRQ (106) /* CF slot1 Ready */ | ||
| 52 | #define SPITZ_GPIO_CF2_CD (93) | ||
| 53 | |||
| 54 | |||
| 55 | /* Spitz/Akita Keyboard Definitions */ | ||
| 56 | |||
| 57 | #define SPITZ_KEY_STROBE_NUM (11) | ||
| 58 | #define SPITZ_KEY_SENSE_NUM (7) | ||
| 59 | #define SPITZ_GPIO_G0_STROBE_BIT 0x0f800000 | ||
| 60 | #define SPITZ_GPIO_G1_STROBE_BIT 0x00100000 | ||
| 61 | #define SPITZ_GPIO_G2_STROBE_BIT 0x01000000 | ||
| 62 | #define SPITZ_GPIO_G3_STROBE_BIT 0x00041880 | ||
| 63 | #define SPITZ_GPIO_G0_SENSE_BIT 0x00021000 | ||
| 64 | #define SPITZ_GPIO_G1_SENSE_BIT 0x000000d4 | ||
| 65 | #define SPITZ_GPIO_G2_SENSE_BIT 0x08000000 | ||
| 66 | #define SPITZ_GPIO_G3_SENSE_BIT 0x00000000 | ||
| 67 | |||
| 68 | #define SPITZ_GPIO_KEY_STROBE0 88 | ||
| 69 | #define SPITZ_GPIO_KEY_STROBE1 23 | ||
| 70 | #define SPITZ_GPIO_KEY_STROBE2 24 | ||
| 71 | #define SPITZ_GPIO_KEY_STROBE3 25 | ||
| 72 | #define SPITZ_GPIO_KEY_STROBE4 26 | ||
| 73 | #define SPITZ_GPIO_KEY_STROBE5 27 | ||
| 74 | #define SPITZ_GPIO_KEY_STROBE6 52 | ||
| 75 | #define SPITZ_GPIO_KEY_STROBE7 103 | ||
| 76 | #define SPITZ_GPIO_KEY_STROBE8 107 | ||
| 77 | #define SPITZ_GPIO_KEY_STROBE9 108 | ||
| 78 | #define SPITZ_GPIO_KEY_STROBE10 114 | ||
| 79 | |||
| 80 | #define SPITZ_GPIO_KEY_SENSE0 12 | ||
| 81 | #define SPITZ_GPIO_KEY_SENSE1 17 | ||
| 82 | #define SPITZ_GPIO_KEY_SENSE2 91 | ||
| 83 | #define SPITZ_GPIO_KEY_SENSE3 34 | ||
| 84 | #define SPITZ_GPIO_KEY_SENSE4 36 | ||
| 85 | #define SPITZ_GPIO_KEY_SENSE5 38 | ||
| 86 | #define SPITZ_GPIO_KEY_SENSE6 39 | ||
| 87 | |||
| 88 | |||
| 89 | /* Spitz Scoop Device (No. 1) GPIOs */ | ||
| 90 | /* Suspend States in comments */ | ||
| 91 | #define SPITZ_SCP_LED_GREEN SCOOP_GPCR_PA11 /* Keep */ | ||
| 92 | #define SPITZ_SCP_JK_B SCOOP_GPCR_PA12 /* Keep */ | ||
| 93 | #define SPITZ_SCP_CHRG_ON SCOOP_GPCR_PA13 /* Keep */ | ||
| 94 | #define SPITZ_SCP_MUTE_L SCOOP_GPCR_PA14 /* Low */ | ||
| 95 | #define SPITZ_SCP_MUTE_R SCOOP_GPCR_PA15 /* Low */ | ||
| 96 | #define SPITZ_SCP_CF_POWER SCOOP_GPCR_PA16 /* Keep */ | ||
| 97 | #define SPITZ_SCP_LED_ORANGE SCOOP_GPCR_PA17 /* Keep */ | ||
| 98 | #define SPITZ_SCP_JK_A SCOOP_GPCR_PA18 /* Low */ | ||
| 99 | #define SPITZ_SCP_ADC_TEMP_ON SCOOP_GPCR_PA19 /* Low */ | ||
| 100 | |||
| 101 | #define SPITZ_SCP_IO_DIR (SPITZ_SCP_LED_GREEN | SPITZ_SCP_JK_B | SPITZ_SCP_CHRG_ON | \ | ||
| 102 | SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_LED_ORANGE | \ | ||
| 103 | SPITZ_SCP_CF_POWER | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON) | ||
| 104 | #define SPITZ_SCP_IO_OUT (SPITZ_SCP_CHRG_ON | SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R) | ||
| 105 | #define SPITZ_SCP_SUS_CLR (SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON) | ||
| 106 | #define SPITZ_SCP_SUS_SET 0 | ||
| 107 | |||
| 108 | /* Spitz Scoop Device (No. 2) GPIOs */ | ||
| 109 | /* Suspend States in comments */ | ||
| 110 | #define SPITZ_SCP2_IR_ON SCOOP_GPCR_PA11 /* High */ | ||
| 111 | #define SPITZ_SCP2_AKIN_PULLUP SCOOP_GPCR_PA12 /* Keep */ | ||
| 112 | #define SPITZ_SCP2_RESERVED_1 SCOOP_GPCR_PA13 /* High */ | ||
| 113 | #define SPITZ_SCP2_RESERVED_2 SCOOP_GPCR_PA14 /* Low */ | ||
| 114 | #define SPITZ_SCP2_RESERVED_3 SCOOP_GPCR_PA15 /* Low */ | ||
| 115 | #define SPITZ_SCP2_RESERVED_4 SCOOP_GPCR_PA16 /* Low */ | ||
| 116 | #define SPITZ_SCP2_BACKLIGHT_CONT SCOOP_GPCR_PA17 /* Low */ | ||
| 117 | #define SPITZ_SCP2_BACKLIGHT_ON SCOOP_GPCR_PA18 /* Low */ | ||
| 118 | #define SPITZ_SCP2_MIC_BIAS SCOOP_GPCR_PA19 /* Low */ | ||
| 119 | |||
| 120 | #define SPITZ_SCP2_IO_DIR (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1 | \ | ||
| 121 | SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \ | ||
| 122 | SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS) | ||
| 123 | |||
| 124 | #define SPITZ_SCP2_IO_OUT (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1) | ||
| 125 | #define SPITZ_SCP2_SUS_CLR (SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \ | ||
| 126 | SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS) | ||
| 127 | #define SPITZ_SCP2_SUS_SET (SPITZ_SCP2_IR_ON | SPITZ_SCP2_RESERVED_1) | ||
| 128 | |||
| 129 | |||
| 130 | /* Spitz IRQ Definitions */ | ||
| 131 | |||
| 132 | #define SPITZ_IRQ_GPIO_KEY_INT IRQ_GPIO(SPITZ_GPIO_KEY_INT) | ||
| 133 | #define SPITZ_IRQ_GPIO_AC_IN IRQ_GPIO(SPITZ_GPIO_AC_IN) | ||
| 134 | #define SPITZ_IRQ_GPIO_AK_INT IRQ_GPIO(SPITZ_GPIO_AK_INT) | ||
| 135 | #define SPITZ_IRQ_GPIO_HP_IN IRQ_GPIO(SPITZ_GPIO_HP_IN) | ||
| 136 | #define SPITZ_IRQ_GPIO_TP_INT IRQ_GPIO(SPITZ_GPIO_TP_INT) | ||
| 137 | #define SPITZ_IRQ_GPIO_SYNC IRQ_GPIO(SPITZ_GPIO_SYNC) | ||
| 138 | #define SPITZ_IRQ_GPIO_ON_KEY IRQ_GPIO(SPITZ_GPIO_ON_KEY) | ||
| 139 | #define SPITZ_IRQ_GPIO_SWA IRQ_GPIO(SPITZ_GPIO_SWA) | ||
| 140 | #define SPITZ_IRQ_GPIO_SWB IRQ_GPIO(SPITZ_GPIO_SWB) | ||
| 141 | #define SPITZ_IRQ_GPIO_BAT_COVER IRQ_GPIO(SPITZ_GPIO_BAT_COVER) | ||
| 142 | #define SPITZ_IRQ_GPIO_FATAL_BAT IRQ_GPIO(SPITZ_GPIO_FATAL_BAT) | ||
| 143 | #define SPITZ_IRQ_GPIO_CO IRQ_GPIO(SPITZ_GPIO_CO) | ||
| 144 | #define SPITZ_IRQ_GPIO_CF_IRQ IRQ_GPIO(SPITZ_GPIO_CF_IRQ) | ||
| 145 | #define SPITZ_IRQ_GPIO_CF_CD IRQ_GPIO(SPITZ_GPIO_CF_CD) | ||
| 146 | #define SPITZ_IRQ_GPIO_CF2_IRQ IRQ_GPIO(SPITZ_GPIO_CF2_IRQ) | ||
| 147 | #define SPITZ_IRQ_GPIO_nSD_INT IRQ_GPIO(SPITZ_GPIO_nSD_INT) | ||
| 148 | #define SPITZ_IRQ_GPIO_nSD_DETECT IRQ_GPIO(SPITZ_GPIO_nSD_DETECT) | ||
| 149 | |||
| 150 | /* | ||
| 151 | * Shared data structures | ||
| 152 | */ | ||
| 153 | extern struct platform_device spitzscoop_device; | ||
| 154 | extern struct platform_device spitzscoop2_device; | ||
| 155 | extern struct platform_device spitzssp_device; | ||
| 156 | extern struct sharpsl_charger_machinfo spitz_pm_machinfo; | ||
| 157 | |||
| 158 | extern void spitz_lcd_power(int on); | ||
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 478c49b56e18..366bafbdfbb1 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
| @@ -445,12 +445,9 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
| 445 | #define HAVE_ARCH_UNMAPPED_AREA | 445 | #define HAVE_ARCH_UNMAPPED_AREA |
| 446 | 446 | ||
| 447 | /* | 447 | /* |
| 448 | * remap a physical address `phys' of size `size' with page protection `prot' | 448 | * remap a physical page `pfn' of size `size' with page protection `prot' |
| 449 | * into virtual address `from' | 449 | * into virtual address `from' |
| 450 | */ | 450 | */ |
| 451 | #define io_remap_page_range(vma,from,phys,size,prot) \ | ||
| 452 | remap_pfn_range(vma, from, (phys) >> PAGE_SHIFT, size, prot) | ||
| 453 | |||
| 454 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ | 451 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ |
| 455 | remap_pfn_range(vma, from, pfn, size, prot) | 452 | remap_pfn_range(vma, from, pfn, size, prot) |
| 456 | 453 | ||
diff --git a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h index 4a0a00da425f..f602cf572411 100644 --- a/include/asm-arm26/pgtable.h +++ b/include/asm-arm26/pgtable.h | |||
| @@ -294,12 +294,9 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) | |||
| 294 | #include <asm-generic/pgtable.h> | 294 | #include <asm-generic/pgtable.h> |
| 295 | 295 | ||
| 296 | /* | 296 | /* |
| 297 | * remap a physical address `phys' of size `size' with page protection `prot' | 297 | * remap a physical page `pfn' of size `size' with page protection `prot' |
| 298 | * into virtual address `from' | 298 | * into virtual address `from' |
| 299 | */ | 299 | */ |
| 300 | #define io_remap_page_range(vma,from,phys,size,prot) \ | ||
| 301 | remap_pfn_range(vma, from, (phys) >> PAGE_SHIFT, size, prot) | ||
| 302 | |||
| 303 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ | 300 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ |
| 304 | remap_pfn_range(vma, from, pfn, size, prot) | 301 | remap_pfn_range(vma, from, pfn, size, prot) |
| 305 | 302 | ||
diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index d0a9c2f9c13e..473fb4bb6329 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h | |||
| @@ -500,9 +500,6 @@ static inline int pte_file(pte_t pte) | |||
| 500 | #define PageSkip(page) (0) | 500 | #define PageSkip(page) (0) |
| 501 | #define kern_addr_valid(addr) (1) | 501 | #define kern_addr_valid(addr) (1) |
| 502 | 502 | ||
| 503 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 504 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 505 | |||
| 506 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 503 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 507 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 504 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
| 508 | 505 | ||
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index faff403e1061..7d0298347ee7 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
| @@ -23,7 +23,11 @@ | |||
| 23 | * and page free order so much.. | 23 | * and page free order so much.. |
| 24 | */ | 24 | */ |
| 25 | #ifdef CONFIG_SMP | 25 | #ifdef CONFIG_SMP |
| 26 | #define FREE_PTE_NR 506 | 26 | #ifdef ARCH_FREE_PTR_NR |
| 27 | #define FREE_PTR_NR ARCH_FREE_PTR_NR | ||
| 28 | #else | ||
| 29 | #define FREE_PTE_NR 506 | ||
| 30 | #endif | ||
| 27 | #define tlb_fast_mode(tlb) ((tlb)->nr == ~0U) | 31 | #define tlb_fast_mode(tlb) ((tlb)->nr == ~0U) |
| 28 | #else | 32 | #else |
| 29 | #define FREE_PTE_NR 1 | 33 | #define FREE_PTE_NR 1 |
diff --git a/include/asm-h8300/pgtable.h b/include/asm-h8300/pgtable.h index 69076eb31476..f6e296fc1297 100644 --- a/include/asm-h8300/pgtable.h +++ b/include/asm-h8300/pgtable.h | |||
| @@ -52,8 +52,6 @@ extern int is_in_rom(unsigned long); | |||
| 52 | * No page table caches to initialise | 52 | * No page table caches to initialise |
| 53 | */ | 53 | */ |
| 54 | #define pgtable_cache_init() do { } while (0) | 54 | #define pgtable_cache_init() do { } while (0) |
| 55 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 56 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 57 | 55 | ||
| 58 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 56 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 59 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 57 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index 6a1b1882285c..8c454aa58ac6 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
| @@ -130,6 +130,8 @@ extern unsigned int nmi_watchdog; | |||
| 130 | #define NMI_LOCAL_APIC 2 | 130 | #define NMI_LOCAL_APIC 2 |
| 131 | #define NMI_INVALID 3 | 131 | #define NMI_INVALID 3 |
| 132 | 132 | ||
| 133 | extern int disable_timer_pin_1; | ||
| 134 | |||
| 133 | #else /* !CONFIG_X86_LOCAL_APIC */ | 135 | #else /* !CONFIG_X86_LOCAL_APIC */ |
| 134 | static inline void lapic_shutdown(void) { } | 136 | static inline void lapic_shutdown(void) { } |
| 135 | 137 | ||
diff --git a/include/asm-i386/numa.h b/include/asm-i386/numa.h new file mode 100644 index 000000000000..96fcb157db1d --- /dev/null +++ b/include/asm-i386/numa.h | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | |||
| 2 | int pxm_to_nid(int pxm); | ||
| 3 | |||
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 47bc1ffa3d4c..d101ac414f07 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
| @@ -431,9 +431,6 @@ extern void noexec_setup(const char *str); | |||
| 431 | #define kern_addr_valid(addr) (1) | 431 | #define kern_addr_valid(addr) (1) |
| 432 | #endif /* CONFIG_FLATMEM */ | 432 | #endif /* CONFIG_FLATMEM */ |
| 433 | 433 | ||
| 434 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 435 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 436 | |||
| 437 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 434 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 438 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 435 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
| 439 | 436 | ||
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index 2461b731781e..0ec27c9e8e45 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h | |||
| @@ -60,7 +60,7 @@ static inline int node_to_first_cpu(int node) | |||
| 60 | return first_cpu(mask); | 60 | return first_cpu(mask); |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | #define pcibus_to_node(bus) mp_bus_id_to_node[(bus)->number] | 63 | #define pcibus_to_node(bus) ((long) (bus)->sysdata) |
| 64 | #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)) | 64 | #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)) |
| 65 | 65 | ||
| 66 | /* sched_domains SD_NODE_INIT for NUMAQ machines */ | 66 | /* sched_domains SD_NODE_INIT for NUMAQ machines */ |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index a7cb377745bf..fbaf90a3968c 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
| @@ -332,7 +332,7 @@ type name(type1 arg1) \ | |||
| 332 | long __res; \ | 332 | long __res; \ |
| 333 | __asm__ volatile ("int $0x80" \ | 333 | __asm__ volatile ("int $0x80" \ |
| 334 | : "=a" (__res) \ | 334 | : "=a" (__res) \ |
| 335 | : "0" (__NR_##name),"b" ((long)(arg1))); \ | 335 | : "0" (__NR_##name),"b" ((long)(arg1)) : "memory"); \ |
| 336 | __syscall_return(type,__res); \ | 336 | __syscall_return(type,__res); \ |
| 337 | } | 337 | } |
| 338 | 338 | ||
| @@ -342,7 +342,7 @@ type name(type1 arg1,type2 arg2) \ | |||
| 342 | long __res; \ | 342 | long __res; \ |
| 343 | __asm__ volatile ("int $0x80" \ | 343 | __asm__ volatile ("int $0x80" \ |
| 344 | : "=a" (__res) \ | 344 | : "=a" (__res) \ |
| 345 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \ | 345 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)) : "memory"); \ |
| 346 | __syscall_return(type,__res); \ | 346 | __syscall_return(type,__res); \ |
| 347 | } | 347 | } |
| 348 | 348 | ||
| @@ -353,7 +353,7 @@ long __res; \ | |||
| 353 | __asm__ volatile ("int $0x80" \ | 353 | __asm__ volatile ("int $0x80" \ |
| 354 | : "=a" (__res) \ | 354 | : "=a" (__res) \ |
| 355 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ | 355 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ |
| 356 | "d" ((long)(arg3))); \ | 356 | "d" ((long)(arg3)) : "memory"); \ |
| 357 | __syscall_return(type,__res); \ | 357 | __syscall_return(type,__res); \ |
| 358 | } | 358 | } |
| 359 | 359 | ||
| @@ -364,7 +364,7 @@ long __res; \ | |||
| 364 | __asm__ volatile ("int $0x80" \ | 364 | __asm__ volatile ("int $0x80" \ |
| 365 | : "=a" (__res) \ | 365 | : "=a" (__res) \ |
| 366 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ | 366 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ |
| 367 | "d" ((long)(arg3)),"S" ((long)(arg4))); \ | 367 | "d" ((long)(arg3)),"S" ((long)(arg4)) : "memory"); \ |
| 368 | __syscall_return(type,__res); \ | 368 | __syscall_return(type,__res); \ |
| 369 | } | 369 | } |
| 370 | 370 | ||
| @@ -376,7 +376,7 @@ long __res; \ | |||
| 376 | __asm__ volatile ("int $0x80" \ | 376 | __asm__ volatile ("int $0x80" \ |
| 377 | : "=a" (__res) \ | 377 | : "=a" (__res) \ |
| 378 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ | 378 | : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ |
| 379 | "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \ | 379 | "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)) : "memory"); \ |
| 380 | __syscall_return(type,__res); \ | 380 | __syscall_return(type,__res); \ |
| 381 | } | 381 | } |
| 382 | 382 | ||
| @@ -389,7 +389,7 @@ __asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; int $0x80 ; p | |||
| 389 | : "=a" (__res) \ | 389 | : "=a" (__res) \ |
| 390 | : "i" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ | 390 | : "i" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ |
| 391 | "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \ | 391 | "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \ |
| 392 | "0" ((long)(arg6))); \ | 392 | "0" ((long)(arg6)) : "memory"); \ |
| 393 | __syscall_return(type,__res); \ | 393 | __syscall_return(type,__res); \ |
| 394 | } | 394 | } |
| 395 | 395 | ||
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index 2e34c06e6777..3339c7b55a6f 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h | |||
| @@ -443,10 +443,6 @@ extern void paging_init (void); | |||
| 443 | #define pte_to_pgoff(pte) ((pte_val(pte) << 1) >> 3) | 443 | #define pte_to_pgoff(pte) ((pte_val(pte) << 1) >> 3) |
| 444 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 2) | _PAGE_FILE }) | 444 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 2) | _PAGE_FILE }) |
| 445 | 445 | ||
| 446 | /* XXX is this right? */ | ||
| 447 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 448 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 449 | |||
| 450 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 446 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 451 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 447 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
| 452 | 448 | ||
diff --git a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h index da805e970844..388e5ee9fa27 100644 --- a/include/asm-m32r/pgtable.h +++ b/include/asm-m32r/pgtable.h | |||
| @@ -378,9 +378,6 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep) | |||
| 378 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ | 378 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ |
| 379 | #define kern_addr_valid(addr) (1) | 379 | #define kern_addr_valid(addr) (1) |
| 380 | 380 | ||
| 381 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 382 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 383 | |||
| 384 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 381 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 385 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 382 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
| 386 | 383 | ||
diff --git a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h index 0c87fc84f7a4..add129e93fd7 100644 --- a/include/asm-m68k/pgtable.h +++ b/include/asm-m68k/pgtable.h | |||
| @@ -141,9 +141,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, | |||
| 141 | 141 | ||
| 142 | #define kern_addr_valid(addr) (1) | 142 | #define kern_addr_valid(addr) (1) |
| 143 | 143 | ||
| 144 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 145 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 146 | |||
| 147 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 144 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 148 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 145 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
| 149 | 146 | ||
diff --git a/include/asm-m68knommu/bitops.h b/include/asm-m68knommu/bitops.h index f95e32b40425..c42f88a9b9f9 100644 --- a/include/asm-m68knommu/bitops.h +++ b/include/asm-m68knommu/bitops.h | |||
| @@ -259,7 +259,7 @@ static __inline__ int __test_bit(int nr, const volatile unsigned long * addr) | |||
| 259 | #define find_first_bit(addr, size) \ | 259 | #define find_first_bit(addr, size) \ |
| 260 | find_next_bit((addr), (size), 0) | 260 | find_next_bit((addr), (size), 0) |
| 261 | 261 | ||
| 262 | static __inline__ int find_next_zero_bit (void * addr, int size, int offset) | 262 | static __inline__ int find_next_zero_bit (const void * addr, int size, int offset) |
| 263 | { | 263 | { |
| 264 | unsigned long *p = ((unsigned long *) addr) + (offset >> 5); | 264 | unsigned long *p = ((unsigned long *) addr) + (offset >> 5); |
| 265 | unsigned long result = offset & ~31UL; | 265 | unsigned long result = offset & ~31UL; |
diff --git a/include/asm-m68knommu/cacheflush.h b/include/asm-m68knommu/cacheflush.h index aa7a2ffa41af..026bbc9565b4 100644 --- a/include/asm-m68knommu/cacheflush.h +++ b/include/asm-m68knommu/cacheflush.h | |||
| @@ -2,23 +2,23 @@ | |||
| 2 | #define _M68KNOMMU_CACHEFLUSH_H | 2 | #define _M68KNOMMU_CACHEFLUSH_H |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * (C) Copyright 2000-2002, Greg Ungerer <gerg@snapgear.com> | 5 | * (C) Copyright 2000-2004, Greg Ungerer <gerg@snapgear.com> |
| 6 | */ | 6 | */ |
| 7 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
| 8 | 8 | ||
| 9 | #define flush_cache_all() __flush_cache_all() | 9 | #define flush_cache_all() __flush_cache_all() |
| 10 | #define flush_cache_mm(mm) do { } while (0) | 10 | #define flush_cache_mm(mm) do { } while (0) |
| 11 | #define flush_cache_range(vma, start, end) do { } while (0) | 11 | #define flush_cache_range(vma, start, end) __flush_cache_all() |
| 12 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 12 | #define flush_cache_page(vma, vmaddr) do { } while (0) |
| 13 | #define flush_dcache_range(start,len) do { } while (0) | 13 | #define flush_dcache_range(start,len) __flush_cache_all() |
| 14 | #define flush_dcache_page(page) do { } while (0) | 14 | #define flush_dcache_page(page) do { } while (0) |
| 15 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | 15 | #define flush_dcache_mmap_lock(mapping) do { } while (0) |
| 16 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 16 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
| 17 | #define flush_icache_range(start,len) __flush_cache_all() | 17 | #define flush_icache_range(start,len) __flush_cache_all() |
| 18 | #define flush_icache_page(vma,pg) do { } while (0) | 18 | #define flush_icache_page(vma,pg) do { } while (0) |
| 19 | #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) | 19 | #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) |
| 20 | #define flush_cache_vmap(start, end) flush_cache_all() | 20 | #define flush_cache_vmap(start, end) do { } while (0) |
| 21 | #define flush_cache_vunmap(start, end) flush_cache_all() | 21 | #define flush_cache_vunmap(start, end) do { } while (0) |
| 22 | 22 | ||
| 23 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | 23 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ |
| 24 | memcpy(dst, src, len) | 24 | memcpy(dst, src, len) |
| @@ -50,22 +50,23 @@ extern inline void __flush_cache_all(void) | |||
| 50 | "movec %%d0,%%CACR\n\t" | 50 | "movec %%d0,%%CACR\n\t" |
| 51 | : : : "d0", "a0" ); | 51 | : : : "d0", "a0" ); |
| 52 | #endif /* CONFIG_M5407 */ | 52 | #endif /* CONFIG_M5407 */ |
| 53 | #ifdef CONFIG_M5272 | 53 | #if defined(CONFIG_M527x) || defined(CONFIG_M528x) |
| 54 | __asm__ __volatile__ ( | 54 | __asm__ __volatile__ ( |
| 55 | "movel #0x01000000, %%d0\n\t" | 55 | "movel #0x81400100, %%d0\n\t" |
| 56 | "movec %%d0, %%CACR\n\t" | ||
| 57 | "nop\n\t" | ||
| 58 | "movel #0x80000100, %%d0\n\t" | ||
| 59 | "movec %%d0, %%CACR\n\t" | 56 | "movec %%d0, %%CACR\n\t" |
| 60 | "nop\n\t" | 57 | "nop\n\t" |
| 61 | : : : "d0" ); | 58 | : : : "d0" ); |
| 62 | #endif /* CONFIG_M5272 */ | 59 | #endif /* CONFIG_M527x || CONFIG_M528x */ |
| 63 | #if 0 /* CONFIG_M5249 */ | 60 | #ifdef CONFIG_M5272 |
| 64 | __asm__ __volatile__ ( | 61 | __asm__ __volatile__ ( |
| 65 | "movel #0x01000000, %%d0\n\t" | 62 | "movel #0x01000000, %%d0\n\t" |
| 66 | "movec %%d0, %%CACR\n\t" | 63 | "movec %%d0, %%CACR\n\t" |
| 67 | "nop\n\t" | 64 | "nop\n\t" |
| 68 | "movel #0xa0000200, %%d0\n\t" | 65 | : : : "d0" ); |
| 66 | #endif /* CONFIG_M5272 */ | ||
| 67 | #if CONFIG_M5249 | ||
| 68 | __asm__ __volatile__ ( | ||
| 69 | "movel #0xa1000200, %%d0\n\t" | ||
| 69 | "movec %%d0, %%CACR\n\t" | 70 | "movec %%d0, %%CACR\n\t" |
| 70 | "nop\n\t" | 71 | "nop\n\t" |
| 71 | : : : "d0" ); | 72 | : : : "d0" ); |
diff --git a/include/asm-m68knommu/checksum.h b/include/asm-m68knommu/checksum.h index 92cf102c2534..294ec7583ac9 100644 --- a/include/asm-m68knommu/checksum.h +++ b/include/asm-m68knommu/checksum.h | |||
| @@ -25,7 +25,8 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) | |||
| 25 | * better 64-bit) boundary | 25 | * better 64-bit) boundary |
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | unsigned int csum_partial_copy(const char *src, char *dst, int len, int sum); | 28 | unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst, |
| 29 | int len, int sum); | ||
| 29 | 30 | ||
| 30 | 31 | ||
| 31 | /* | 32 | /* |
| @@ -35,8 +36,8 @@ unsigned int csum_partial_copy(const char *src, char *dst, int len, int sum); | |||
| 35 | * better 64-bit) boundary | 36 | * better 64-bit) boundary |
| 36 | */ | 37 | */ |
| 37 | 38 | ||
| 38 | extern unsigned int csum_partial_copy_from_user(const char *src, char *dst, | 39 | extern unsigned int csum_partial_copy_from_user(const unsigned char *src, |
| 39 | int len, int sum, int *csum_err); | 40 | unsigned char *dst, int len, int sum, int *csum_err); |
| 40 | 41 | ||
| 41 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ | 42 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ |
| 42 | csum_partial_copy((src), (dst), (len), (sum)) | 43 | csum_partial_copy((src), (dst), (len), (sum)) |
diff --git a/include/asm-m68knommu/m527xsim.h b/include/asm-m68knommu/m527xsim.h index d280d013da03..e7878d0f7d7a 100644 --- a/include/asm-m68knommu/m527xsim.h +++ b/include/asm-m68knommu/m527xsim.h | |||
| @@ -37,13 +37,14 @@ | |||
| 37 | /* | 37 | /* |
| 38 | * SDRAM configuration registers. | 38 | * SDRAM configuration registers. |
| 39 | */ | 39 | */ |
| 40 | #ifdef CONFIG_M5271EVB | 40 | #ifdef CONFIG_M5271 |
| 41 | #define MCFSIM_DCR 0x40 /* SDRAM control */ | 41 | #define MCFSIM_DCR 0x40 /* SDRAM control */ |
| 42 | #define MCFSIM_DACR0 0x48 /* SDRAM base address 0 */ | 42 | #define MCFSIM_DACR0 0x48 /* SDRAM base address 0 */ |
| 43 | #define MCFSIM_DMR0 0x4c /* SDRAM address mask 0 */ | 43 | #define MCFSIM_DMR0 0x4c /* SDRAM address mask 0 */ |
| 44 | #define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */ | 44 | #define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */ |
| 45 | #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ | 45 | #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ |
| 46 | #else | 46 | #endif |
| 47 | #ifdef CONFIG_M5275 | ||
| 47 | #define MCFSIM_DMR 0x40 /* SDRAM mode */ | 48 | #define MCFSIM_DMR 0x40 /* SDRAM mode */ |
| 48 | #define MCFSIM_DCR 0x44 /* SDRAM control */ | 49 | #define MCFSIM_DCR 0x44 /* SDRAM control */ |
| 49 | #define MCFSIM_DCFG1 0x48 /* SDRAM configuration 1 */ | 50 | #define MCFSIM_DCFG1 0x48 /* SDRAM configuration 1 */ |
| @@ -54,5 +55,21 @@ | |||
| 54 | #define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */ | 55 | #define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */ |
| 55 | #endif | 56 | #endif |
| 56 | 57 | ||
| 58 | /* | ||
| 59 | * GPIO pins setups to enable the UARTs. | ||
| 60 | */ | ||
| 61 | #ifdef CONFIG_M5271 | ||
| 62 | #define MCF_GPIO_PAR_UART 0x100048 /* PAR UART address */ | ||
| 63 | #define UART0_ENABLE_MASK 0x000f | ||
| 64 | #define UART1_ENABLE_MASK 0x0ff0 | ||
| 65 | #define UART2_ENABLE_MASK 0x3000 | ||
| 66 | #endif | ||
| 67 | #ifdef CONFIG_M5275 | ||
| 68 | #define MCF_GPIO_PAR_UART 0x10007c /* PAR UART address */ | ||
| 69 | #define UART0_ENABLE_MASK 0x000f | ||
| 70 | #define UART1_ENABLE_MASK 0x00f0 | ||
| 71 | #define UART2_ENABLE_MASK 0x3f00 | ||
| 72 | #endif | ||
| 73 | |||
| 57 | /****************************************************************************/ | 74 | /****************************************************************************/ |
| 58 | #endif /* m527xsim_h */ | 75 | #endif /* m527xsim_h */ |
diff --git a/include/asm-m68knommu/m528xsim.h b/include/asm-m68knommu/m528xsim.h index 371993a206ac..610774a17f70 100644 --- a/include/asm-m68knommu/m528xsim.h +++ b/include/asm-m68knommu/m528xsim.h | |||
| @@ -41,5 +41,117 @@ | |||
| 41 | #define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */ | 41 | #define MCFSIM_DACR1 0x50 /* SDRAM base address 1 */ |
| 42 | #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ | 42 | #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ |
| 43 | 43 | ||
| 44 | /* | ||
| 45 | * Derek Cheung - 6 Feb 2005 | ||
| 46 | * add I2C and QSPI register definition using Freescale's MCF5282 | ||
| 47 | */ | ||
| 48 | /* set Port AS pin for I2C or UART */ | ||
| 49 | #define MCF5282_GPIO_PASPAR (volatile u16 *) (MCF_IPSBAR + 0x00100056) | ||
| 50 | |||
| 51 | /* Interrupt Mask Register Register Low */ | ||
| 52 | #define MCF5282_INTC0_IMRL (volatile u32 *) (MCF_IPSBAR + 0x0C0C) | ||
| 53 | /* Interrupt Control Register 7 */ | ||
| 54 | #define MCF5282_INTC0_ICR17 (volatile u8 *) (MCF_IPSBAR + 0x0C51) | ||
| 55 | |||
| 56 | |||
| 57 | |||
| 58 | /********************************************************************* | ||
| 59 | * | ||
| 60 | * Inter-IC (I2C) Module | ||
| 61 | * | ||
| 62 | *********************************************************************/ | ||
| 63 | /* Read/Write access macros for general use */ | ||
| 64 | #define MCF5282_I2C_I2ADR (volatile u8 *) (MCF_IPSBAR + 0x0300) // Address | ||
| 65 | #define MCF5282_I2C_I2FDR (volatile u8 *) (MCF_IPSBAR + 0x0304) // Freq Divider | ||
| 66 | #define MCF5282_I2C_I2CR (volatile u8 *) (MCF_IPSBAR + 0x0308) // Control | ||
| 67 | #define MCF5282_I2C_I2SR (volatile u8 *) (MCF_IPSBAR + 0x030C) // Status | ||
| 68 | #define MCF5282_I2C_I2DR (volatile u8 *) (MCF_IPSBAR + 0x0310) // Data I/O | ||
| 69 | |||
| 70 | /* Bit level definitions and macros */ | ||
| 71 | #define MCF5282_I2C_I2ADR_ADDR(x) (((x)&0x7F)<<0x01) | ||
| 72 | |||
| 73 | #define MCF5282_I2C_I2FDR_IC(x) (((x)&0x3F)) | ||
| 74 | |||
| 75 | #define MCF5282_I2C_I2CR_IEN (0x80) // I2C enable | ||
| 76 | #define MCF5282_I2C_I2CR_IIEN (0x40) // interrupt enable | ||
| 77 | #define MCF5282_I2C_I2CR_MSTA (0x20) // master/slave mode | ||
| 78 | #define MCF5282_I2C_I2CR_MTX (0x10) // transmit/receive mode | ||
| 79 | #define MCF5282_I2C_I2CR_TXAK (0x08) // transmit acknowledge enable | ||
| 80 | #define MCF5282_I2C_I2CR_RSTA (0x04) // repeat start | ||
| 81 | |||
| 82 | #define MCF5282_I2C_I2SR_ICF (0x80) // data transfer bit | ||
| 83 | #define MCF5282_I2C_I2SR_IAAS (0x40) // I2C addressed as a slave | ||
| 84 | #define MCF5282_I2C_I2SR_IBB (0x20) // I2C bus busy | ||
| 85 | #define MCF5282_I2C_I2SR_IAL (0x10) // aribitration lost | ||
| 86 | #define MCF5282_I2C_I2SR_SRW (0x04) // slave read/write | ||
| 87 | #define MCF5282_I2C_I2SR_IIF (0x02) // I2C interrupt | ||
| 88 | #define MCF5282_I2C_I2SR_RXAK (0x01) // received acknowledge | ||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | /********************************************************************* | ||
| 93 | * | ||
| 94 | * Queued Serial Peripheral Interface (QSPI) Module | ||
| 95 | * | ||
| 96 | *********************************************************************/ | ||
| 97 | /* Derek - 21 Feb 2005 */ | ||
| 98 | /* change to the format used in I2C */ | ||
| 99 | /* Read/Write access macros for general use */ | ||
| 100 | #define MCF5282_QSPI_QMR MCF_IPSBAR + 0x0340 | ||
| 101 | #define MCF5282_QSPI_QDLYR MCF_IPSBAR + 0x0344 | ||
| 102 | #define MCF5282_QSPI_QWR MCF_IPSBAR + 0x0348 | ||
| 103 | #define MCF5282_QSPI_QIR MCF_IPSBAR + 0x034C | ||
| 104 | #define MCF5282_QSPI_QAR MCF_IPSBAR + 0x0350 | ||
| 105 | #define MCF5282_QSPI_QDR MCF_IPSBAR + 0x0354 | ||
| 106 | #define MCF5282_QSPI_QCR MCF_IPSBAR + 0x0354 | ||
| 107 | |||
| 108 | /* Bit level definitions and macros */ | ||
| 109 | #define MCF5282_QSPI_QMR_MSTR (0x8000) | ||
| 110 | #define MCF5282_QSPI_QMR_DOHIE (0x4000) | ||
| 111 | #define MCF5282_QSPI_QMR_BITS_16 (0x0000) | ||
| 112 | #define MCF5282_QSPI_QMR_BITS_8 (0x2000) | ||
| 113 | #define MCF5282_QSPI_QMR_BITS_9 (0x2400) | ||
| 114 | #define MCF5282_QSPI_QMR_BITS_10 (0x2800) | ||
| 115 | #define MCF5282_QSPI_QMR_BITS_11 (0x2C00) | ||
| 116 | #define MCF5282_QSPI_QMR_BITS_12 (0x3000) | ||
| 117 | #define MCF5282_QSPI_QMR_BITS_13 (0x3400) | ||
| 118 | #define MCF5282_QSPI_QMR_BITS_14 (0x3800) | ||
| 119 | #define MCF5282_QSPI_QMR_BITS_15 (0x3C00) | ||
| 120 | #define MCF5282_QSPI_QMR_CPOL (0x0200) | ||
| 121 | #define MCF5282_QSPI_QMR_CPHA (0x0100) | ||
| 122 | #define MCF5282_QSPI_QMR_BAUD(x) (((x)&0x00FF)) | ||
| 123 | |||
| 124 | #define MCF5282_QSPI_QDLYR_SPE (0x80) | ||
| 125 | #define MCF5282_QSPI_QDLYR_QCD(x) (((x)&0x007F)<<8) | ||
| 126 | #define MCF5282_QSPI_QDLYR_DTL(x) (((x)&0x00FF)) | ||
| 127 | |||
| 128 | #define MCF5282_QSPI_QWR_HALT (0x8000) | ||
| 129 | #define MCF5282_QSPI_QWR_WREN (0x4000) | ||
| 130 | #define MCF5282_QSPI_QWR_WRTO (0x2000) | ||
| 131 | #define MCF5282_QSPI_QWR_CSIV (0x1000) | ||
| 132 | #define MCF5282_QSPI_QWR_ENDQP(x) (((x)&0x000F)<<8) | ||
| 133 | #define MCF5282_QSPI_QWR_CPTQP(x) (((x)&0x000F)<<4) | ||
| 134 | #define MCF5282_QSPI_QWR_NEWQP(x) (((x)&0x000F)) | ||
| 135 | |||
| 136 | #define MCF5282_QSPI_QIR_WCEFB (0x8000) | ||
| 137 | #define MCF5282_QSPI_QIR_ABRTB (0x4000) | ||
| 138 | #define MCF5282_QSPI_QIR_ABRTL (0x1000) | ||
| 139 | #define MCF5282_QSPI_QIR_WCEFE (0x0800) | ||
| 140 | #define MCF5282_QSPI_QIR_ABRTE (0x0400) | ||
| 141 | #define MCF5282_QSPI_QIR_SPIFE (0x0100) | ||
| 142 | #define MCF5282_QSPI_QIR_WCEF (0x0008) | ||
| 143 | #define MCF5282_QSPI_QIR_ABRT (0x0004) | ||
| 144 | #define MCF5282_QSPI_QIR_SPIF (0x0001) | ||
| 145 | |||
| 146 | #define MCF5282_QSPI_QAR_ADDR(x) (((x)&0x003F)) | ||
| 147 | |||
| 148 | #define MCF5282_QSPI_QDR_COMMAND(x) (((x)&0xFF00)) | ||
| 149 | #define MCF5282_QSPI_QCR_DATA(x) (((x)&0x00FF)<<8) | ||
| 150 | #define MCF5282_QSPI_QCR_CONT (0x8000) | ||
| 151 | #define MCF5282_QSPI_QCR_BITSE (0x4000) | ||
| 152 | #define MCF5282_QSPI_QCR_DT (0x2000) | ||
| 153 | #define MCF5282_QSPI_QCR_DSCK (0x1000) | ||
| 154 | #define MCF5282_QSPI_QCR_CS (((x)&0x000F)<<8) | ||
| 155 | |||
| 44 | /****************************************************************************/ | 156 | /****************************************************************************/ |
| 45 | #endif /* m528xsim_h */ | 157 | #endif /* m528xsim_h */ |
diff --git a/include/asm-m68knommu/mcfcache.h b/include/asm-m68knommu/mcfcache.h index bdd8c53ef34c..b17cd920977f 100644 --- a/include/asm-m68knommu/mcfcache.h +++ b/include/asm-m68knommu/mcfcache.h | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | .endm | 33 | .endm |
| 34 | #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ | 34 | #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ |
| 35 | 35 | ||
| 36 | #if defined(CONFIG_M527x) | 36 | #if defined(CONFIG_M523x) || defined(CONFIG_M527x) |
| 37 | /* | 37 | /* |
| 38 | * New version 2 cores have a configurable split cache arrangement. | 38 | * New version 2 cores have a configurable split cache arrangement. |
| 39 | * For now I am just enabling instruction cache - but ultimately I | 39 | * For now I am just enabling instruction cache - but ultimately I |
| @@ -51,23 +51,20 @@ | |||
| 51 | movec %d0,%CACR /* enable cache */ | 51 | movec %d0,%CACR /* enable cache */ |
| 52 | nop | 52 | nop |
| 53 | .endm | 53 | .endm |
| 54 | #endif /* CONFIG_M527x */ | 54 | #endif /* CONFIG_M523x || CONFIG_M527x */ |
| 55 | 55 | ||
| 56 | #if defined(CONFIG_M528x) | 56 | #if defined(CONFIG_M528x) |
| 57 | /* | ||
| 58 | * Cache is totally broken on early 5282 silicon. So far now we | ||
| 59 | * disable its cache all together. | ||
| 60 | */ | ||
| 61 | .macro CACHE_ENABLE | 57 | .macro CACHE_ENABLE |
| 62 | movel #0x01000000,%d0 | ||
| 63 | movec %d0,%CACR /* invalidate cache */ | ||
| 64 | nop | 58 | nop |
| 65 | movel #0x0000c000,%d0 /* set SDRAM cached only */ | 59 | movel #0x01000000, %d0 |
| 66 | movec %d0,%ACR0 | 60 | movec %d0, %CACR /* Invalidate cache */ |
| 67 | movel #0x00000000,%d0 /* no other regions cached */ | 61 | nop |
| 68 | movec %d0,%ACR1 | 62 | movel #0x0000c020, %d0 /* Set SDRAM cached only */ |
| 69 | movel #0x00000000,%d0 /* configure cache */ | 63 | movec %d0, %ACR0 |
| 70 | movec %d0,%CACR /* enable cache */ | 64 | movel #0xff00c000, %d0 /* Cache Flash also */ |
| 65 | movec %d0, %ACR1 | ||
| 66 | movel #0x80000200, %d0 /* Setup cache mask */ | ||
| 67 | movec %d0, %CACR /* Enable cache */ | ||
| 71 | nop | 68 | nop |
| 72 | .endm | 69 | .endm |
| 73 | #endif /* CONFIG_M528x */ | 70 | #endif /* CONFIG_M528x */ |
diff --git a/include/asm-m68knommu/mcfdma.h b/include/asm-m68knommu/mcfdma.h index 350c6090b5c1..b93f8ba8a248 100644 --- a/include/asm-m68knommu/mcfdma.h +++ b/include/asm-m68knommu/mcfdma.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define MCFDMA_BASE1 0x240 /* Base address of DMA 1 */ | 21 | #define MCFDMA_BASE1 0x240 /* Base address of DMA 1 */ |
| 22 | #elif defined(CONFIG_M5272) | 22 | #elif defined(CONFIG_M5272) |
| 23 | #define MCFDMA_BASE0 0x0e0 /* Base address of DMA 0 */ | 23 | #define MCFDMA_BASE0 0x0e0 /* Base address of DMA 0 */ |
| 24 | #elif defined(CONFIG_M527x) || defined(CONFIG_M528x) | 24 | #elif defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) |
| 25 | /* These are relative to the IPSBAR, not MBAR */ | 25 | /* These are relative to the IPSBAR, not MBAR */ |
| 26 | #define MCFDMA_BASE0 0x100 /* Base address of DMA 0 */ | 26 | #define MCFDMA_BASE0 0x100 /* Base address of DMA 0 */ |
| 27 | #define MCFDMA_BASE1 0x140 /* Base address of DMA 1 */ | 27 | #define MCFDMA_BASE1 0x140 /* Base address of DMA 1 */ |
diff --git a/include/asm-m68knommu/pgtable.h b/include/asm-m68knommu/pgtable.h index e2a69fffa370..00893055e6c2 100644 --- a/include/asm-m68knommu/pgtable.h +++ b/include/asm-m68knommu/pgtable.h | |||
| @@ -56,8 +56,6 @@ extern int is_in_rom(unsigned long); | |||
| 56 | * No page table caches to initialise. | 56 | * No page table caches to initialise. |
| 57 | */ | 57 | */ |
| 58 | #define pgtable_cache_init() do { } while (0) | 58 | #define pgtable_cache_init() do { } while (0) |
| 59 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 60 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 61 | 59 | ||
| 62 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 60 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 63 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 61 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
diff --git a/include/asm-m68knommu/scatterlist.h b/include/asm-m68knommu/scatterlist.h index 230b8d56d17f..12309b181d29 100644 --- a/include/asm-m68knommu/scatterlist.h +++ b/include/asm-m68knommu/scatterlist.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _M68KNOMMU_SCATTERLIST_H | 1 | #ifndef _M68KNOMMU_SCATTERLIST_H |
| 2 | #define _M68KNOMMU_SCATTERLIST_H | 2 | #define _M68KNOMMU_SCATTERLIST_H |
| 3 | 3 | ||
| 4 | #include <linux/mm.h> | ||
| 5 | |||
| 4 | struct scatterlist { | 6 | struct scatterlist { |
| 5 | struct page *page; | 7 | struct page *page; |
| 6 | unsigned int offset; | 8 | unsigned int offset; |
| @@ -8,6 +10,10 @@ struct scatterlist { | |||
| 8 | unsigned int length; | 10 | unsigned int length; |
| 9 | }; | 11 | }; |
| 10 | 12 | ||
| 13 | #define sg_address(sg) (page_address((sg)->page) + (sg)->offset | ||
| 14 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
| 15 | #define sg_dma_len(sg) ((sg)->length) | ||
| 16 | |||
| 11 | #define ISA_DMA_THRESHOLD (0xffffffff) | 17 | #define ISA_DMA_THRESHOLD (0xffffffff) |
| 12 | 18 | ||
| 13 | #endif /* !(_M68KNOMMU_SCATTERLIST_H) */ | 19 | #endif /* !(_M68KNOMMU_SCATTERLIST_H) */ |
diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h index c341b66c147b..53cbbad0f130 100644 --- a/include/asm-m68knommu/system.h +++ b/include/asm-m68knommu/system.h | |||
| @@ -57,9 +57,18 @@ asmlinkage void resume(void); | |||
| 57 | : "cc", "%d0", "memory") | 57 | : "cc", "%d0", "memory") |
| 58 | #define local_irq_disable() __asm__ __volatile__ ( \ | 58 | #define local_irq_disable() __asm__ __volatile__ ( \ |
| 59 | "move %/sr,%%d0\n\t" \ | 59 | "move %/sr,%%d0\n\t" \ |
| 60 | "ori.l #0x0700,%%d0\n\t" \ | 60 | "ori.l #0x0700,%%d0\n\t" \ |
| 61 | "move %%d0,%/sr\n" \ | 61 | "move %%d0,%/sr\n" \ |
| 62 | : /* no inputs */ \ | 62 | : /* no outputs */ \ |
| 63 | : \ | ||
| 64 | : "cc", "%d0", "memory") | ||
| 65 | /* For spinlocks etc */ | ||
| 66 | #define local_irq_save(x) __asm__ __volatile__ ( \ | ||
| 67 | "movew %%sr,%0\n\t" \ | ||
| 68 | "movew #0x0700,%%d0\n\t" \ | ||
| 69 | "or.l %0,%%d0\n\t" \ | ||
| 70 | "movew %%d0,%/sr" \ | ||
| 71 | : "=d" (x) \ | ||
| 63 | : \ | 72 | : \ |
| 64 | : "cc", "%d0", "memory") | 73 | : "cc", "%d0", "memory") |
| 65 | #else | 74 | #else |
| @@ -75,7 +84,9 @@ asmlinkage void resume(void); | |||
| 75 | #define local_irq_restore(x) asm volatile ("movew %0,%%sr": :"d" (x) : "memory") | 84 | #define local_irq_restore(x) asm volatile ("movew %0,%%sr": :"d" (x) : "memory") |
| 76 | 85 | ||
| 77 | /* For spinlocks etc */ | 86 | /* For spinlocks etc */ |
| 87 | #ifndef local_irq_save | ||
| 78 | #define local_irq_save(x) do { local_save_flags(x); local_irq_disable(); } while (0) | 88 | #define local_irq_save(x) do { local_save_flags(x); local_irq_disable(); } while (0) |
| 89 | #endif | ||
| 79 | 90 | ||
| 80 | #define irqs_disabled() \ | 91 | #define irqs_disabled() \ |
| 81 | ({ \ | 92 | ({ \ |
| @@ -234,9 +245,9 @@ cmpxchg(volatile int *p, int old, int new) | |||
| 234 | #ifdef CONFIG_COLDFIRE | 245 | #ifdef CONFIG_COLDFIRE |
| 235 | #if defined(CONFIG_M5272) && defined(CONFIG_NETtel) | 246 | #if defined(CONFIG_M5272) && defined(CONFIG_NETtel) |
| 236 | /* | 247 | /* |
| 237 | * Need to account for broken early mask of 5272 silicon. So don't | 248 | * Need to account for broken early mask of 5272 silicon. So don't |
| 238 | * jump through the original start address. Jump strait into the | 249 | * jump through the original start address. Jump strait into the |
| 239 | * known start of the FLASH code. | 250 | * known start of the FLASH code. |
| 240 | */ | 251 | */ |
| 241 | #define HARD_RESET_NOW() ({ \ | 252 | #define HARD_RESET_NOW() ({ \ |
| 242 | asm(" \ | 253 | asm(" \ |
| @@ -244,7 +255,9 @@ cmpxchg(volatile int *p, int old, int new) | |||
| 244 | jmp 0xf0000400; \ | 255 | jmp 0xf0000400; \ |
| 245 | "); \ | 256 | "); \ |
| 246 | }) | 257 | }) |
| 247 | #elif defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || defined(CONFIG_CLEOPATRA) | 258 | #elif defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \ |
| 259 | defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \ | ||
| 260 | defined(CONFIG_CLEOPATRA) | ||
| 248 | #define HARD_RESET_NOW() ({ \ | 261 | #define HARD_RESET_NOW() ({ \ |
| 249 | asm(" \ | 262 | asm(" \ |
| 250 | movew #0x2700, %sr; \ | 263 | movew #0x2700, %sr; \ |
| @@ -257,6 +270,26 @@ cmpxchg(volatile int *p, int old, int new) | |||
| 257 | jmp (%a0); \ | 270 | jmp (%a0); \ |
| 258 | "); \ | 271 | "); \ |
| 259 | }) | 272 | }) |
| 273 | #elif defined(CONFIG_M5272) | ||
| 274 | /* | ||
| 275 | * Retrieve the boot address in flash using CSBR0 and CSOR0 | ||
| 276 | * find the reset vector at flash_address + 4 (e.g. 0x400) | ||
| 277 | * remap it in the flash's current location (e.g. 0xf0000400) | ||
| 278 | * and jump there. | ||
| 279 | */ | ||
| 280 | #define HARD_RESET_NOW() ({ \ | ||
| 281 | asm(" \ | ||
| 282 | movew #0x2700, %%sr; \ | ||
| 283 | move.l %0+0x40,%%d0; \ | ||
| 284 | and.l %0+0x44,%%d0; \ | ||
| 285 | andi.l #0xfffff000,%%d0; \ | ||
| 286 | mov.l %%d0,%%a0; \ | ||
| 287 | or.l 4(%%a0),%%d0; \ | ||
| 288 | mov.l %%d0,%%a0; \ | ||
| 289 | jmp (%%a0);" \ | ||
| 290 | : /* No output */ \ | ||
| 291 | : "o" (*(char *)MCF_MBAR) ); \ | ||
| 292 | }) | ||
| 260 | #elif defined(CONFIG_M528x) | 293 | #elif defined(CONFIG_M528x) |
| 261 | /* | 294 | /* |
| 262 | * The MCF528x has a bit (SOFTRST) in memory (Reset Control Register RCR), | 295 | * The MCF528x has a bit (SOFTRST) in memory (Reset Control Register RCR), |
| @@ -270,6 +303,15 @@ cmpxchg(volatile int *p, int old, int new) | |||
| 270 | while(1) \ | 303 | while(1) \ |
| 271 | *reset |= (0x01 << 7);\ | 304 | *reset |= (0x01 << 7);\ |
| 272 | }) | 305 | }) |
| 306 | #elif defined(CONFIG_M523x) | ||
| 307 | #define HARD_RESET_NOW() ({ \ | ||
| 308 | asm(" \ | ||
| 309 | movew #0x2700, %sr; \ | ||
| 310 | movel #0x01000000, %sp; \ | ||
| 311 | moveal #0x40110000, %a0; \ | ||
| 312 | moveb #0x80, (%a0); \ | ||
| 313 | "); \ | ||
| 314 | }) | ||
| 273 | #else | 315 | #else |
| 274 | #define HARD_RESET_NOW() ({ \ | 316 | #define HARD_RESET_NOW() ({ \ |
| 275 | asm(" \ | 317 | asm(" \ |
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index dbe13da0bdad..cbd1672c94cb 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
| @@ -358,16 +358,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, | |||
| 358 | extern phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size); | 358 | extern phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size); |
| 359 | extern int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t prot); | 359 | extern int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t prot); |
| 360 | 360 | ||
| 361 | static inline int io_remap_page_range(struct vm_area_struct *vma, | ||
| 362 | unsigned long vaddr, | ||
| 363 | unsigned long paddr, | ||
| 364 | unsigned long size, | ||
| 365 | pgprot_t prot) | ||
| 366 | { | ||
| 367 | phys_t phys_addr_high = fixup_bigphys_addr(paddr, size); | ||
| 368 | return remap_pfn_range(vma, vaddr, phys_addr_high >> PAGE_SHIFT, size, prot); | ||
| 369 | } | ||
| 370 | |||
| 371 | static inline int io_remap_pfn_range(struct vm_area_struct *vma, | 361 | static inline int io_remap_pfn_range(struct vm_area_struct *vma, |
| 372 | unsigned long vaddr, | 362 | unsigned long vaddr, |
| 373 | unsigned long pfn, | 363 | unsigned long pfn, |
| @@ -378,8 +368,6 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma, | |||
| 378 | return remap_pfn_range(vma, vaddr, pfn, size, prot); | 368 | return remap_pfn_range(vma, vaddr, pfn, size, prot); |
| 379 | } | 369 | } |
| 380 | #else | 370 | #else |
| 381 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 382 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 383 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 371 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 384 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 372 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
| 385 | #endif | 373 | #endif |
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index f001bb01e38f..820c6e712cd7 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h | |||
| @@ -498,9 +498,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
| 498 | 498 | ||
| 499 | #endif /* !__ASSEMBLY__ */ | 499 | #endif /* !__ASSEMBLY__ */ |
| 500 | 500 | ||
| 501 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 502 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 503 | |||
| 504 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 501 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 505 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 502 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
| 506 | 503 | ||
diff --git a/include/asm-powerpc/siginfo.h b/include/asm-powerpc/siginfo.h index 538ea8ef509b..12f1bce037be 100644 --- a/include/asm-powerpc/siginfo.h +++ b/include/asm-powerpc/siginfo.h | |||
| @@ -15,4 +15,12 @@ | |||
| 15 | 15 | ||
| 16 | #include <asm-generic/siginfo.h> | 16 | #include <asm-generic/siginfo.h> |
| 17 | 17 | ||
| 18 | /* | ||
| 19 | * SIGTRAP si_codes | ||
| 20 | */ | ||
| 21 | #define TRAP_BRANCH (__SI_FAULT|3) /* process taken branch trap */ | ||
| 22 | #define TRAP_HWBKPT (__SI_FAULT|4) /* hardware breakpoint or watchpoint */ | ||
| 23 | #undef NSIGTRAP | ||
| 24 | #define NSIGTRAP 4 | ||
| 25 | |||
| 18 | #endif /* _ASM_POWERPC_SIGINFO_H */ | 26 | #endif /* _ASM_POWERPC_SIGINFO_H */ |
diff --git a/include/asm-ppc/mv64x60.h b/include/asm-ppc/mv64x60.h index 835930d6faa1..75c2ffa26b26 100644 --- a/include/asm-ppc/mv64x60.h +++ b/include/asm-ppc/mv64x60.h | |||
| @@ -119,6 +119,14 @@ extern spinlock_t mv64x60_lock; | |||
| 119 | 119 | ||
| 120 | #define MV64x60_64BIT_WIN_COUNT 24 | 120 | #define MV64x60_64BIT_WIN_COUNT 24 |
| 121 | 121 | ||
| 122 | /* Watchdog Platform Device, Driver Data */ | ||
| 123 | #define MV64x60_WDT_NAME "wdt" | ||
| 124 | |||
| 125 | struct mv64x60_wdt_pdata { | ||
| 126 | int timeout; /* watchdog expiry in seconds, default 10 */ | ||
| 127 | int bus_clk; /* bus clock in MHz, default 133 */ | ||
| 128 | }; | ||
| 129 | |||
| 122 | /* | 130 | /* |
| 123 | * Define a structure that's used to pass in config information to the | 131 | * Define a structure that's used to pass in config information to the |
| 124 | * core routines. | 132 | * core routines. |
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index 92f30b28b252..eee601bb9ada 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h | |||
| @@ -812,15 +812,6 @@ extern void kernel_set_cachemode (unsigned long address, unsigned long size, | |||
| 812 | #ifdef CONFIG_PHYS_64BIT | 812 | #ifdef CONFIG_PHYS_64BIT |
| 813 | extern int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 813 | extern int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, |
| 814 | unsigned long paddr, unsigned long size, pgprot_t prot); | 814 | unsigned long paddr, unsigned long size, pgprot_t prot); |
| 815 | static inline int io_remap_page_range(struct vm_area_struct *vma, | ||
| 816 | unsigned long vaddr, | ||
| 817 | unsigned long paddr, | ||
| 818 | unsigned long size, | ||
| 819 | pgprot_t prot) | ||
| 820 | { | ||
| 821 | phys_addr_t paddr64 = fixup_bigphys_addr(paddr, size); | ||
| 822 | return remap_pfn_range(vma, vaddr, paddr64 >> PAGE_SHIFT, size, prot); | ||
| 823 | } | ||
| 824 | 815 | ||
| 825 | static inline int io_remap_pfn_range(struct vm_area_struct *vma, | 816 | static inline int io_remap_pfn_range(struct vm_area_struct *vma, |
| 826 | unsigned long vaddr, | 817 | unsigned long vaddr, |
| @@ -832,8 +823,6 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma, | |||
| 832 | return remap_pfn_range(vma, vaddr, paddr64 >> PAGE_SHIFT, size, prot); | 823 | return remap_pfn_range(vma, vaddr, paddr64 >> PAGE_SHIFT, size, prot); |
| 833 | } | 824 | } |
| 834 | #else | 825 | #else |
| 835 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 836 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 837 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 826 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 838 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 827 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
| 839 | #endif | 828 | #endif |
diff --git a/include/asm-ppc/ptrace.h b/include/asm-ppc/ptrace.h index 9d4e4ea530c3..7043c164b537 100644 --- a/include/asm-ppc/ptrace.h +++ b/include/asm-ppc/ptrace.h | |||
| @@ -142,4 +142,11 @@ do { \ | |||
| 142 | #define PTRACE_GETEVRREGS 20 | 142 | #define PTRACE_GETEVRREGS 20 |
| 143 | #define PTRACE_SETEVRREGS 21 | 143 | #define PTRACE_SETEVRREGS 21 |
| 144 | 144 | ||
| 145 | /* | ||
| 146 | * Get or set a debug register. The first 16 are DABR registers and the | ||
| 147 | * second 16 are IABR registers. | ||
| 148 | */ | ||
| 149 | #define PTRACE_GET_DEBUGREG 25 | ||
| 150 | #define PTRACE_SET_DEBUGREG 26 | ||
| 151 | |||
| 145 | #endif | 152 | #endif |
diff --git a/include/asm-ppc/segment.h b/include/asm-ppc/segment.h deleted file mode 100644 index 0f2f7428d437..000000000000 --- a/include/asm-ppc/segment.h +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | #include <asm/uaccess.h> | ||
diff --git a/include/asm-ppc64/hvcall.h b/include/asm-ppc64/hvcall.h index 4f668a4baff0..ab7c3cf24888 100644 --- a/include/asm-ppc64/hvcall.h +++ b/include/asm-ppc64/hvcall.h | |||
| @@ -56,6 +56,11 @@ | |||
| 56 | #define H_PP1 (1UL<<(63-62)) | 56 | #define H_PP1 (1UL<<(63-62)) |
| 57 | #define H_PP2 (1UL<<(63-63)) | 57 | #define H_PP2 (1UL<<(63-63)) |
| 58 | 58 | ||
| 59 | /* DABRX flags */ | ||
| 60 | #define H_DABRX_HYPERVISOR (1UL<<(63-61)) | ||
| 61 | #define H_DABRX_KERNEL (1UL<<(63-62)) | ||
| 62 | #define H_DABRX_USER (1UL<<(63-63)) | ||
| 63 | |||
| 59 | /* pSeries hypervisor opcodes */ | 64 | /* pSeries hypervisor opcodes */ |
| 60 | #define H_REMOVE 0x04 | 65 | #define H_REMOVE 0x04 |
| 61 | #define H_ENTER 0x08 | 66 | #define H_ENTER 0x08 |
| @@ -101,6 +106,7 @@ | |||
| 101 | #define H_VIO_SIGNAL 0x104 | 106 | #define H_VIO_SIGNAL 0x104 |
| 102 | #define H_SEND_CRQ 0x108 | 107 | #define H_SEND_CRQ 0x108 |
| 103 | #define H_COPY_RDMA 0x110 | 108 | #define H_COPY_RDMA 0x110 |
| 109 | #define H_SET_XDABR 0x134 | ||
| 104 | #define H_STUFF_TCE 0x138 | 110 | #define H_STUFF_TCE 0x138 |
| 105 | #define H_PUT_TCE_INDIRECT 0x13C | 111 | #define H_PUT_TCE_INDIRECT 0x13C |
| 106 | #define H_VTERM_PARTNER_INFO 0x150 | 112 | #define H_VTERM_PARTNER_INFO 0x150 |
diff --git a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h index 9a1ef4427ed2..8027160ec96d 100644 --- a/include/asm-ppc64/machdep.h +++ b/include/asm-ppc64/machdep.h | |||
| @@ -88,6 +88,7 @@ struct machdep_calls { | |||
| 88 | 88 | ||
| 89 | /* PCI stuff */ | 89 | /* PCI stuff */ |
| 90 | void (*pcibios_fixup)(void); | 90 | void (*pcibios_fixup)(void); |
| 91 | int (*pci_probe_mode)(struct pci_bus *); | ||
| 91 | 92 | ||
| 92 | void (*restart)(char *cmd); | 93 | void (*restart)(char *cmd); |
| 93 | void (*power_off)(void); | 94 | void (*power_off)(void); |
| @@ -173,10 +174,6 @@ extern sys_ctrler_t sys_ctrler; | |||
| 173 | void ppc64_boot_msg(unsigned int src, const char *msg); | 174 | void ppc64_boot_msg(unsigned int src, const char *msg); |
| 174 | /* Print a termination message (print only -- does not stop the kernel) */ | 175 | /* Print a termination message (print only -- does not stop the kernel) */ |
| 175 | void ppc64_terminate_msg(unsigned int src, const char *msg); | 176 | void ppc64_terminate_msg(unsigned int src, const char *msg); |
| 176 | /* Print something that needs attention (device error, etc) */ | ||
| 177 | void ppc64_attention_msg(unsigned int src, const char *msg); | ||
| 178 | /* Print a dump progress message. */ | ||
| 179 | void ppc64_dump_msg(unsigned int src, const char *msg); | ||
| 180 | 177 | ||
| 181 | static inline void log_error(char *buf, unsigned int err_type, int fatal) | 178 | static inline void log_error(char *buf, unsigned int err_type, int fatal) |
| 182 | { | 179 | { |
diff --git a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h index 6b4a5b1f695e..d8991389ab39 100644 --- a/include/asm-ppc64/pci-bridge.h +++ b/include/asm-ppc64/pci-bridge.h | |||
| @@ -119,5 +119,10 @@ static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) | |||
| 119 | return PCI_DN(busdn)->phb; | 119 | return PCI_DN(busdn)->phb; |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | /* Return values for ppc_md.pci_probe_mode function */ | ||
| 123 | #define PCI_PROBE_NONE -1 /* Don't look at this bus at all */ | ||
| 124 | #define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */ | ||
| 125 | #define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */ | ||
| 126 | |||
| 122 | #endif | 127 | #endif |
| 123 | #endif /* __KERNEL__ */ | 128 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc64/plpar_wrappers.h b/include/asm-ppc64/plpar_wrappers.h index f4a5fb7d67c7..72dd2449ee76 100644 --- a/include/asm-ppc64/plpar_wrappers.h +++ b/include/asm-ppc64/plpar_wrappers.h | |||
| @@ -107,5 +107,14 @@ static inline long plpar_put_term_char(unsigned long termno, | |||
| 107 | lbuf[1]); | 107 | lbuf[1]); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | static inline long plpar_set_xdabr(unsigned long address, unsigned long flags) | ||
| 111 | { | ||
| 112 | return plpar_hcall_norets(H_SET_XDABR, address, flags); | ||
| 113 | } | ||
| 114 | |||
| 115 | static inline long plpar_set_dabr(unsigned long val) | ||
| 116 | { | ||
| 117 | return plpar_hcall_norets(H_SET_DABR, val); | ||
| 118 | } | ||
| 110 | 119 | ||
| 111 | #endif /* _PPC64_PLPAR_WRAPPERS_H */ | 120 | #endif /* _PPC64_PLPAR_WRAPPERS_H */ |
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h index 8bd7aa959385..4146189006e3 100644 --- a/include/asm-ppc64/processor.h +++ b/include/asm-ppc64/processor.h | |||
| @@ -433,6 +433,7 @@ struct thread_struct { | |||
| 433 | unsigned long start_tb; /* Start purr when proc switched in */ | 433 | unsigned long start_tb; /* Start purr when proc switched in */ |
| 434 | unsigned long accum_tb; /* Total accumilated purr for process */ | 434 | unsigned long accum_tb; /* Total accumilated purr for process */ |
| 435 | unsigned long vdso_base; /* base of the vDSO library */ | 435 | unsigned long vdso_base; /* base of the vDSO library */ |
| 436 | unsigned long dabr; /* Data address breakpoint register */ | ||
| 436 | #ifdef CONFIG_ALTIVEC | 437 | #ifdef CONFIG_ALTIVEC |
| 437 | /* Complete AltiVec register set */ | 438 | /* Complete AltiVec register set */ |
| 438 | vector128 vr[32] __attribute((aligned(16))); | 439 | vector128 vr[32] __attribute((aligned(16))); |
diff --git a/include/asm-ppc64/ptrace-common.h b/include/asm-ppc64/ptrace-common.h index af03547f9c7e..b1babb729673 100644 --- a/include/asm-ppc64/ptrace-common.h +++ b/include/asm-ppc64/ptrace-common.h | |||
| @@ -11,6 +11,10 @@ | |||
| 11 | 11 | ||
| 12 | #ifndef _PPC64_PTRACE_COMMON_H | 12 | #ifndef _PPC64_PTRACE_COMMON_H |
| 13 | #define _PPC64_PTRACE_COMMON_H | 13 | #define _PPC64_PTRACE_COMMON_H |
| 14 | |||
| 15 | #include <linux/config.h> | ||
| 16 | #include <asm/system.h> | ||
| 17 | |||
| 14 | /* | 18 | /* |
| 15 | * Set of msr bits that gdb can change on behalf of a process. | 19 | * Set of msr bits that gdb can change on behalf of a process. |
| 16 | */ | 20 | */ |
| @@ -69,4 +73,92 @@ static inline void clear_single_step(struct task_struct *task) | |||
| 69 | clear_ti_thread_flag(task->thread_info, TIF_SINGLESTEP); | 73 | clear_ti_thread_flag(task->thread_info, TIF_SINGLESTEP); |
| 70 | } | 74 | } |
| 71 | 75 | ||
| 76 | #ifdef CONFIG_ALTIVEC | ||
| 77 | /* | ||
| 78 | * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go. | ||
| 79 | * The transfer totals 34 quadword. Quadwords 0-31 contain the | ||
| 80 | * corresponding vector registers. Quadword 32 contains the vscr as the | ||
| 81 | * last word (offset 12) within that quadword. Quadword 33 contains the | ||
| 82 | * vrsave as the first word (offset 0) within the quadword. | ||
| 83 | * | ||
| 84 | * This definition of the VMX state is compatible with the current PPC32 | ||
| 85 | * ptrace interface. This allows signal handling and ptrace to use the | ||
| 86 | * same structures. This also simplifies the implementation of a bi-arch | ||
| 87 | * (combined (32- and 64-bit) gdb. | ||
| 88 | */ | ||
| 89 | |||
| 90 | /* | ||
| 91 | * Get contents of AltiVec register state in task TASK | ||
| 92 | */ | ||
| 93 | static inline int get_vrregs(unsigned long __user *data, | ||
| 94 | struct task_struct *task) | ||
| 95 | { | ||
| 96 | unsigned long regsize; | ||
| 97 | |||
| 98 | /* copy AltiVec registers VR[0] .. VR[31] */ | ||
| 99 | regsize = 32 * sizeof(vector128); | ||
| 100 | if (copy_to_user(data, task->thread.vr, regsize)) | ||
| 101 | return -EFAULT; | ||
| 102 | data += (regsize / sizeof(unsigned long)); | ||
| 103 | |||
| 104 | /* copy VSCR */ | ||
| 105 | regsize = 1 * sizeof(vector128); | ||
| 106 | if (copy_to_user(data, &task->thread.vscr, regsize)) | ||
| 107 | return -EFAULT; | ||
| 108 | data += (regsize / sizeof(unsigned long)); | ||
| 109 | |||
| 110 | /* copy VRSAVE */ | ||
| 111 | if (put_user(task->thread.vrsave, (u32 __user *)data)) | ||
| 112 | return -EFAULT; | ||
| 113 | |||
| 114 | return 0; | ||
| 115 | } | ||
| 116 | |||
| 117 | /* | ||
| 118 | * Write contents of AltiVec register state into task TASK. | ||
| 119 | */ | ||
| 120 | static inline int set_vrregs(struct task_struct *task, | ||
| 121 | unsigned long __user *data) | ||
| 122 | { | ||
| 123 | unsigned long regsize; | ||
| 124 | |||
| 125 | /* copy AltiVec registers VR[0] .. VR[31] */ | ||
| 126 | regsize = 32 * sizeof(vector128); | ||
| 127 | if (copy_from_user(task->thread.vr, data, regsize)) | ||
| 128 | return -EFAULT; | ||
| 129 | data += (regsize / sizeof(unsigned long)); | ||
| 130 | |||
| 131 | /* copy VSCR */ | ||
| 132 | regsize = 1 * sizeof(vector128); | ||
| 133 | if (copy_from_user(&task->thread.vscr, data, regsize)) | ||
| 134 | return -EFAULT; | ||
| 135 | data += (regsize / sizeof(unsigned long)); | ||
| 136 | |||
| 137 | /* copy VRSAVE */ | ||
| 138 | if (get_user(task->thread.vrsave, (u32 __user *)data)) | ||
| 139 | return -EFAULT; | ||
| 140 | |||
| 141 | return 0; | ||
| 142 | } | ||
| 143 | #endif | ||
| 144 | |||
| 145 | static inline int ptrace_set_debugreg(struct task_struct *task, | ||
| 146 | unsigned long addr, unsigned long data) | ||
| 147 | { | ||
| 148 | /* We only support one DABR and no IABRS at the moment */ | ||
| 149 | if (addr > 0) | ||
| 150 | return -EINVAL; | ||
| 151 | |||
| 152 | /* The bottom 3 bits are flags */ | ||
| 153 | if ((data & ~0x7UL) >= TASK_SIZE) | ||
| 154 | return -EIO; | ||
| 155 | |||
| 156 | /* Ensure translation is on */ | ||
| 157 | if (data && !(data & DABR_TRANSLATION)) | ||
| 158 | return -EIO; | ||
| 159 | |||
| 160 | task->thread.dabr = data; | ||
| 161 | return 0; | ||
| 162 | } | ||
| 163 | |||
| 72 | #endif /* _PPC64_PTRACE_COMMON_H */ | 164 | #endif /* _PPC64_PTRACE_COMMON_H */ |
diff --git a/include/asm-ppc64/ptrace.h b/include/asm-ppc64/ptrace.h index c96aad28fc08..3a55377f1fd3 100644 --- a/include/asm-ppc64/ptrace.h +++ b/include/asm-ppc64/ptrace.h | |||
| @@ -25,56 +25,49 @@ | |||
| 25 | */ | 25 | */ |
| 26 | 26 | ||
| 27 | #ifndef __ASSEMBLY__ | 27 | #ifndef __ASSEMBLY__ |
| 28 | #define PPC_REG unsigned long | 28 | |
| 29 | struct pt_regs { | 29 | struct pt_regs { |
| 30 | PPC_REG gpr[32]; | 30 | unsigned long gpr[32]; |
| 31 | PPC_REG nip; | 31 | unsigned long nip; |
| 32 | PPC_REG msr; | 32 | unsigned long msr; |
| 33 | PPC_REG orig_gpr3; /* Used for restarting system calls */ | 33 | unsigned long orig_gpr3; /* Used for restarting system calls */ |
| 34 | PPC_REG ctr; | 34 | unsigned long ctr; |
| 35 | PPC_REG link; | 35 | unsigned long link; |
| 36 | PPC_REG xer; | 36 | unsigned long xer; |
| 37 | PPC_REG ccr; | 37 | unsigned long ccr; |
| 38 | PPC_REG softe; /* Soft enabled/disabled */ | 38 | unsigned long softe; /* Soft enabled/disabled */ |
| 39 | PPC_REG trap; /* Reason for being here */ | 39 | unsigned long trap; /* Reason for being here */ |
| 40 | PPC_REG dar; /* Fault registers */ | 40 | unsigned long dar; /* Fault registers */ |
| 41 | PPC_REG dsisr; | 41 | unsigned long dsisr; |
| 42 | PPC_REG result; /* Result of a system call */ | 42 | unsigned long result; /* Result of a system call */ |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | #define PPC_REG_32 unsigned int | ||
| 46 | struct pt_regs32 { | 45 | struct pt_regs32 { |
| 47 | PPC_REG_32 gpr[32]; | 46 | unsigned int gpr[32]; |
| 48 | PPC_REG_32 nip; | 47 | unsigned int nip; |
| 49 | PPC_REG_32 msr; | 48 | unsigned int msr; |
| 50 | PPC_REG_32 orig_gpr3; /* Used for restarting system calls */ | 49 | unsigned int orig_gpr3; /* Used for restarting system calls */ |
| 51 | PPC_REG_32 ctr; | 50 | unsigned int ctr; |
| 52 | PPC_REG_32 link; | 51 | unsigned int link; |
| 53 | PPC_REG_32 xer; | 52 | unsigned int xer; |
| 54 | PPC_REG_32 ccr; | 53 | unsigned int ccr; |
| 55 | PPC_REG_32 mq; /* 601 only (not used at present) */ | 54 | unsigned int mq; /* 601 only (not used at present) */ |
| 56 | /* Used on APUS to hold IPL value. */ | 55 | unsigned int trap; /* Reason for being here */ |
| 57 | PPC_REG_32 trap; /* Reason for being here */ | 56 | unsigned int dar; /* Fault registers */ |
| 58 | PPC_REG_32 dar; /* Fault registers */ | 57 | unsigned int dsisr; |
| 59 | PPC_REG_32 dsisr; | 58 | unsigned int result; /* Result of a system call */ |
| 60 | PPC_REG_32 result; /* Result of a system call */ | ||
| 61 | }; | 59 | }; |
| 62 | 60 | ||
| 61 | #ifdef __KERNEL__ | ||
| 62 | |||
| 63 | #define instruction_pointer(regs) ((regs)->nip) | 63 | #define instruction_pointer(regs) ((regs)->nip) |
| 64 | |||
| 64 | #ifdef CONFIG_SMP | 65 | #ifdef CONFIG_SMP |
| 65 | extern unsigned long profile_pc(struct pt_regs *regs); | 66 | extern unsigned long profile_pc(struct pt_regs *regs); |
| 66 | #else | 67 | #else |
| 67 | #define profile_pc(regs) instruction_pointer(regs) | 68 | #define profile_pc(regs) instruction_pointer(regs) |
| 68 | #endif | 69 | #endif |
| 69 | 70 | ||
| 70 | #endif /* __ASSEMBLY__ */ | ||
| 71 | |||
| 72 | #define STACK_FRAME_OVERHEAD 112 /* size of minimum stack frame */ | ||
| 73 | |||
| 74 | /* Size of dummy stack frame allocated when calling signal handler. */ | ||
| 75 | #define __SIGNAL_FRAMESIZE 128 | ||
| 76 | #define __SIGNAL_FRAMESIZE32 64 | ||
| 77 | |||
| 78 | #define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1) | 71 | #define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1) |
| 79 | 72 | ||
| 80 | #define force_successful_syscall_return() \ | 73 | #define force_successful_syscall_return() \ |
| @@ -89,6 +82,16 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
| 89 | #define TRAP(regs) ((regs)->trap & ~0xF) | 82 | #define TRAP(regs) ((regs)->trap & ~0xF) |
| 90 | #define CHECK_FULL_REGS(regs) BUG_ON(regs->trap & 1) | 83 | #define CHECK_FULL_REGS(regs) BUG_ON(regs->trap & 1) |
| 91 | 84 | ||
| 85 | #endif /* __KERNEL__ */ | ||
| 86 | |||
| 87 | #endif /* __ASSEMBLY__ */ | ||
| 88 | |||
| 89 | #define STACK_FRAME_OVERHEAD 112 /* size of minimum stack frame */ | ||
| 90 | |||
| 91 | /* Size of dummy stack frame allocated when calling signal handler. */ | ||
| 92 | #define __SIGNAL_FRAMESIZE 128 | ||
| 93 | #define __SIGNAL_FRAMESIZE32 64 | ||
| 94 | |||
| 92 | /* | 95 | /* |
| 93 | * Offsets used by 'ptrace' system call interface. | 96 | * Offsets used by 'ptrace' system call interface. |
| 94 | */ | 97 | */ |
| @@ -135,17 +138,21 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
| 135 | #define PT_XER 37 | 138 | #define PT_XER 37 |
| 136 | #define PT_CCR 38 | 139 | #define PT_CCR 38 |
| 137 | #define PT_SOFTE 39 | 140 | #define PT_SOFTE 39 |
| 141 | #define PT_TRAP 40 | ||
| 142 | #define PT_DAR 41 | ||
| 143 | #define PT_DSISR 42 | ||
| 138 | #define PT_RESULT 43 | 144 | #define PT_RESULT 43 |
| 139 | 145 | ||
| 140 | #define PT_FPR0 48 | 146 | #define PT_FPR0 48 |
| 141 | 147 | ||
| 142 | /* Kernel and userspace will both use this PT_FPSCR value. 32-bit apps will have | 148 | /* |
| 143 | * visibility to the asm-ppc/ptrace.h header instead of this one. | 149 | * Kernel and userspace will both use this PT_FPSCR value. 32-bit apps will |
| 150 | * have visibility to the asm-ppc/ptrace.h header instead of this one. | ||
| 144 | */ | 151 | */ |
| 145 | #define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */ | 152 | #define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */ |
| 146 | 153 | ||
| 147 | #ifdef __KERNEL__ | 154 | #ifdef __KERNEL__ |
| 148 | #define PT_FPSCR32 (PT_FPR0 + 2*32 + 1) /* each FP reg occupies 2 32-bit userspace slots */ | 155 | #define PT_FPSCR32 (PT_FPR0 + 2*32 + 1) /* each FP reg occupies 2 32-bit userspace slots */ |
| 149 | #endif | 156 | #endif |
| 150 | 157 | ||
| 151 | #define PT_VR0 82 /* each Vector reg occupies 2 slots in 64-bit */ | 158 | #define PT_VR0 82 /* each Vector reg occupies 2 slots in 64-bit */ |
| @@ -173,17 +180,34 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
| 173 | #define PTRACE_GETVRREGS 18 | 180 | #define PTRACE_GETVRREGS 18 |
| 174 | #define PTRACE_SETVRREGS 19 | 181 | #define PTRACE_SETVRREGS 19 |
| 175 | 182 | ||
| 176 | /* Additional PTRACE requests implemented on PowerPC. */ | 183 | /* |
| 177 | #define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ | 184 | * While we dont have 64bit book E processors, we need to reserve the |
| 178 | #define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ | 185 | * relevant ptrace calls for 32bit compatibility. |
| 179 | #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ | 186 | */ |
| 180 | #define PPC_PTRACE_SETFPREGS 0x96 /* Set FPRs 0 - 31 */ | 187 | #if 0 |
| 181 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 /* Read word at location ADDR on a 64-bit process from a 32-bit process. */ | 188 | #define PTRACE_GETEVRREGS 20 |
| 182 | #define PPC_PTRACE_PEEKDATA_3264 0x94 /* Read word at location ADDR on a 64-bit process from a 32-bit process. */ | 189 | #define PTRACE_SETEVRREGS 21 |
| 183 | #define PPC_PTRACE_POKETEXT_3264 0x93 /* Write word at location ADDR on a 64-bit process from a 32-bit process. */ | 190 | #endif |
| 184 | #define PPC_PTRACE_POKEDATA_3264 0x92 /* Write word at location ADDR on a 64-bit process from a 32-bit process. */ | ||
| 185 | #define PPC_PTRACE_PEEKUSR_3264 0x91 /* Read a register (specified by ADDR) out of the "user area" on a 64-bit process from a 32-bit process. */ | ||
| 186 | #define PPC_PTRACE_POKEUSR_3264 0x90 /* Write DATA into location ADDR within the "user area" on a 64-bit process from a 32-bit process. */ | ||
| 187 | 191 | ||
| 192 | /* | ||
| 193 | * Get or set a debug register. The first 16 are DABR registers and the | ||
| 194 | * second 16 are IABR registers. | ||
| 195 | */ | ||
| 196 | #define PTRACE_GET_DEBUGREG 25 | ||
| 197 | #define PTRACE_SET_DEBUGREG 26 | ||
| 198 | |||
| 199 | /* Additional PTRACE requests implemented on PowerPC. */ | ||
| 200 | #define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ | ||
| 201 | #define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ | ||
| 202 | #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ | ||
| 203 | #define PPC_PTRACE_SETFPREGS 0x96 /* Set FPRs 0 - 31 */ | ||
| 204 | |||
| 205 | /* Calls to trace a 64bit program from a 32bit program */ | ||
| 206 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 | ||
| 207 | #define PPC_PTRACE_PEEKDATA_3264 0x94 | ||
| 208 | #define PPC_PTRACE_POKETEXT_3264 0x93 | ||
| 209 | #define PPC_PTRACE_POKEDATA_3264 0x92 | ||
| 210 | #define PPC_PTRACE_PEEKUSR_3264 0x91 | ||
| 211 | #define PPC_PTRACE_POKEUSR_3264 0x90 | ||
| 188 | 212 | ||
| 189 | #endif /* _PPC64_PTRACE_H */ | 213 | #endif /* _PPC64_PTRACE_H */ |
diff --git a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h index c0396428cc3c..375015c62f20 100644 --- a/include/asm-ppc64/system.h +++ b/include/asm-ppc64/system.h | |||
| @@ -101,6 +101,9 @@ static inline int debugger_dabr_match(struct pt_regs *regs) { return 0; } | |||
| 101 | static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; } | 101 | static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; } |
| 102 | #endif | 102 | #endif |
| 103 | 103 | ||
| 104 | extern int set_dabr(unsigned long dabr); | ||
| 105 | extern void _exception(int signr, struct pt_regs *regs, int code, | ||
| 106 | unsigned long addr); | ||
| 104 | extern int fix_alignment(struct pt_regs *regs); | 107 | extern int fix_alignment(struct pt_regs *regs); |
| 105 | extern void bad_page_fault(struct pt_regs *regs, unsigned long address, | 108 | extern void bad_page_fault(struct pt_regs *regs, unsigned long address, |
| 106 | int sig); | 109 | int sig); |
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index ecb909572d3f..0f4bcaae61bd 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h | |||
| @@ -277,9 +277,6 @@ typedef pte_t *pte_addr_t; | |||
| 277 | 277 | ||
| 278 | #define kern_addr_valid(addr) (1) | 278 | #define kern_addr_valid(addr) (1) |
| 279 | 279 | ||
| 280 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 281 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 282 | |||
| 283 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 280 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 284 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 281 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
| 285 | 282 | ||
diff --git a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h index 78ac6be2d9ef..51db4307bfaf 100644 --- a/include/asm-sh64/pgtable.h +++ b/include/asm-sh64/pgtable.h | |||
| @@ -482,9 +482,6 @@ extern void update_mmu_cache(struct vm_area_struct * vma, | |||
| 482 | #define PageSkip(page) (0) | 482 | #define PageSkip(page) (0) |
| 483 | #define kern_addr_valid(addr) (1) | 483 | #define kern_addr_valid(addr) (1) |
| 484 | 484 | ||
| 485 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 486 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 487 | |||
| 488 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 485 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 489 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 486 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
| 490 | 487 | ||
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h index 16ec82e16b21..6c5d5ca8383a 100644 --- a/include/asm-x86_64/apic.h +++ b/include/asm-x86_64/apic.h | |||
| @@ -109,9 +109,10 @@ extern unsigned int nmi_watchdog; | |||
| 109 | #define NMI_LOCAL_APIC 2 | 109 | #define NMI_LOCAL_APIC 2 |
| 110 | #define NMI_INVALID 3 | 110 | #define NMI_INVALID 3 |
| 111 | 111 | ||
| 112 | extern int disable_timer_pin_1; | ||
| 113 | |||
| 112 | #endif /* CONFIG_X86_LOCAL_APIC */ | 114 | #endif /* CONFIG_X86_LOCAL_APIC */ |
| 113 | 115 | ||
| 114 | #define esr_disable 0 | ||
| 115 | extern unsigned boot_cpu_id; | 116 | extern unsigned boot_cpu_id; |
| 116 | 117 | ||
| 117 | #endif /* __ASM_APIC_H */ | 118 | #endif /* __ASM_APIC_H */ |
diff --git a/include/asm-x86_64/apicdef.h b/include/asm-x86_64/apicdef.h index 9388062c4f6e..fb1c99ac669f 100644 --- a/include/asm-x86_64/apicdef.h +++ b/include/asm-x86_64/apicdef.h | |||
| @@ -113,6 +113,7 @@ | |||
| 113 | #define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) | 113 | #define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) |
| 114 | 114 | ||
| 115 | #define MAX_IO_APICS 128 | 115 | #define MAX_IO_APICS 128 |
| 116 | #define MAX_LOCAL_APIC 256 | ||
| 116 | 117 | ||
| 117 | /* | 118 | /* |
| 118 | * All x86-64 systems are xAPIC compatible. | 119 | * All x86-64 systems are xAPIC compatible. |
diff --git a/include/asm-x86_64/bug.h b/include/asm-x86_64/bug.h index eed785667289..80ac1fe966ac 100644 --- a/include/asm-x86_64/bug.h +++ b/include/asm-x86_64/bug.h | |||
| @@ -9,10 +9,8 @@ | |||
| 9 | */ | 9 | */ |
| 10 | struct bug_frame { | 10 | struct bug_frame { |
| 11 | unsigned char ud2[2]; | 11 | unsigned char ud2[2]; |
| 12 | unsigned char mov; | 12 | unsigned char push; |
| 13 | /* should use 32bit offset instead, but the assembler doesn't | 13 | signed int filename; |
| 14 | like it */ | ||
| 15 | char *filename; | ||
| 16 | unsigned char ret; | 14 | unsigned char ret; |
| 17 | unsigned short line; | 15 | unsigned short line; |
| 18 | } __attribute__((packed)); | 16 | } __attribute__((packed)); |
| @@ -25,8 +23,8 @@ struct bug_frame { | |||
| 25 | The magic numbers generate mov $64bitimm,%eax ; ret $offset. */ | 23 | The magic numbers generate mov $64bitimm,%eax ; ret $offset. */ |
| 26 | #define BUG() \ | 24 | #define BUG() \ |
| 27 | asm volatile( \ | 25 | asm volatile( \ |
| 28 | "ud2 ; .byte 0xa3 ; .quad %c1 ; .byte 0xc2 ; .short %c0" :: \ | 26 | "ud2 ; pushq $%c1 ; ret $%c0" :: \ |
| 29 | "i"(__LINE__), "i" (__stringify(__FILE__))) | 27 | "i"(__LINE__), "i" (__FILE__)) |
| 30 | void out_of_line_bug(void); | 28 | void out_of_line_bug(void); |
| 31 | #else | 29 | #else |
| 32 | static inline void out_of_line_bug(void) { } | 30 | static inline void out_of_line_bug(void) { } |
diff --git a/include/asm-x86_64/calling.h b/include/asm-x86_64/calling.h index 0bc12655fa5b..fc2c5a6c262a 100644 --- a/include/asm-x86_64/calling.h +++ b/include/asm-x86_64/calling.h | |||
| @@ -65,27 +65,36 @@ | |||
| 65 | .if \skipr11 | 65 | .if \skipr11 |
| 66 | .else | 66 | .else |
| 67 | movq (%rsp),%r11 | 67 | movq (%rsp),%r11 |
| 68 | CFI_RESTORE r11 | ||
| 68 | .endif | 69 | .endif |
| 69 | .if \skipr8910 | 70 | .if \skipr8910 |
| 70 | .else | 71 | .else |
| 71 | movq 1*8(%rsp),%r10 | 72 | movq 1*8(%rsp),%r10 |
| 73 | CFI_RESTORE r10 | ||
| 72 | movq 2*8(%rsp),%r9 | 74 | movq 2*8(%rsp),%r9 |
| 75 | CFI_RESTORE r9 | ||
| 73 | movq 3*8(%rsp),%r8 | 76 | movq 3*8(%rsp),%r8 |
| 77 | CFI_RESTORE r8 | ||
| 74 | .endif | 78 | .endif |
| 75 | .if \skiprax | 79 | .if \skiprax |
| 76 | .else | 80 | .else |
| 77 | movq 4*8(%rsp),%rax | 81 | movq 4*8(%rsp),%rax |
| 82 | CFI_RESTORE rax | ||
| 78 | .endif | 83 | .endif |
| 79 | .if \skiprcx | 84 | .if \skiprcx |
| 80 | .else | 85 | .else |
| 81 | movq 5*8(%rsp),%rcx | 86 | movq 5*8(%rsp),%rcx |
| 87 | CFI_RESTORE rcx | ||
| 82 | .endif | 88 | .endif |
| 83 | .if \skiprdx | 89 | .if \skiprdx |
| 84 | .else | 90 | .else |
| 85 | movq 6*8(%rsp),%rdx | 91 | movq 6*8(%rsp),%rdx |
| 92 | CFI_RESTORE rdx | ||
| 86 | .endif | 93 | .endif |
| 87 | movq 7*8(%rsp),%rsi | 94 | movq 7*8(%rsp),%rsi |
| 95 | CFI_RESTORE rsi | ||
| 88 | movq 8*8(%rsp),%rdi | 96 | movq 8*8(%rsp),%rdi |
| 97 | CFI_RESTORE rdi | ||
| 89 | .if ARG_SKIP+\addskip > 0 | 98 | .if ARG_SKIP+\addskip > 0 |
| 90 | addq $ARG_SKIP+\addskip,%rsp | 99 | addq $ARG_SKIP+\addskip,%rsp |
| 91 | CFI_ADJUST_CFA_OFFSET -(ARG_SKIP+\addskip) | 100 | CFI_ADJUST_CFA_OFFSET -(ARG_SKIP+\addskip) |
| @@ -124,11 +133,17 @@ | |||
| 124 | 133 | ||
| 125 | .macro RESTORE_REST | 134 | .macro RESTORE_REST |
| 126 | movq (%rsp),%r15 | 135 | movq (%rsp),%r15 |
| 136 | CFI_RESTORE r15 | ||
| 127 | movq 1*8(%rsp),%r14 | 137 | movq 1*8(%rsp),%r14 |
| 138 | CFI_RESTORE r14 | ||
| 128 | movq 2*8(%rsp),%r13 | 139 | movq 2*8(%rsp),%r13 |
| 140 | CFI_RESTORE r13 | ||
| 129 | movq 3*8(%rsp),%r12 | 141 | movq 3*8(%rsp),%r12 |
| 142 | CFI_RESTORE r12 | ||
| 130 | movq 4*8(%rsp),%rbp | 143 | movq 4*8(%rsp),%rbp |
| 144 | CFI_RESTORE rbp | ||
| 131 | movq 5*8(%rsp),%rbx | 145 | movq 5*8(%rsp),%rbx |
| 146 | CFI_RESTORE rbx | ||
| 132 | addq $REST_SKIP,%rsp | 147 | addq $REST_SKIP,%rsp |
| 133 | CFI_ADJUST_CFA_OFFSET -(REST_SKIP) | 148 | CFI_ADJUST_CFA_OFFSET -(REST_SKIP) |
| 134 | .endm | 149 | .endm |
| @@ -146,11 +161,3 @@ | |||
| 146 | .macro icebp | 161 | .macro icebp |
| 147 | .byte 0xf1 | 162 | .byte 0xf1 |
| 148 | .endm | 163 | .endm |
| 149 | |||
| 150 | #ifdef CONFIG_FRAME_POINTER | ||
| 151 | #define ENTER enter | ||
| 152 | #define LEAVE leave | ||
| 153 | #else | ||
| 154 | #define ENTER | ||
| 155 | #define LEAVE | ||
| 156 | #endif | ||
diff --git a/include/asm-x86_64/desc.h b/include/asm-x86_64/desc.h index c89b58bebee2..594e610f4a1e 100644 --- a/include/asm-x86_64/desc.h +++ b/include/asm-x86_64/desc.h | |||
| @@ -191,7 +191,7 @@ static inline void load_TLS(struct thread_struct *t, unsigned int cpu) | |||
| 191 | /* | 191 | /* |
| 192 | * load one particular LDT into the current CPU | 192 | * load one particular LDT into the current CPU |
| 193 | */ | 193 | */ |
| 194 | extern inline void load_LDT_nolock (mm_context_t *pc, int cpu) | 194 | static inline void load_LDT_nolock (mm_context_t *pc, int cpu) |
| 195 | { | 195 | { |
| 196 | int count = pc->size; | 196 | int count = pc->size; |
| 197 | 197 | ||
diff --git a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h index a416dc31634a..e784fdc524f1 100644 --- a/include/asm-x86_64/dma-mapping.h +++ b/include/asm-x86_64/dma-mapping.h | |||
| @@ -85,6 +85,11 @@ static inline void dma_sync_single_for_device(struct device *hwdev, | |||
| 85 | flush_write_buffers(); | 85 | flush_write_buffers(); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | #define dma_sync_single_range_for_cpu(dev, dma_handle, offset, size, dir) \ | ||
| 89 | dma_sync_single_for_cpu(dev, dma_handle, size, dir) | ||
| 90 | #define dma_sync_single_range_for_device(dev, dma_handle, offset, size, dir) \ | ||
| 91 | dma_sync_single_for_device(dev, dma_handle, size, dir) | ||
| 92 | |||
| 88 | static inline void dma_sync_sg_for_cpu(struct device *hwdev, | 93 | static inline void dma_sync_sg_for_cpu(struct device *hwdev, |
| 89 | struct scatterlist *sg, | 94 | struct scatterlist *sg, |
| 90 | int nelems, int direction) | 95 | int nelems, int direction) |
diff --git a/include/asm-x86_64/dwarf2.h b/include/asm-x86_64/dwarf2.h index afd4212e860b..582757fc0365 100644 --- a/include/asm-x86_64/dwarf2.h +++ b/include/asm-x86_64/dwarf2.h | |||
| @@ -24,6 +24,10 @@ | |||
| 24 | #define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset | 24 | #define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset |
| 25 | #define CFI_OFFSET .cfi_offset | 25 | #define CFI_OFFSET .cfi_offset |
| 26 | #define CFI_REL_OFFSET .cfi_rel_offset | 26 | #define CFI_REL_OFFSET .cfi_rel_offset |
| 27 | #define CFI_REGISTER .cfi_register | ||
| 28 | #define CFI_RESTORE .cfi_restore | ||
| 29 | #define CFI_REMEMBER_STATE .cfi_remember_state | ||
| 30 | #define CFI_RESTORE_STATE .cfi_restore_state | ||
| 27 | 31 | ||
| 28 | #else | 32 | #else |
| 29 | 33 | ||
| @@ -36,6 +40,10 @@ | |||
| 36 | #define CFI_ADJUST_CFA_OFFSET # | 40 | #define CFI_ADJUST_CFA_OFFSET # |
| 37 | #define CFI_OFFSET # | 41 | #define CFI_OFFSET # |
| 38 | #define CFI_REL_OFFSET # | 42 | #define CFI_REL_OFFSET # |
| 43 | #define CFI_REGISTER # | ||
| 44 | #define CFI_RESTORE # | ||
| 45 | #define CFI_REMEMBER_STATE # | ||
| 46 | #define CFI_RESTORE_STATE # | ||
| 39 | 47 | ||
| 40 | #endif | 48 | #endif |
| 41 | 49 | ||
diff --git a/include/asm-x86_64/fixmap.h b/include/asm-x86_64/fixmap.h index cf8b16cbe8db..a582cfcf2231 100644 --- a/include/asm-x86_64/fixmap.h +++ b/include/asm-x86_64/fixmap.h | |||
| @@ -76,7 +76,7 @@ extern void __this_fixmap_does_not_exist(void); | |||
| 76 | * directly without translation, we catch the bug with a NULL-deference | 76 | * directly without translation, we catch the bug with a NULL-deference |
| 77 | * kernel oops. Illegal ranges of incoming indices are caught too. | 77 | * kernel oops. Illegal ranges of incoming indices are caught too. |
| 78 | */ | 78 | */ |
| 79 | extern inline unsigned long fix_to_virt(const unsigned int idx) | 79 | static inline unsigned long fix_to_virt(const unsigned int idx) |
| 80 | { | 80 | { |
| 81 | /* | 81 | /* |
| 82 | * this branch gets completely eliminated after inlining, | 82 | * this branch gets completely eliminated after inlining, |
diff --git a/include/asm-x86_64/hardirq.h b/include/asm-x86_64/hardirq.h index 27c381fa1c9d..8661b476fb40 100644 --- a/include/asm-x86_64/hardirq.h +++ b/include/asm-x86_64/hardirq.h | |||
| @@ -9,11 +9,12 @@ | |||
| 9 | 9 | ||
| 10 | #define __ARCH_IRQ_STAT 1 | 10 | #define __ARCH_IRQ_STAT 1 |
| 11 | 11 | ||
| 12 | /* Generate a lvalue for a pda member. Should fix softirq.c instead to use | 12 | #define local_softirq_pending() read_pda(__softirq_pending) |
| 13 | special access macros. This would generate better code. */ | ||
| 14 | #define __IRQ_STAT(cpu,member) (read_pda(me)->member) | ||
| 15 | 13 | ||
| 16 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | 14 | #define __ARCH_SET_SOFTIRQ_PENDING 1 |
| 15 | |||
| 16 | #define set_softirq_pending(x) write_pda(__softirq_pending, (x)) | ||
| 17 | #define or_softirq_pending(x) or_pda(__softirq_pending, (x)) | ||
| 17 | 18 | ||
| 18 | /* | 19 | /* |
| 19 | * 'what should we do if we get a hw irq event on an illegal vector'. | 20 | * 'what should we do if we get a hw irq event on an illegal vector'. |
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index 2b5cb2865d21..dc97668ea0f9 100644 --- a/include/asm-x86_64/hw_irq.h +++ b/include/asm-x86_64/hw_irq.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | struct hw_interrupt_type; | 26 | struct hw_interrupt_type; |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| 29 | #define NMI_VECTOR 0x02 | ||
| 29 | /* | 30 | /* |
| 30 | * IDT vectors usable for external interrupt sources start | 31 | * IDT vectors usable for external interrupt sources start |
| 31 | * at 0x20: | 32 | * at 0x20: |
| @@ -50,14 +51,15 @@ struct hw_interrupt_type; | |||
| 50 | */ | 51 | */ |
| 51 | #define SPURIOUS_APIC_VECTOR 0xff | 52 | #define SPURIOUS_APIC_VECTOR 0xff |
| 52 | #define ERROR_APIC_VECTOR 0xfe | 53 | #define ERROR_APIC_VECTOR 0xfe |
| 53 | #define INVALIDATE_TLB_VECTOR 0xfd | 54 | #define RESCHEDULE_VECTOR 0xfd |
| 54 | #define RESCHEDULE_VECTOR 0xfc | 55 | #define CALL_FUNCTION_VECTOR 0xfc |
| 55 | #define TASK_MIGRATION_VECTOR 0xfb | 56 | #define KDB_VECTOR 0xfb /* reserved for KDB */ |
| 56 | #define CALL_FUNCTION_VECTOR 0xfa | 57 | #define THERMAL_APIC_VECTOR 0xfa |
| 57 | #define KDB_VECTOR 0xf9 | 58 | /* 0xf9 free */ |
| 58 | 59 | #define INVALIDATE_TLB_VECTOR_END 0xf8 | |
| 59 | #define THERMAL_APIC_VECTOR 0xf0 | 60 | #define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f8 used for TLB flush */ |
| 60 | 61 | ||
| 62 | #define NUM_INVALIDATE_TLB_VECTORS 8 | ||
| 61 | 63 | ||
| 62 | /* | 64 | /* |
| 63 | * Local APIC timer IRQ vector is on a different priority level, | 65 | * Local APIC timer IRQ vector is on a different priority level, |
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h index 37fc3f149a5a..52ff269fe054 100644 --- a/include/asm-x86_64/io.h +++ b/include/asm-x86_64/io.h | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | * Talk about misusing macros.. | 48 | * Talk about misusing macros.. |
| 49 | */ | 49 | */ |
| 50 | #define __OUT1(s,x) \ | 50 | #define __OUT1(s,x) \ |
| 51 | extern inline void out##s(unsigned x value, unsigned short port) { | 51 | static inline void out##s(unsigned x value, unsigned short port) { |
| 52 | 52 | ||
| 53 | #define __OUT2(s,s1,s2) \ | 53 | #define __OUT2(s,s1,s2) \ |
| 54 | __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" | 54 | __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" |
| @@ -58,7 +58,7 @@ __OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "Nd" (port)); } \ | |||
| 58 | __OUT1(s##_p,x) __OUT2(s,s1,"w") __FULL_SLOW_DOWN_IO : : "a" (value), "Nd" (port));} \ | 58 | __OUT1(s##_p,x) __OUT2(s,s1,"w") __FULL_SLOW_DOWN_IO : : "a" (value), "Nd" (port));} \ |
| 59 | 59 | ||
| 60 | #define __IN1(s) \ | 60 | #define __IN1(s) \ |
| 61 | extern inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v; | 61 | static inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v; |
| 62 | 62 | ||
| 63 | #define __IN2(s,s1,s2) \ | 63 | #define __IN2(s,s1,s2) \ |
| 64 | __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" | 64 | __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" |
| @@ -68,12 +68,12 @@ __IN1(s) __IN2(s,s1,"w") : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \ | |||
| 68 | __IN1(s##_p) __IN2(s,s1,"w") __FULL_SLOW_DOWN_IO : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \ | 68 | __IN1(s##_p) __IN2(s,s1,"w") __FULL_SLOW_DOWN_IO : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \ |
| 69 | 69 | ||
| 70 | #define __INS(s) \ | 70 | #define __INS(s) \ |
| 71 | extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \ | 71 | static inline void ins##s(unsigned short port, void * addr, unsigned long count) \ |
| 72 | { __asm__ __volatile__ ("rep ; ins" #s \ | 72 | { __asm__ __volatile__ ("rep ; ins" #s \ |
| 73 | : "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } | 73 | : "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } |
| 74 | 74 | ||
| 75 | #define __OUTS(s) \ | 75 | #define __OUTS(s) \ |
| 76 | extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ | 76 | static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ |
| 77 | { __asm__ __volatile__ ("rep ; outs" #s \ | 77 | { __asm__ __volatile__ ("rep ; outs" #s \ |
| 78 | : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } | 78 | : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } |
| 79 | 79 | ||
| @@ -110,12 +110,12 @@ __OUTS(l) | |||
| 110 | * Change virtual addresses to physical addresses and vv. | 110 | * Change virtual addresses to physical addresses and vv. |
| 111 | * These are pretty trivial | 111 | * These are pretty trivial |
| 112 | */ | 112 | */ |
| 113 | extern inline unsigned long virt_to_phys(volatile void * address) | 113 | static inline unsigned long virt_to_phys(volatile void * address) |
| 114 | { | 114 | { |
| 115 | return __pa(address); | 115 | return __pa(address); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | extern inline void * phys_to_virt(unsigned long address) | 118 | static inline void * phys_to_virt(unsigned long address) |
| 119 | { | 119 | { |
| 120 | return __va(address); | 120 | return __va(address); |
| 121 | } | 121 | } |
| @@ -130,7 +130,7 @@ extern inline void * phys_to_virt(unsigned long address) | |||
| 130 | 130 | ||
| 131 | extern void __iomem *__ioremap(unsigned long offset, unsigned long size, unsigned long flags); | 131 | extern void __iomem *__ioremap(unsigned long offset, unsigned long size, unsigned long flags); |
| 132 | 132 | ||
| 133 | extern inline void __iomem * ioremap (unsigned long offset, unsigned long size) | 133 | static inline void __iomem * ioremap (unsigned long offset, unsigned long size) |
| 134 | { | 134 | { |
| 135 | return __ioremap(offset, size, 0); | 135 | return __ioremap(offset, size, 0); |
| 136 | } | 136 | } |
diff --git a/include/asm-x86_64/ipi.h b/include/asm-x86_64/ipi.h index 5e166b9d3bde..022e9d340ad7 100644 --- a/include/asm-x86_64/ipi.h +++ b/include/asm-x86_64/ipi.h | |||
| @@ -31,9 +31,20 @@ | |||
| 31 | 31 | ||
| 32 | static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector, unsigned int dest) | 32 | static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector, unsigned int dest) |
| 33 | { | 33 | { |
| 34 | unsigned int icr = APIC_DM_FIXED | shortcut | vector | dest; | 34 | unsigned int icr = shortcut | dest; |
| 35 | if (vector == KDB_VECTOR) | 35 | |
| 36 | icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI; | 36 | switch (vector) { |
| 37 | default: | ||
| 38 | icr |= APIC_DM_FIXED | vector; | ||
| 39 | break; | ||
| 40 | case NMI_VECTOR: | ||
| 41 | /* | ||
| 42 | * Setup KDB IPI to be delivered as an NMI | ||
| 43 | */ | ||
| 44 | case KDB_VECTOR: | ||
| 45 | icr |= APIC_DM_NMI; | ||
| 46 | break; | ||
| 47 | } | ||
| 37 | return icr; | 48 | return icr; |
| 38 | } | 49 | } |
| 39 | 50 | ||
| @@ -66,7 +77,7 @@ static inline void __send_IPI_shortcut(unsigned int shortcut, int vector, unsign | |||
| 66 | /* | 77 | /* |
| 67 | * Send the IPI. The write to APIC_ICR fires this off. | 78 | * Send the IPI. The write to APIC_ICR fires this off. |
| 68 | */ | 79 | */ |
| 69 | apic_write_around(APIC_ICR, cfg); | 80 | apic_write(APIC_ICR, cfg); |
| 70 | } | 81 | } |
| 71 | 82 | ||
| 72 | 83 | ||
| @@ -92,7 +103,7 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) | |||
| 92 | * prepare target chip field | 103 | * prepare target chip field |
| 93 | */ | 104 | */ |
| 94 | cfg = __prepare_ICR2(x86_cpu_to_apicid[query_cpu]); | 105 | cfg = __prepare_ICR2(x86_cpu_to_apicid[query_cpu]); |
| 95 | apic_write_around(APIC_ICR2, cfg); | 106 | apic_write(APIC_ICR2, cfg); |
| 96 | 107 | ||
| 97 | /* | 108 | /* |
| 98 | * program the ICR | 109 | * program the ICR |
| @@ -102,7 +113,7 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) | |||
| 102 | /* | 113 | /* |
| 103 | * Send the IPI. The write to APIC_ICR fires this off. | 114 | * Send the IPI. The write to APIC_ICR fires this off. |
| 104 | */ | 115 | */ |
| 105 | apic_write_around(APIC_ICR, cfg); | 116 | apic_write(APIC_ICR, cfg); |
| 106 | } | 117 | } |
| 107 | local_irq_restore(flags); | 118 | local_irq_restore(flags); |
| 108 | } | 119 | } |
diff --git a/include/asm-x86_64/kdebug.h b/include/asm-x86_64/kdebug.h index b90341994d80..f604e84c5303 100644 --- a/include/asm-x86_64/kdebug.h +++ b/include/asm-x86_64/kdebug.h | |||
| @@ -46,7 +46,7 @@ extern void die(const char *,struct pt_regs *,long); | |||
| 46 | extern void __die(const char *,struct pt_regs *,long); | 46 | extern void __die(const char *,struct pt_regs *,long); |
| 47 | extern void show_registers(struct pt_regs *regs); | 47 | extern void show_registers(struct pt_regs *regs); |
| 48 | extern void dump_pagetable(unsigned long); | 48 | extern void dump_pagetable(unsigned long); |
| 49 | extern void oops_begin(void); | 49 | extern unsigned long oops_begin(void); |
| 50 | extern void oops_end(void); | 50 | extern void oops_end(unsigned long); |
| 51 | 51 | ||
| 52 | #endif | 52 | #endif |
diff --git a/include/asm-x86_64/local.h b/include/asm-x86_64/local.h index c954f15c1a75..3e72c41727c5 100644 --- a/include/asm-x86_64/local.h +++ b/include/asm-x86_64/local.h | |||
| @@ -29,7 +29,7 @@ static __inline__ void local_dec(local_t *v) | |||
| 29 | :"m" (v->counter)); | 29 | :"m" (v->counter)); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | static __inline__ void local_add(unsigned long i, local_t *v) | 32 | static __inline__ void local_add(unsigned int i, local_t *v) |
| 33 | { | 33 | { |
| 34 | __asm__ __volatile__( | 34 | __asm__ __volatile__( |
| 35 | "addl %1,%0" | 35 | "addl %1,%0" |
| @@ -37,7 +37,7 @@ static __inline__ void local_add(unsigned long i, local_t *v) | |||
| 37 | :"ir" (i), "m" (v->counter)); | 37 | :"ir" (i), "m" (v->counter)); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | static __inline__ void local_sub(unsigned long i, local_t *v) | 40 | static __inline__ void local_sub(unsigned int i, local_t *v) |
| 41 | { | 41 | { |
| 42 | __asm__ __volatile__( | 42 | __asm__ __volatile__( |
| 43 | "subl %1,%0" | 43 | "subl %1,%0" |
diff --git a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h index 768413751b34..b40c661f111e 100644 --- a/include/asm-x86_64/mmzone.h +++ b/include/asm-x86_64/mmzone.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <asm/smp.h> | 13 | #include <asm/smp.h> |
| 14 | 14 | ||
| 15 | #define NODEMAPSIZE 0xff | 15 | #define NODEMAPSIZE 0xfff |
| 16 | 16 | ||
| 17 | /* Simple perfect hash to map physical addresses to node numbers */ | 17 | /* Simple perfect hash to map physical addresses to node numbers */ |
| 18 | extern int memnode_shift; | 18 | extern int memnode_shift; |
| @@ -54,7 +54,7 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) | |||
| 54 | 54 | ||
| 55 | #define pfn_valid(pfn) ((pfn) >= num_physpages ? 0 : \ | 55 | #define pfn_valid(pfn) ((pfn) >= num_physpages ? 0 : \ |
| 56 | ({ u8 nid__ = pfn_to_nid(pfn); \ | 56 | ({ u8 nid__ = pfn_to_nid(pfn); \ |
| 57 | nid__ != 0xff && (pfn) >= node_start_pfn(nid__) && (pfn) <= node_end_pfn(nid__); })) | 57 | nid__ != 0xff && (pfn) >= node_start_pfn(nid__) && (pfn) < node_end_pfn(nid__); })) |
| 58 | #endif | 58 | #endif |
| 59 | 59 | ||
| 60 | #define local_mapnr(kvaddr) \ | 60 | #define local_mapnr(kvaddr) \ |
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index ba15279a79d0..4d727f3f5550 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h | |||
| @@ -29,22 +29,37 @@ | |||
| 29 | #define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32) | 29 | #define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32) |
| 30 | 30 | ||
| 31 | /* wrmsr with exception handling */ | 31 | /* wrmsr with exception handling */ |
| 32 | #define wrmsr_safe(msr,a,b) ({ int ret__; \ | 32 | #define wrmsr_safe(msr,a,b) ({ int ret__; \ |
| 33 | asm volatile("2: wrmsr ; xorl %0,%0\n" \ | 33 | asm volatile("2: wrmsr ; xorl %0,%0\n" \ |
| 34 | "1:\n\t" \ | 34 | "1:\n\t" \ |
| 35 | ".section .fixup,\"ax\"\n\t" \ | 35 | ".section .fixup,\"ax\"\n\t" \ |
| 36 | "3: movl %4,%0 ; jmp 1b\n\t" \ | 36 | "3: movl %4,%0 ; jmp 1b\n\t" \ |
| 37 | ".previous\n\t" \ | 37 | ".previous\n\t" \ |
| 38 | ".section __ex_table,\"a\"\n" \ | 38 | ".section __ex_table,\"a\"\n" \ |
| 39 | " .align 8\n\t" \ | 39 | " .align 8\n\t" \ |
| 40 | " .quad 2b,3b\n\t" \ | 40 | " .quad 2b,3b\n\t" \ |
| 41 | ".previous" \ | 41 | ".previous" \ |
| 42 | : "=a" (ret__) \ | 42 | : "=a" (ret__) \ |
| 43 | : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT));\ | 43 | : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT)); \ |
| 44 | ret__; }) | 44 | ret__; }) |
| 45 | 45 | ||
| 46 | #define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32)) | 46 | #define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32)) |
| 47 | 47 | ||
| 48 | #define rdmsr_safe(msr,a,b) \ | ||
| 49 | ({ int ret__; \ | ||
| 50 | asm volatile ("1: rdmsr\n" \ | ||
| 51 | "2:\n" \ | ||
| 52 | ".section .fixup,\"ax\"\n" \ | ||
| 53 | "3: movl %4,%0\n" \ | ||
| 54 | " jmp 2b\n" \ | ||
| 55 | ".previous\n" \ | ||
| 56 | ".section __ex_table,\"a\"\n" \ | ||
| 57 | " .align 8\n" \ | ||
| 58 | " .quad 1b,3b\n" \ | ||
| 59 | ".previous":"=&bDS" (ret__), "=a"(a), "=d"(b)\ | ||
| 60 | :"c"(msr), "i"(-EIO), "0"(0)); \ | ||
| 61 | ret__; }) | ||
| 62 | |||
| 48 | #define rdtsc(low,high) \ | 63 | #define rdtsc(low,high) \ |
| 49 | __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) | 64 | __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) |
| 50 | 65 | ||
| @@ -64,7 +79,7 @@ | |||
| 64 | : "=a" (low), "=d" (high) \ | 79 | : "=a" (low), "=d" (high) \ |
| 65 | : "c" (counter)) | 80 | : "c" (counter)) |
| 66 | 81 | ||
| 67 | extern inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, | 82 | static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, |
| 68 | unsigned int *ecx, unsigned int *edx) | 83 | unsigned int *ecx, unsigned int *edx) |
| 69 | { | 84 | { |
| 70 | __asm__("cpuid" | 85 | __asm__("cpuid" |
| @@ -90,7 +105,7 @@ static inline void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx, | |||
| 90 | /* | 105 | /* |
| 91 | * CPUID functions returning a single datum | 106 | * CPUID functions returning a single datum |
| 92 | */ | 107 | */ |
| 93 | extern inline unsigned int cpuid_eax(unsigned int op) | 108 | static inline unsigned int cpuid_eax(unsigned int op) |
| 94 | { | 109 | { |
| 95 | unsigned int eax; | 110 | unsigned int eax; |
| 96 | 111 | ||
| @@ -100,7 +115,7 @@ extern inline unsigned int cpuid_eax(unsigned int op) | |||
| 100 | : "bx", "cx", "dx"); | 115 | : "bx", "cx", "dx"); |
| 101 | return eax; | 116 | return eax; |
| 102 | } | 117 | } |
| 103 | extern inline unsigned int cpuid_ebx(unsigned int op) | 118 | static inline unsigned int cpuid_ebx(unsigned int op) |
| 104 | { | 119 | { |
| 105 | unsigned int eax, ebx; | 120 | unsigned int eax, ebx; |
| 106 | 121 | ||
| @@ -110,7 +125,7 @@ extern inline unsigned int cpuid_ebx(unsigned int op) | |||
| 110 | : "cx", "dx" ); | 125 | : "cx", "dx" ); |
| 111 | return ebx; | 126 | return ebx; |
| 112 | } | 127 | } |
| 113 | extern inline unsigned int cpuid_ecx(unsigned int op) | 128 | static inline unsigned int cpuid_ecx(unsigned int op) |
| 114 | { | 129 | { |
| 115 | unsigned int eax, ecx; | 130 | unsigned int eax, ecx; |
| 116 | 131 | ||
| @@ -120,7 +135,7 @@ extern inline unsigned int cpuid_ecx(unsigned int op) | |||
| 120 | : "bx", "dx" ); | 135 | : "bx", "dx" ); |
| 121 | return ecx; | 136 | return ecx; |
| 122 | } | 137 | } |
| 123 | extern inline unsigned int cpuid_edx(unsigned int op) | 138 | static inline unsigned int cpuid_edx(unsigned int op) |
| 124 | { | 139 | { |
| 125 | unsigned int eax, edx; | 140 | unsigned int eax, edx; |
| 126 | 141 | ||
diff --git a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h index 5c363a1482e4..bcf55c3f7f7f 100644 --- a/include/asm-x86_64/numa.h +++ b/include/asm-x86_64/numa.h | |||
| @@ -9,6 +9,7 @@ struct node { | |||
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | extern int compute_hash_shift(struct node *nodes, int numnodes); | 11 | extern int compute_hash_shift(struct node *nodes, int numnodes); |
| 12 | extern int pxm_to_node(int nid); | ||
| 12 | 13 | ||
| 13 | #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT)) | 14 | #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT)) |
| 14 | 15 | ||
| @@ -16,6 +17,8 @@ extern void numa_add_cpu(int cpu); | |||
| 16 | extern void numa_init_array(void); | 17 | extern void numa_init_array(void); |
| 17 | extern int numa_off; | 18 | extern int numa_off; |
| 18 | 19 | ||
| 20 | extern unsigned char apicid_to_node[256]; | ||
| 21 | |||
| 19 | #define NUMA_NO_NODE 0xff | 22 | #define NUMA_NO_NODE 0xff |
| 20 | 23 | ||
| 21 | #endif | 24 | #endif |
diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h index 135ffaa0393b..e5ab4d231f2c 100644 --- a/include/asm-x86_64/page.h +++ b/include/asm-x86_64/page.h | |||
| @@ -32,6 +32,8 @@ | |||
| 32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
| 33 | #ifndef __ASSEMBLY__ | 33 | #ifndef __ASSEMBLY__ |
| 34 | 34 | ||
| 35 | extern unsigned long end_pfn; | ||
| 36 | |||
| 35 | void clear_page(void *); | 37 | void clear_page(void *); |
| 36 | void copy_page(void *, void *); | 38 | void copy_page(void *, void *); |
| 37 | 39 | ||
| @@ -111,7 +113,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
| 111 | #ifdef CONFIG_FLATMEM | 113 | #ifdef CONFIG_FLATMEM |
| 112 | #define pfn_to_page(pfn) (mem_map + (pfn)) | 114 | #define pfn_to_page(pfn) (mem_map + (pfn)) |
| 113 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) | 115 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) |
| 114 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 116 | #define pfn_valid(pfn) ((pfn) < end_pfn) |
| 115 | #endif | 117 | #endif |
| 116 | 118 | ||
| 117 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 119 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h index eeb3088a1c9e..5a82a6762c21 100644 --- a/include/asm-x86_64/pci.h +++ b/include/asm-x86_64/pci.h | |||
| @@ -50,10 +50,10 @@ extern int iommu_setup(char *opt); | |||
| 50 | * address space. The networking and block device layers use | 50 | * address space. The networking and block device layers use |
| 51 | * this boolean for bounce buffer decisions | 51 | * this boolean for bounce buffer decisions |
| 52 | * | 52 | * |
| 53 | * On AMD64 it mostly equals, but we set it to zero to tell some subsystems | 53 | * On x86-64 it mostly equals, but we set it to zero to tell some subsystems |
| 54 | * that an IOMMU is available. | 54 | * that an hard or soft IOMMU is available. |
| 55 | */ | 55 | */ |
| 56 | #define PCI_DMA_BUS_IS_PHYS (no_iommu ? 1 : 0) | 56 | #define PCI_DMA_BUS_IS_PHYS 0 |
| 57 | 57 | ||
| 58 | /* | 58 | /* |
| 59 | * x86-64 always supports DAC, but sometimes it is useful to force | 59 | * x86-64 always supports DAC, but sometimes it is useful to force |
diff --git a/include/asm-x86_64/pda.h b/include/asm-x86_64/pda.h index 36b766cfc4d5..bbf89aa8a1af 100644 --- a/include/asm-x86_64/pda.h +++ b/include/asm-x86_64/pda.h | |||
| @@ -10,10 +10,8 @@ | |||
| 10 | struct x8664_pda { | 10 | struct x8664_pda { |
| 11 | struct task_struct *pcurrent; /* Current process */ | 11 | struct task_struct *pcurrent; /* Current process */ |
| 12 | unsigned long data_offset; /* Per cpu data offset from linker address */ | 12 | unsigned long data_offset; /* Per cpu data offset from linker address */ |
| 13 | struct x8664_pda *me; /* Pointer to itself */ | ||
| 14 | unsigned long kernelstack; /* top of kernel stack for current */ | 13 | unsigned long kernelstack; /* top of kernel stack for current */ |
| 15 | unsigned long oldrsp; /* user rsp for system call */ | 14 | unsigned long oldrsp; /* user rsp for system call */ |
| 16 | unsigned long irqrsp; /* Old rsp for interrupts. */ | ||
| 17 | int irqcount; /* Irq nesting counter. Starts with -1 */ | 15 | int irqcount; /* Irq nesting counter. Starts with -1 */ |
| 18 | int cpunumber; /* Logical CPU number */ | 16 | int cpunumber; /* Logical CPU number */ |
| 19 | char *irqstackptr; /* top of irqstack */ | 17 | char *irqstackptr; /* top of irqstack */ |
| @@ -22,7 +20,7 @@ struct x8664_pda { | |||
| 22 | struct mm_struct *active_mm; | 20 | struct mm_struct *active_mm; |
| 23 | int mmu_state; | 21 | int mmu_state; |
| 24 | unsigned apic_timer_irqs; | 22 | unsigned apic_timer_irqs; |
| 25 | } ____cacheline_aligned; | 23 | } ____cacheline_aligned_in_smp; |
| 26 | 24 | ||
| 27 | 25 | ||
| 28 | #define IRQSTACK_ORDER 2 | 26 | #define IRQSTACK_ORDER 2 |
| @@ -42,13 +40,14 @@ extern void __bad_pda_field(void); | |||
| 42 | #define pda_offset(field) offsetof(struct x8664_pda, field) | 40 | #define pda_offset(field) offsetof(struct x8664_pda, field) |
| 43 | 41 | ||
| 44 | #define pda_to_op(op,field,val) do { \ | 42 | #define pda_to_op(op,field,val) do { \ |
| 43 | typedef typeof_field(struct x8664_pda, field) T__; \ | ||
| 45 | switch (sizeof_field(struct x8664_pda, field)) { \ | 44 | switch (sizeof_field(struct x8664_pda, field)) { \ |
| 46 | case 2: \ | 45 | case 2: \ |
| 47 | asm volatile(op "w %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ | 46 | asm volatile(op "w %0,%%gs:%P1"::"ri" ((T__)val),"i"(pda_offset(field)):"memory"); break; \ |
| 48 | case 4: \ | 47 | case 4: \ |
| 49 | asm volatile(op "l %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ | 48 | asm volatile(op "l %0,%%gs:%P1"::"ri" ((T__)val),"i"(pda_offset(field)):"memory"); break; \ |
| 50 | case 8: \ | 49 | case 8: \ |
| 51 | asm volatile(op "q %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ | 50 | asm volatile(op "q %0,%%gs:%P1"::"ri" ((T__)val),"i"(pda_offset(field)):"memory"); break; \ |
| 52 | default: __bad_pda_field(); \ | 51 | default: __bad_pda_field(); \ |
| 53 | } \ | 52 | } \ |
| 54 | } while (0) | 53 | } while (0) |
| @@ -58,7 +57,7 @@ asm volatile(op "q %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); bre | |||
| 58 | * Unfortunately removing them causes all hell to break lose currently. | 57 | * Unfortunately removing them causes all hell to break lose currently. |
| 59 | */ | 58 | */ |
| 60 | #define pda_from_op(op,field) ({ \ | 59 | #define pda_from_op(op,field) ({ \ |
| 61 | typedef typeof_field(struct x8664_pda, field) T__; T__ ret__; \ | 60 | typeof_field(struct x8664_pda, field) ret__; \ |
| 62 | switch (sizeof_field(struct x8664_pda, field)) { \ | 61 | switch (sizeof_field(struct x8664_pda, field)) { \ |
| 63 | case 2: \ | 62 | case 2: \ |
| 64 | asm volatile(op "w %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\ | 63 | asm volatile(op "w %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\ |
| @@ -75,6 +74,7 @@ asm volatile(op "q %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); b | |||
| 75 | #define write_pda(field,val) pda_to_op("mov",field,val) | 74 | #define write_pda(field,val) pda_to_op("mov",field,val) |
| 76 | #define add_pda(field,val) pda_to_op("add",field,val) | 75 | #define add_pda(field,val) pda_to_op("add",field,val) |
| 77 | #define sub_pda(field,val) pda_to_op("sub",field,val) | 76 | #define sub_pda(field,val) pda_to_op("sub",field,val) |
| 77 | #define or_pda(field,val) pda_to_op("or",field,val) | ||
| 78 | 78 | ||
| 79 | #endif | 79 | #endif |
| 80 | 80 | ||
diff --git a/include/asm-x86_64/pgalloc.h b/include/asm-x86_64/pgalloc.h index deadd146978b..08cad2482bcb 100644 --- a/include/asm-x86_64/pgalloc.h +++ b/include/asm-x86_64/pgalloc.h | |||
| @@ -18,12 +18,12 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *p | |||
| 18 | set_pmd(pmd, __pmd(_PAGE_TABLE | (page_to_pfn(pte) << PAGE_SHIFT))); | 18 | set_pmd(pmd, __pmd(_PAGE_TABLE | (page_to_pfn(pte) << PAGE_SHIFT))); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | extern __inline__ pmd_t *get_pmd(void) | 21 | static inline pmd_t *get_pmd(void) |
| 22 | { | 22 | { |
| 23 | return (pmd_t *)get_zeroed_page(GFP_KERNEL); | 23 | return (pmd_t *)get_zeroed_page(GFP_KERNEL); |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | extern __inline__ void pmd_free(pmd_t *pmd) | 26 | static inline void pmd_free(pmd_t *pmd) |
| 27 | { | 27 | { |
| 28 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); | 28 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); |
| 29 | free_page((unsigned long)pmd); | 29 | free_page((unsigned long)pmd); |
| @@ -86,13 +86,13 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long add | |||
| 86 | /* Should really implement gc for free page table pages. This could be | 86 | /* Should really implement gc for free page table pages. This could be |
| 87 | done with a reference count in struct page. */ | 87 | done with a reference count in struct page. */ |
| 88 | 88 | ||
| 89 | extern __inline__ void pte_free_kernel(pte_t *pte) | 89 | static inline void pte_free_kernel(pte_t *pte) |
| 90 | { | 90 | { |
| 91 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); | 91 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); |
| 92 | free_page((unsigned long)pte); | 92 | free_page((unsigned long)pte); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | extern inline void pte_free(struct page *pte) | 95 | static inline void pte_free(struct page *pte) |
| 96 | { | 96 | { |
| 97 | __free_page(pte); | 97 | __free_page(pte); |
| 98 | } | 98 | } |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 5e0f2fdab0d3..2cb483516459 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
| @@ -85,7 +85,7 @@ static inline void set_pud(pud_t *dst, pud_t val) | |||
| 85 | pud_val(*dst) = pud_val(val); | 85 | pud_val(*dst) = pud_val(val); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | extern inline void pud_clear (pud_t *pud) | 88 | static inline void pud_clear (pud_t *pud) |
| 89 | { | 89 | { |
| 90 | set_pud(pud, __pud(0)); | 90 | set_pud(pud, __pud(0)); |
| 91 | } | 91 | } |
| @@ -95,7 +95,7 @@ static inline void set_pgd(pgd_t *dst, pgd_t val) | |||
| 95 | pgd_val(*dst) = pgd_val(val); | 95 | pgd_val(*dst) = pgd_val(val); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | extern inline void pgd_clear (pgd_t * pgd) | 98 | static inline void pgd_clear (pgd_t * pgd) |
| 99 | { | 99 | { |
| 100 | set_pgd(pgd, __pgd(0)); | 100 | set_pgd(pgd, __pgd(0)); |
| 101 | } | 101 | } |
| @@ -375,7 +375,7 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) | |||
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | /* Change flags of a PTE */ | 377 | /* Change flags of a PTE */ |
| 378 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 378 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
| 379 | { | 379 | { |
| 380 | pte_val(pte) &= _PAGE_CHG_MASK; | 380 | pte_val(pte) &= _PAGE_CHG_MASK; |
| 381 | pte_val(pte) |= pgprot_val(newprot); | 381 | pte_val(pte) |= pgprot_val(newprot); |
| @@ -421,9 +421,6 @@ extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
| 421 | 421 | ||
| 422 | extern int kern_addr_valid(unsigned long addr); | 422 | extern int kern_addr_valid(unsigned long addr); |
| 423 | 423 | ||
| 424 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
| 425 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
| 426 | |||
| 427 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 424 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
| 428 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 425 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
| 429 | 426 | ||
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index a8321999448f..03837d34fba0 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
| @@ -254,7 +254,13 @@ struct thread_struct { | |||
| 254 | u64 tls_array[GDT_ENTRY_TLS_ENTRIES]; | 254 | u64 tls_array[GDT_ENTRY_TLS_ENTRIES]; |
| 255 | } __attribute__((aligned(16))); | 255 | } __attribute__((aligned(16))); |
| 256 | 256 | ||
| 257 | #define INIT_THREAD {} | 257 | #define INIT_THREAD { \ |
| 258 | .rsp0 = (unsigned long)&init_stack + sizeof(init_stack) \ | ||
| 259 | } | ||
| 260 | |||
| 261 | #define INIT_TSS { \ | ||
| 262 | .rsp0 = (unsigned long)&init_stack + sizeof(init_stack) \ | ||
| 263 | } | ||
| 258 | 264 | ||
| 259 | #define INIT_MMAP \ | 265 | #define INIT_MMAP \ |
| 260 | { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } | 266 | { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } |
| @@ -375,13 +381,13 @@ struct extended_sigtable { | |||
| 375 | #define ASM_NOP_MAX 8 | 381 | #define ASM_NOP_MAX 8 |
| 376 | 382 | ||
| 377 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ | 383 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ |
| 378 | extern inline void rep_nop(void) | 384 | static inline void rep_nop(void) |
| 379 | { | 385 | { |
| 380 | __asm__ __volatile__("rep;nop": : :"memory"); | 386 | __asm__ __volatile__("rep;nop": : :"memory"); |
| 381 | } | 387 | } |
| 382 | 388 | ||
| 383 | /* Stop speculative execution */ | 389 | /* Stop speculative execution */ |
| 384 | extern inline void sync_core(void) | 390 | static inline void sync_core(void) |
| 385 | { | 391 | { |
| 386 | int tmp; | 392 | int tmp; |
| 387 | asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory"); | 393 | asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory"); |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index f7574196424e..dbb37b0adb43 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
| @@ -74,9 +74,6 @@ extern void acpi_reserve_bootmem(void); | |||
| 74 | 74 | ||
| 75 | extern void swap_low_mappings(void); | 75 | extern void swap_low_mappings(void); |
| 76 | 76 | ||
| 77 | extern void oops_begin(void); | ||
| 78 | extern void die(const char *,struct pt_regs *,long); | ||
| 79 | extern void __die(const char * str, struct pt_regs * regs, long err); | ||
| 80 | extern void __show_regs(struct pt_regs * regs); | 77 | extern void __show_regs(struct pt_regs * regs); |
| 81 | extern void show_regs(struct pt_regs * regs); | 78 | extern void show_regs(struct pt_regs * regs); |
| 82 | 79 | ||
| @@ -93,8 +90,6 @@ extern int unhandled_signal(struct task_struct *tsk, int sig); | |||
| 93 | extern void select_idle_routine(const struct cpuinfo_x86 *c); | 90 | extern void select_idle_routine(const struct cpuinfo_x86 *c); |
| 94 | extern void swiotlb_init(void); | 91 | extern void swiotlb_init(void); |
| 95 | 92 | ||
| 96 | extern unsigned long max_mapnr; | ||
| 97 | extern unsigned long end_pfn; | ||
| 98 | extern unsigned long table_start, table_end; | 93 | extern unsigned long table_start, table_end; |
| 99 | 94 | ||
| 100 | extern int exception_trace; | 95 | extern int exception_trace; |
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h index fe9b96d94815..f8d55798535a 100644 --- a/include/asm-x86_64/signal.h +++ b/include/asm-x86_64/signal.h | |||
| @@ -143,23 +143,23 @@ typedef struct sigaltstack { | |||
| 143 | #undef __HAVE_ARCH_SIG_BITOPS | 143 | #undef __HAVE_ARCH_SIG_BITOPS |
| 144 | #if 0 | 144 | #if 0 |
| 145 | 145 | ||
| 146 | extern __inline__ void sigaddset(sigset_t *set, int _sig) | 146 | static inline void sigaddset(sigset_t *set, int _sig) |
| 147 | { | 147 | { |
| 148 | __asm__("btsq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); | 148 | __asm__("btsq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | extern __inline__ void sigdelset(sigset_t *set, int _sig) | 151 | static inline void sigdelset(sigset_t *set, int _sig) |
| 152 | { | 152 | { |
| 153 | __asm__("btrq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); | 153 | __asm__("btrq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | extern __inline__ int __const_sigismember(sigset_t *set, int _sig) | 156 | static inline int __const_sigismember(sigset_t *set, int _sig) |
| 157 | { | 157 | { |
| 158 | unsigned long sig = _sig - 1; | 158 | unsigned long sig = _sig - 1; |
| 159 | return 1 & (set->sig[sig / _NSIG_BPW] >> (sig & ~(_NSIG_BPW-1))); | 159 | return 1 & (set->sig[sig / _NSIG_BPW] >> (sig & ~(_NSIG_BPW-1))); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | extern __inline__ int __gen_sigismember(sigset_t *set, int _sig) | 162 | static inline int __gen_sigismember(sigset_t *set, int _sig) |
| 163 | { | 163 | { |
| 164 | int ret; | 164 | int ret; |
| 165 | __asm__("btq %2,%1\n\tsbbq %0,%0" | 165 | __asm__("btq %2,%1\n\tsbbq %0,%0" |
| @@ -172,7 +172,7 @@ extern __inline__ int __gen_sigismember(sigset_t *set, int _sig) | |||
| 172 | __const_sigismember((set),(sig)) : \ | 172 | __const_sigismember((set),(sig)) : \ |
| 173 | __gen_sigismember((set),(sig))) | 173 | __gen_sigismember((set),(sig))) |
| 174 | 174 | ||
| 175 | extern __inline__ int sigfindinword(unsigned long word) | 175 | static inline int sigfindinword(unsigned long word) |
| 176 | { | 176 | { |
| 177 | __asm__("bsfq %1,%0" : "=r"(word) : "rm"(word) : "cc"); | 177 | __asm__("bsfq %1,%0" : "=r"(word) : "rm"(word) : "cc"); |
| 178 | return word; | 178 | return word; |
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index de8b57b2b62b..24e32611f0bf 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h | |||
| @@ -72,7 +72,7 @@ static inline int num_booting_cpus(void) | |||
| 72 | 72 | ||
| 73 | #define raw_smp_processor_id() read_pda(cpunumber) | 73 | #define raw_smp_processor_id() read_pda(cpunumber) |
| 74 | 74 | ||
| 75 | extern __inline int hard_smp_processor_id(void) | 75 | static inline int hard_smp_processor_id(void) |
| 76 | { | 76 | { |
| 77 | /* we don't want to mark this access volatile - bad code generation */ | 77 | /* we don't want to mark this access volatile - bad code generation */ |
| 78 | return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID)); | 78 | return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID)); |
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index 8606e170a7dc..85348e02ad2e 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
| @@ -188,7 +188,7 @@ static inline void write_cr4(unsigned long val) | |||
| 188 | 188 | ||
| 189 | #define __xg(x) ((volatile long *)(x)) | 189 | #define __xg(x) ((volatile long *)(x)) |
| 190 | 190 | ||
| 191 | extern inline void set_64bit(volatile unsigned long *ptr, unsigned long val) | 191 | static inline void set_64bit(volatile unsigned long *ptr, unsigned long val) |
| 192 | { | 192 | { |
| 193 | *ptr = val; | 193 | *ptr = val; |
| 194 | } | 194 | } |
| @@ -253,19 +253,19 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
| 253 | case 2: | 253 | case 2: |
| 254 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2" | 254 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2" |
| 255 | : "=a"(prev) | 255 | : "=a"(prev) |
| 256 | : "q"(new), "m"(*__xg(ptr)), "0"(old) | 256 | : "r"(new), "m"(*__xg(ptr)), "0"(old) |
| 257 | : "memory"); | 257 | : "memory"); |
| 258 | return prev; | 258 | return prev; |
| 259 | case 4: | 259 | case 4: |
| 260 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %k1,%2" | 260 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %k1,%2" |
| 261 | : "=a"(prev) | 261 | : "=a"(prev) |
| 262 | : "q"(new), "m"(*__xg(ptr)), "0"(old) | 262 | : "r"(new), "m"(*__xg(ptr)), "0"(old) |
| 263 | : "memory"); | 263 | : "memory"); |
| 264 | return prev; | 264 | return prev; |
| 265 | case 8: | 265 | case 8: |
| 266 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgq %1,%2" | 266 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgq %1,%2" |
| 267 | : "=a"(prev) | 267 | : "=a"(prev) |
| 268 | : "q"(new), "m"(*__xg(ptr)), "0"(old) | 268 | : "r"(new), "m"(*__xg(ptr)), "0"(old) |
| 269 | : "memory"); | 269 | : "memory"); |
| 270 | return prev; | 270 | return prev; |
| 271 | } | 271 | } |
diff --git a/include/asm-x86_64/timex.h b/include/asm-x86_64/timex.h index 24ecf6a637cb..f971f45d6d78 100644 --- a/include/asm-x86_64/timex.h +++ b/include/asm-x86_64/timex.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | #ifndef _ASMx8664_TIMEX_H | 6 | #ifndef _ASMx8664_TIMEX_H |
| 7 | #define _ASMx8664_TIMEX_H | 7 | #define _ASMx8664_TIMEX_H |
| 8 | 8 | ||
| 9 | #include <linux/config.h> | ||
| 10 | #include <asm/8253pit.h> | 9 | #include <asm/8253pit.h> |
| 11 | #include <asm/msr.h> | 10 | #include <asm/msr.h> |
| 12 | #include <asm/vsyscall.h> | 11 | #include <asm/vsyscall.h> |
diff --git a/include/asm-x86_64/tlbflush.h b/include/asm-x86_64/tlbflush.h index 505b0cf906de..4a9c20ea9b10 100644 --- a/include/asm-x86_64/tlbflush.h +++ b/include/asm-x86_64/tlbflush.h | |||
| @@ -109,6 +109,10 @@ static inline void flush_tlb_range(struct vm_area_struct * vma, unsigned long st | |||
| 109 | #define TLBSTATE_OK 1 | 109 | #define TLBSTATE_OK 1 |
| 110 | #define TLBSTATE_LAZY 2 | 110 | #define TLBSTATE_LAZY 2 |
| 111 | 111 | ||
| 112 | /* Roughly an IPI every 20MB with 4k pages for freeing page table | ||
| 113 | ranges. Cost is about 42k of memory for each CPU. */ | ||
| 114 | #define ARCH_FREE_PTE_NR 5350 | ||
| 115 | |||
| 112 | #endif | 116 | #endif |
| 113 | 117 | ||
| 114 | #define flush_tlb_kernel_range(start, end) flush_tlb_all() | 118 | #define flush_tlb_kernel_range(start, end) flush_tlb_all() |
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index c1bc3fad482e..1c603cd7e4d0 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | extern cpumask_t cpu_online_map; | 13 | extern cpumask_t cpu_online_map; |
| 14 | 14 | ||
| 15 | extern unsigned char cpu_to_node[]; | 15 | extern unsigned char cpu_to_node[]; |
| 16 | extern unsigned char pci_bus_to_node[]; | ||
| 17 | extern cpumask_t node_to_cpumask[]; | 16 | extern cpumask_t node_to_cpumask[]; |
| 18 | 17 | ||
| 19 | #ifdef CONFIG_ACPI_NUMA | 18 | #ifdef CONFIG_ACPI_NUMA |
| @@ -26,7 +25,7 @@ extern int __node_distance(int, int); | |||
| 26 | #define parent_node(node) (node) | 25 | #define parent_node(node) (node) |
| 27 | #define node_to_first_cpu(node) (__ffs(node_to_cpumask[node])) | 26 | #define node_to_first_cpu(node) (__ffs(node_to_cpumask[node])) |
| 28 | #define node_to_cpumask(node) (node_to_cpumask[node]) | 27 | #define node_to_cpumask(node) (node_to_cpumask[node]) |
| 29 | #define pcibus_to_node(bus) pci_bus_to_node[(bus)->number] | 28 | #define pcibus_to_node(bus) ((long)(bus->sysdata)) |
| 30 | #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)); | 29 | #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)); |
| 31 | 30 | ||
| 32 | /* sched_domains SD_NODE_INIT for x86_64 machines */ | 31 | /* sched_domains SD_NODE_INIT for x86_64 machines */ |
diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h index 2872da23fc7e..438a3f52f839 100644 --- a/include/asm-x86_64/vsyscall.h +++ b/include/asm-x86_64/vsyscall.h | |||
| @@ -29,7 +29,6 @@ enum vsyscall_num { | |||
| 29 | 29 | ||
| 30 | struct vxtime_data { | 30 | struct vxtime_data { |
| 31 | long hpet_address; /* HPET base address */ | 31 | long hpet_address; /* HPET base address */ |
| 32 | unsigned long hz; /* HPET clocks / sec */ | ||
| 33 | int last; | 32 | int last; |
| 34 | unsigned long last_tsc; | 33 | unsigned long last_tsc; |
| 35 | long quot; | 34 | long quot; |
diff --git a/include/asm-xtensa/pgtable.h b/include/asm-xtensa/pgtable.h index 883ebc2d75d6..987e3b802313 100644 --- a/include/asm-xtensa/pgtable.h +++ b/include/asm-xtensa/pgtable.h | |||
| @@ -441,11 +441,11 @@ extern void update_mmu_cache(struct vm_area_struct * vma, | |||
| 441 | unsigned long address, pte_t pte); | 441 | unsigned long address, pte_t pte); |
| 442 | 442 | ||
| 443 | /* | 443 | /* |
| 444 | * remap a physical address `phys' of size `size' with page protection `prot' | 444 | * remap a physical page `pfn' of size `size' with page protection `prot' |
| 445 | * into virtual address `from' | 445 | * into virtual address `from' |
| 446 | */ | 446 | */ |
| 447 | #define io_remap_page_range(vma,from,phys,size,prot) \ | 447 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ |
| 448 | remap_pfn_range(vma, from, (phys) >> PAGE_SHIFT, size, prot) | 448 | remap_pfn_range(vma, from, pfn, size, prot) |
| 449 | 449 | ||
| 450 | 450 | ||
| 451 | /* No page table caches to init */ | 451 | /* No page table caches to init */ |
diff --git a/include/linux/connector.h b/include/linux/connector.h new file mode 100644 index 000000000000..96de26301f84 --- /dev/null +++ b/include/linux/connector.h | |||
| @@ -0,0 +1,158 @@ | |||
| 1 | /* | ||
| 2 | * connector.h | ||
| 3 | * | ||
| 4 | * 2004-2005 Copyright (c) Evgeniy Polyakov <johnpol@2ka.mipt.ru> | ||
| 5 | * All rights reserved. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef __CONNECTOR_H | ||
| 23 | #define __CONNECTOR_H | ||
| 24 | |||
| 25 | #include <asm/types.h> | ||
| 26 | |||
| 27 | #define CN_IDX_CONNECTOR 0xffffffff | ||
| 28 | #define CN_VAL_CONNECTOR 0xffffffff | ||
| 29 | |||
| 30 | #define CN_NETLINK_USERS 1 | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Maximum connector's message size. | ||
| 34 | */ | ||
| 35 | #define CONNECTOR_MAX_MSG_SIZE 1024 | ||
| 36 | |||
| 37 | /* | ||
| 38 | * idx and val are unique identifiers which | ||
| 39 | * are used for message routing and | ||
| 40 | * must be registered in connector.h for in-kernel usage. | ||
| 41 | */ | ||
| 42 | |||
| 43 | struct cb_id { | ||
| 44 | __u32 idx; | ||
| 45 | __u32 val; | ||
| 46 | }; | ||
| 47 | |||
| 48 | struct cn_msg { | ||
| 49 | struct cb_id id; | ||
| 50 | |||
| 51 | __u32 seq; | ||
| 52 | __u32 ack; | ||
| 53 | |||
| 54 | __u16 len; /* Length of the following data */ | ||
| 55 | __u16 flags; | ||
| 56 | __u8 data[0]; | ||
| 57 | }; | ||
| 58 | |||
| 59 | /* | ||
| 60 | * Notify structure - requests notification about | ||
| 61 | * registering/unregistering idx/val in range [first, first+range]. | ||
| 62 | */ | ||
| 63 | struct cn_notify_req { | ||
| 64 | __u32 first; | ||
| 65 | __u32 range; | ||
| 66 | }; | ||
| 67 | |||
| 68 | /* | ||
| 69 | * Main notification control message | ||
| 70 | * *_notify_num - number of appropriate cn_notify_req structures after | ||
| 71 | * this struct. | ||
| 72 | * group - notification receiver's idx. | ||
| 73 | * len - total length of the attached data. | ||
| 74 | */ | ||
| 75 | struct cn_ctl_msg { | ||
| 76 | __u32 idx_notify_num; | ||
| 77 | __u32 val_notify_num; | ||
| 78 | __u32 group; | ||
| 79 | __u32 len; | ||
| 80 | __u8 data[0]; | ||
| 81 | }; | ||
| 82 | |||
| 83 | #ifdef __KERNEL__ | ||
| 84 | |||
| 85 | #include <asm/atomic.h> | ||
| 86 | |||
| 87 | #include <linux/list.h> | ||
| 88 | #include <linux/workqueue.h> | ||
| 89 | |||
| 90 | #include <net/sock.h> | ||
| 91 | |||
| 92 | #define CN_CBQ_NAMELEN 32 | ||
| 93 | |||
| 94 | struct cn_queue_dev { | ||
| 95 | atomic_t refcnt; | ||
| 96 | unsigned char name[CN_CBQ_NAMELEN]; | ||
| 97 | |||
| 98 | struct workqueue_struct *cn_queue; | ||
| 99 | |||
| 100 | struct list_head queue_list; | ||
| 101 | spinlock_t queue_lock; | ||
| 102 | |||
| 103 | int netlink_groups; | ||
| 104 | struct sock *nls; | ||
| 105 | }; | ||
| 106 | |||
| 107 | struct cn_callback { | ||
| 108 | unsigned char name[CN_CBQ_NAMELEN]; | ||
| 109 | |||
| 110 | struct cb_id id; | ||
| 111 | void (*callback) (void *); | ||
| 112 | void *priv; | ||
| 113 | }; | ||
| 114 | |||
| 115 | struct cn_callback_entry { | ||
| 116 | struct list_head callback_entry; | ||
| 117 | struct cn_callback *cb; | ||
| 118 | struct work_struct work; | ||
| 119 | struct cn_queue_dev *pdev; | ||
| 120 | |||
| 121 | void (*destruct_data) (void *); | ||
| 122 | void *ddata; | ||
| 123 | |||
| 124 | int seq, group; | ||
| 125 | struct sock *nls; | ||
| 126 | }; | ||
| 127 | |||
| 128 | struct cn_ctl_entry { | ||
| 129 | struct list_head notify_entry; | ||
| 130 | struct cn_ctl_msg *msg; | ||
| 131 | }; | ||
| 132 | |||
| 133 | struct cn_dev { | ||
| 134 | struct cb_id id; | ||
| 135 | |||
| 136 | u32 seq, groups; | ||
| 137 | struct sock *nls; | ||
| 138 | void (*input) (struct sock * sk, int len); | ||
| 139 | |||
| 140 | struct cn_queue_dev *cbdev; | ||
| 141 | }; | ||
| 142 | |||
| 143 | int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); | ||
| 144 | void cn_del_callback(struct cb_id *); | ||
| 145 | int cn_netlink_send(struct cn_msg *, u32, int); | ||
| 146 | |||
| 147 | int cn_queue_add_callback(struct cn_queue_dev *dev, struct cn_callback *cb); | ||
| 148 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | ||
| 149 | |||
| 150 | struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); | ||
| 151 | void cn_queue_free_dev(struct cn_queue_dev *dev); | ||
| 152 | |||
| 153 | int cn_cb_equal(struct cb_id *, struct cb_id *); | ||
| 154 | |||
| 155 | extern int cn_already_initialized; | ||
| 156 | |||
| 157 | #endif /* __KERNEL__ */ | ||
| 158 | #endif /* __CONNECTOR_H */ | ||
diff --git a/include/linux/crc16.h b/include/linux/crc16.h index bdedf825b04a..9443c084f881 100644 --- a/include/linux/crc16.h +++ b/include/linux/crc16.h | |||
| @@ -1,22 +1,11 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * crc16.h - CRC-16 routine | 2 | * crc16.h - CRC-16 routine |
| 3 | * | 3 | * |
| 4 | * Implements the standard CRC-16, as used with 1-wire devices: | 4 | * Implements the standard CRC-16: |
| 5 | * Width 16 | 5 | * Width 16 |
| 6 | * Poly 0x8005 (x^16 + x^15 + x^2 + 1) | 6 | * Poly 0x8005 (x^16 + x^15 + x^2 + 1) |
| 7 | * Init 0 | 7 | * Init 0 |
| 8 | * | 8 | * |
| 9 | * For 1-wire devices, the CRC is stored inverted, LSB-first | ||
| 10 | * | ||
| 11 | * Example buffer with the CRC attached: | ||
| 12 | * 31 32 33 34 35 36 37 38 39 C2 44 | ||
| 13 | * | ||
| 14 | * The CRC over a buffer with the CRC attached is 0xB001. | ||
| 15 | * So, if (crc16(0, buf, size) == 0xB001) then the buffer is valid. | ||
| 16 | * | ||
| 17 | * Refer to "Application Note 937: Book of iButton Standards" for details. | ||
| 18 | * http://www.maxim-ic.com/appnotes.cfm/appnote_number/937 | ||
| 19 | * | ||
| 20 | * Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com> | 9 | * Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com> |
| 21 | * | 10 | * |
| 22 | * This source code is licensed under the GNU General Public License, | 11 | * This source code is licensed under the GNU General Public License, |
| @@ -28,9 +17,6 @@ | |||
| 28 | 17 | ||
| 29 | #include <linux/types.h> | 18 | #include <linux/types.h> |
| 30 | 19 | ||
| 31 | #define CRC16_INIT 0 | ||
| 32 | #define CRC16_VALID 0xb001 | ||
| 33 | |||
| 34 | extern u16 const crc16_table[256]; | 20 | extern u16 const crc16_table[256]; |
| 35 | 21 | ||
| 36 | extern u16 crc16(u16 crc, const u8 *buffer, size_t len); | 22 | extern u16 crc16(u16 crc, const u8 *buffer, size_t len); |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index c30175e8dec6..a415f1d93e9a 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
| @@ -70,7 +70,7 @@ extern struct dmi_device * dmi_find_device(int type, const char *name, | |||
| 70 | 70 | ||
| 71 | static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } | 71 | static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } |
| 72 | static inline char * dmi_get_system_info(int field) { return NULL; } | 72 | static inline char * dmi_get_system_info(int field) { return NULL; } |
| 73 | static struct dmi_device * dmi_find_device(int type, const char *name, | 73 | static inline struct dmi_device * dmi_find_device(int type, const char *name, |
| 74 | struct dmi_device *from) { return NULL; } | 74 | struct dmi_device *from) { return NULL; } |
| 75 | 75 | ||
| 76 | #endif | 76 | #endif |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 82e39cd0c4fb..c698055266d0 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -619,7 +619,7 @@ struct fb_tilemap { | |||
| 619 | __u32 height; /* height of each tile in scanlines */ | 619 | __u32 height; /* height of each tile in scanlines */ |
| 620 | __u32 depth; /* color depth of each tile */ | 620 | __u32 depth; /* color depth of each tile */ |
| 621 | __u32 length; /* number of tiles in the map */ | 621 | __u32 length; /* number of tiles in the map */ |
| 622 | __u8 *data; /* actual tile map: a bitmap array, packed | 622 | const __u8 *data; /* actual tile map: a bitmap array, packed |
| 623 | to the nearest byte */ | 623 | to the nearest byte */ |
| 624 | }; | 624 | }; |
| 625 | 625 | ||
diff --git a/include/linux/font.h b/include/linux/font.h index 8fc80a7d78ac..53b129f07f6f 100644 --- a/include/linux/font.h +++ b/include/linux/font.h | |||
| @@ -15,9 +15,9 @@ | |||
| 15 | 15 | ||
| 16 | struct font_desc { | 16 | struct font_desc { |
| 17 | int idx; | 17 | int idx; |
| 18 | char *name; | 18 | const char *name; |
| 19 | int width, height; | 19 | int width, height; |
| 20 | void *data; | 20 | const void *data; |
| 21 | int pref; | 21 | int pref; |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| @@ -32,7 +32,7 @@ struct font_desc { | |||
| 32 | #define ACORN8x8_IDX 8 | 32 | #define ACORN8x8_IDX 8 |
| 33 | #define MINI4x6_IDX 9 | 33 | #define MINI4x6_IDX 9 |
| 34 | 34 | ||
| 35 | extern struct font_desc font_vga_8x8, | 35 | extern const struct font_desc font_vga_8x8, |
| 36 | font_vga_8x16, | 36 | font_vga_8x16, |
| 37 | font_pearl_8x8, | 37 | font_pearl_8x8, |
| 38 | font_vga_6x11, | 38 | font_vga_6x11, |
| @@ -45,11 +45,11 @@ extern struct font_desc font_vga_8x8, | |||
| 45 | 45 | ||
| 46 | /* Find a font with a specific name */ | 46 | /* Find a font with a specific name */ |
| 47 | 47 | ||
| 48 | extern struct font_desc *find_font(char *name); | 48 | extern const struct font_desc *find_font(const char *name); |
| 49 | 49 | ||
| 50 | /* Get the default font for a specific screen size */ | 50 | /* Get the default font for a specific screen size */ |
| 51 | 51 | ||
| 52 | extern struct font_desc *get_default_font(int xres, int yres); | 52 | extern const struct font_desc *get_default_font(int xres, int yres); |
| 53 | 53 | ||
| 54 | /* Max. length for the name of a predefined font */ | 54 | /* Max. length for the name of a predefined font */ |
| 55 | #define MAX_FONT_NAME 32 | 55 | #define MAX_FONT_NAME 32 |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index d99e7aeb7d33..0a90205184b0 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -57,6 +57,11 @@ extern void disable_irq(unsigned int irq); | |||
| 57 | extern void enable_irq(unsigned int irq); | 57 | extern void enable_irq(unsigned int irq); |
| 58 | #endif | 58 | #endif |
| 59 | 59 | ||
| 60 | #ifndef __ARCH_SET_SOFTIRQ_PENDING | ||
| 61 | #define set_softirq_pending(x) (local_softirq_pending() = (x)) | ||
| 62 | #define or_softirq_pending(x) (local_softirq_pending() |= (x)) | ||
| 63 | #endif | ||
| 64 | |||
| 60 | /* | 65 | /* |
| 61 | * Temporary defines for UP kernels, until all code gets fixed. | 66 | * Temporary defines for UP kernels, until all code gets fixed. |
| 62 | */ | 67 | */ |
| @@ -123,7 +128,7 @@ struct softirq_action | |||
| 123 | asmlinkage void do_softirq(void); | 128 | asmlinkage void do_softirq(void); |
| 124 | extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data); | 129 | extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data); |
| 125 | extern void softirq_init(void); | 130 | extern void softirq_init(void); |
| 126 | #define __raise_softirq_irqoff(nr) do { local_softirq_pending() |= 1UL << (nr); } while (0) | 131 | #define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0) |
| 127 | extern void FASTCALL(raise_softirq_irqoff(unsigned int nr)); | 132 | extern void FASTCALL(raise_softirq_irqoff(unsigned int nr)); |
| 128 | extern void FASTCALL(raise_softirq(unsigned int nr)); | 133 | extern void FASTCALL(raise_softirq(unsigned int nr)); |
| 129 | 134 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 687ba8c9973d..4367ce4db52a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -307,8 +307,8 @@ struct sysinfo { | |||
| 307 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ | 307 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ |
| 308 | }; | 308 | }; |
| 309 | 309 | ||
| 310 | extern void BUILD_BUG(void); | 310 | /* Force a compilation error if condition is false */ |
| 311 | #define BUILD_BUG_ON(condition) do { if (condition) BUILD_BUG(); } while(0) | 311 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
| 312 | 312 | ||
| 313 | #ifdef CONFIG_SYSCTL | 313 | #ifdef CONFIG_SYSCTL |
| 314 | extern int randomize_va_space; | 314 | extern int randomize_va_space; |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 167518668936..7bbd25970c9e 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #define NETLINK_ISCSI 8 /* Open-iSCSI */ | 15 | #define NETLINK_ISCSI 8 /* Open-iSCSI */ |
| 16 | #define NETLINK_AUDIT 9 /* auditing */ | 16 | #define NETLINK_AUDIT 9 /* auditing */ |
| 17 | #define NETLINK_FIB_LOOKUP 10 | 17 | #define NETLINK_FIB_LOOKUP 10 |
| 18 | #define NETLINK_CONNECTOR 11 | ||
| 18 | #define NETLINK_NETFILTER 12 /* netfilter subsystem */ | 19 | #define NETLINK_NETFILTER 12 /* netfilter subsystem */ |
| 19 | #define NETLINK_IP6_FW 13 | 20 | #define NETLINK_IP6_FW 13 |
| 20 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ | 21 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ |
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index 4d24d65c0e88..8903688890ce 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h | |||
| @@ -438,17 +438,22 @@ extern int nfsd4_process_open1(struct nfsd4_open *open); | |||
| 438 | extern int nfsd4_process_open2(struct svc_rqst *rqstp, | 438 | extern int nfsd4_process_open2(struct svc_rqst *rqstp, |
| 439 | struct svc_fh *current_fh, struct nfsd4_open *open); | 439 | struct svc_fh *current_fh, struct nfsd4_open *open); |
| 440 | extern int nfsd4_open_confirm(struct svc_rqst *rqstp, | 440 | extern int nfsd4_open_confirm(struct svc_rqst *rqstp, |
| 441 | struct svc_fh *current_fh, struct nfsd4_open_confirm *oc); | 441 | struct svc_fh *current_fh, struct nfsd4_open_confirm *oc, |
| 442 | struct nfs4_stateowner **); | ||
| 442 | extern int nfsd4_close(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 443 | extern int nfsd4_close(struct svc_rqst *rqstp, struct svc_fh *current_fh, |
| 443 | struct nfsd4_close *close); | 444 | struct nfsd4_close *close, |
| 445 | struct nfs4_stateowner **replay_owner); | ||
| 444 | extern int nfsd4_open_downgrade(struct svc_rqst *rqstp, | 446 | extern int nfsd4_open_downgrade(struct svc_rqst *rqstp, |
| 445 | struct svc_fh *current_fh, struct nfsd4_open_downgrade *od); | 447 | struct svc_fh *current_fh, struct nfsd4_open_downgrade *od, |
| 448 | struct nfs4_stateowner **replay_owner); | ||
| 446 | extern int nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 449 | extern int nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, |
| 447 | struct nfsd4_lock *lock); | 450 | struct nfsd4_lock *lock, |
| 451 | struct nfs4_stateowner **replay_owner); | ||
| 448 | extern int nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 452 | extern int nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, |
| 449 | struct nfsd4_lockt *lockt); | 453 | struct nfsd4_lockt *lockt); |
| 450 | extern int nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, | 454 | extern int nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, |
| 451 | struct nfsd4_locku *locku); | 455 | struct nfsd4_locku *locku, |
| 456 | struct nfs4_stateowner **replay_owner); | ||
| 452 | extern int | 457 | extern int |
| 453 | nfsd4_release_lockowner(struct svc_rqst *rqstp, | 458 | nfsd4_release_lockowner(struct svc_rqst *rqstp, |
| 454 | struct nfsd4_release_lockowner *rlockowner); | 459 | struct nfsd4_release_lockowner *rlockowner); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 31da85f4ab6e..f6c1a142286a 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -719,10 +719,12 @@ | |||
| 719 | #define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282 | 719 | #define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282 |
| 720 | #define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290 | 720 | #define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290 |
| 721 | #define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301 | 721 | #define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301 |
| 722 | #define PCI_DEVICE_ID_HP_CISS 0x3210 | ||
| 722 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 | 723 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 |
| 723 | #define PCI_DEVICE_ID_HP_CISSB 0x3222 | 724 | #define PCI_DEVICE_ID_HP_CISSB 0x3222 |
| 724 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 | ||
| 725 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 | 725 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 |
| 726 | #define PCI_DEVICE_ID_HP_CISSD 0x3238 | ||
| 727 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 | ||
| 726 | 728 | ||
| 727 | #define PCI_VENDOR_ID_PCTECH 0x1042 | 729 | #define PCI_VENDOR_ID_PCTECH 0x1042 |
| 728 | #define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 | 730 | #define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 |
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 4b32bce9a289..2c177e4c8f22 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
| @@ -166,6 +166,9 @@ struct packet_iosched | |||
| 166 | /* | 166 | /* |
| 167 | * 32 buffers of 2048 bytes | 167 | * 32 buffers of 2048 bytes |
| 168 | */ | 168 | */ |
| 169 | #if (PAGE_SIZE % CD_FRAMESIZE) != 0 | ||
| 170 | #error "PAGE_SIZE must be a multiple of CD_FRAMESIZE" | ||
| 171 | #endif | ||
| 169 | #define PACKET_MAX_SIZE 32 | 172 | #define PACKET_MAX_SIZE 32 |
| 170 | #define PAGES_PER_PACKET (PACKET_MAX_SIZE * CD_FRAMESIZE / PAGE_SIZE) | 173 | #define PAGES_PER_PACKET (PACKET_MAX_SIZE * CD_FRAMESIZE / PAGE_SIZE) |
| 171 | #define PACKET_MAX_SECTORS (PACKET_MAX_SIZE * CD_FRAMESIZE >> 9) | 174 | #define PACKET_MAX_SECTORS (PACKET_MAX_SIZE * CD_FRAMESIZE >> 9) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index ed3bb19d1337..49e617fa0f66 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -121,6 +121,17 @@ extern unsigned long nr_iowait(void); | |||
| 121 | #define set_task_state(tsk, state_value) \ | 121 | #define set_task_state(tsk, state_value) \ |
| 122 | set_mb((tsk)->state, (state_value)) | 122 | set_mb((tsk)->state, (state_value)) |
| 123 | 123 | ||
| 124 | /* | ||
| 125 | * set_current_state() includes a barrier so that the write of current->state | ||
| 126 | * is correctly serialised wrt the caller's subsequent test of whether to | ||
| 127 | * actually sleep: | ||
| 128 | * | ||
| 129 | * set_current_state(TASK_UNINTERRUPTIBLE); | ||
| 130 | * if (do_i_need_to_sleep()) | ||
| 131 | * schedule(); | ||
| 132 | * | ||
| 133 | * If the caller does not need such serialisation then use __set_current_state() | ||
| 134 | */ | ||
| 124 | #define __set_current_state(state_value) \ | 135 | #define __set_current_state(state_value) \ |
| 125 | do { current->state = (state_value); } while (0) | 136 | do { current->state = (state_value); } while (0) |
| 126 | #define set_current_state(state_value) \ | 137 | #define set_current_state(state_value) \ |
| @@ -785,7 +796,6 @@ struct task_struct { | |||
| 785 | short il_next; | 796 | short il_next; |
| 786 | #endif | 797 | #endif |
| 787 | #ifdef CONFIG_CPUSETS | 798 | #ifdef CONFIG_CPUSETS |
| 788 | short cpuset_sem_nest_depth; | ||
| 789 | struct cpuset *cpuset; | 799 | struct cpuset *cpuset; |
| 790 | nodemask_t mems_allowed; | 800 | nodemask_t mems_allowed; |
| 791 | int cpuset_mems_generation; | 801 | int cpuset_mems_generation; |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 532a6c5c24e9..3a29a9f9b451 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -544,7 +544,8 @@ enum { | |||
| 544 | NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE=8, | 544 | NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE=8, |
| 545 | NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT=9, | 545 | NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT=9, |
| 546 | NET_NETROM_ROUTING_CONTROL=10, | 546 | NET_NETROM_ROUTING_CONTROL=10, |
| 547 | NET_NETROM_LINK_FAILS_COUNT=11 | 547 | NET_NETROM_LINK_FAILS_COUNT=11, |
| 548 | NET_NETROM_RESET=12 | ||
| 548 | }; | 549 | }; |
| 549 | 550 | ||
| 550 | /* /proc/sys/net/ax25 */ | 551 | /* /proc/sys/net/ax25 */ |
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index fb57c2217468..9facf733800c 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h | |||
| @@ -32,7 +32,6 @@ | |||
| 32 | #define _LINUX_USBDEVICE_FS_H | 32 | #define _LINUX_USBDEVICE_FS_H |
| 33 | 33 | ||
| 34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
| 35 | #include <linux/compat.h> | ||
| 36 | 35 | ||
| 37 | /* --------------------------------------------------------------------- */ | 36 | /* --------------------------------------------------------------------- */ |
| 38 | 37 | ||
| @@ -125,6 +124,7 @@ struct usbdevfs_hub_portinfo { | |||
| 125 | }; | 124 | }; |
| 126 | 125 | ||
| 127 | #ifdef CONFIG_COMPAT | 126 | #ifdef CONFIG_COMPAT |
| 127 | #include <linux/compat.h> | ||
| 128 | struct usbdevfs_urb32 { | 128 | struct usbdevfs_urb32 { |
| 129 | unsigned char type; | 129 | unsigned char type; |
| 130 | unsigned char endpoint; | 130 | unsigned char endpoint; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index f623a33b9abe..89a055761bed 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -60,12 +60,17 @@ enum v4l2_field { | |||
| 60 | (field) == V4L2_FIELD_SEQ_BT) | 60 | (field) == V4L2_FIELD_SEQ_BT) |
| 61 | 61 | ||
| 62 | enum v4l2_buf_type { | 62 | enum v4l2_buf_type { |
| 63 | V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, | 63 | V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, |
| 64 | V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, | 64 | V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, |
| 65 | V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, | 65 | V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, |
| 66 | V4L2_BUF_TYPE_VBI_CAPTURE = 4, | 66 | V4L2_BUF_TYPE_VBI_CAPTURE = 4, |
| 67 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, | 67 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, |
| 68 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 68 | #if 1 |
| 69 | /* Experimental Sliced VBI */ | ||
| 70 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, | ||
| 71 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, | ||
| 72 | #endif | ||
| 73 | V4L2_BUF_TYPE_PRIVATE = 0x80, | ||
| 69 | }; | 74 | }; |
| 70 | 75 | ||
| 71 | enum v4l2_ctrl_type { | 76 | enum v4l2_ctrl_type { |
| @@ -149,20 +154,24 @@ struct v4l2_capability | |||
| 149 | }; | 154 | }; |
| 150 | 155 | ||
| 151 | /* Values for 'capabilities' field */ | 156 | /* Values for 'capabilities' field */ |
| 152 | #define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ | 157 | #define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ |
| 153 | #define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ | 158 | #define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ |
| 154 | #define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ | 159 | #define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ |
| 155 | #define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a VBI capture device */ | 160 | #define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ |
| 156 | #define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a VBI output device */ | 161 | #define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ |
| 157 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ | 162 | #if 1 |
| 163 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ | ||
| 164 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ | ||
| 165 | #endif | ||
| 166 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ | ||
| 158 | 167 | ||
| 159 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ | 168 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ |
| 160 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ | 169 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ |
| 161 | #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ | 170 | #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ |
| 162 | 171 | ||
| 163 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ | 172 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ |
| 164 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ | 173 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ |
| 165 | #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ | 174 | #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ |
| 166 | 175 | ||
| 167 | /* | 176 | /* |
| 168 | * V I D E O I M A G E F O R M A T | 177 | * V I D E O I M A G E F O R M A T |
| @@ -809,6 +818,8 @@ struct v4l2_audioout | |||
| 809 | * Data services API by Michael Schimek | 818 | * Data services API by Michael Schimek |
| 810 | */ | 819 | */ |
| 811 | 820 | ||
| 821 | /* Raw VBI */ | ||
| 822 | |||
| 812 | struct v4l2_vbi_format | 823 | struct v4l2_vbi_format |
| 813 | { | 824 | { |
| 814 | __u32 sampling_rate; /* in 1 Hz */ | 825 | __u32 sampling_rate; /* in 1 Hz */ |
| @@ -825,6 +836,54 @@ struct v4l2_vbi_format | |||
| 825 | #define V4L2_VBI_UNSYNC (1<< 0) | 836 | #define V4L2_VBI_UNSYNC (1<< 0) |
| 826 | #define V4L2_VBI_INTERLACED (1<< 1) | 837 | #define V4L2_VBI_INTERLACED (1<< 1) |
| 827 | 838 | ||
| 839 | #if 1 | ||
| 840 | /* Sliced VBI | ||
| 841 | * | ||
| 842 | * This implements is a proposal V4L2 API to allow SLICED VBI | ||
| 843 | * required for some hardware encoders. It should change without | ||
| 844 | * notice in the definitive implementation. | ||
| 845 | */ | ||
| 846 | |||
| 847 | struct v4l2_sliced_vbi_format | ||
| 848 | { | ||
| 849 | __u16 service_set; | ||
| 850 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field | ||
| 851 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field | ||
| 852 | (equals frame lines 313-336 for 625 line video | ||
| 853 | standards, 263-286 for 525 line standards) */ | ||
| 854 | __u16 service_lines[2][24]; | ||
| 855 | __u32 io_size; | ||
| 856 | __u32 reserved[2]; /* must be zero */ | ||
| 857 | }; | ||
| 858 | |||
| 859 | #define V4L2_SLICED_TELETEXT_B (0x0001) | ||
| 860 | #define V4L2_SLICED_VPS (0x0400) | ||
| 861 | #define V4L2_SLICED_CAPTION_525 (0x1000) | ||
| 862 | #define V4L2_SLICED_WSS_625 (0x4000) | ||
| 863 | |||
| 864 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) | ||
| 865 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) | ||
| 866 | |||
| 867 | struct v4l2_sliced_vbi_cap | ||
| 868 | { | ||
| 869 | __u16 service_set; | ||
| 870 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field | ||
| 871 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field | ||
| 872 | (equals frame lines 313-336 for 625 line video | ||
| 873 | standards, 263-286 for 525 line standards) */ | ||
| 874 | __u16 service_lines[2][24]; | ||
| 875 | __u32 reserved[4]; /* must be 0 */ | ||
| 876 | }; | ||
| 877 | |||
| 878 | struct v4l2_sliced_vbi_data | ||
| 879 | { | ||
| 880 | __u32 id; | ||
| 881 | __u32 field; /* 0: first field, 1: second field */ | ||
| 882 | __u32 line; /* 1-23 */ | ||
| 883 | __u32 reserved; /* must be 0 */ | ||
| 884 | __u8 data[48]; | ||
| 885 | }; | ||
| 886 | #endif | ||
| 828 | 887 | ||
| 829 | /* | 888 | /* |
| 830 | * A G G R E G A T E S T R U C T U R E S | 889 | * A G G R E G A T E S T R U C T U R E S |
| @@ -837,10 +896,13 @@ struct v4l2_format | |||
| 837 | enum v4l2_buf_type type; | 896 | enum v4l2_buf_type type; |
| 838 | union | 897 | union |
| 839 | { | 898 | { |
| 840 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE | 899 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE |
| 841 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY | 900 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY |
| 842 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE | 901 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE |
| 843 | __u8 raw_data[200]; // user-defined | 902 | #if 1 |
| 903 | struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE | ||
| 904 | #endif | ||
| 905 | __u8 raw_data[200]; // user-defined | ||
| 844 | } fmt; | 906 | } fmt; |
| 845 | }; | 907 | }; |
| 846 | 908 | ||
| @@ -916,6 +978,9 @@ struct v4l2_streamparm | |||
| 916 | #define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout) | 978 | #define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout) |
| 917 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) | 979 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) |
| 918 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) | 980 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) |
| 981 | #if 1 | ||
| 982 | #define VIDIOC_G_SLICED_VBI_CAP _IOR ('V', 69, struct v4l2_sliced_vbi_cap) | ||
| 983 | #endif | ||
| 919 | 984 | ||
| 920 | /* for compatibility, will go away some day */ | 985 | /* for compatibility, will go away some day */ |
| 921 | #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) | 986 | #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 227d3378decd..9dbcd9e51c00 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
| @@ -26,11 +26,20 @@ | |||
| 26 | 26 | ||
| 27 | /* AX.25 Protocol IDs */ | 27 | /* AX.25 Protocol IDs */ |
| 28 | #define AX25_P_ROSE 0x01 | 28 | #define AX25_P_ROSE 0x01 |
| 29 | #define AX25_P_IP 0xCC | 29 | #define AX25_P_VJCOMP 0x06 /* Compressed TCP/IP packet */ |
| 30 | #define AX25_P_ARP 0xCD | 30 | /* Van Jacobsen (RFC 1144) */ |
| 31 | #define AX25_P_TEXT 0xF0 | 31 | #define AX25_P_VJUNCOMP 0x07 /* Uncompressed TCP/IP packet */ |
| 32 | #define AX25_P_NETROM 0xCF | 32 | /* Van Jacobsen (RFC 1144) */ |
| 33 | #define AX25_P_SEGMENT 0x08 | 33 | #define AX25_P_SEGMENT 0x08 /* Segmentation fragment */ |
| 34 | #define AX25_P_TEXNET 0xc3 /* TEXTNET datagram protocol */ | ||
| 35 | #define AX25_P_LQ 0xc4 /* Link Quality Protocol */ | ||
| 36 | #define AX25_P_ATALK 0xca /* Appletalk */ | ||
| 37 | #define AX25_P_ATALK_ARP 0xcb /* Appletalk ARP */ | ||
| 38 | #define AX25_P_IP 0xcc /* ARPA Internet Protocol */ | ||
| 39 | #define AX25_P_ARP 0xcd /* ARPA Adress Resolution */ | ||
| 40 | #define AX25_P_FLEXNET 0xce /* FlexNet */ | ||
| 41 | #define AX25_P_NETROM 0xcf /* NET/ROM */ | ||
| 42 | #define AX25_P_TEXT 0xF0 /* No layer 3 protocol impl. */ | ||
| 34 | 43 | ||
| 35 | /* AX.25 Segment control values */ | 44 | /* AX.25 Segment control values */ |
| 36 | #define AX25_SEG_REM 0x7F | 45 | #define AX25_SEG_REM 0x7F |
| @@ -88,11 +97,11 @@ | |||
| 88 | /* Define Link State constants. */ | 97 | /* Define Link State constants. */ |
| 89 | 98 | ||
| 90 | enum { | 99 | enum { |
| 91 | AX25_STATE_0, | 100 | AX25_STATE_0, /* Listening */ |
| 92 | AX25_STATE_1, | 101 | AX25_STATE_1, /* SABM sent */ |
| 93 | AX25_STATE_2, | 102 | AX25_STATE_2, /* DISC sent */ |
| 94 | AX25_STATE_3, | 103 | AX25_STATE_3, /* Established */ |
| 95 | AX25_STATE_4 | 104 | AX25_STATE_4 /* Recovery */ |
| 96 | }; | 105 | }; |
| 97 | 106 | ||
| 98 | #define AX25_MODULUS 8 /* Standard AX.25 modulus */ | 107 | #define AX25_MODULUS 8 /* Standard AX.25 modulus */ |
| @@ -319,7 +328,7 @@ extern int ax25_rx_iframe(ax25_cb *, struct sk_buff *); | |||
| 319 | extern int ax25_kiss_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); | 328 | extern int ax25_kiss_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); |
| 320 | 329 | ||
| 321 | /* ax25_ip.c */ | 330 | /* ax25_ip.c */ |
| 322 | extern int ax25_encapsulate(struct sk_buff *, struct net_device *, unsigned short, void *, void *, unsigned int); | 331 | extern int ax25_hard_header(struct sk_buff *, struct net_device *, unsigned short, void *, void *, unsigned int); |
| 323 | extern int ax25_rebuild_header(struct sk_buff *); | 332 | extern int ax25_rebuild_header(struct sk_buff *); |
| 324 | 333 | ||
| 325 | /* ax25_out.c */ | 334 | /* ax25_out.c */ |
diff --git a/include/net/netrom.h b/include/net/netrom.h index 45f2c7616d8b..a6bf6e0f606a 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #ifndef _NETROM_H | 7 | #ifndef _NETROM_H |
| 8 | #define _NETROM_H | 8 | #define _NETROM_H |
| 9 | |||
| 9 | #include <linux/netrom.h> | 10 | #include <linux/netrom.h> |
| 10 | #include <linux/list.h> | 11 | #include <linux/list.h> |
| 11 | #include <net/sock.h> | 12 | #include <net/sock.h> |
| @@ -22,6 +23,7 @@ | |||
| 22 | #define NR_DISCACK 0x04 | 23 | #define NR_DISCACK 0x04 |
| 23 | #define NR_INFO 0x05 | 24 | #define NR_INFO 0x05 |
| 24 | #define NR_INFOACK 0x06 | 25 | #define NR_INFOACK 0x06 |
| 26 | #define NR_RESET 0x07 | ||
| 25 | 27 | ||
| 26 | #define NR_CHOKE_FLAG 0x80 | 28 | #define NR_CHOKE_FLAG 0x80 |
| 27 | #define NR_NAK_FLAG 0x40 | 29 | #define NR_NAK_FLAG 0x40 |
| @@ -51,11 +53,16 @@ enum { | |||
| 51 | #define NR_DEFAULT_TTL 16 /* Default Time To Live - 16 */ | 53 | #define NR_DEFAULT_TTL 16 /* Default Time To Live - 16 */ |
| 52 | #define NR_DEFAULT_ROUTING 1 /* Is routing enabled ? */ | 54 | #define NR_DEFAULT_ROUTING 1 /* Is routing enabled ? */ |
| 53 | #define NR_DEFAULT_FAILS 2 /* Link fails until route fails */ | 55 | #define NR_DEFAULT_FAILS 2 /* Link fails until route fails */ |
| 56 | #define NR_DEFAULT_RESET 0 /* Sent / accept reset cmds? */ | ||
| 54 | 57 | ||
| 55 | #define NR_MODULUS 256 | 58 | #define NR_MODULUS 256 |
| 56 | #define NR_MAX_WINDOW_SIZE 127 /* Maximum Window Allowable - 127 */ | 59 | #define NR_MAX_WINDOW_SIZE 127 /* Maximum Window Allowable - 127 */ |
| 57 | #define NR_MAX_PACKET_SIZE 236 /* Maximum Packet Length - 236 */ | 60 | #define NR_MAX_PACKET_SIZE 236 /* Maximum Packet Length - 236 */ |
| 58 | 61 | ||
| 62 | struct nr_private { | ||
| 63 | struct net_device_stats stats; | ||
| 64 | }; | ||
| 65 | |||
| 59 | struct nr_sock { | 66 | struct nr_sock { |
| 60 | struct sock sock; | 67 | struct sock sock; |
| 61 | ax25_address user_addr, source_addr, dest_addr; | 68 | ax25_address user_addr, source_addr, dest_addr; |
| @@ -176,6 +183,8 @@ extern int sysctl_netrom_transport_requested_window_size; | |||
| 176 | extern int sysctl_netrom_transport_no_activity_timeout; | 183 | extern int sysctl_netrom_transport_no_activity_timeout; |
| 177 | extern int sysctl_netrom_routing_control; | 184 | extern int sysctl_netrom_routing_control; |
| 178 | extern int sysctl_netrom_link_fails_count; | 185 | extern int sysctl_netrom_link_fails_count; |
| 186 | extern int sysctl_netrom_reset_circuit; | ||
| 187 | |||
| 179 | extern int nr_rx_frame(struct sk_buff *, struct net_device *); | 188 | extern int nr_rx_frame(struct sk_buff *, struct net_device *); |
| 180 | extern void nr_destroy_socket(struct sock *); | 189 | extern void nr_destroy_socket(struct sock *); |
| 181 | 190 | ||
| @@ -218,7 +227,28 @@ extern void nr_requeue_frames(struct sock *); | |||
| 218 | extern int nr_validate_nr(struct sock *, unsigned short); | 227 | extern int nr_validate_nr(struct sock *, unsigned short); |
| 219 | extern int nr_in_rx_window(struct sock *, unsigned short); | 228 | extern int nr_in_rx_window(struct sock *, unsigned short); |
| 220 | extern void nr_write_internal(struct sock *, int); | 229 | extern void nr_write_internal(struct sock *, int); |
| 221 | extern void nr_transmit_refusal(struct sk_buff *, int); | 230 | |
| 231 | extern void __nr_transmit_reply(struct sk_buff *skb, int mine, | ||
| 232 | unsigned char cmdflags); | ||
| 233 | |||
| 234 | /* | ||
| 235 | * This routine is called when a Connect Acknowledge with the Choke Flag | ||
| 236 | * set is needed to refuse a connection. | ||
| 237 | */ | ||
| 238 | #define nr_transmit_refusal(skb, mine) \ | ||
| 239 | do { \ | ||
| 240 | __nr_transmit_reply((skb), (mine), NR_CONNACK | NR_CHOKE_FLAG); \ | ||
| 241 | } while (0) | ||
| 242 | |||
| 243 | /* | ||
| 244 | * This routine is called when we don't have a circuit matching an incoming | ||
| 245 | * NET/ROM packet. This is an G8PZT Xrouter extension. | ||
| 246 | */ | ||
| 247 | #define nr_transmit_reset(skb, mine) \ | ||
| 248 | do { \ | ||
| 249 | __nr_transmit_reply((skb), (mine), NR_RESET); \ | ||
| 250 | } while (0) | ||
| 251 | |||
| 222 | extern void nr_disconnect(struct sock *, int); | 252 | extern void nr_disconnect(struct sock *, int); |
| 223 | 253 | ||
| 224 | /* nr_timer.c */ | 254 | /* nr_timer.c */ |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index da63722c0123..c0e4c67d836f 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
| @@ -178,8 +178,8 @@ static inline struct scsi_target *scsi_target(struct scsi_device *sdev) | |||
| 178 | 178 | ||
| 179 | extern struct scsi_device *__scsi_add_device(struct Scsi_Host *, | 179 | extern struct scsi_device *__scsi_add_device(struct Scsi_Host *, |
| 180 | uint, uint, uint, void *hostdata); | 180 | uint, uint, uint, void *hostdata); |
| 181 | #define scsi_add_device(host, channel, target, lun) \ | 181 | extern int scsi_add_device(struct Scsi_Host *host, uint channel, |
| 182 | __scsi_add_device(host, channel, target, lun, NULL) | 182 | uint target, uint lun); |
| 183 | extern void scsi_remove_device(struct scsi_device *); | 183 | extern void scsi_remove_device(struct scsi_device *); |
| 184 | extern int scsi_device_cancel(struct scsi_device *, int); | 184 | extern int scsi_device_cancel(struct scsi_device *, int); |
| 185 | 185 | ||
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 70ad16315a16..115db056dc6b 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
| @@ -439,4 +439,12 @@ int fc_remote_port_block(struct fc_rport *rport); | |||
| 439 | void fc_remote_port_unblock(struct fc_rport *rport); | 439 | void fc_remote_port_unblock(struct fc_rport *rport); |
| 440 | int scsi_is_fc_rport(const struct device *); | 440 | int scsi_is_fc_rport(const struct device *); |
| 441 | 441 | ||
| 442 | static inline u64 wwn_to_u64(u8 *wwn) | ||
| 443 | { | ||
| 444 | return (u64)wwn[0] << 56 | (u64)wwn[1] << 48 | | ||
| 445 | (u64)wwn[2] << 40 | (u64)wwn[3] << 32 | | ||
| 446 | (u64)wwn[4] << 24 | (u64)wwn[5] << 16 | | ||
| 447 | (u64)wwn[6] << 8 | (u64)wwn[7]; | ||
| 448 | } | ||
| 449 | |||
| 442 | #endif /* SCSI_TRANSPORT_FC_H */ | 450 | #endif /* SCSI_TRANSPORT_FC_H */ |
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h new file mode 100644 index 000000000000..bc4aeb660dd3 --- /dev/null +++ b/include/scsi/scsi_transport_sas.h | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | #ifndef SCSI_TRANSPORT_SAS_H | ||
| 2 | #define SCSI_TRANSPORT_SAS_H | ||
| 3 | |||
| 4 | #include <linux/transport_class.h> | ||
| 5 | #include <linux/types.h> | ||
| 6 | |||
| 7 | struct scsi_transport_template; | ||
| 8 | struct sas_rphy; | ||
| 9 | |||
| 10 | |||
| 11 | enum sas_device_type { | ||
| 12 | SAS_PHY_UNUSED, | ||
| 13 | SAS_END_DEVICE, | ||
| 14 | SAS_EDGE_EXPANDER_DEVICE, | ||
| 15 | SAS_FANOUT_EXPANDER_DEVICE, | ||
| 16 | }; | ||
| 17 | |||
| 18 | enum sas_protocol { | ||
| 19 | SAS_PROTOCOL_SATA = 0x01, | ||
| 20 | SAS_PROTOCOL_SMP = 0x02, | ||
| 21 | SAS_PROTOCOL_STP = 0x04, | ||
| 22 | SAS_PROTOCOL_SSP = 0x08, | ||
| 23 | }; | ||
| 24 | |||
| 25 | enum sas_linkrate { | ||
| 26 | SAS_LINK_RATE_UNKNOWN, | ||
| 27 | SAS_PHY_DISABLED, | ||
| 28 | SAS_LINK_RATE_FAILED, | ||
| 29 | SAS_SATA_SPINUP_HOLD, | ||
| 30 | SAS_SATA_PORT_SELECTOR, | ||
| 31 | SAS_LINK_RATE_1_5_GBPS, | ||
| 32 | SAS_LINK_RATE_3_0_GBPS, | ||
| 33 | SAS_LINK_VIRTUAL, | ||
| 34 | }; | ||
| 35 | |||
| 36 | struct sas_identify { | ||
| 37 | enum sas_device_type device_type; | ||
| 38 | enum sas_protocol initiator_port_protocols; | ||
| 39 | enum sas_protocol target_port_protocols; | ||
| 40 | u64 sas_address; | ||
| 41 | u8 phy_identifier; | ||
| 42 | }; | ||
| 43 | |||
| 44 | /* The functions by which the transport class and the driver communicate */ | ||
| 45 | struct sas_function_template { | ||
| 46 | }; | ||
| 47 | |||
| 48 | struct sas_phy { | ||
| 49 | struct device dev; | ||
| 50 | int number; | ||
| 51 | struct sas_identify identify; | ||
| 52 | enum sas_linkrate negotiated_linkrate; | ||
| 53 | enum sas_linkrate minimum_linkrate_hw; | ||
| 54 | enum sas_linkrate minimum_linkrate; | ||
| 55 | enum sas_linkrate maximum_linkrate_hw; | ||
| 56 | enum sas_linkrate maximum_linkrate; | ||
| 57 | u8 port_identifier; | ||
| 58 | struct sas_rphy *rphy; | ||
| 59 | }; | ||
| 60 | |||
| 61 | #define dev_to_phy(d) \ | ||
| 62 | container_of((d), struct sas_phy, dev) | ||
| 63 | #define transport_class_to_phy(cdev) \ | ||
| 64 | dev_to_phy((cdev)->dev) | ||
| 65 | #define phy_to_shost(phy) \ | ||
| 66 | dev_to_shost((phy)->dev.parent) | ||
| 67 | |||
| 68 | struct sas_rphy { | ||
| 69 | struct device dev; | ||
| 70 | struct sas_identify identify; | ||
| 71 | struct list_head list; | ||
| 72 | u32 scsi_target_id; | ||
| 73 | }; | ||
| 74 | |||
| 75 | #define dev_to_rphy(d) \ | ||
| 76 | container_of((d), struct sas_rphy, dev) | ||
| 77 | #define transport_class_to_rphy(cdev) \ | ||
| 78 | dev_to_rphy((cdev)->dev) | ||
| 79 | #define rphy_to_shost(rphy) \ | ||
| 80 | dev_to_shost((rphy)->dev.parent) | ||
| 81 | |||
| 82 | extern void sas_remove_host(struct Scsi_Host *); | ||
| 83 | |||
| 84 | extern struct sas_phy *sas_phy_alloc(struct device *, int); | ||
| 85 | extern void sas_phy_free(struct sas_phy *); | ||
| 86 | extern int sas_phy_add(struct sas_phy *); | ||
| 87 | extern void sas_phy_delete(struct sas_phy *); | ||
| 88 | extern int scsi_is_sas_phy(const struct device *); | ||
| 89 | |||
| 90 | extern struct sas_rphy *sas_rphy_alloc(struct sas_phy *); | ||
| 91 | void sas_rphy_free(struct sas_rphy *); | ||
| 92 | extern int sas_rphy_add(struct sas_rphy *); | ||
| 93 | extern void sas_rphy_delete(struct sas_rphy *); | ||
| 94 | extern int scsi_is_sas_rphy(const struct device *); | ||
| 95 | |||
| 96 | extern struct scsi_transport_template * | ||
| 97 | sas_attach_transport(struct sas_function_template *); | ||
| 98 | extern void sas_release_transport(struct scsi_transport_template *); | ||
| 99 | |||
| 100 | #endif /* SCSI_TRANSPORT_SAS_H */ | ||
diff --git a/include/video/pm3fb.h b/include/video/pm3fb.h index 8d3cef5d87a2..6f4ea808cf74 100644 --- a/include/video/pm3fb.h +++ b/include/video/pm3fb.h | |||
| @@ -1142,9 +1142,6 @@ | |||
| 1142 | /* do we want accelerated console */ | 1142 | /* do we want accelerated console */ |
| 1143 | #define PM3FB_USE_ACCEL 1 | 1143 | #define PM3FB_USE_ACCEL 1 |
| 1144 | 1144 | ||
| 1145 | /* useful ? */ | ||
| 1146 | #define CHAR_IS_NUM(a) ((((a) >= '0') && ((a) <= '9')) ? 1 : 0) | ||
| 1147 | |||
| 1148 | /* for driver debugging ONLY */ | 1145 | /* for driver debugging ONLY */ |
| 1149 | /* 0 = assert only, 1 = error, 2 = info, 3+ = verbose */ | 1146 | /* 0 = assert only, 1 = error, 2 = info, 3+ = verbose */ |
| 1150 | /* define PM3FB_MASTER_DEBUG 1 */ | 1147 | /* define PM3FB_MASTER_DEBUG 1 */ |
diff --git a/include/video/w100fb.h b/include/video/w100fb.h index e6da2d7ded8c..677d40326796 100644 --- a/include/video/w100fb.h +++ b/include/video/w100fb.h | |||
| @@ -19,6 +19,7 @@ struct w100fb_par; | |||
| 19 | 19 | ||
| 20 | unsigned long w100fb_gpio_read(int port); | 20 | unsigned long w100fb_gpio_read(int port); |
| 21 | void w100fb_gpio_write(int port, unsigned long value); | 21 | void w100fb_gpio_write(int port, unsigned long value); |
| 22 | unsigned long w100fb_get_hsynclen(struct device *dev); | ||
| 22 | 23 | ||
| 23 | /* LCD Specific Routines and Config */ | 24 | /* LCD Specific Routines and Config */ |
| 24 | struct w100_tg_info { | 25 | struct w100_tg_info { |
