diff options
31 files changed, 298 insertions, 111 deletions
diff --git a/arch/alpha/kernel/core_mcpcia.c b/arch/alpha/kernel/core_mcpcia.c index 8d019071190a..381fec0af52e 100644 --- a/arch/alpha/kernel/core_mcpcia.c +++ b/arch/alpha/kernel/core_mcpcia.c | |||
| @@ -40,8 +40,6 @@ | |||
| 40 | # define DBG_CFG(args) | 40 | # define DBG_CFG(args) |
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | #define MCPCIA_MAX_HOSES 4 | ||
| 44 | |||
| 45 | /* | 43 | /* |
| 46 | * Given a bus, device, and function number, compute resulting | 44 | * Given a bus, device, and function number, compute resulting |
| 47 | * configuration space address and setup the MCPCIA_HAXR2 register | 45 | * configuration space address and setup the MCPCIA_HAXR2 register |
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c index febe71c6869f..543d96d7fa2b 100644 --- a/arch/alpha/kernel/err_titan.c +++ b/arch/alpha/kernel/err_titan.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <asm/smp.h> | 16 | #include <asm/smp.h> |
| 17 | #include <asm/err_common.h> | 17 | #include <asm/err_common.h> |
| 18 | #include <asm/err_ev6.h> | 18 | #include <asm/err_ev6.h> |
| 19 | #include <asm/irq_regs.h> | ||
| 19 | 20 | ||
| 20 | #include "err_impl.h" | 21 | #include "err_impl.h" |
| 21 | #include "proto.h" | 22 | #include "proto.h" |
diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c index aac6d4b22f7a..bd03dc94c72b 100644 --- a/arch/alpha/kernel/module.c +++ b/arch/alpha/kernel/module.c | |||
| @@ -285,12 +285,12 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, | |||
| 285 | reloc_overflow: | 285 | reloc_overflow: |
| 286 | if (ELF64_ST_TYPE (sym->st_info) == STT_SECTION) | 286 | if (ELF64_ST_TYPE (sym->st_info) == STT_SECTION) |
| 287 | printk(KERN_ERR | 287 | printk(KERN_ERR |
| 288 | "module %s: Relocation overflow vs section %d\n", | 288 | "module %s: Relocation (type %lu) overflow vs section %d\n", |
| 289 | me->name, sym->st_shndx); | 289 | me->name, r_type, sym->st_shndx); |
| 290 | else | 290 | else |
| 291 | printk(KERN_ERR | 291 | printk(KERN_ERR |
| 292 | "module %s: Relocation overflow vs %s\n", | 292 | "module %s: Relocation (type %lu) overflow vs %s\n", |
| 293 | me->name, strtab + sym->st_name); | 293 | me->name, r_type, strtab + sym->st_name); |
| 294 | return -ENOEXEC; | 294 | return -ENOEXEC; |
| 295 | } | 295 | } |
| 296 | } | 296 | } |
diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c index e7594a7cf585..920196bcbb61 100644 --- a/arch/alpha/kernel/sys_nautilus.c +++ b/arch/alpha/kernel/sys_nautilus.c | |||
| @@ -70,6 +70,12 @@ nautilus_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
| 70 | /* Preserve the IRQ set up by the console. */ | 70 | /* Preserve the IRQ set up by the console. */ |
| 71 | 71 | ||
| 72 | u8 irq; | 72 | u8 irq; |
| 73 | /* UP1500: AGP INTA is actually routed to IRQ 5, not IRQ 10 as | ||
| 74 | console reports. Check the device id of AGP bridge to distinguish | ||
| 75 | UP1500 from UP1000/1100. Note: 'pin' is 2 due to bridge swizzle. */ | ||
| 76 | if (slot == 1 && pin == 2 && | ||
| 77 | dev->bus->self && dev->bus->self->device == 0x700f) | ||
| 78 | return 5; | ||
| 73 | pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); | 79 | pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); |
| 74 | return irq; | 80 | return irq; |
| 75 | } | 81 | } |
diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c index de6ba3432e8a..eb2a1d63f484 100644 --- a/arch/alpha/kernel/sys_noritake.c +++ b/arch/alpha/kernel/sys_noritake.c | |||
| @@ -66,6 +66,13 @@ noritake_startup_irq(unsigned int irq) | |||
| 66 | return 0; | 66 | return 0; |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | static void | ||
| 70 | noritake_end_irq(unsigned int irq) | ||
| 71 | { | ||
| 72 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
| 73 | noritake_enable_irq(irq); | ||
| 74 | } | ||
| 75 | |||
| 69 | static struct hw_interrupt_type noritake_irq_type = { | 76 | static struct hw_interrupt_type noritake_irq_type = { |
| 70 | .typename = "NORITAKE", | 77 | .typename = "NORITAKE", |
| 71 | .startup = noritake_startup_irq, | 78 | .startup = noritake_startup_irq, |
| @@ -73,7 +80,7 @@ static struct hw_interrupt_type noritake_irq_type = { | |||
| 73 | .enable = noritake_enable_irq, | 80 | .enable = noritake_enable_irq, |
| 74 | .disable = noritake_disable_irq, | 81 | .disable = noritake_disable_irq, |
| 75 | .ack = noritake_disable_irq, | 82 | .ack = noritake_disable_irq, |
| 76 | .end = noritake_enable_irq, | 83 | .end = noritake_end_irq, |
| 77 | }; | 84 | }; |
| 78 | 85 | ||
| 79 | static void | 86 | static void |
diff --git a/arch/alpha/kernel/sys_rawhide.c b/arch/alpha/kernel/sys_rawhide.c index 581d08c70b92..672cb2df53df 100644 --- a/arch/alpha/kernel/sys_rawhide.c +++ b/arch/alpha/kernel/sys_rawhide.c | |||
| @@ -52,6 +52,9 @@ rawhide_update_irq_hw(int hose, int mask) | |||
| 52 | *(vuip)MCPCIA_INT_MASK0(MCPCIA_HOSE2MID(hose)); | 52 | *(vuip)MCPCIA_INT_MASK0(MCPCIA_HOSE2MID(hose)); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | #define hose_exists(h) \ | ||
| 56 | (((h) < MCPCIA_MAX_HOSES) && (cached_irq_masks[(h)] != 0)) | ||
| 57 | |||
| 55 | static inline void | 58 | static inline void |
| 56 | rawhide_enable_irq(unsigned int irq) | 59 | rawhide_enable_irq(unsigned int irq) |
| 57 | { | 60 | { |
| @@ -59,6 +62,9 @@ rawhide_enable_irq(unsigned int irq) | |||
| 59 | 62 | ||
| 60 | irq -= 16; | 63 | irq -= 16; |
| 61 | hose = irq / 24; | 64 | hose = irq / 24; |
| 65 | if (!hose_exists(hose)) /* if hose non-existent, exit */ | ||
| 66 | return; | ||
| 67 | |||
| 62 | irq -= hose * 24; | 68 | irq -= hose * 24; |
| 63 | mask = 1 << irq; | 69 | mask = 1 << irq; |
| 64 | 70 | ||
| @@ -76,6 +82,9 @@ rawhide_disable_irq(unsigned int irq) | |||
| 76 | 82 | ||
| 77 | irq -= 16; | 83 | irq -= 16; |
| 78 | hose = irq / 24; | 84 | hose = irq / 24; |
| 85 | if (!hose_exists(hose)) /* if hose non-existent, exit */ | ||
| 86 | return; | ||
| 87 | |||
| 79 | irq -= hose * 24; | 88 | irq -= hose * 24; |
| 80 | mask = ~(1 << irq) | hose_irq_masks[hose]; | 89 | mask = ~(1 << irq) | hose_irq_masks[hose]; |
| 81 | 90 | ||
| @@ -93,6 +102,9 @@ rawhide_mask_and_ack_irq(unsigned int irq) | |||
| 93 | 102 | ||
| 94 | irq -= 16; | 103 | irq -= 16; |
| 95 | hose = irq / 24; | 104 | hose = irq / 24; |
| 105 | if (!hose_exists(hose)) /* if hose non-existent, exit */ | ||
| 106 | return; | ||
| 107 | |||
| 96 | irq -= hose * 24; | 108 | irq -= hose * 24; |
| 97 | mask1 = 1 << irq; | 109 | mask1 = 1 << irq; |
| 98 | mask = ~mask1 | hose_irq_masks[hose]; | 110 | mask = ~mask1 | hose_irq_masks[hose]; |
| @@ -169,6 +181,9 @@ rawhide_init_irq(void) | |||
| 169 | 181 | ||
| 170 | mcpcia_init_hoses(); | 182 | mcpcia_init_hoses(); |
| 171 | 183 | ||
| 184 | /* Clear them all; only hoses that exist will be non-zero. */ | ||
| 185 | for (i = 0; i < MCPCIA_MAX_HOSES; i++) cached_irq_masks[i] = 0; | ||
| 186 | |||
| 172 | for (hose = hose_head; hose; hose = hose->next) { | 187 | for (hose = hose_head; hose; hose = hose->next) { |
| 173 | unsigned int h = hose->index; | 188 | unsigned int h = hose->index; |
| 174 | unsigned int mask = hose_irq_masks[h]; | 189 | unsigned int mask = hose_irq_masks[h]; |
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c index a654014d202a..14b5a753aba5 100644 --- a/arch/alpha/kernel/sys_sio.c +++ b/arch/alpha/kernel/sys_sio.c | |||
| @@ -84,12 +84,16 @@ alphabook1_init_arch(void) | |||
| 84 | static void __init | 84 | static void __init |
| 85 | sio_pci_route(void) | 85 | sio_pci_route(void) |
| 86 | { | 86 | { |
| 87 | #if defined(ALPHA_RESTORE_SRM_SETUP) | 87 | unsigned int orig_route_tab; |
| 88 | /* First, read and save the original setting. */ | 88 | |
| 89 | /* First, ALWAYS read and print the original setting. */ | ||
| 89 | pci_bus_read_config_dword(pci_isa_hose->bus, PCI_DEVFN(7, 0), 0x60, | 90 | pci_bus_read_config_dword(pci_isa_hose->bus, PCI_DEVFN(7, 0), 0x60, |
| 90 | &saved_config.orig_route_tab); | 91 | &orig_route_tab); |
| 91 | printk("%s: PIRQ original 0x%x new 0x%x\n", __FUNCTION__, | 92 | printk("%s: PIRQ original 0x%x new 0x%x\n", __FUNCTION__, |
| 92 | saved_config.orig_route_tab, alpha_mv.sys.sio.route_tab); | 93 | orig_route_tab, alpha_mv.sys.sio.route_tab); |
| 94 | |||
| 95 | #if defined(ALPHA_RESTORE_SRM_SETUP) | ||
| 96 | saved_config.orig_route_tab = orig_route_tab; | ||
| 93 | #endif | 97 | #endif |
| 94 | 98 | ||
| 95 | /* Now override with desired setting. */ | 99 | /* Now override with desired setting. */ |
| @@ -334,7 +338,7 @@ struct alpha_machine_vector avanti_mv __initmv = { | |||
| 334 | .pci_swizzle = common_swizzle, | 338 | .pci_swizzle = common_swizzle, |
| 335 | 339 | ||
| 336 | .sys = { .sio = { | 340 | .sys = { .sio = { |
| 337 | .route_tab = 0x0b0a0e0f, | 341 | .route_tab = 0x0b0a050f, /* leave 14 for IDE, 9 for SND */ |
| 338 | }} | 342 | }} |
| 339 | }; | 343 | }; |
| 340 | ALIAS_MV(avanti) | 344 | ALIAS_MV(avanti) |
diff --git a/arch/alpha/kernel/sys_sx164.c b/arch/alpha/kernel/sys_sx164.c index 94ad68b7c0ae..41d4ad4c7c44 100644 --- a/arch/alpha/kernel/sys_sx164.c +++ b/arch/alpha/kernel/sys_sx164.c | |||
| @@ -132,7 +132,7 @@ sx164_init_arch(void) | |||
| 132 | 132 | ||
| 133 | if (amask(AMASK_MAX) != 0 | 133 | if (amask(AMASK_MAX) != 0 |
| 134 | && alpha_using_srm | 134 | && alpha_using_srm |
| 135 | && (cpu->pal_revision & 0xffff) == 0x117) { | 135 | && (cpu->pal_revision & 0xffff) <= 0x117) { |
| 136 | __asm__ __volatile__( | 136 | __asm__ __volatile__( |
| 137 | "lda $16,8($31)\n" | 137 | "lda $16,8($31)\n" |
| 138 | "call_pal 9\n" /* Allow PALRES insns in kernel mode */ | 138 | "call_pal 9\n" /* Allow PALRES insns in kernel mode */ |
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index 29ab7db81c30..f009b7bc0943 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c | |||
| @@ -257,8 +257,7 @@ titan_dispatch_irqs(u64 mask) | |||
| 257 | */ | 257 | */ |
| 258 | while (mask) { | 258 | while (mask) { |
| 259 | /* convert to SRM vector... priority is <63> -> <0> */ | 259 | /* convert to SRM vector... priority is <63> -> <0> */ |
| 260 | __asm__("ctlz %1, %0" : "=r"(vector) : "r"(mask)); | 260 | vector = 63 - __kernel_ctlz(mask); |
| 261 | vector = 63 - vector; | ||
| 262 | mask &= ~(1UL << vector); /* clear it out */ | 261 | mask &= ~(1UL << vector); /* clear it out */ |
| 263 | vector = 0x900 + (vector << 4); /* convert to SRM vector */ | 262 | vector = 0x900 + (vector << 4); /* convert to SRM vector */ |
| 264 | 263 | ||
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig index d4ca0f06be5f..a850da377a29 100644 --- a/arch/arm/configs/s3c2410_defconfig +++ b/arch/arm/configs/s3c2410_defconfig | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.21-rc1 | 3 | # Linux kernel version: 2.6.21-rc6 |
| 4 | # Wed Feb 21 16:48:01 2007 | 4 | # Mon Apr 9 10:12:58 2007 |
| 5 | # | 5 | # |
| 6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
| 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y |
| 8 | CONFIG_GENERIC_GPIO=y | ||
| 8 | # CONFIG_GENERIC_TIME is not set | 9 | # CONFIG_GENERIC_TIME is not set |
| 9 | CONFIG_MMU=y | 10 | CONFIG_MMU=y |
| 10 | CONFIG_NO_IOPORT=y | 11 | CONFIG_NO_IOPORT=y |
| @@ -45,6 +46,7 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
| 45 | # CONFIG_IKCONFIG is not set | 46 | # CONFIG_IKCONFIG is not set |
| 46 | CONFIG_SYSFS_DEPRECATED=y | 47 | CONFIG_SYSFS_DEPRECATED=y |
| 47 | # CONFIG_RELAY is not set | 48 | # CONFIG_RELAY is not set |
| 49 | CONFIG_BLK_DEV_INITRD=y | ||
| 48 | CONFIG_INITRAMFS_SOURCE="" | 50 | CONFIG_INITRAMFS_SOURCE="" |
| 49 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 51 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
| 50 | CONFIG_SYSCTL=y | 52 | CONFIG_SYSCTL=y |
| @@ -531,7 +533,6 @@ CONFIG_BLK_DEV_RAM=y | |||
| 531 | CONFIG_BLK_DEV_RAM_COUNT=16 | 533 | CONFIG_BLK_DEV_RAM_COUNT=16 |
| 532 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 534 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
| 533 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 535 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 |
| 534 | CONFIG_BLK_DEV_INITRD=y | ||
| 535 | # CONFIG_CDROM_PKTCDVD is not set | 536 | # CONFIG_CDROM_PKTCDVD is not set |
| 536 | CONFIG_ATA_OVER_ETH=m | 537 | CONFIG_ATA_OVER_ETH=m |
| 537 | 538 | ||
| @@ -560,7 +561,6 @@ CONFIG_IDE_GENERIC=y | |||
| 560 | CONFIG_BLK_DEV_IDE_BAST=y | 561 | CONFIG_BLK_DEV_IDE_BAST=y |
| 561 | # CONFIG_IDE_CHIPSETS is not set | 562 | # CONFIG_IDE_CHIPSETS is not set |
| 562 | # CONFIG_BLK_DEV_IDEDMA is not set | 563 | # CONFIG_BLK_DEV_IDEDMA is not set |
| 563 | # CONFIG_IDEDMA_AUTO is not set | ||
| 564 | # CONFIG_BLK_DEV_HD is not set | 564 | # CONFIG_BLK_DEV_HD is not set |
| 565 | 565 | ||
| 566 | # | 566 | # |
| @@ -941,6 +941,7 @@ CONFIG_LEDS_CLASS=m | |||
| 941 | # LED drivers | 941 | # LED drivers |
| 942 | # | 942 | # |
| 943 | CONFIG_LEDS_S3C24XX=m | 943 | CONFIG_LEDS_S3C24XX=m |
| 944 | CONFIG_LEDS_H1940=m | ||
| 944 | 945 | ||
| 945 | # | 946 | # |
| 946 | # LED Triggers | 947 | # LED Triggers |
| @@ -1125,6 +1126,7 @@ CONFIG_USB_MON=y | |||
| 1125 | # CONFIG_USB_APPLEDISPLAY is not set | 1126 | # CONFIG_USB_APPLEDISPLAY is not set |
| 1126 | # CONFIG_USB_LD is not set | 1127 | # CONFIG_USB_LD is not set |
| 1127 | # CONFIG_USB_TRANCEVIBRATOR is not set | 1128 | # CONFIG_USB_TRANCEVIBRATOR is not set |
| 1129 | # CONFIG_USB_IOWARRIOR is not set | ||
| 1128 | # CONFIG_USB_TEST is not set | 1130 | # CONFIG_USB_TEST is not set |
| 1129 | 1131 | ||
| 1130 | # | 1132 | # |
| @@ -1169,7 +1171,6 @@ CONFIG_RTC_INTF_DEV=y | |||
| 1169 | # CONFIG_RTC_DRV_DS1672 is not set | 1171 | # CONFIG_RTC_DRV_DS1672 is not set |
| 1170 | # CONFIG_RTC_DRV_DS1742 is not set | 1172 | # CONFIG_RTC_DRV_DS1742 is not set |
| 1171 | # CONFIG_RTC_DRV_PCF8563 is not set | 1173 | # CONFIG_RTC_DRV_PCF8563 is not set |
| 1172 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
| 1173 | # CONFIG_RTC_DRV_RS5C348 is not set | 1174 | # CONFIG_RTC_DRV_RS5C348 is not set |
| 1174 | # CONFIG_RTC_DRV_RS5C372 is not set | 1175 | # CONFIG_RTC_DRV_RS5C372 is not set |
| 1175 | CONFIG_RTC_DRV_S3C=y | 1176 | CONFIG_RTC_DRV_S3C=y |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index bd78058b7178..b1142ce4ac47 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | # | 12 | # |
| 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
| 14 | # | 14 | # |
| 15 | # Last update: Tue Jan 16 16:52:56 2007 | 15 | # Last update: Mon Apr 16 21:01:04 2007 |
| 16 | # | 16 | # |
| 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
| 18 | # | 18 | # |
| @@ -1190,13 +1190,12 @@ g500 MACH_G500 G500 1178 | |||
| 1190 | bug MACH_BUG BUG 1179 | 1190 | bug MACH_BUG BUG 1179 |
| 1191 | mx33ads MACH_MX33ADS MX33ADS 1180 | 1191 | mx33ads MACH_MX33ADS MX33ADS 1180 |
| 1192 | chub MACH_CHUB CHUB 1181 | 1192 | chub MACH_CHUB CHUB 1181 |
| 1193 | gta01 MACH_GTA01 GTA01 1182 | 1193 | neo1973_gta01 MACH_NEO1973_GTA01 NEO1973_GTA01 1182 |
| 1194 | w90n740 MACH_W90N740 W90N740 1183 | 1194 | w90n740 MACH_W90N740 W90N740 1183 |
| 1195 | medallion_sa2410 MACH_MEDALLION_SA2410 MEDALLION_SA2410 1184 | 1195 | medallion_sa2410 MACH_MEDALLION_SA2410 MEDALLION_SA2410 1184 |
| 1196 | ia_cpu_9200_2 MACH_IA_CPU_9200_2 IA_CPU_9200_2 1185 | 1196 | ia_cpu_9200_2 MACH_IA_CPU_9200_2 IA_CPU_9200_2 1185 |
| 1197 | dimmrm9200 MACH_DIMMRM9200 DIMMRM9200 1186 | 1197 | dimmrm9200 MACH_DIMMRM9200 DIMMRM9200 1186 |
| 1198 | pm9261 MACH_PM9261 PM9261 1187 | 1198 | pm9261 MACH_PM9261 PM9261 1187 |
| 1199 | mx21 MACH_MX21 MX21 1188 | ||
| 1200 | ml7304 MACH_ML7304 ML7304 1189 | 1199 | ml7304 MACH_ML7304 ML7304 1189 |
| 1201 | ucp250 MACH_UCP250 UCP250 1190 | 1200 | ucp250 MACH_UCP250 UCP250 1190 |
| 1202 | intboard MACH_INTBOARD INTBOARD 1191 | 1201 | intboard MACH_INTBOARD INTBOARD 1191 |
| @@ -1242,3 +1241,97 @@ xscale_treo680 MACH_XSCALE_TREO680 XSCALE_TREO680 1230 | |||
| 1242 | tecon_tmezon MACH_TECON_TMEZON TECON_TMEZON 1231 | 1241 | tecon_tmezon MACH_TECON_TMEZON TECON_TMEZON 1231 |
| 1243 | zylonite MACH_ZYLONITE ZYLONITE 1233 | 1242 | zylonite MACH_ZYLONITE ZYLONITE 1233 |
| 1244 | gene1270 MACH_GENE1270 GENE1270 1234 | 1243 | gene1270 MACH_GENE1270 GENE1270 1234 |
| 1244 | zir2412 MACH_ZIR2412 ZIR2412 1235 | ||
| 1245 | mx31lite MACH_MX31LITE MX31LITE 1236 | ||
| 1246 | t700wx MACH_T700WX T700WX 1237 | ||
| 1247 | vf100 MACH_VF100 VF100 1238 | ||
| 1248 | nsb2 MACH_NSB2 NSB2 1239 | ||
| 1249 | nxhmi_bb MACH_NXHMI_BB NXHMI_BB 1240 | ||
| 1250 | nxhmi_re MACH_NXHMI_RE NXHMI_RE 1241 | ||
| 1251 | n4100pro MACH_N4100PRO N4100PRO 1242 | ||
| 1252 | sam9260 MACH_SAM9260 SAM9260 1243 | ||
| 1253 | omap_treo600 MACH_OMAP_TREO600 OMAP_TREO600 1244 | ||
| 1254 | indy2410 MACH_INDY2410 INDY2410 1245 | ||
| 1255 | nelt_a MACH_NELT_A NELT_A 1246 | ||
| 1256 | n311 MACH_N311 N311 1248 | ||
| 1257 | at91sam9260vgk MACH_AT91SAM9260VGK AT91SAM9260VGK 1249 | ||
| 1258 | at91leppe MACH_AT91LEPPE AT91LEPPE 1250 | ||
| 1259 | at91lepccn MACH_AT91LEPCCN AT91LEPCCN 1251 | ||
| 1260 | apc7100 MACH_APC7100 APC7100 1252 | ||
| 1261 | stargazer MACH_STARGAZER STARGAZER 1253 | ||
| 1262 | sonata MACH_SONATA SONATA 1254 | ||
| 1263 | schmoogie MACH_SCHMOOGIE SCHMOOGIE 1255 | ||
| 1264 | aztool MACH_AZTOOL AZTOOL 1256 | ||
| 1265 | mioa701 MACH_MIOA701 MIOA701 1257 | ||
| 1266 | sxni9260 MACH_SXNI9260 SXNI9260 1258 | ||
| 1267 | mxc27520evb MACH_MXC27520EVB MXC27520EVB 1259 | ||
| 1268 | armadillo5x0 MACH_ARMADILLO5X0 ARMADILLO5X0 1260 | ||
| 1269 | mb9260 MACH_MB9260 MB9260 1261 | ||
| 1270 | mb9263 MACH_MB9263 MB9263 1262 | ||
| 1271 | ipac9302 MACH_IPAC9302 IPAC9302 1263 | ||
| 1272 | cc9p9360js MACH_CC9P9360JS CC9P9360JS 1264 | ||
| 1273 | gallium MACH_GALLIUM GALLIUM 1265 | ||
| 1274 | msc2410 MACH_MSC2410 MSC2410 1266 | ||
| 1275 | ghi270 MACH_GHI270 GHI270 1267 | ||
| 1276 | davinci_leonardo MACH_DAVINCI_LEONARDO DAVINCI_LEONARDO 1268 | ||
| 1277 | oiab MACH_OIAB OIAB 1269 | ||
| 1278 | smdk6400 MACH_SMDK6400 SMDK6400 1270 | ||
| 1279 | nokia_n800 MACH_NOKIA_N800 NOKIA_N800 1271 | ||
| 1280 | greenphone MACH_GREENPHONE GREENPHONE 1272 | ||
| 1281 | compex42x MACH_COMPEXWP18 COMPEXWP18 1273 | ||
| 1282 | xmate MACH_XMATE XMATE 1274 | ||
| 1283 | energizer MACH_ENERGIZER ENERGIZER 1275 | ||
| 1284 | ime1 MACH_IME1 IME1 1276 | ||
| 1285 | sweda_tms MACH_SWEDATMS SWEDATMS 1277 | ||
| 1286 | ntnp435c MACH_NTNP435C NTNP435C 1278 | ||
| 1287 | spectro2 MACH_SPECTRO2 SPECTRO2 1279 | ||
| 1288 | h6039 MACH_H6039 H6039 1280 | ||
| 1289 | ep80219 MACH_EP80219 EP80219 1281 | ||
| 1290 | samoa_ii MACH_SAMOA_II SAMOA_II 1282 | ||
| 1291 | cwmxl MACH_CWMXL CWMXL 1283 | ||
| 1292 | as9200 MACH_AS9200 AS9200 1284 | ||
| 1293 | sfx1149 MACH_SFX1149 SFX1149 1285 | ||
| 1294 | navi010 MACH_NAVI010 NAVI010 1286 | ||
| 1295 | multmdp MACH_MULTMDP MULTMDP 1287 | ||
| 1296 | scb9520 MACH_SCB9520 SCB9520 1288 | ||
| 1297 | htcathena MACH_HTCATHENA HTCATHENA 1289 | ||
| 1298 | xp179 MACH_XP179 XP179 1290 | ||
| 1299 | h4300 MACH_H4300 H4300 1291 | ||
| 1300 | goramo_mlr MACH_GORAMO_MLR GORAMO_MLR 1292 | ||
| 1301 | mxc30020evb MACH_MXC30020EVB MXC30020EVB 1293 | ||
| 1302 | adsbitsymx MACH_ADSBITSIMX ADSBITSIMX 1294 | ||
| 1303 | adsportalplus MACH_ADSPORTALPLUS ADSPORTALPLUS 1295 | ||
| 1304 | mmsp2plus MACH_MMSP2PLUS MMSP2PLUS 1296 | ||
| 1305 | em_x270 MACH_EM_X270 EM_X270 1297 | ||
| 1306 | tpp302 MACH_TPP302 TPP302 1298 | ||
| 1307 | tpp104 MACH_TPM104 TPM104 1299 | ||
| 1308 | tpm102 MACH_TPM102 TPM102 1300 | ||
| 1309 | tpm109 MACH_TPM109 TPM109 1301 | ||
| 1310 | fbxo1 MACH_FBXO1 FBXO1 1302 | ||
| 1311 | hxd8 MACH_HXD8 HXD8 1303 | ||
| 1312 | neo1973_gta02 MACH_NEO1973_GTA02 NEO1973_GTA02 1304 | ||
| 1313 | emtest MACH_EMTEST EMTEST 1305 | ||
| 1314 | ad6900 MACH_AD6900 AD6900 1306 | ||
| 1315 | europa MACH_EUROPA EUROPA 1307 | ||
| 1316 | metroconnect MACH_METROCONNECT METROCONNECT 1308 | ||
| 1317 | ez_s2410 MACH_EZ_S2410 EZ_S2410 1309 | ||
| 1318 | ez_s2440 MACH_EZ_S2440 EZ_S2440 1310 | ||
| 1319 | ez_ep9312 MACH_EZ_EP9312 EZ_EP9312 1311 | ||
| 1320 | ez_ep9315 MACH_EZ_EP9315 EZ_EP9315 1312 | ||
| 1321 | ez_x7 MACH_EZ_X7 EZ_X7 1313 | ||
| 1322 | godotdb MACH_GODOTDB GODOTDB 1314 | ||
| 1323 | mistral MACH_MISTRAL MISTRAL 1315 | ||
| 1324 | msm MACH_MSM MSM 1316 | ||
| 1325 | ct5910 MACH_CT5910 CT5910 1317 | ||
| 1326 | ct5912 MACH_CT5912 CT5912 1318 | ||
| 1327 | hynet_ine MACH_HYNET_INE HYNET_INE 1319 | ||
| 1328 | hynet_app MACH_HYNET_APP HYNET_APP 1320 | ||
| 1329 | msm7200 MACH_MSM7200 MSM7200 1321 | ||
| 1330 | msm7600 MACH_MSM7600 MSM7600 1322 | ||
| 1331 | ceb255 MACH_CEB255 CEB255 1323 | ||
| 1332 | ciel MACH_CIEL CIEL 1324 | ||
| 1333 | slm5650 MACH_SLM5650 SLM5650 1325 | ||
| 1334 | at91sam9rlek MACH_AT91SAM9RLEK AT91SAM9RLEK 1326 | ||
| 1335 | comtech_router MACH_COMTECH_ROUTER COMTECH_ROUTER 1327 | ||
| 1336 | sbc2410x MACH_SBC2410X SBC2410X 1328 | ||
| 1337 | at4x0bd MACH_AT4X0BD AT4X0BD 1329 | ||
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index a98ba88a8c0c..9f1e8c1afab7 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
| @@ -41,16 +41,17 @@ int nmi_watchdog_enabled; | |||
| 41 | * different subsystems this reservation system just tries to coordinate | 41 | * different subsystems this reservation system just tries to coordinate |
| 42 | * things a little | 42 | * things a little |
| 43 | */ | 43 | */ |
| 44 | static DEFINE_PER_CPU(unsigned long, perfctr_nmi_owner); | ||
| 45 | static DEFINE_PER_CPU(unsigned long, evntsel_nmi_owner[3]); | ||
| 46 | |||
| 47 | static cpumask_t backtrace_mask = CPU_MASK_NONE; | ||
| 48 | 44 | ||
| 49 | /* this number is calculated from Intel's MSR_P4_CRU_ESCR5 register and it's | 45 | /* this number is calculated from Intel's MSR_P4_CRU_ESCR5 register and it's |
| 50 | * offset from MSR_P4_BSU_ESCR0. It will be the max for all platforms (for now) | 46 | * offset from MSR_P4_BSU_ESCR0. It will be the max for all platforms (for now) |
| 51 | */ | 47 | */ |
| 52 | #define NMI_MAX_COUNTER_BITS 66 | 48 | #define NMI_MAX_COUNTER_BITS 66 |
| 49 | #define NMI_MAX_COUNTER_LONGS BITS_TO_LONGS(NMI_MAX_COUNTER_BITS) | ||
| 53 | 50 | ||
| 51 | static DEFINE_PER_CPU(unsigned long, perfctr_nmi_owner[NMI_MAX_COUNTER_LONGS]); | ||
| 52 | static DEFINE_PER_CPU(unsigned long, evntsel_nmi_owner[NMI_MAX_COUNTER_LONGS]); | ||
| 53 | |||
| 54 | static cpumask_t backtrace_mask = CPU_MASK_NONE; | ||
| 54 | /* nmi_active: | 55 | /* nmi_active: |
| 55 | * >0: the lapic NMI watchdog is active, but can be disabled | 56 | * >0: the lapic NMI watchdog is active, but can be disabled |
| 56 | * <0: the lapic NMI watchdog has not been set up, and cannot | 57 | * <0: the lapic NMI watchdog has not been set up, and cannot |
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S index ca51610955df..6f38f818380b 100644 --- a/arch/i386/kernel/vmlinux.lds.S +++ b/arch/i386/kernel/vmlinux.lds.S | |||
| @@ -26,7 +26,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") | |||
| 26 | OUTPUT_ARCH(i386) | 26 | OUTPUT_ARCH(i386) |
| 27 | ENTRY(phys_startup_32) | 27 | ENTRY(phys_startup_32) |
| 28 | jiffies = jiffies_64; | 28 | jiffies = jiffies_64; |
| 29 | _proxy_pda = 0; | 29 | _proxy_pda = 1; |
| 30 | 30 | ||
| 31 | PHDRS { | 31 | PHDRS { |
| 32 | text PT_LOAD FLAGS(5); /* R_E */ | 32 | text PT_LOAD FLAGS(5); /* R_E */ |
diff --git a/arch/x86_64/kernel/k8.c b/arch/x86_64/kernel/k8.c index 6416682d33d0..bc11b32e8b4d 100644 --- a/arch/x86_64/kernel/k8.c +++ b/arch/x86_64/kernel/k8.c | |||
| @@ -61,8 +61,8 @@ int cache_k8_northbridges(void) | |||
| 61 | dev = NULL; | 61 | dev = NULL; |
| 62 | i = 0; | 62 | i = 0; |
| 63 | while ((dev = next_k8_northbridge(dev)) != NULL) { | 63 | while ((dev = next_k8_northbridge(dev)) != NULL) { |
| 64 | k8_northbridges[i++] = dev; | 64 | k8_northbridges[i] = dev; |
| 65 | pci_read_config_dword(dev, 0x9c, &flush_words[i]); | 65 | pci_read_config_dword(dev, 0x9c, &flush_words[i++]); |
| 66 | } | 66 | } |
| 67 | k8_northbridges[i] = NULL; | 67 | k8_northbridges[i] = NULL; |
| 68 | return 0; | 68 | return 0; |
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index a90996c27dc8..dfab9f167366 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
| @@ -39,15 +39,17 @@ int panic_on_unrecovered_nmi; | |||
| 39 | * different subsystems this reservation system just tries to coordinate | 39 | * different subsystems this reservation system just tries to coordinate |
| 40 | * things a little | 40 | * things a little |
| 41 | */ | 41 | */ |
| 42 | static DEFINE_PER_CPU(unsigned, perfctr_nmi_owner); | ||
| 43 | static DEFINE_PER_CPU(unsigned, evntsel_nmi_owner[2]); | ||
| 44 | |||
| 45 | static cpumask_t backtrace_mask = CPU_MASK_NONE; | ||
| 46 | 42 | ||
| 47 | /* this number is calculated from Intel's MSR_P4_CRU_ESCR5 register and it's | 43 | /* this number is calculated from Intel's MSR_P4_CRU_ESCR5 register and it's |
| 48 | * offset from MSR_P4_BSU_ESCR0. It will be the max for all platforms (for now) | 44 | * offset from MSR_P4_BSU_ESCR0. It will be the max for all platforms (for now) |
| 49 | */ | 45 | */ |
| 50 | #define NMI_MAX_COUNTER_BITS 66 | 46 | #define NMI_MAX_COUNTER_BITS 66 |
| 47 | #define NMI_MAX_COUNTER_LONGS BITS_TO_LONGS(NMI_MAX_COUNTER_BITS) | ||
| 48 | |||
| 49 | static DEFINE_PER_CPU(unsigned, perfctr_nmi_owner[NMI_MAX_COUNTER_LONGS]); | ||
| 50 | static DEFINE_PER_CPU(unsigned, evntsel_nmi_owner[NMI_MAX_COUNTER_LONGS]); | ||
| 51 | |||
| 52 | static cpumask_t backtrace_mask = CPU_MASK_NONE; | ||
| 51 | 53 | ||
| 52 | /* nmi_active: | 54 | /* nmi_active: |
| 53 | * >0: the lapic NMI watchdog is active, but can be disabled | 55 | * >0: the lapic NMI watchdog is active, but can be disabled |
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S index b73212c0a550..5176ecf006ee 100644 --- a/arch/x86_64/kernel/vmlinux.lds.S +++ b/arch/x86_64/kernel/vmlinux.lds.S | |||
| @@ -13,7 +13,7 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") | |||
| 13 | OUTPUT_ARCH(i386:x86-64) | 13 | OUTPUT_ARCH(i386:x86-64) |
| 14 | ENTRY(phys_startup_64) | 14 | ENTRY(phys_startup_64) |
| 15 | jiffies_64 = jiffies; | 15 | jiffies_64 = jiffies; |
| 16 | _proxy_pda = 0; | 16 | _proxy_pda = 1; |
| 17 | PHDRS { | 17 | PHDRS { |
| 18 | text PT_LOAD FLAGS(5); /* R_E */ | 18 | text PT_LOAD FLAGS(5); /* R_E */ |
| 19 | data PT_LOAD FLAGS(7); /* RWE */ | 19 | data PT_LOAD FLAGS(7); /* RWE */ |
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index f5c160caf9f4..5f066963f171 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
| @@ -248,7 +248,7 @@ static unsigned long get_unmapped_area_mem(struct file *file, | |||
| 248 | { | 248 | { |
| 249 | if (!valid_mmap_phys_addr_range(pgoff, len)) | 249 | if (!valid_mmap_phys_addr_range(pgoff, len)) |
| 250 | return (unsigned long) -EINVAL; | 250 | return (unsigned long) -EINVAL; |
| 251 | return pgoff; | 251 | return pgoff << PAGE_SHIFT; |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | /* can't do an in-place private mapping if there's no MMU */ | 254 | /* can't do an in-place private mapping if there's no MMU */ |
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index da5828f2dfc2..01206ebb1cf2 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c | |||
| @@ -407,7 +407,7 @@ static void w83627ehf_write_fan_div(struct i2c_client *client, int nr) | |||
| 407 | break; | 407 | break; |
| 408 | case 4: | 408 | case 4: |
| 409 | reg = (w83627ehf_read_value(client, W83627EHF_REG_DIODE) & 0x73) | 409 | reg = (w83627ehf_read_value(client, W83627EHF_REG_DIODE) & 0x73) |
| 410 | | ((data->fan_div[4] & 0x03) << 3) | 410 | | ((data->fan_div[4] & 0x03) << 2) |
| 411 | | ((data->fan_div[4] & 0x04) << 5); | 411 | | ((data->fan_div[4] & 0x04) << 5); |
| 412 | w83627ehf_write_value(client, W83627EHF_REG_DIODE, reg); | 412 | w83627ehf_write_value(client, W83627EHF_REG_DIODE, reg); |
| 413 | break; | 413 | break; |
| @@ -471,9 +471,9 @@ static struct w83627ehf_data *w83627ehf_update_device(struct device *dev) | |||
| 471 | time */ | 471 | time */ |
| 472 | if (data->fan[i] == 0xff | 472 | if (data->fan[i] == 0xff |
| 473 | && data->fan_div[i] < 0x07) { | 473 | && data->fan_div[i] < 0x07) { |
| 474 | dev_dbg(&client->dev, "Increasing fan %d " | 474 | dev_dbg(&client->dev, "Increasing fan%d " |
| 475 | "clock divider from %u to %u\n", | 475 | "clock divider from %u to %u\n", |
| 476 | i, div_from_reg(data->fan_div[i]), | 476 | i + 1, div_from_reg(data->fan_div[i]), |
| 477 | div_from_reg(data->fan_div[i] + 1)); | 477 | div_from_reg(data->fan_div[i] + 1)); |
| 478 | data->fan_div[i]++; | 478 | data->fan_div[i]++; |
| 479 | w83627ehf_write_fan_div(client, i); | 479 | w83627ehf_write_fan_div(client, i); |
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index fb19dbb31e42..ece31d2c6c64 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
| @@ -344,8 +344,7 @@ config I2C_PARPORT_LIGHT | |||
| 344 | 344 | ||
| 345 | config I2C_PASEMI | 345 | config I2C_PASEMI |
| 346 | tristate "PA Semi SMBus interface" | 346 | tristate "PA Semi SMBus interface" |
| 347 | # depends on PPC_PASEMI && I2C && PCI | 347 | depends on PPC_PASEMI && I2C && PCI |
| 348 | depends on I2C && PCI | ||
| 349 | help | 348 | help |
| 350 | Supports the PA Semi PWRficient on-chip SMBus interfaces. | 349 | Supports the PA Semi PWRficient on-chip SMBus interfaces. |
| 351 | 350 | ||
diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c index f54fb5d65cc4..bf89eeef74e9 100644 --- a/drivers/i2c/busses/i2c-pasemi.c +++ b/drivers/i2c/busses/i2c-pasemi.c | |||
| @@ -141,7 +141,7 @@ static int pasemi_i2c_xfer_msg(struct i2c_adapter *adapter, | |||
| 141 | for (i = 0; i < msg->len - 1; i++) | 141 | for (i = 0; i < msg->len - 1; i++) |
| 142 | TXFIFO_WR(smbus, msg->buf[i]); | 142 | TXFIFO_WR(smbus, msg->buf[i]); |
| 143 | 143 | ||
| 144 | TXFIFO_WR(smbus, msg->buf[msg->len] | | 144 | TXFIFO_WR(smbus, msg->buf[msg->len-1] | |
| 145 | (stop ? MTXFIFO_STOP : 0)); | 145 | (stop ? MTXFIFO_STOP : 0)); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| @@ -226,7 +226,7 @@ static int pasemi_smb_xfer(struct i2c_adapter *adapter, | |||
| 226 | rd = RXFIFO_RD(smbus); | 226 | rd = RXFIFO_RD(smbus); |
| 227 | len = min_t(u8, (rd & MRXFIFO_DATA_M), | 227 | len = min_t(u8, (rd & MRXFIFO_DATA_M), |
| 228 | I2C_SMBUS_BLOCK_MAX); | 228 | I2C_SMBUS_BLOCK_MAX); |
| 229 | TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ | | 229 | TXFIFO_WR(smbus, len | MTXFIFO_READ | |
| 230 | MTXFIFO_STOP); | 230 | MTXFIFO_STOP); |
| 231 | } else { | 231 | } else { |
| 232 | len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX); | 232 | len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX); |
| @@ -258,7 +258,7 @@ static int pasemi_smb_xfer(struct i2c_adapter *adapter, | |||
| 258 | rd = RXFIFO_RD(smbus); | 258 | rd = RXFIFO_RD(smbus); |
| 259 | len = min_t(u8, (rd & MRXFIFO_DATA_M), | 259 | len = min_t(u8, (rd & MRXFIFO_DATA_M), |
| 260 | I2C_SMBUS_BLOCK_MAX - len); | 260 | I2C_SMBUS_BLOCK_MAX - len); |
| 261 | TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ | MTXFIFO_STOP); | 261 | TXFIFO_WR(smbus, len | MTXFIFO_READ | MTXFIFO_STOP); |
| 262 | break; | 262 | break; |
| 263 | 263 | ||
| 264 | default: | 264 | default: |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 3096836d8bd3..c9f3dc4fd3ee 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
| @@ -1259,9 +1259,9 @@ static int smu_release(struct inode *inode, struct file *file) | |||
| 1259 | set_current_state(TASK_UNINTERRUPTIBLE); | 1259 | set_current_state(TASK_UNINTERRUPTIBLE); |
| 1260 | if (pp->cmd.status != 1) | 1260 | if (pp->cmd.status != 1) |
| 1261 | break; | 1261 | break; |
| 1262 | spin_lock_irqsave(&pp->lock, flags); | ||
| 1263 | schedule(); | ||
| 1264 | spin_unlock_irqrestore(&pp->lock, flags); | 1262 | spin_unlock_irqrestore(&pp->lock, flags); |
| 1263 | schedule(); | ||
| 1264 | spin_lock_irqsave(&pp->lock, flags); | ||
| 1265 | } | 1265 | } |
| 1266 | set_current_state(TASK_RUNNING); | 1266 | set_current_state(TASK_RUNNING); |
| 1267 | remove_wait_queue(&pp->wait, &wait); | 1267 | remove_wait_queue(&pp->wait, &wait); |
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 220abce63e4a..b10211c420ef 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c | |||
| @@ -77,7 +77,7 @@ static void s3c24xx_spi_chipsel(struct spi_device *spi, int value) | |||
| 77 | 77 | ||
| 78 | switch (value) { | 78 | switch (value) { |
| 79 | case BITBANG_CS_INACTIVE: | 79 | case BITBANG_CS_INACTIVE: |
| 80 | hw->pdata->set_cs(hw->pdata, spi->chip_select, cspol^1); | 80 | hw->set_cs(hw->pdata, spi->chip_select, cspol^1); |
| 81 | break; | 81 | break; |
| 82 | 82 | ||
| 83 | case BITBANG_CS_ACTIVE: | 83 | case BITBANG_CS_ACTIVE: |
| @@ -98,7 +98,7 @@ static void s3c24xx_spi_chipsel(struct spi_device *spi, int value) | |||
| 98 | /* write new configration */ | 98 | /* write new configration */ |
| 99 | 99 | ||
| 100 | writeb(spcon, hw->regs + S3C2410_SPCON); | 100 | writeb(spcon, hw->regs + S3C2410_SPCON); |
| 101 | hw->pdata->set_cs(hw->pdata, spi->chip_select, cspol); | 101 | hw->set_cs(hw->pdata, spi->chip_select, cspol); |
| 102 | 102 | ||
| 103 | break; | 103 | break; |
| 104 | } | 104 | } |
| @@ -1244,13 +1244,17 @@ EXPORT_SYMBOL(set_binfmt); | |||
| 1244 | * name into corename, which must have space for at least | 1244 | * name into corename, which must have space for at least |
| 1245 | * CORENAME_MAX_SIZE bytes plus one byte for the zero terminator. | 1245 | * CORENAME_MAX_SIZE bytes plus one byte for the zero terminator. |
| 1246 | */ | 1246 | */ |
| 1247 | static void format_corename(char *corename, const char *pattern, long signr) | 1247 | static int format_corename(char *corename, const char *pattern, long signr) |
| 1248 | { | 1248 | { |
| 1249 | const char *pat_ptr = pattern; | 1249 | const char *pat_ptr = pattern; |
| 1250 | char *out_ptr = corename; | 1250 | char *out_ptr = corename; |
| 1251 | char *const out_end = corename + CORENAME_MAX_SIZE; | 1251 | char *const out_end = corename + CORENAME_MAX_SIZE; |
| 1252 | int rc; | 1252 | int rc; |
| 1253 | int pid_in_pattern = 0; | 1253 | int pid_in_pattern = 0; |
| 1254 | int ispipe = 0; | ||
| 1255 | |||
| 1256 | if (*pattern == '|') | ||
| 1257 | ispipe = 1; | ||
| 1254 | 1258 | ||
| 1255 | /* Repeat as long as we have more pattern to process and more output | 1259 | /* Repeat as long as we have more pattern to process and more output |
| 1256 | space */ | 1260 | space */ |
| @@ -1341,8 +1345,8 @@ static void format_corename(char *corename, const char *pattern, long signr) | |||
| 1341 | * | 1345 | * |
| 1342 | * If core_pattern does not include a %p (as is the default) | 1346 | * If core_pattern does not include a %p (as is the default) |
| 1343 | * and core_uses_pid is set, then .%pid will be appended to | 1347 | * and core_uses_pid is set, then .%pid will be appended to |
| 1344 | * the filename */ | 1348 | * the filename. Do not do this for piped commands. */ |
| 1345 | if (!pid_in_pattern | 1349 | if (!ispipe && !pid_in_pattern |
| 1346 | && (core_uses_pid || atomic_read(¤t->mm->mm_users) != 1)) { | 1350 | && (core_uses_pid || atomic_read(¤t->mm->mm_users) != 1)) { |
| 1347 | rc = snprintf(out_ptr, out_end - out_ptr, | 1351 | rc = snprintf(out_ptr, out_end - out_ptr, |
| 1348 | ".%d", current->tgid); | 1352 | ".%d", current->tgid); |
| @@ -1350,8 +1354,9 @@ static void format_corename(char *corename, const char *pattern, long signr) | |||
| 1350 | goto out; | 1354 | goto out; |
| 1351 | out_ptr += rc; | 1355 | out_ptr += rc; |
| 1352 | } | 1356 | } |
| 1353 | out: | 1357 | out: |
| 1354 | *out_ptr = 0; | 1358 | *out_ptr = 0; |
| 1359 | return ispipe; | ||
| 1355 | } | 1360 | } |
| 1356 | 1361 | ||
| 1357 | static void zap_process(struct task_struct *start) | 1362 | static void zap_process(struct task_struct *start) |
| @@ -1502,16 +1507,15 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs) | |||
| 1502 | * uses lock_kernel() | 1507 | * uses lock_kernel() |
| 1503 | */ | 1508 | */ |
| 1504 | lock_kernel(); | 1509 | lock_kernel(); |
| 1505 | format_corename(corename, core_pattern, signr); | 1510 | ispipe = format_corename(corename, core_pattern, signr); |
| 1506 | unlock_kernel(); | 1511 | unlock_kernel(); |
| 1507 | if (corename[0] == '|') { | 1512 | if (ispipe) { |
| 1508 | /* SIGPIPE can happen, but it's just never processed */ | 1513 | /* SIGPIPE can happen, but it's just never processed */ |
| 1509 | if(call_usermodehelper_pipe(corename+1, NULL, NULL, &file)) { | 1514 | if(call_usermodehelper_pipe(corename+1, NULL, NULL, &file)) { |
| 1510 | printk(KERN_INFO "Core dump to %s pipe failed\n", | 1515 | printk(KERN_INFO "Core dump to %s pipe failed\n", |
| 1511 | corename); | 1516 | corename); |
| 1512 | goto fail_unlock; | 1517 | goto fail_unlock; |
| 1513 | } | 1518 | } |
| 1514 | ispipe = 1; | ||
| 1515 | } else | 1519 | } else |
| 1516 | file = filp_open(corename, | 1520 | file = filp_open(corename, |
| 1517 | O_CREAT | 2 | O_NOFOLLOW | O_LARGEFILE | flag, | 1521 | O_CREAT | 2 | O_NOFOLLOW | O_LARGEFILE | flag, |
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index 013d7afe7cde..f18b79122fa3 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c | |||
| @@ -601,7 +601,7 @@ static void ufs_set_inode_ops(struct inode *inode) | |||
| 601 | ufs_get_inode_dev(inode->i_sb, UFS_I(inode))); | 601 | ufs_get_inode_dev(inode->i_sb, UFS_I(inode))); |
| 602 | } | 602 | } |
| 603 | 603 | ||
| 604 | static void ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode) | 604 | static int ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode) |
| 605 | { | 605 | { |
| 606 | struct ufs_inode_info *ufsi = UFS_I(inode); | 606 | struct ufs_inode_info *ufsi = UFS_I(inode); |
| 607 | struct super_block *sb = inode->i_sb; | 607 | struct super_block *sb = inode->i_sb; |
| @@ -613,8 +613,10 @@ static void ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode) | |||
| 613 | */ | 613 | */ |
| 614 | inode->i_mode = mode = fs16_to_cpu(sb, ufs_inode->ui_mode); | 614 | inode->i_mode = mode = fs16_to_cpu(sb, ufs_inode->ui_mode); |
| 615 | inode->i_nlink = fs16_to_cpu(sb, ufs_inode->ui_nlink); | 615 | inode->i_nlink = fs16_to_cpu(sb, ufs_inode->ui_nlink); |
| 616 | if (inode->i_nlink == 0) | 616 | if (inode->i_nlink == 0) { |
| 617 | ufs_error (sb, "ufs_read_inode", "inode %lu has zero nlink\n", inode->i_ino); | 617 | ufs_error (sb, "ufs_read_inode", "inode %lu has zero nlink\n", inode->i_ino); |
| 618 | return -1; | ||
| 619 | } | ||
| 618 | 620 | ||
| 619 | /* | 621 | /* |
| 620 | * Linux now has 32-bit uid and gid, so we can support EFT. | 622 | * Linux now has 32-bit uid and gid, so we can support EFT. |
| @@ -643,9 +645,10 @@ static void ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode) | |||
| 643 | for (i = 0; i < (UFS_NDADDR + UFS_NINDIR) * 4; i++) | 645 | for (i = 0; i < (UFS_NDADDR + UFS_NINDIR) * 4; i++) |
| 644 | ufsi->i_u1.i_symlink[i] = ufs_inode->ui_u2.ui_symlink[i]; | 646 | ufsi->i_u1.i_symlink[i] = ufs_inode->ui_u2.ui_symlink[i]; |
| 645 | } | 647 | } |
| 648 | return 0; | ||
| 646 | } | 649 | } |
| 647 | 650 | ||
| 648 | static void ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode) | 651 | static int ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode) |
| 649 | { | 652 | { |
| 650 | struct ufs_inode_info *ufsi = UFS_I(inode); | 653 | struct ufs_inode_info *ufsi = UFS_I(inode); |
| 651 | struct super_block *sb = inode->i_sb; | 654 | struct super_block *sb = inode->i_sb; |
| @@ -658,8 +661,10 @@ static void ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode) | |||
| 658 | */ | 661 | */ |
| 659 | inode->i_mode = mode = fs16_to_cpu(sb, ufs2_inode->ui_mode); | 662 | inode->i_mode = mode = fs16_to_cpu(sb, ufs2_inode->ui_mode); |
| 660 | inode->i_nlink = fs16_to_cpu(sb, ufs2_inode->ui_nlink); | 663 | inode->i_nlink = fs16_to_cpu(sb, ufs2_inode->ui_nlink); |
| 661 | if (inode->i_nlink == 0) | 664 | if (inode->i_nlink == 0) { |
| 662 | ufs_error (sb, "ufs_read_inode", "inode %lu has zero nlink\n", inode->i_ino); | 665 | ufs_error (sb, "ufs_read_inode", "inode %lu has zero nlink\n", inode->i_ino); |
| 666 | return -1; | ||
| 667 | } | ||
| 663 | 668 | ||
| 664 | /* | 669 | /* |
| 665 | * Linux now has 32-bit uid and gid, so we can support EFT. | 670 | * Linux now has 32-bit uid and gid, so we can support EFT. |
| @@ -690,6 +695,7 @@ static void ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode) | |||
| 690 | for (i = 0; i < (UFS_NDADDR + UFS_NINDIR) * 4; i++) | 695 | for (i = 0; i < (UFS_NDADDR + UFS_NINDIR) * 4; i++) |
| 691 | ufsi->i_u1.i_symlink[i] = ufs2_inode->ui_u2.ui_symlink[i]; | 696 | ufsi->i_u1.i_symlink[i] = ufs2_inode->ui_u2.ui_symlink[i]; |
| 692 | } | 697 | } |
| 698 | return 0; | ||
| 693 | } | 699 | } |
| 694 | 700 | ||
| 695 | void ufs_read_inode(struct inode * inode) | 701 | void ufs_read_inode(struct inode * inode) |
| @@ -698,6 +704,7 @@ void ufs_read_inode(struct inode * inode) | |||
| 698 | struct super_block * sb; | 704 | struct super_block * sb; |
| 699 | struct ufs_sb_private_info * uspi; | 705 | struct ufs_sb_private_info * uspi; |
| 700 | struct buffer_head * bh; | 706 | struct buffer_head * bh; |
| 707 | int err; | ||
| 701 | 708 | ||
| 702 | UFSD("ENTER, ino %lu\n", inode->i_ino); | 709 | UFSD("ENTER, ino %lu\n", inode->i_ino); |
| 703 | 710 | ||
| @@ -720,14 +727,17 @@ void ufs_read_inode(struct inode * inode) | |||
| 720 | if ((UFS_SB(sb)->s_flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) { | 727 | if ((UFS_SB(sb)->s_flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) { |
| 721 | struct ufs2_inode *ufs2_inode = (struct ufs2_inode *)bh->b_data; | 728 | struct ufs2_inode *ufs2_inode = (struct ufs2_inode *)bh->b_data; |
| 722 | 729 | ||
| 723 | ufs2_read_inode(inode, | 730 | err = ufs2_read_inode(inode, |
| 724 | ufs2_inode + ufs_inotofsbo(inode->i_ino)); | 731 | ufs2_inode + ufs_inotofsbo(inode->i_ino)); |
| 725 | } else { | 732 | } else { |
| 726 | struct ufs_inode *ufs_inode = (struct ufs_inode *)bh->b_data; | 733 | struct ufs_inode *ufs_inode = (struct ufs_inode *)bh->b_data; |
| 727 | 734 | ||
| 728 | ufs1_read_inode(inode, ufs_inode + ufs_inotofsbo(inode->i_ino)); | 735 | err = ufs1_read_inode(inode, |
| 736 | ufs_inode + ufs_inotofsbo(inode->i_ino)); | ||
| 729 | } | 737 | } |
| 730 | 738 | ||
| 739 | if (err) | ||
| 740 | goto bad_inode; | ||
| 731 | inode->i_version++; | 741 | inode->i_version++; |
| 732 | ufsi->i_lastfrag = | 742 | ufsi->i_lastfrag = |
| 733 | (inode->i_size + uspi->s_fsize - 1) >> uspi->s_fshift; | 743 | (inode->i_size + uspi->s_fsize - 1) >> uspi->s_fshift; |
| @@ -888,6 +898,8 @@ void ufs_delete_inode (struct inode * inode) | |||
| 888 | loff_t old_i_size; | 898 | loff_t old_i_size; |
| 889 | 899 | ||
| 890 | truncate_inode_pages(&inode->i_data, 0); | 900 | truncate_inode_pages(&inode->i_data, 0); |
| 901 | if (is_bad_inode(inode)) | ||
| 902 | goto no_delete; | ||
| 891 | /*UFS_I(inode)->i_dtime = CURRENT_TIME;*/ | 903 | /*UFS_I(inode)->i_dtime = CURRENT_TIME;*/ |
| 892 | lock_kernel(); | 904 | lock_kernel(); |
| 893 | mark_inode_dirty(inode); | 905 | mark_inode_dirty(inode); |
| @@ -898,4 +910,7 @@ void ufs_delete_inode (struct inode * inode) | |||
| 898 | ufs_warning(inode->i_sb, __FUNCTION__, "ufs_truncate failed\n"); | 910 | ufs_warning(inode->i_sb, __FUNCTION__, "ufs_truncate failed\n"); |
| 899 | ufs_free_inode (inode); | 911 | ufs_free_inode (inode); |
| 900 | unlock_kernel(); | 912 | unlock_kernel(); |
| 913 | return; | ||
| 914 | no_delete: | ||
| 915 | clear_inode(inode); /* We must guarantee clearing of inode... */ | ||
| 901 | } | 916 | } |
diff --git a/include/asm-alpha/compiler.h b/include/asm-alpha/compiler.h index d2768cc3d7a4..da6bb199839c 100644 --- a/include/asm-alpha/compiler.h +++ b/include/asm-alpha/compiler.h | |||
| @@ -17,9 +17,6 @@ | |||
| 17 | # define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift) | 17 | # define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift) |
| 18 | # define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift) | 18 | # define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift) |
| 19 | # define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b) | 19 | # define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b) |
| 20 | # define __kernel_cttz(x) __builtin_ctzl(x) | ||
| 21 | # define __kernel_ctlz(x) __builtin_clzl(x) | ||
| 22 | # define __kernel_ctpop(x) __builtin_popcountl(x) | ||
| 23 | #else | 20 | #else |
| 24 | # define __kernel_insbl(val, shift) \ | 21 | # define __kernel_insbl(val, shift) \ |
| 25 | ({ unsigned long __kir; \ | 22 | ({ unsigned long __kir; \ |
| @@ -49,17 +46,39 @@ | |||
| 49 | ({ unsigned long __kir; \ | 46 | ({ unsigned long __kir; \ |
| 50 | __asm__("cmpbge %r2,%1,%0" : "=r"(__kir) : "rI"(b), "rJ"(a)); \ | 47 | __asm__("cmpbge %r2,%1,%0" : "=r"(__kir) : "rI"(b), "rJ"(a)); \ |
| 51 | __kir; }) | 48 | __kir; }) |
| 49 | #endif | ||
| 50 | |||
| 51 | #ifdef __alpha_cix__ | ||
| 52 | # if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 | ||
| 53 | # define __kernel_cttz(x) __builtin_ctzl(x) | ||
| 54 | # define __kernel_ctlz(x) __builtin_clzl(x) | ||
| 55 | # define __kernel_ctpop(x) __builtin_popcountl(x) | ||
| 56 | # else | ||
| 57 | # define __kernel_cttz(x) \ | ||
| 58 | ({ unsigned long __kir; \ | ||
| 59 | __asm__("cttz %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
| 60 | __kir; }) | ||
| 61 | # define __kernel_ctlz(x) \ | ||
| 62 | ({ unsigned long __kir; \ | ||
| 63 | __asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
| 64 | __kir; }) | ||
| 65 | # define __kernel_ctpop(x) \ | ||
| 66 | ({ unsigned long __kir; \ | ||
| 67 | __asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x)); \ | ||
| 68 | __kir; }) | ||
| 69 | # endif | ||
| 70 | #else | ||
| 52 | # define __kernel_cttz(x) \ | 71 | # define __kernel_cttz(x) \ |
| 53 | ({ unsigned long __kir; \ | 72 | ({ unsigned long __kir; \ |
| 54 | __asm__("cttz %1,%0" : "=r"(__kir) : "r"(x)); \ | 73 | __asm__(".arch ev67; cttz %1,%0" : "=r"(__kir) : "r"(x)); \ |
| 55 | __kir; }) | 74 | __kir; }) |
| 56 | # define __kernel_ctlz(x) \ | 75 | # define __kernel_ctlz(x) \ |
| 57 | ({ unsigned long __kir; \ | 76 | ({ unsigned long __kir; \ |
| 58 | __asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x)); \ | 77 | __asm__(".arch ev67; ctlz %1,%0" : "=r"(__kir) : "r"(x)); \ |
| 59 | __kir; }) | 78 | __kir; }) |
| 60 | # define __kernel_ctpop(x) \ | 79 | # define __kernel_ctpop(x) \ |
| 61 | ({ unsigned long __kir; \ | 80 | ({ unsigned long __kir; \ |
| 62 | __asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x)); \ | 81 | __asm__(".arch ev67; ctpop %1,%0" : "=r"(__kir) : "r"(x)); \ |
| 63 | __kir; }) | 82 | __kir; }) |
| 64 | #endif | 83 | #endif |
| 65 | 84 | ||
| @@ -78,16 +97,20 @@ | |||
| 78 | #else | 97 | #else |
| 79 | #define __kernel_ldbu(mem) \ | 98 | #define __kernel_ldbu(mem) \ |
| 80 | ({ unsigned char __kir; \ | 99 | ({ unsigned char __kir; \ |
| 81 | __asm__("ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \ | 100 | __asm__(".arch ev56; \ |
| 101 | ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \ | ||
| 82 | __kir; }) | 102 | __kir; }) |
| 83 | #define __kernel_ldwu(mem) \ | 103 | #define __kernel_ldwu(mem) \ |
| 84 | ({ unsigned short __kir; \ | 104 | ({ unsigned short __kir; \ |
| 85 | __asm__("ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \ | 105 | __asm__(".arch ev56; \ |
| 106 | ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \ | ||
| 86 | __kir; }) | 107 | __kir; }) |
| 87 | #define __kernel_stb(val,mem) \ | 108 | #define __kernel_stb(val,mem) \ |
| 88 | __asm__("stb %1,%0" : "=m"(mem) : "r"(val)) | 109 | __asm__(".arch ev56; \ |
| 89 | #define __kernel_stw(val,mem) \ | 110 | stb %1,%0" : "=m"(mem) : "r"(val)) |
| 90 | __asm__("stw %1,%0" : "=m"(mem) : "r"(val)) | 111 | #define __kernel_stw(val,mem) \ |
| 112 | __asm__(".arch ev56; \ | ||
| 113 | stw %1,%0" : "=m"(mem) : "r"(val)) | ||
| 91 | #endif | 114 | #endif |
| 92 | 115 | ||
| 93 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
diff --git a/include/asm-alpha/core_mcpcia.h b/include/asm-alpha/core_mcpcia.h index 980a3c51b18e..525b4f6a7ace 100644 --- a/include/asm-alpha/core_mcpcia.h +++ b/include/asm-alpha/core_mcpcia.h | |||
| @@ -72,6 +72,8 @@ | |||
| 72 | * | 72 | * |
| 73 | */ | 73 | */ |
| 74 | 74 | ||
| 75 | #define MCPCIA_MAX_HOSES 4 | ||
| 76 | |||
| 75 | #define MCPCIA_MID(m) ((unsigned long)(m) << 33) | 77 | #define MCPCIA_MID(m) ((unsigned long)(m) << 33) |
| 76 | 78 | ||
| 77 | /* Dodge has PCI0 and PCI1 at MID 4 and 5 respectively. | 79 | /* Dodge has PCI0 and PCI1 at MID 4 and 5 respectively. |
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h index 24bdcc8b63aa..21a86f1a05b3 100644 --- a/include/asm-alpha/io.h +++ b/include/asm-alpha/io.h | |||
| @@ -113,6 +113,7 @@ static inline unsigned long virt_to_bus(void *address) | |||
| 113 | unsigned long bus = phys + __direct_map_base; | 113 | unsigned long bus = phys + __direct_map_base; |
| 114 | return phys <= __direct_map_size ? bus : 0; | 114 | return phys <= __direct_map_size ? bus : 0; |
| 115 | } | 115 | } |
| 116 | #define isa_virt_to_bus virt_to_bus | ||
| 116 | 117 | ||
| 117 | static inline void *bus_to_virt(unsigned long address) | 118 | static inline void *bus_to_virt(unsigned long address) |
| 118 | { | 119 | { |
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index 8d853c554631..0b00068313f9 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h | |||
| @@ -288,7 +288,7 @@ COMPAT_SYS(ppoll) | |||
| 288 | SYSCALL_SPU(unshare) | 288 | SYSCALL_SPU(unshare) |
| 289 | SYSCALL_SPU(splice) | 289 | SYSCALL_SPU(splice) |
| 290 | SYSCALL_SPU(tee) | 290 | SYSCALL_SPU(tee) |
| 291 | SYSCALL_SPU(vmsplice) | 291 | COMPAT_SYS_SPU(vmsplice) |
| 292 | COMPAT_SYS_SPU(openat) | 292 | COMPAT_SYS_SPU(openat) |
| 293 | SYSCALL_SPU(mkdirat) | 293 | SYSCALL_SPU(mkdirat) |
| 294 | SYSCALL_SPU(mknodat) | 294 | SYSCALL_SPU(mknodat) |
diff --git a/include/linux/io.h b/include/linux/io.h index c244a0cc9319..09d351236379 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
| @@ -33,9 +33,22 @@ int ioremap_page_range(unsigned long addr, unsigned long end, | |||
| 33 | /* | 33 | /* |
| 34 | * Managed iomap interface | 34 | * Managed iomap interface |
| 35 | */ | 35 | */ |
| 36 | #ifdef CONFIG_HAS_IOPORT | ||
| 36 | void __iomem * devm_ioport_map(struct device *dev, unsigned long port, | 37 | void __iomem * devm_ioport_map(struct device *dev, unsigned long port, |
| 37 | unsigned int nr); | 38 | unsigned int nr); |
| 38 | void devm_ioport_unmap(struct device *dev, void __iomem *addr); | 39 | void devm_ioport_unmap(struct device *dev, void __iomem *addr); |
| 40 | #else | ||
| 41 | static inline void __iomem *devm_ioport_map(struct device *dev, | ||
| 42 | unsigned long port, | ||
| 43 | unsigned int nr) | ||
| 44 | { | ||
| 45 | return NULL; | ||
| 46 | } | ||
| 47 | |||
| 48 | static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr) | ||
| 49 | { | ||
| 50 | } | ||
| 51 | #endif | ||
| 39 | 52 | ||
| 40 | void __iomem * devm_ioremap(struct device *dev, unsigned long offset, | 53 | void __iomem * devm_ioremap(struct device *dev, unsigned long offset, |
| 41 | unsigned long size); | 54 | unsigned long size); |
diff --git a/include/linux/plist.h b/include/linux/plist.h index b95818a037ad..85de2f055874 100644 --- a/include/linux/plist.h +++ b/include/linux/plist.h | |||
| @@ -97,9 +97,9 @@ struct plist_node { | |||
| 97 | #endif | 97 | #endif |
| 98 | 98 | ||
| 99 | /** | 99 | /** |
| 100 | * #PLIST_HEAD_INIT - static struct plist_head initializer | 100 | * PLIST_HEAD_INIT - static struct plist_head initializer |
| 101 | * | ||
| 102 | * @head: struct plist_head variable name | 101 | * @head: struct plist_head variable name |
| 102 | * @_lock: lock to initialize for this list | ||
| 103 | */ | 103 | */ |
| 104 | #define PLIST_HEAD_INIT(head, _lock) \ | 104 | #define PLIST_HEAD_INIT(head, _lock) \ |
| 105 | { \ | 105 | { \ |
| @@ -109,8 +109,7 @@ struct plist_node { | |||
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | /** | 111 | /** |
| 112 | * #PLIST_NODE_INIT - static struct plist_node initializer | 112 | * PLIST_NODE_INIT - static struct plist_node initializer |
| 113 | * | ||
| 114 | * @node: struct plist_node variable name | 113 | * @node: struct plist_node variable name |
| 115 | * @__prio: initial node priority | 114 | * @__prio: initial node priority |
| 116 | */ | 115 | */ |
| @@ -122,8 +121,8 @@ struct plist_node { | |||
| 122 | 121 | ||
| 123 | /** | 122 | /** |
| 124 | * plist_head_init - dynamic struct plist_head initializer | 123 | * plist_head_init - dynamic struct plist_head initializer |
| 125 | * | ||
| 126 | * @head: &struct plist_head pointer | 124 | * @head: &struct plist_head pointer |
| 125 | * @lock: list spinlock, remembered for debugging | ||
| 127 | */ | 126 | */ |
| 128 | static inline void | 127 | static inline void |
| 129 | plist_head_init(struct plist_head *head, spinlock_t *lock) | 128 | plist_head_init(struct plist_head *head, spinlock_t *lock) |
| @@ -137,7 +136,6 @@ plist_head_init(struct plist_head *head, spinlock_t *lock) | |||
| 137 | 136 | ||
| 138 | /** | 137 | /** |
| 139 | * plist_node_init - Dynamic struct plist_node initializer | 138 | * plist_node_init - Dynamic struct plist_node initializer |
| 140 | * | ||
| 141 | * @node: &struct plist_node pointer | 139 | * @node: &struct plist_node pointer |
| 142 | * @prio: initial node priority | 140 | * @prio: initial node priority |
| 143 | */ | 141 | */ |
| @@ -152,49 +150,46 @@ extern void plist_del(struct plist_node *node, struct plist_head *head); | |||
| 152 | 150 | ||
| 153 | /** | 151 | /** |
| 154 | * plist_for_each - iterate over the plist | 152 | * plist_for_each - iterate over the plist |
| 155 | * | 153 | * @pos: the type * to use as a loop counter |
| 156 | * @pos1: the type * to use as a loop counter. | 154 | * @head: the head for your list |
| 157 | * @head: the head for your list. | ||
| 158 | */ | 155 | */ |
| 159 | #define plist_for_each(pos, head) \ | 156 | #define plist_for_each(pos, head) \ |
| 160 | list_for_each_entry(pos, &(head)->node_list, plist.node_list) | 157 | list_for_each_entry(pos, &(head)->node_list, plist.node_list) |
| 161 | 158 | ||
| 162 | /** | 159 | /** |
| 163 | * plist_for_each_entry_safe - iterate over a plist of given type safe | 160 | * plist_for_each_safe - iterate safely over a plist of given type |
| 164 | * against removal of list entry | 161 | * @pos: the type * to use as a loop counter |
| 162 | * @n: another type * to use as temporary storage | ||
| 163 | * @head: the head for your list | ||
| 165 | * | 164 | * |
| 166 | * @pos1: the type * to use as a loop counter. | 165 | * Iterate over a plist of given type, safe against removal of list entry. |
| 167 | * @n1: another type * to use as temporary storage | ||
| 168 | * @head: the head for your list. | ||
| 169 | */ | 166 | */ |
| 170 | #define plist_for_each_safe(pos, n, head) \ | 167 | #define plist_for_each_safe(pos, n, head) \ |
| 171 | list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list) | 168 | list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list) |
| 172 | 169 | ||
| 173 | /** | 170 | /** |
| 174 | * plist_for_each_entry - iterate over list of given type | 171 | * plist_for_each_entry - iterate over list of given type |
| 175 | * | 172 | * @pos: the type * to use as a loop counter |
| 176 | * @pos: the type * to use as a loop counter. | 173 | * @head: the head for your list |
| 177 | * @head: the head for your list. | 174 | * @mem: the name of the list_struct within the struct |
| 178 | * @member: the name of the list_struct within the struct. | ||
| 179 | */ | 175 | */ |
| 180 | #define plist_for_each_entry(pos, head, mem) \ | 176 | #define plist_for_each_entry(pos, head, mem) \ |
| 181 | list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list) | 177 | list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list) |
| 182 | 178 | ||
| 183 | /** | 179 | /** |
| 184 | * plist_for_each_entry_safe - iterate over list of given type safe against | 180 | * plist_for_each_entry_safe - iterate safely over list of given type |
| 185 | * removal of list entry | 181 | * @pos: the type * to use as a loop counter |
| 186 | * | ||
| 187 | * @pos: the type * to use as a loop counter. | ||
| 188 | * @n: another type * to use as temporary storage | 182 | * @n: another type * to use as temporary storage |
| 189 | * @head: the head for your list. | 183 | * @head: the head for your list |
| 190 | * @m: the name of the list_struct within the struct. | 184 | * @m: the name of the list_struct within the struct |
| 185 | * | ||
| 186 | * Iterate over list of given type, safe against removal of list entry. | ||
| 191 | */ | 187 | */ |
| 192 | #define plist_for_each_entry_safe(pos, n, head, m) \ | 188 | #define plist_for_each_entry_safe(pos, n, head, m) \ |
| 193 | list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list) | 189 | list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list) |
| 194 | 190 | ||
| 195 | /** | 191 | /** |
| 196 | * plist_head_empty - return !0 if a plist_head is empty | 192 | * plist_head_empty - return !0 if a plist_head is empty |
| 197 | * | ||
| 198 | * @head: &struct plist_head pointer | 193 | * @head: &struct plist_head pointer |
| 199 | */ | 194 | */ |
| 200 | static inline int plist_head_empty(const struct plist_head *head) | 195 | static inline int plist_head_empty(const struct plist_head *head) |
| @@ -204,7 +199,6 @@ static inline int plist_head_empty(const struct plist_head *head) | |||
| 204 | 199 | ||
| 205 | /** | 200 | /** |
| 206 | * plist_node_empty - return !0 if plist_node is not on a list | 201 | * plist_node_empty - return !0 if plist_node is not on a list |
| 207 | * | ||
| 208 | * @node: &struct plist_node pointer | 202 | * @node: &struct plist_node pointer |
| 209 | */ | 203 | */ |
| 210 | static inline int plist_node_empty(const struct plist_node *node) | 204 | static inline int plist_node_empty(const struct plist_node *node) |
| @@ -216,10 +210,9 @@ static inline int plist_node_empty(const struct plist_node *node) | |||
| 216 | 210 | ||
| 217 | /** | 211 | /** |
| 218 | * plist_first_entry - get the struct for the first entry | 212 | * plist_first_entry - get the struct for the first entry |
| 219 | * | 213 | * @head: the &struct plist_head pointer |
| 220 | * @ptr: the &struct plist_head pointer. | 214 | * @type: the type of the struct this is embedded in |
| 221 | * @type: the type of the struct this is embedded in. | 215 | * @member: the name of the list_struct within the struct |
| 222 | * @member: the name of the list_struct within the struct. | ||
| 223 | */ | 216 | */ |
| 224 | #ifdef CONFIG_DEBUG_PI_LIST | 217 | #ifdef CONFIG_DEBUG_PI_LIST |
| 225 | # define plist_first_entry(head, type, member) \ | 218 | # define plist_first_entry(head, type, member) \ |
| @@ -234,7 +227,6 @@ static inline int plist_node_empty(const struct plist_node *node) | |||
| 234 | 227 | ||
| 235 | /** | 228 | /** |
| 236 | * plist_first - return the first node (and thus, highest priority) | 229 | * plist_first - return the first node (and thus, highest priority) |
| 237 | * | ||
| 238 | * @head: the &struct plist_head pointer | 230 | * @head: the &struct plist_head pointer |
| 239 | * | 231 | * |
| 240 | * Assumes the plist is _not_ empty. | 232 | * Assumes the plist is _not_ empty. |
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 9bae4090254c..2bd23ea2aa8b 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
| @@ -383,7 +383,10 @@ void svcauth_unix_purge(void) | |||
| 383 | static inline struct ip_map * | 383 | static inline struct ip_map * |
| 384 | ip_map_cached_get(struct svc_rqst *rqstp) | 384 | ip_map_cached_get(struct svc_rqst *rqstp) |
| 385 | { | 385 | { |
| 386 | struct ip_map *ipm = rqstp->rq_sock->sk_info_authunix; | 386 | struct ip_map *ipm; |
| 387 | struct svc_sock *svsk = rqstp->rq_sock; | ||
| 388 | spin_lock_bh(&svsk->sk_defer_lock); | ||
| 389 | ipm = svsk->sk_info_authunix; | ||
| 387 | if (ipm != NULL) { | 390 | if (ipm != NULL) { |
| 388 | if (!cache_valid(&ipm->h)) { | 391 | if (!cache_valid(&ipm->h)) { |
| 389 | /* | 392 | /* |
| @@ -391,12 +394,14 @@ ip_map_cached_get(struct svc_rqst *rqstp) | |||
| 391 | * remembered, e.g. by a second mount from the | 394 | * remembered, e.g. by a second mount from the |
| 392 | * same IP address. | 395 | * same IP address. |
| 393 | */ | 396 | */ |
| 394 | rqstp->rq_sock->sk_info_authunix = NULL; | 397 | svsk->sk_info_authunix = NULL; |
| 398 | spin_unlock_bh(&svsk->sk_defer_lock); | ||
| 395 | cache_put(&ipm->h, &ip_map_cache); | 399 | cache_put(&ipm->h, &ip_map_cache); |
| 396 | return NULL; | 400 | return NULL; |
| 397 | } | 401 | } |
| 398 | cache_get(&ipm->h); | 402 | cache_get(&ipm->h); |
| 399 | } | 403 | } |
| 404 | spin_unlock_bh(&svsk->sk_defer_lock); | ||
| 400 | return ipm; | 405 | return ipm; |
| 401 | } | 406 | } |
| 402 | 407 | ||
| @@ -405,9 +410,15 @@ ip_map_cached_put(struct svc_rqst *rqstp, struct ip_map *ipm) | |||
| 405 | { | 410 | { |
| 406 | struct svc_sock *svsk = rqstp->rq_sock; | 411 | struct svc_sock *svsk = rqstp->rq_sock; |
| 407 | 412 | ||
| 408 | if (svsk->sk_sock->type == SOCK_STREAM && svsk->sk_info_authunix == NULL) | 413 | spin_lock_bh(&svsk->sk_defer_lock); |
| 409 | svsk->sk_info_authunix = ipm; /* newly cached, keep the reference */ | 414 | if (svsk->sk_sock->type == SOCK_STREAM && |
| 410 | else | 415 | svsk->sk_info_authunix == NULL) { |
| 416 | /* newly cached, keep the reference */ | ||
| 417 | svsk->sk_info_authunix = ipm; | ||
| 418 | ipm = NULL; | ||
| 419 | } | ||
| 420 | spin_unlock_bh(&svsk->sk_defer_lock); | ||
| 421 | if (ipm) | ||
| 411 | cache_put(&ipm->h, &ip_map_cache); | 422 | cache_put(&ipm->h, &ip_map_cache); |
| 412 | } | 423 | } |
| 413 | 424 | ||
