Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'locking/urgent' into locking/core, to pick up fixes before applying new changes

Signed-off-by: Ingo Molnar <mingo@kernel.org>

+1494 -1244
+1 -1
Makefile
··· 1 1 VERSION = 4 2 2 PATCHLEVEL = 3 3 3 SUBLEVEL = 0 4 - EXTRAVERSION = -rc1 4 + EXTRAVERSION = -rc2 5 5 NAME = Hurr durr I'ma sheep 6 6 7 7 # *DOCUMENTATION*
+1 -1
arch/alpha/kernel/irq.c
··· 117 117 } 118 118 119 119 irq_enter(); 120 - generic_handle_irq_desc(irq, desc); 120 + generic_handle_irq_desc(desc); 121 121 irq_exit(); 122 122 }
+1 -1
arch/arc/kernel/mcip.c
··· 252 252 253 253 static int idu_first_irq; 254 254 255 - static void idu_cascade_isr(unsigned int __core_irq, struct irq_desc *desc) 255 + static void idu_cascade_isr(struct irq_desc *desc) 256 256 { 257 257 struct irq_domain *domain = irq_desc_get_handler_data(desc); 258 258 unsigned int core_irq = irq_desc_get_irq(desc);
+1 -1
arch/arm/common/it8152.c
··· 95 95 } 96 96 } 97 97 98 - void it8152_irq_demux(unsigned int irq, struct irq_desc *desc) 98 + void it8152_irq_demux(struct irq_desc *desc) 99 99 { 100 100 int bits_pd, bits_lp, bits_ld; 101 101 int i;
+1 -1
arch/arm/common/locomo.c
··· 138 138 }, 139 139 }; 140 140 141 - static void locomo_handler(unsigned int __irq, struct irq_desc *desc) 141 + static void locomo_handler(struct irq_desc *desc) 142 142 { 143 143 struct locomo *lchip = irq_desc_get_chip_data(desc); 144 144 int req, i;
+2 -4
arch/arm/common/sa1111.c
··· 196 196 * active IRQs causes the interrupt output to pulse, the upper levels 197 197 * will call us again if there are more interrupts to process. 198 198 */ 199 - static void 200 - sa1111_irq_handler(unsigned int __irq, struct irq_desc *desc) 199 + static void sa1111_irq_handler(struct irq_desc *desc) 201 200 { 202 - unsigned int irq = irq_desc_get_irq(desc); 203 201 unsigned int stat0, stat1, i; 204 202 struct sa1111 *sachip = irq_desc_get_handler_data(desc); 205 203 void __iomem *mapbase = sachip->base + SA1111_INTC; ··· 212 214 sa1111_writel(stat1, mapbase + SA1111_INTSTATCLR1); 213 215 214 216 if (stat0 == 0 && stat1 == 0) { 215 - do_bad_IRQ(irq, desc); 217 + do_bad_IRQ(desc); 216 218 return; 217 219 } 218 220
+1 -1
arch/arm/include/asm/hardware/it8152.h
··· 106 106 struct pci_dev; 107 107 struct pci_sys_data; 108 108 109 - extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc); 109 + extern void it8152_irq_demux(struct irq_desc *desc); 110 110 extern void it8152_init_irq(void); 111 111 extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); 112 112 extern int it8152_pci_setup(int nr, struct pci_sys_data *sys);
-6
arch/arm/include/asm/hw_irq.h
··· 11 11 pr_crit("unexpected IRQ trap at vector %02x\n", irq); 12 12 } 13 13 14 - void set_irq_flags(unsigned int irq, unsigned int flags); 15 - 16 - #define IRQF_VALID (1 << 0) 17 - #define IRQF_PROBE (1 << 1) 18 - #define IRQF_NOAUTOEN (1 << 2) 19 - 20 14 #define ARCH_IRQ_INIT_FLAGS (IRQ_NOREQUEST | IRQ_NOPROBE) 21 15 22 16 #endif
+3 -6
arch/arm/include/asm/kvm_host.h
··· 29 29 30 30 #define __KVM_HAVE_ARCH_INTC_INITIALIZED 31 31 32 - #if defined(CONFIG_KVM_ARM_MAX_VCPUS) 33 - #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS 34 - #else 35 - #define KVM_MAX_VCPUS 0 36 - #endif 37 - 38 32 #define KVM_USER_MEM_SLOTS 32 39 33 #define KVM_PRIVATE_MEM_SLOTS 4 40 34 #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 ··· 37 43 #define KVM_VCPU_MAX_FEATURES 2 38 44 39 45 #include <kvm/arm_vgic.h> 46 + 47 + #define KVM_MAX_VCPUS VGIC_V2_MAX_CPUS 40 48 41 49 u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode); 42 50 int __attribute_const__ kvm_target_cpu(void); ··· 144 148 145 149 struct kvm_vcpu_stat { 146 150 u32 halt_successful_poll; 151 + u32 halt_attempted_poll; 147 152 u32 halt_wakeup; 148 153 }; 149 154
+2 -2
arch/arm/include/asm/mach/irq.h
··· 23 23 /* 24 24 * This is for easy migration, but should be changed in the source 25 25 */ 26 - #define do_bad_IRQ(irq,desc) \ 26 + #define do_bad_IRQ(desc) \ 27 27 do { \ 28 28 raw_spin_lock(&desc->lock); \ 29 - handle_bad_irq(irq, desc); \ 29 + handle_bad_irq(desc); \ 30 30 raw_spin_unlock(&desc->lock); \ 31 31 } while(0) 32 32
-20
arch/arm/kernel/irq.c
··· 79 79 handle_IRQ(irq, regs); 80 80 } 81 81 82 - void set_irq_flags(unsigned int irq, unsigned int iflags) 83 - { 84 - unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; 85 - 86 - if (irq >= nr_irqs) { 87 - pr_err("Trying to set irq flags for IRQ%d\n", irq); 88 - return; 89 - } 90 - 91 - if (iflags & IRQF_VALID) 92 - clr |= IRQ_NOREQUEST; 93 - if (iflags & IRQF_PROBE) 94 - clr |= IRQ_NOPROBE; 95 - if (!(iflags & IRQF_NOAUTOEN)) 96 - clr |= IRQ_NOAUTOEN; 97 - /* Order is clear bits in "clr" then set bits in "set" */ 98 - irq_modify_status(irq, clr, set & ~clr); 99 - } 100 - EXPORT_SYMBOL_GPL(set_irq_flags); 101 - 102 82 void __init init_IRQ(void) 103 83 { 104 84 int ret;
+5 -3
arch/arm/kernel/kgdb.c
··· 259 259 if (err) 260 260 return err; 261 261 262 - patch_text((void *)bpt->bpt_addr, 263 - *(unsigned int *)arch_kgdb_ops.gdb_bpt_instr); 262 + /* Machine is already stopped, so we can use __patch_text() directly */ 263 + __patch_text((void *)bpt->bpt_addr, 264 + *(unsigned int *)arch_kgdb_ops.gdb_bpt_instr); 264 265 265 266 return err; 266 267 } 267 268 268 269 int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt) 269 270 { 270 - patch_text((void *)bpt->bpt_addr, *(unsigned int *)bpt->saved_instr); 271 + /* Machine is already stopped, so we can use __patch_text() directly */ 272 + __patch_text((void *)bpt->bpt_addr, *(unsigned int *)bpt->saved_instr); 271 273 272 274 return 0; 273 275 }
+9 -6
arch/arm/kernel/signal.c
··· 343 343 */ 344 344 thumb = handler & 1; 345 345 346 - #if __LINUX_ARM_ARCH__ >= 7 347 346 /* 348 - * Clear the If-Then Thumb-2 execution state 349 - * ARM spec requires this to be all 000s in ARM mode 350 - * Snapdragon S4/Krait misbehaves on a Thumb=>ARM 351 - * signal transition without this. 347 + * Clear the If-Then Thumb-2 execution state. ARM spec 348 + * requires this to be all 000s in ARM mode. Snapdragon 349 + * S4/Krait misbehaves on a Thumb=>ARM signal transition 350 + * without this. 351 + * 352 + * We must do this whenever we are running on a Thumb-2 353 + * capable CPU, which includes ARMv6T2. However, we elect 354 + * to always do this to simplify the code; this field is 355 + * marked UNK/SBZP for older architectures. 352 356 */ 353 357 cpsr &= ~PSR_IT_MASK; 354 - #endif 355 358 356 359 if (thumb) { 357 360 cpsr |= PSR_T_BIT;
-11
arch/arm/kvm/Kconfig
··· 45 45 ---help--- 46 46 Provides host support for ARM processors. 47 47 48 - config KVM_ARM_MAX_VCPUS 49 - int "Number maximum supported virtual CPUs per VM" 50 - depends on KVM_ARM_HOST 51 - default 4 52 - help 53 - Static number of max supported virtual CPUs per VM. 54 - 55 - If you choose a high number, the vcpu structures will be quite 56 - large, so only choose a reasonable number that you expect to 57 - actually use. 58 - 59 48 endif # VIRTUALIZATION
+1 -1
arch/arm/kvm/arm.c
··· 446 446 * Map the VGIC hardware resources before running a vcpu the first 447 447 * time on this VM. 448 448 */ 449 - if (unlikely(!vgic_ready(kvm))) { 449 + if (unlikely(irqchip_in_kernel(kvm) && !vgic_ready(kvm))) { 450 450 ret = kvm_vgic_map_resources(kvm); 451 451 if (ret) 452 452 return ret;
+4 -2
arch/arm/kvm/interrupts_head.S
··· 515 515 516 516 mrc p15, 0, r2, c14, c3, 1 @ CNTV_CTL 517 517 str r2, [vcpu, #VCPU_TIMER_CNTV_CTL] 518 - bic r2, #1 @ Clear ENABLE 519 - mcr p15, 0, r2, c14, c3, 1 @ CNTV_CTL 518 + 520 519 isb 521 520 522 521 mrrc p15, 3, rr_lo_hi(r2, r3), c14 @ CNTV_CVAL ··· 528 529 mcrr p15, 4, r2, r2, c14 @ CNTVOFF 529 530 530 531 1: 532 + mov r2, #0 @ Clear ENABLE 533 + mcr p15, 0, r2, c14, c3, 1 @ CNTV_CTL 534 + 531 535 @ Allow physical timer/counter access for the host 532 536 mrc p15, 4, r2, c14, c1, 0 @ CNTHCTL 533 537 orr r2, r2, #(CNTHCTL_PL1PCEN | CNTHCTL_PL1PCTEN)
+4 -2
arch/arm/kvm/mmu.c
··· 1792 1792 if (vma->vm_flags & VM_PFNMAP) { 1793 1793 gpa_t gpa = mem->guest_phys_addr + 1794 1794 (vm_start - mem->userspace_addr); 1795 - phys_addr_t pa = (vma->vm_pgoff << PAGE_SHIFT) + 1796 - vm_start - vma->vm_start; 1795 + phys_addr_t pa; 1796 + 1797 + pa = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT; 1798 + pa += vm_start - vma->vm_start; 1797 1799 1798 1800 /* IO region dirty page logging not allowed */ 1799 1801 if (memslot->flags & KVM_MEM_LOG_DIRTY_PAGES)
+8 -4
arch/arm/kvm/psci.c
··· 126 126 127 127 static unsigned long kvm_psci_vcpu_affinity_info(struct kvm_vcpu *vcpu) 128 128 { 129 - int i; 129 + int i, matching_cpus = 0; 130 130 unsigned long mpidr; 131 131 unsigned long target_affinity; 132 132 unsigned long target_affinity_mask; ··· 151 151 */ 152 152 kvm_for_each_vcpu(i, tmp, kvm) { 153 153 mpidr = kvm_vcpu_get_mpidr_aff(tmp); 154 - if (((mpidr & target_affinity_mask) == target_affinity) && 155 - !tmp->arch.pause) { 156 - return PSCI_0_2_AFFINITY_LEVEL_ON; 154 + if ((mpidr & target_affinity_mask) == target_affinity) { 155 + matching_cpus++; 156 + if (!tmp->arch.pause) 157 + return PSCI_0_2_AFFINITY_LEVEL_ON; 157 158 } 158 159 } 160 + 161 + if (!matching_cpus) 162 + return PSCI_RET_INVALID_PARAMS; 159 163 160 164 return PSCI_0_2_AFFINITY_LEVEL_OFF; 161 165 }
+3 -3
arch/arm/mach-dove/irq.c
··· 69 69 .irq_ack = pmu_irq_ack, 70 70 }; 71 71 72 - static void pmu_irq_handler(unsigned int __irq, struct irq_desc *desc) 72 + static void pmu_irq_handler(struct irq_desc *desc) 73 73 { 74 - unsigned int irq = irq_desc_get_irq(desc); 75 74 unsigned long cause = readl(PMU_INTERRUPT_CAUSE); 75 + unsigned int irq; 76 76 77 77 cause &= readl(PMU_INTERRUPT_MASK); 78 78 if (cause == 0) { 79 - do_bad_IRQ(irq, desc); 79 + do_bad_IRQ(desc); 80 80 return; 81 81 } 82 82
+2 -3
arch/arm/mach-footbridge/isa-irq.c
··· 87 87 .irq_unmask = isa_unmask_pic_hi_irq, 88 88 }; 89 89 90 - static void 91 - isa_irq_handler(unsigned int irq, struct irq_desc *desc) 90 + static void isa_irq_handler(struct irq_desc *desc) 92 91 { 93 92 unsigned int isa_irq = *(unsigned char *)PCIIACK_BASE; 94 93 95 94 if (isa_irq < _ISA_IRQ(0) || isa_irq >= _ISA_IRQ(16)) { 96 - do_bad_IRQ(isa_irq, desc); 95 + do_bad_IRQ(desc); 97 96 return; 98 97 } 99 98
+1 -1
arch/arm/mach-gemini/gpio.c
··· 126 126 return 0; 127 127 } 128 128 129 - static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 129 + static void gpio_irq_handler(struct irq_desc *desc) 130 130 { 131 131 unsigned int port = (unsigned int)irq_desc_get_handler_data(desc); 132 132 unsigned int gpio_irq_no, irq_stat;
+1 -1
arch/arm/mach-imx/3ds_debugboard.c
··· 85 85 .resource = smsc911x_resources, 86 86 }; 87 87 88 - static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc) 88 + static void mxc_expio_irq_handler(struct irq_desc *desc) 89 89 { 90 90 u32 imr_val; 91 91 u32 int_valid;
+1 -1
arch/arm/mach-imx/mach-mx31ads.c
··· 154 154 imx31_add_imx_uart0(&uart_pdata); 155 155 } 156 156 157 - static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc) 157 + static void mx31ads_expio_irq_handler(struct irq_desc *desc) 158 158 { 159 159 u32 imr_val; 160 160 u32 int_valid;
+1 -1
arch/arm/mach-iop13xx/msi.c
··· 91 91 write_imipr_3, 92 92 }; 93 93 94 - static void iop13xx_msi_handler(unsigned int irq, struct irq_desc *desc) 94 + static void iop13xx_msi_handler(struct irq_desc *desc) 95 95 { 96 96 int i, j; 97 97 unsigned long status;
+2 -2
arch/arm/mach-lpc32xx/irq.c
··· 370 370 .irq_set_wake = lpc32xx_irq_wake 371 371 }; 372 372 373 - static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc) 373 + static void lpc32xx_sic1_handler(struct irq_desc *desc) 374 374 { 375 375 unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC1_BASE)); 376 376 ··· 383 383 } 384 384 } 385 385 386 - static void lpc32xx_sic2_handler(unsigned int irq, struct irq_desc *desc) 386 + static void lpc32xx_sic2_handler(struct irq_desc *desc) 387 387 { 388 388 unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC2_BASE)); 389 389
+1 -2
arch/arm/mach-netx/generic.c
··· 69 69 #define DEBUG_IRQ(fmt...) while (0) {} 70 70 #endif 71 71 72 - static void 73 - netx_hif_demux_handler(unsigned int irq_unused, struct irq_desc *desc) 72 + static void netx_hif_demux_handler(struct irq_desc *desc) 74 73 { 75 74 unsigned int irq = NETX_IRQ_HIF_CHAINED(0); 76 75 unsigned int stat;
+1 -1
arch/arm/mach-omap1/fpga.c
··· 87 87 fpga_ack_irq(d); 88 88 } 89 89 90 - static void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc) 90 + static void innovator_fpga_IRQ_demux(struct irq_desc *desc) 91 91 { 92 92 u32 stat; 93 93 int fpga_irq;
+1 -1
arch/arm/mach-omap2/prm_common.c
··· 102 102 * dispatched accordingly. Clearing of the wakeup events should be 103 103 * done by the SoC specific individual handlers. 104 104 */ 105 - static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc) 105 + static void omap_prcm_irq_handler(struct irq_desc *desc) 106 106 { 107 107 unsigned long pending[OMAP_PRCM_MAX_NR_PENDING_REG]; 108 108 unsigned long priority_pending[OMAP_PRCM_MAX_NR_PENDING_REG];
+1 -1
arch/arm/mach-pxa/balloon3.c
··· 496 496 .irq_unmask = balloon3_unmask_irq, 497 497 }; 498 498 499 - static void balloon3_irq_handler(unsigned int __irq, struct irq_desc *desc) 499 + static void balloon3_irq_handler(struct irq_desc *desc) 500 500 { 501 501 unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) & 502 502 balloon3_irq_enabled;
+2 -3
arch/arm/mach-pxa/cm-x2xx-pci.c
··· 29 29 void __iomem *it8152_base_address; 30 30 static int cmx2xx_it8152_irq_gpio; 31 31 32 - static void cmx2xx_it8152_irq_demux(unsigned int __irq, struct irq_desc *desc) 32 + static void cmx2xx_it8152_irq_demux(struct irq_desc *desc) 33 33 { 34 - unsigned int irq = irq_desc_get_irq(desc); 35 34 /* clear our parent irq */ 36 35 desc->irq_data.chip->irq_ack(&desc->irq_data); 37 36 38 - it8152_irq_demux(irq, desc); 37 + it8152_irq_demux(desc); 39 38 } 40 39 41 40 void __cmx2xx_pci_init_irq(int irq_gpio)
+1 -1
arch/arm/mach-pxa/lpd270.c
··· 120 120 .irq_unmask = lpd270_unmask_irq, 121 121 }; 122 122 123 - static void lpd270_irq_handler(unsigned int __irq, struct irq_desc *desc) 123 + static void lpd270_irq_handler(struct irq_desc *desc) 124 124 { 125 125 unsigned int irq; 126 126 unsigned long pending;
+1 -1
arch/arm/mach-pxa/pcm990-baseboard.c
··· 284 284 .irq_unmask = pcm990_unmask_irq, 285 285 }; 286 286 287 - static void pcm990_irq_handler(unsigned int __irq, struct irq_desc *desc) 287 + static void pcm990_irq_handler(struct irq_desc *desc) 288 288 { 289 289 unsigned int irq; 290 290 unsigned long pending;
+1 -1
arch/arm/mach-pxa/viper.c
··· 276 276 viper_irq_enabled_mask; 277 277 } 278 278 279 - static void viper_irq_handler(unsigned int __irq, struct irq_desc *desc) 279 + static void viper_irq_handler(struct irq_desc *desc) 280 280 { 281 281 unsigned int irq; 282 282 unsigned long pending;
+1 -1
arch/arm/mach-pxa/zeus.c
··· 105 105 return __raw_readw(ZEUS_CPLD_ISA_IRQ) & zeus_irq_enabled_mask; 106 106 } 107 107 108 - static void zeus_irq_handler(unsigned int __irq, struct irq_desc *desc) 108 + static void zeus_irq_handler(struct irq_desc *desc) 109 109 { 110 110 unsigned int irq; 111 111 unsigned long pending;
+1 -2
arch/arm/mach-rpc/ecard.c
··· 551 551 } 552 552 } 553 553 554 - static void 555 - ecard_irq_handler(unsigned int irq, struct irq_desc *desc) 554 + static void ecard_irq_handler(struct irq_desc *desc) 556 555 { 557 556 ecard_t *ec; 558 557 int called = 0;
+1 -3
arch/arm/mach-s3c24xx/bast-irq.c
··· 100 100 .irq_ack = bast_pc104_maskack 101 101 }; 102 102 103 - static void 104 - bast_irq_pc104_demux(unsigned int irq, 105 - struct irq_desc *desc) 103 + static void bast_irq_pc104_demux(struct irq_desc *desc) 106 104 { 107 105 unsigned int stat; 108 106 unsigned int irqno;
+4 -4
arch/arm/mach-s3c64xx/common.c
··· 388 388 } 389 389 } 390 390 391 - static void s3c_irq_demux_eint0_3(unsigned int irq, struct irq_desc *desc) 391 + static void s3c_irq_demux_eint0_3(struct irq_desc *desc) 392 392 { 393 393 s3c_irq_demux_eint(0, 3); 394 394 } 395 395 396 - static void s3c_irq_demux_eint4_11(unsigned int irq, struct irq_desc *desc) 396 + static void s3c_irq_demux_eint4_11(struct irq_desc *desc) 397 397 { 398 398 s3c_irq_demux_eint(4, 11); 399 399 } 400 400 401 - static void s3c_irq_demux_eint12_19(unsigned int irq, struct irq_desc *desc) 401 + static void s3c_irq_demux_eint12_19(struct irq_desc *desc) 402 402 { 403 403 s3c_irq_demux_eint(12, 19); 404 404 } 405 405 406 - static void s3c_irq_demux_eint20_27(unsigned int irq, struct irq_desc *desc) 406 + static void s3c_irq_demux_eint20_27(struct irq_desc *desc) 407 407 { 408 408 s3c_irq_demux_eint(20, 27); 409 409 }
+1 -1
arch/arm/mach-sa1100/neponset.c
··· 166 166 * ensure that the IRQ signal is deasserted before returning. This 167 167 * is rather unfortunate. 168 168 */ 169 - static void neponset_irq_handler(unsigned int irq, struct irq_desc *desc) 169 + static void neponset_irq_handler(struct irq_desc *desc) 170 170 { 171 171 struct neponset_drvdata *d = irq_desc_get_handler_data(desc); 172 172 unsigned int irr;
+3 -1
arch/arm/mm/dma-mapping.c
··· 1249 1249 struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); 1250 1250 unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; 1251 1251 dma_addr_t dma_addr, iova; 1252 - int i, ret = DMA_ERROR_CODE; 1252 + int i; 1253 1253 1254 1254 dma_addr = __alloc_iova(mapping, size); 1255 1255 if (dma_addr == DMA_ERROR_CODE) ··· 1257 1257 1258 1258 iova = dma_addr; 1259 1259 for (i = 0; i < count; ) { 1260 + int ret; 1261 + 1260 1262 unsigned int next_pfn = page_to_pfn(pages[i]) + 1; 1261 1263 phys_addr_t phys = page_to_phys(pages[i]); 1262 1264 unsigned int len, j;
+1 -1
arch/arm/plat-orion/gpio.c
··· 407 407 return 0; 408 408 } 409 409 410 - static void gpio_irq_handler(unsigned __irq, struct irq_desc *desc) 410 + static void gpio_irq_handler(struct irq_desc *desc) 411 411 { 412 412 struct orion_gpio_chip *ochip = irq_desc_get_handler_data(desc); 413 413 u32 cause, type;
-5
arch/arm64/include/asm/hardirq.h
··· 43 43 irq_err_count++; 44 44 } 45 45 46 - /* 47 - * No arch-specific IRQ flags. 48 - */ 49 - #define set_irq_flags(irq, flags) 50 - 51 46 #endif /* __ASM_HARDIRQ_H */
+7 -4
arch/arm64/include/asm/kvm_arm.h
··· 95 95 SCTLR_EL2_SA | SCTLR_EL2_I) 96 96 97 97 /* TCR_EL2 Registers bits */ 98 + #define TCR_EL2_RES1 ((1 << 31) | (1 << 23)) 98 99 #define TCR_EL2_TBI (1 << 20) 99 100 #define TCR_EL2_PS (7 << 16) 100 101 #define TCR_EL2_PS_40B (2 << 16) ··· 107 106 #define TCR_EL2_MASK (TCR_EL2_TG0 | TCR_EL2_SH0 | \ 108 107 TCR_EL2_ORGN0 | TCR_EL2_IRGN0 | TCR_EL2_T0SZ) 109 108 110 - #define TCR_EL2_FLAGS (TCR_EL2_PS_40B) 109 + #define TCR_EL2_FLAGS (TCR_EL2_RES1 | TCR_EL2_PS_40B) 111 110 112 111 /* VTCR_EL2 Registers bits */ 112 + #define VTCR_EL2_RES1 (1 << 31) 113 113 #define VTCR_EL2_PS_MASK (7 << 16) 114 114 #define VTCR_EL2_TG0_MASK (1 << 14) 115 115 #define VTCR_EL2_TG0_4K (0 << 14) ··· 149 147 */ 150 148 #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_64K | VTCR_EL2_SH0_INNER | \ 151 149 VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ 152 - VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B) 150 + VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B | \ 151 + VTCR_EL2_RES1) 153 152 #define VTTBR_X (38 - VTCR_EL2_T0SZ_40B) 154 153 #else 155 154 /* ··· 161 158 */ 162 159 #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_4K | VTCR_EL2_SH0_INNER | \ 163 160 VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ 164 - VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B) 161 + VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B | \ 162 + VTCR_EL2_RES1) 165 163 #define VTTBR_X (37 - VTCR_EL2_T0SZ_40B) 166 164 #endif 167 165 ··· 172 168 #define VTTBR_VMID_MASK (UL(0xFF) << VTTBR_VMID_SHIFT) 173 169 174 170 /* Hyp System Trap Register */ 175 - #define HSTR_EL2_TTEE (1 << 16) 176 171 #define HSTR_EL2_T(x) (1 << x) 177 172 178 173 /* Hyp Coproccessor Trap Register Shifts */
+1 -3
arch/arm64/include/asm/kvm_asm.h
··· 53 53 #define IFSR32_EL2 25 /* Instruction Fault Status Register */ 54 54 #define FPEXC32_EL2 26 /* Floating-Point Exception Control Register */ 55 55 #define DBGVCR32_EL2 27 /* Debug Vector Catch Register */ 56 - #define TEECR32_EL1 28 /* ThumbEE Configuration Register */ 57 - #define TEEHBR32_EL1 29 /* ThumbEE Handler Base Register */ 58 - #define NR_SYS_REGS 30 56 + #define NR_SYS_REGS 28 59 57 60 58 /* 32bit mapping */ 61 59 #define c0_MPIDR (MPIDR_EL1 * 2) /* MultiProcessor ID Register */
+3 -6
arch/arm64/include/asm/kvm_host.h
··· 30 30 31 31 #define __KVM_HAVE_ARCH_INTC_INITIALIZED 32 32 33 - #if defined(CONFIG_KVM_ARM_MAX_VCPUS) 34 - #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS 35 - #else 36 - #define KVM_MAX_VCPUS 0 37 - #endif 38 - 39 33 #define KVM_USER_MEM_SLOTS 32 40 34 #define KVM_PRIVATE_MEM_SLOTS 4 41 35 #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 42 36 43 37 #include <kvm/arm_vgic.h> 44 38 #include <kvm/arm_arch_timer.h> 39 + 40 + #define KVM_MAX_VCPUS VGIC_V3_MAX_CPUS 45 41 46 42 #define KVM_VCPU_MAX_FEATURES 3 47 43 ··· 191 195 192 196 struct kvm_vcpu_stat { 193 197 u32 halt_successful_poll; 198 + u32 halt_attempted_poll; 194 199 u32 halt_wakeup; 195 200 }; 196 201
-11
arch/arm64/kvm/Kconfig
··· 41 41 ---help--- 42 42 Provides host support for ARM processors. 43 43 44 - config KVM_ARM_MAX_VCPUS 45 - int "Number maximum supported virtual CPUs per VM" 46 - depends on KVM_ARM_HOST 47 - default 4 48 - help 49 - Static number of max supported virtual CPUs per VM. 50 - 51 - If you choose a high number, the vcpu structures will be quite 52 - large, so only choose a reasonable number that you expect to 53 - actually use. 54 - 55 44 endif # VIRTUALIZATION
+10 -21
arch/arm64/kvm/hyp.S
··· 433 433 mrs x5, ifsr32_el2 434 434 stp x4, x5, [x3] 435 435 436 - skip_fpsimd_state x8, 3f 436 + skip_fpsimd_state x8, 2f 437 437 mrs x6, fpexc32_el2 438 438 str x6, [x3, #16] 439 - 3: 440 - skip_debug_state x8, 2f 439 + 2: 440 + skip_debug_state x8, 1f 441 441 mrs x7, dbgvcr32_el2 442 442 str x7, [x3, #24] 443 - 2: 444 - skip_tee_state x8, 1f 445 - 446 - add x3, x2, #CPU_SYSREG_OFFSET(TEECR32_EL1) 447 - mrs x4, teecr32_el1 448 - mrs x5, teehbr32_el1 449 - stp x4, x5, [x3] 450 443 1: 451 444 .endm 452 445 ··· 459 466 msr dacr32_el2, x4 460 467 msr ifsr32_el2, x5 461 468 462 - skip_debug_state x8, 2f 469 + skip_debug_state x8, 1f 463 470 ldr x7, [x3, #24] 464 471 msr dbgvcr32_el2, x7 465 - 2: 466 - skip_tee_state x8, 1f 467 - 468 - add x3, x2, #CPU_SYSREG_OFFSET(TEECR32_EL1) 469 - ldp x4, x5, [x3] 470 - msr teecr32_el1, x4 471 - msr teehbr32_el1, x5 472 472 1: 473 473 .endm 474 474 ··· 556 570 mrs x3, cntv_ctl_el0 557 571 and x3, x3, #3 558 572 str w3, [x0, #VCPU_TIMER_CNTV_CTL] 559 - bic x3, x3, #1 // Clear Enable 560 - msr cntv_ctl_el0, x3 561 573 562 574 isb 563 575 ··· 563 579 str x3, [x0, #VCPU_TIMER_CNTV_CVAL] 564 580 565 581 1: 582 + // Disable the virtual timer 583 + msr cntv_ctl_el0, xzr 584 + 566 585 // Allow physical timer/counter access for the host 567 586 mrs x2, cnthctl_el2 568 587 orr x2, x2, #3 ··· 740 753 // Guest context 741 754 add x2, x0, #VCPU_CONTEXT 742 755 756 + // We must restore the 32-bit state before the sysregs, thanks 757 + // to Cortex-A57 erratum #852523. 758 + restore_guest_32bit_state 743 759 bl __restore_sysregs 744 760 745 761 skip_debug_state x3, 1f ··· 750 760 kern_hyp_va x3 751 761 bl __restore_debug 752 762 1: 753 - restore_guest_32bit_state 754 763 restore_guest_regs 755 764 756 765 // That's it, no more messing around.
+4 -11
arch/arm64/kvm/sys_regs.c
··· 272 272 { 273 273 __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_bvr[rd->reg]; 274 274 275 - if (copy_from_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0) 275 + if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0) 276 276 return -EFAULT; 277 277 return 0; 278 278 } ··· 314 314 { 315 315 __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_bcr[rd->reg]; 316 316 317 - if (copy_from_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0) 317 + if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0) 318 318 return -EFAULT; 319 319 320 320 return 0; ··· 358 358 { 359 359 __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_wvr[rd->reg]; 360 360 361 - if (copy_from_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0) 361 + if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0) 362 362 return -EFAULT; 363 363 return 0; 364 364 } ··· 400 400 { 401 401 __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_wcr[rd->reg]; 402 402 403 - if (copy_from_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0) 403 + if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0) 404 404 return -EFAULT; 405 405 return 0; 406 406 } ··· 538 538 /* DBGAUTHSTATUS_EL1 */ 539 539 { Op0(0b10), Op1(0b000), CRn(0b0111), CRm(0b1110), Op2(0b110), 540 540 trap_dbgauthstatus_el1 }, 541 - 542 - /* TEECR32_EL1 */ 543 - { Op0(0b10), Op1(0b010), CRn(0b0000), CRm(0b0000), Op2(0b000), 544 - NULL, reset_val, TEECR32_EL1, 0 }, 545 - /* TEEHBR32_EL1 */ 546 - { Op0(0b10), Op1(0b010), CRn(0b0001), CRm(0b0000), Op2(0b000), 547 - NULL, reset_val, TEEHBR32_EL1, 0 }, 548 541 549 542 /* MDCCSR_EL1 */ 550 543 { Op0(0b10), Op1(0b011), CRn(0b0000), CRm(0b0001), Op2(0b000),
+1 -1
arch/avr32/mach-at32ap/extint.c
··· 144 144 .irq_set_type = eic_set_irq_type, 145 145 }; 146 146 147 - static void demux_eic_irq(unsigned int irq, struct irq_desc *desc) 147 + static void demux_eic_irq(struct irq_desc *desc) 148 148 { 149 149 struct eic *eic = irq_desc_get_handler_data(desc); 150 150 unsigned long status, pending;
+1 -1
arch/avr32/mach-at32ap/pio.c
··· 281 281 .irq_set_type = gpio_irq_type, 282 282 }; 283 283 284 - static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) 284 + static void gpio_irq_handler(struct irq_desc *desc) 285 285 { 286 286 struct pio_device *pio = irq_desc_get_chip_data(desc); 287 287 unsigned gpio_irq;
+2 -2
arch/blackfin/include/asm/irq_handler.h
··· 60 60 extern void bfin_internal_unmask_irq(unsigned int irq); 61 61 62 62 struct irq_desc; 63 - extern void bfin_demux_mac_status_irq(unsigned int, struct irq_desc *); 64 - extern void bfin_demux_gpio_irq(unsigned int, struct irq_desc *); 63 + extern void bfin_demux_mac_status_irq(struct irq_desc *); 64 + extern void bfin_demux_gpio_irq(struct irq_desc *); 65 65 66 66 #endif
+1 -1
arch/blackfin/kernel/irqchip.c
··· 107 107 * than crashing, do something sensible. 108 108 */ 109 109 if (irq >= NR_IRQS) 110 - handle_bad_irq(irq, &bad_irq_desc); 110 + handle_bad_irq(&bad_irq_desc); 111 111 else 112 112 generic_handle_irq(irq); 113 113
+3 -7
arch/blackfin/mach-bf537/ints-priority.c
··· 89 89 .irq_unmask = bf537_generic_error_unmask_irq, 90 90 }; 91 91 92 - static void bf537_demux_error_irq(unsigned int int_err_irq, 93 - struct irq_desc *inta_desc) 92 + static void bf537_demux_error_irq(struct irq_desc *inta_desc) 94 93 { 95 94 int irq = 0; 96 95 ··· 181 182 .irq_unmask = bf537_mac_rx_unmask_irq, 182 183 }; 183 184 184 - static void bf537_demux_mac_rx_irq(unsigned int __int_irq, 185 - struct irq_desc *desc) 185 + static void bf537_demux_mac_rx_irq(struct irq_desc *desc) 186 186 { 187 - unsigned int int_irq = irq_desc_get_irq(desc); 188 - 189 187 if (bfin_read_DMA1_IRQ_STATUS() & (DMA_DONE | DMA_ERR)) 190 188 bfin_handle_irq(IRQ_MAC_RX); 191 189 else 192 - bfin_demux_gpio_irq(int_irq, desc); 190 + bfin_demux_gpio_irq(desc); 193 191 } 194 192 #endif 195 193
+2 -3
arch/blackfin/mach-common/ints-priority.c
··· 656 656 .irq_set_wake = bfin_mac_status_set_wake, 657 657 }; 658 658 659 - void bfin_demux_mac_status_irq(unsigned int int_err_irq, 660 - struct irq_desc *inta_desc) 659 + void bfin_demux_mac_status_irq(struct irq_desc *inta_desc) 661 660 { 662 661 int i, irq = 0; 663 662 u32 status = bfin_read_EMAC_SYSTAT(); ··· 824 825 } 825 826 } 826 827 827 - void bfin_demux_gpio_irq(unsigned int __inta_irq, struct irq_desc *desc) 828 + void bfin_demux_gpio_irq(struct irq_desc *desc) 828 829 { 829 830 unsigned int inta_irq = irq_desc_get_irq(desc); 830 831 unsigned int irq;
+1 -1
arch/c6x/platforms/megamod-pic.c
··· 93 93 .irq_unmask = unmask_megamod, 94 94 }; 95 95 96 - static void megamod_irq_cascade(unsigned int __irq, struct irq_desc *desc) 96 + static void megamod_irq_cascade(struct irq_desc *desc) 97 97 { 98 98 struct megamod_cascade_data *cascade; 99 99 struct megamod_pic *pic;
+4 -4
arch/m68k/amiga/amiints.c
··· 46 46 * The builtin Amiga hardware interrupt handlers. 47 47 */ 48 48 49 - static void ami_int1(unsigned int irq, struct irq_desc *desc) 49 + static void ami_int1(struct irq_desc *desc) 50 50 { 51 51 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; 52 52 ··· 69 69 } 70 70 } 71 71 72 - static void ami_int3(unsigned int irq, struct irq_desc *desc) 72 + static void ami_int3(struct irq_desc *desc) 73 73 { 74 74 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; 75 75 ··· 92 92 } 93 93 } 94 94 95 - static void ami_int4(unsigned int irq, struct irq_desc *desc) 95 + static void ami_int4(struct irq_desc *desc) 96 96 { 97 97 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; 98 98 ··· 121 121 } 122 122 } 123 123 124 - static void ami_int5(unsigned int irq, struct irq_desc *desc) 124 + static void ami_int5(struct irq_desc *desc) 125 125 { 126 126 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; 127 127
+2 -4
arch/m68k/coldfire/intc-5272.c
··· 143 143 * We need to be careful with the masking/acking due to the side effects 144 144 * of masking an interrupt. 145 145 */ 146 - static void intc_external_irq(unsigned int __irq, struct irq_desc *desc) 146 + static void intc_external_irq(struct irq_desc *desc) 147 147 { 148 - unsigned int irq = irq_desc_get_irq(desc); 149 - 150 148 irq_desc_get_chip(desc)->irq_ack(&desc->irq_data); 151 - handle_simple_irq(irq, desc); 149 + handle_simple_irq(desc); 152 150 } 153 151 154 152 static struct irq_chip intc_irq_chip = {
+1 -2
arch/m68k/include/asm/irq.h
··· 64 64 struct pt_regs *)); 65 65 extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt); 66 66 extern void m68k_setup_irq_controller(struct irq_chip *, 67 - void (*handle)(unsigned int irq, 68 - struct irq_desc *desc), 67 + void (*handle)(struct irq_desc *desc), 69 68 unsigned int irq, unsigned int cnt); 70 69 71 70 extern unsigned int irq_canonicalize(unsigned int irq);
+1 -1
arch/m68k/include/asm/mac_via.h
··· 261 261 extern void via_irq_disable(int); 262 262 extern void via_nubus_irq_startup(int irq); 263 263 extern void via_nubus_irq_shutdown(int irq); 264 - extern void via1_irq(unsigned int irq, struct irq_desc *desc); 264 + extern void via1_irq(struct irq_desc *desc); 265 265 extern void via1_set_head(int); 266 266 extern int via2_scsi_drq_pending(void); 267 267
+1 -1
arch/m68k/mac/baboon.c
··· 45 45 * Baboon interrupt handler. This works a lot like a VIA. 46 46 */ 47 47 48 - static void baboon_irq(unsigned int irq, struct irq_desc *desc) 48 + static void baboon_irq(struct irq_desc *desc) 49 49 { 50 50 int irq_bit, irq_num; 51 51 unsigned char events;
+2 -2
arch/m68k/mac/oss.c
··· 63 63 * Handle miscellaneous OSS interrupts. 64 64 */ 65 65 66 - static void oss_irq(unsigned int __irq, struct irq_desc *desc) 66 + static void oss_irq(struct irq_desc *desc) 67 67 { 68 68 int events = oss->irq_pending & 69 69 (OSS_IP_IOPSCC | OSS_IP_SCSI | OSS_IP_IOPISM); ··· 99 99 * Unlike the VIA/RBV this is on its own autovector interrupt level. 100 100 */ 101 101 102 - static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc) 102 + static void oss_nubus_irq(struct irq_desc *desc) 103 103 { 104 104 int events, irq_bit, i; 105 105
+1 -1
arch/m68k/mac/psc.c
··· 113 113 * PSC interrupt handler. It's a lot like the VIA interrupt handler. 114 114 */ 115 115 116 - static void psc_irq(unsigned int __irq, struct irq_desc *desc) 116 + static void psc_irq(struct irq_desc *desc) 117 117 { 118 118 unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc); 119 119 unsigned int irq = irq_desc_get_irq(desc);
+3 -3
arch/m68k/mac/via.c
··· 446 446 * via6522.c :-), disable/pending masks added. 447 447 */ 448 448 449 - void via1_irq(unsigned int irq, struct irq_desc *desc) 449 + void via1_irq(struct irq_desc *desc) 450 450 { 451 451 int irq_num; 452 452 unsigned char irq_bit, events; ··· 467 467 } while (events >= irq_bit); 468 468 } 469 469 470 - static void via2_irq(unsigned int irq, struct irq_desc *desc) 470 + static void via2_irq(struct irq_desc *desc) 471 471 { 472 472 int irq_num; 473 473 unsigned char irq_bit, events; ··· 493 493 * VIA2 dispatcher as a fast interrupt handler. 494 494 */ 495 495 496 - void via_nubus_irq(unsigned int irq, struct irq_desc *desc) 496 + static void via_nubus_irq(struct irq_desc *desc) 497 497 { 498 498 int slot_irq; 499 499 unsigned char slot_bit, events;
+1 -3
arch/metag/kernel/irq.c
··· 94 94 "MOV D0.5,%0\n" 95 95 "MOV D1Ar1,%1\n" 96 96 "MOV D1RtP,%2\n" 97 - "MOV D0Ar2,%3\n" 98 97 "SWAP A0StP,D0.5\n" 99 98 "SWAP PC,D1RtP\n" 100 99 "MOV A0StP,D0.5\n" 101 100 : 102 - : "r" (isp), "r" (irq), "r" (desc->handle_irq), 103 - "r" (desc) 101 + : "r" (isp), "r" (desc), "r" (desc->handle_irq) 104 102 : "memory", "cc", "D1Ar1", "D0Ar2", "D1Ar3", "D0Ar4", 105 103 "D1Ar5", "D0Ar6", "D0Re0", "D1Re0", "D0.4", "D1RtP", 106 104 "D0.5"
+2 -2
arch/mips/alchemy/common/irq.c
··· 851 851 852 852 /* create chained handlers for the 4 IC requests to the MIPS IRQ ctrl */ 853 853 #define DISP(name, base, addr) \ 854 - static void au1000_##name##_dispatch(unsigned int irq, struct irq_desc *d) \ 854 + static void au1000_##name##_dispatch(struct irq_desc *d) \ 855 855 { \ 856 856 unsigned long r = __raw_readl((void __iomem *)KSEG1ADDR(addr)); \ 857 857 if (likely(r)) \ ··· 865 865 DISP(ic1r0, AU1000_INTC1_INT_BASE, AU1000_IC1_PHYS_ADDR + IC_REQ0INT) 866 866 DISP(ic1r1, AU1000_INTC1_INT_BASE, AU1000_IC1_PHYS_ADDR + IC_REQ1INT) 867 867 868 - static void alchemy_gpic_dispatch(unsigned int irq, struct irq_desc *d) 868 + static void alchemy_gpic_dispatch(struct irq_desc *d) 869 869 { 870 870 int i = __raw_readl(AU1300_GPIC_ADDR + AU1300_GPIC_PRIENC); 871 871 generic_handle_irq(ALCHEMY_GPIC_INT_BASE + i);
+1 -1
arch/mips/alchemy/devboards/bcsr.c
··· 86 86 /* 87 87 * DB1200/PB1200 CPLD IRQ muxer 88 88 */ 89 - static void bcsr_csc_handler(unsigned int irq, struct irq_desc *d) 89 + static void bcsr_csc_handler(struct irq_desc *d) 90 90 { 91 91 unsigned short bisr = __raw_readw(bcsr_virt + BCSR_REG_INTSTAT); 92 92 struct irq_chip *chip = irq_desc_get_chip(d);
+1 -1
arch/mips/ath25/ar2315.c
··· 69 69 .name = "ar2315-ahb-error", 70 70 }; 71 71 72 - static void ar2315_misc_irq_handler(unsigned irq, struct irq_desc *desc) 72 + static void ar2315_misc_irq_handler(struct irq_desc *desc) 73 73 { 74 74 u32 pending = ar2315_rst_reg_read(AR2315_ISR) & 75 75 ar2315_rst_reg_read(AR2315_IMR);
+1 -1
arch/mips/ath25/ar5312.c
··· 73 73 .name = "ar5312-ahb-error", 74 74 }; 75 75 76 - static void ar5312_misc_irq_handler(unsigned irq, struct irq_desc *desc) 76 + static void ar5312_misc_irq_handler(struct irq_desc *desc) 77 77 { 78 78 u32 pending = ar5312_rst_reg_read(AR5312_ISR) & 79 79 ar5312_rst_reg_read(AR5312_IMR);
+4 -4
arch/mips/ath79/irq.c
··· 26 26 #include "common.h" 27 27 #include "machtypes.h" 28 28 29 - static void ath79_misc_irq_handler(unsigned int irq, struct irq_desc *desc) 29 + static void ath79_misc_irq_handler(struct irq_desc *desc) 30 30 { 31 31 void __iomem *base = ath79_reset_base; 32 32 u32 pending; ··· 119 119 irq_set_chained_handler(ATH79_CPU_IRQ(6), ath79_misc_irq_handler); 120 120 } 121 121 122 - static void ar934x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc) 122 + static void ar934x_ip2_irq_dispatch(struct irq_desc *desc) 123 123 { 124 124 u32 status; 125 125 ··· 148 148 irq_set_chained_handler(ATH79_CPU_IRQ(2), ar934x_ip2_irq_dispatch); 149 149 } 150 150 151 - static void qca955x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc) 151 + static void qca955x_ip2_irq_dispatch(struct irq_desc *desc) 152 152 { 153 153 u32 status; 154 154 ··· 171 171 } 172 172 } 173 173 174 - static void qca955x_ip3_irq_dispatch(unsigned int irq, struct irq_desc *desc) 174 + static void qca955x_ip3_irq_dispatch(struct irq_desc *desc) 175 175 { 176 176 u32 status; 177 177
+1 -1
arch/mips/cavium-octeon/octeon-irq.c
··· 2221 2221 if (irqd_get_trigger_type(irq_data) & 2222 2222 IRQ_TYPE_EDGE_BOTH) 2223 2223 cvmx_write_csr(host_data->raw_reg, 1ull << i); 2224 - generic_handle_irq_desc(irq, desc); 2224 + generic_handle_irq_desc(desc); 2225 2225 } 2226 2226 } 2227 2227
+1
arch/mips/include/asm/kvm_host.h
··· 128 128 u32 msa_disabled_exits; 129 129 u32 flush_dcache_exits; 130 130 u32 halt_successful_poll; 131 + u32 halt_attempted_poll; 131 132 u32 halt_wakeup; 132 133 }; 133 134
+2 -2
arch/mips/include/asm/netlogic/common.h
··· 57 57 #include <asm/mach-netlogic/multi-node.h> 58 58 59 59 struct irq_desc; 60 - void nlm_smp_function_ipi_handler(unsigned int irq, struct irq_desc *desc); 61 - void nlm_smp_resched_ipi_handler(unsigned int irq, struct irq_desc *desc); 60 + void nlm_smp_function_ipi_handler(struct irq_desc *desc); 61 + void nlm_smp_resched_ipi_handler(struct irq_desc *desc); 62 62 void nlm_smp_irq_init(int hwcpuid); 63 63 void nlm_boot_secondary_cpus(void); 64 64 int nlm_wakeup_secondary_cpus(void);
+1 -1
arch/mips/jz4740/gpio.c
··· 291 291 writel(mask, reg); 292 292 } 293 293 294 - static void jz_gpio_irq_demux_handler(unsigned int irq, struct irq_desc *desc) 294 + static void jz_gpio_irq_demux_handler(struct irq_desc *desc) 295 295 { 296 296 uint32_t flag; 297 297 unsigned int gpio_irq;
+1
arch/mips/kvm/mips.c
··· 55 55 { "msa_disabled", VCPU_STAT(msa_disabled_exits), KVM_STAT_VCPU }, 56 56 { "flush_dcache", VCPU_STAT(flush_dcache_exits), KVM_STAT_VCPU }, 57 57 { "halt_successful_poll", VCPU_STAT(halt_successful_poll), KVM_STAT_VCPU }, 58 + { "halt_attempted_poll", VCPU_STAT(halt_attempted_poll), KVM_STAT_VCPU }, 58 59 { "halt_wakeup", VCPU_STAT(halt_wakeup), KVM_STAT_VCPU }, 59 60 {NULL} 60 61 };
+2 -2
arch/mips/netlogic/common/smp.c
··· 82 82 } 83 83 84 84 /* IRQ_IPI_SMP_FUNCTION Handler */ 85 - void nlm_smp_function_ipi_handler(unsigned int __irq, struct irq_desc *desc) 85 + void nlm_smp_function_ipi_handler(struct irq_desc *desc) 86 86 { 87 87 unsigned int irq = irq_desc_get_irq(desc); 88 88 clear_c0_eimr(irq); ··· 92 92 } 93 93 94 94 /* IRQ_IPI_SMP_RESCHEDULE handler */ 95 - void nlm_smp_resched_ipi_handler(unsigned int __irq, struct irq_desc *desc) 95 + void nlm_smp_resched_ipi_handler(struct irq_desc *desc) 96 96 { 97 97 unsigned int irq = irq_desc_get_irq(desc); 98 98 clear_c0_eimr(irq);
+1 -1
arch/mips/pci/pci-ar2315.c
··· 318 318 return 0; 319 319 } 320 320 321 - static void ar2315_pci_irq_handler(unsigned irq, struct irq_desc *desc) 321 + static void ar2315_pci_irq_handler(struct irq_desc *desc) 322 322 { 323 323 struct ar2315_pci_ctrl *apc = irq_desc_get_handler_data(desc); 324 324 u32 pending = ar2315_pci_reg_read(apc, AR2315_PCI_ISR) &
+1 -1
arch/mips/pci/pci-ar71xx.c
··· 226 226 .write = ar71xx_pci_write_config, 227 227 }; 228 228 229 - static void ar71xx_pci_irq_handler(unsigned int irq, struct irq_desc *desc) 229 + static void ar71xx_pci_irq_handler(struct irq_desc *desc) 230 230 { 231 231 struct ar71xx_pci_controller *apc; 232 232 void __iomem *base = ath79_reset_base;
+1 -1
arch/mips/pci/pci-ar724x.c
··· 225 225 .write = ar724x_pci_write, 226 226 }; 227 227 228 - static void ar724x_pci_irq_handler(unsigned int irq, struct irq_desc *desc) 228 + static void ar724x_pci_irq_handler(struct irq_desc *desc) 229 229 { 230 230 struct ar724x_pci_controller *apc; 231 231 void __iomem *base;
+1 -1
arch/mips/pci/pci-rt3883.c
··· 129 129 rt3883_pci_w32(rpc, val, RT3883_PCI_REG_CFGDATA); 130 130 } 131 131 132 - static void rt3883_pci_irq_handler(unsigned int __irq, struct irq_desc *desc) 132 + static void rt3883_pci_irq_handler(struct irq_desc *desc) 133 133 { 134 134 struct rt3883_pci_controller *rpc; 135 135 u32 pending;
+1 -1
arch/mips/ralink/irq.c
··· 96 96 return CP0_LEGACY_COMPARE_IRQ; 97 97 } 98 98 99 - static void ralink_intc_irq_handler(unsigned int irq, struct irq_desc *desc) 99 + static void ralink_intc_irq_handler(struct irq_desc *desc) 100 100 { 101 101 u32 pending = rt_intc_r32(INTC_REG_STATUS0); 102 102
+3
arch/powerpc/boot/Makefile
··· 28 28 endif 29 29 ifdef CONFIG_CPU_BIG_ENDIAN 30 30 BOOTCFLAGS += -mbig-endian 31 + else 32 + BOOTCFLAGS += -mlittle-endian 33 + BOOTCFLAGS += $(call cc-option,-mabi=elfv2) 31 34 endif 32 35 33 36 BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
+1
arch/powerpc/include/asm/kvm_host.h
··· 108 108 u32 dec_exits; 109 109 u32 ext_intr_exits; 110 110 u32 halt_successful_poll; 111 + u32 halt_attempted_poll; 111 112 u32 halt_wakeup; 112 113 u32 dbell_exits; 113 114 u32 gdbell_exits;
+9 -14
arch/powerpc/include/asm/qe_ic.h
··· 59 59 60 60 #ifdef CONFIG_QUICC_ENGINE 61 61 void qe_ic_init(struct device_node *node, unsigned int flags, 62 - void (*low_handler)(unsigned int irq, struct irq_desc *desc), 63 - void (*high_handler)(unsigned int irq, struct irq_desc *desc)); 62 + void (*low_handler)(struct irq_desc *desc), 63 + void (*high_handler)(struct irq_desc *desc)); 64 64 unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic); 65 65 unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic); 66 66 #else 67 67 static inline void qe_ic_init(struct device_node *node, unsigned int flags, 68 - void (*low_handler)(unsigned int irq, struct irq_desc *desc), 69 - void (*high_handler)(unsigned int irq, struct irq_desc *desc)) 68 + void (*low_handler)(struct irq_desc *desc), 69 + void (*high_handler)(struct irq_desc *desc)) 70 70 {} 71 71 static inline unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic) 72 72 { return 0; } ··· 78 78 int qe_ic_set_priority(unsigned int virq, unsigned int priority); 79 79 int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high); 80 80 81 - static inline void qe_ic_cascade_low_ipic(unsigned int irq, 82 - struct irq_desc *desc) 81 + static inline void qe_ic_cascade_low_ipic(struct irq_desc *desc) 83 82 { 84 83 struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); 85 84 unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); ··· 87 88 generic_handle_irq(cascade_irq); 88 89 } 89 90 90 - static inline void qe_ic_cascade_high_ipic(unsigned int irq, 91 - struct irq_desc *desc) 91 + static inline void qe_ic_cascade_high_ipic(struct irq_desc *desc) 92 92 { 93 93 struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); 94 94 unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); ··· 96 98 generic_handle_irq(cascade_irq); 97 99 } 98 100 99 - static inline void qe_ic_cascade_low_mpic(unsigned int irq, 100 - struct irq_desc *desc) 101 + static inline void qe_ic_cascade_low_mpic(struct irq_desc *desc) 101 102 { 102 103 struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); 103 104 unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); ··· 108 111 chip->irq_eoi(&desc->irq_data); 109 112 } 110 113 111 - static inline void qe_ic_cascade_high_mpic(unsigned int irq, 112 - struct irq_desc *desc) 114 + static inline void qe_ic_cascade_high_mpic(struct irq_desc *desc) 113 115 { 114 116 struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); 115 117 unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); ··· 120 124 chip->irq_eoi(&desc->irq_data); 121 125 } 122 126 123 - static inline void qe_ic_cascade_muxed_mpic(unsigned int irq, 124 - struct irq_desc *desc) 127 + static inline void qe_ic_cascade_muxed_mpic(struct irq_desc *desc) 125 128 { 126 129 struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); 127 130 unsigned int cascade_irq;
+1
arch/powerpc/include/asm/systbl.h
··· 368 368 SYSCALL_SPU(bpf) 369 369 COMPAT_SYS(execveat) 370 370 PPC64ONLY(switch_endian) 371 + SYSCALL_SPU(userfaultfd)
+1 -1
arch/powerpc/include/asm/tsi108_pci.h
··· 39 39 40 40 extern int tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary); 41 41 extern void tsi108_pci_int_init(struct device_node *node); 42 - extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc); 42 + extern void tsi108_irq_cascade(struct irq_desc *desc); 43 43 extern void tsi108_clear_pci_cfg_error(void); 44 44 45 45 #endif /* _ASM_POWERPC_TSI108_PCI_H */
+1 -1
arch/powerpc/include/asm/unistd.h
··· 12 12 #include <uapi/asm/unistd.h> 13 13 14 14 15 - #define __NR_syscalls 364 15 + #define __NR_syscalls 365 16 16 17 17 #define __NR__exit __NR_exit 18 18 #define NR_syscalls __NR_syscalls
+1
arch/powerpc/include/uapi/asm/unistd.h
··· 386 386 #define __NR_bpf 361 387 387 #define __NR_execveat 362 388 388 #define __NR_switch_endian 363 389 + #define __NR_userfaultfd 364 389 390 390 391 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
+1 -1
arch/powerpc/kernel/irq.c
··· 441 441 442 442 chip = irq_data_get_irq_chip(data); 443 443 444 - cpumask_and(mask, data->affinity, map); 444 + cpumask_and(mask, irq_data_get_affinity_mask(data), map); 445 445 if (cpumask_any(mask) >= nr_cpu_ids) { 446 446 pr_warn("Breaking affinity for irq %i\n", irq); 447 447 cpumask_copy(mask, map);
+6
arch/powerpc/kernel/setup_32.c
··· 38 38 #include <asm/udbg.h> 39 39 #include <asm/mmu_context.h> 40 40 #include <asm/epapr_hcalls.h> 41 + #include <asm/code-patching.h> 41 42 42 43 #define DBG(fmt...) 43 44 ··· 110 109 * This is called very early on the boot process, after a minimal 111 110 * MMU environment has been set up but before MMU_init is called. 112 111 */ 112 + extern unsigned int memset_nocache_branch; /* Insn to be replaced by NOP */ 113 + 113 114 notrace void __init machine_init(u64 dt_ptr) 114 115 { 115 116 lockdep_init(); 116 117 117 118 /* Enable early debugging if any specified (see udbg.h) */ 118 119 udbg_early_init(); 120 + 121 + patch_instruction((unsigned int *)&memcpy, PPC_INST_NOP); 122 + patch_instruction(&memset_nocache_branch, PPC_INST_NOP); 119 123 120 124 /* Do some early initialization based on the flat device tree */ 121 125 early_init_devtree(__va(dt_ptr));
+1
arch/powerpc/kvm/book3s.c
··· 53 53 { "ext_intr", VCPU_STAT(ext_intr_exits) }, 54 54 { "queue_intr", VCPU_STAT(queue_intr) }, 55 55 { "halt_successful_poll", VCPU_STAT(halt_successful_poll), }, 56 + { "halt_attempted_poll", VCPU_STAT(halt_attempted_poll), }, 56 57 { "halt_wakeup", VCPU_STAT(halt_wakeup) }, 57 58 { "pf_storage", VCPU_STAT(pf_storage) }, 58 59 { "sp_storage", VCPU_STAT(sp_storage) },
+1
arch/powerpc/kvm/booke.c
··· 63 63 { "dec", VCPU_STAT(dec_exits) }, 64 64 { "ext_intr", VCPU_STAT(ext_intr_exits) }, 65 65 { "halt_successful_poll", VCPU_STAT(halt_successful_poll) }, 66 + { "halt_attempted_poll", VCPU_STAT(halt_attempted_poll) }, 66 67 { "halt_wakeup", VCPU_STAT(halt_wakeup) }, 67 68 { "doorbell", VCPU_STAT(dbell_exits) }, 68 69 { "guest doorbell", VCPU_STAT(gdbell_exits) },
+11
arch/powerpc/lib/copy_32.S
··· 73 73 * Use dcbz on the complete cache lines in the destination 74 74 * to set them to zero. This requires that the destination 75 75 * area is cacheable. -- paulus 76 + * 77 + * During early init, cache might not be active yet, so dcbz cannot be used. 78 + * We therefore skip the optimised bloc that uses dcbz. This jump is 79 + * replaced by a nop once cache is active. This is done in machine_init() 76 80 */ 77 81 _GLOBAL(memset) 78 82 rlwimi r4,r4,8,16,23 ··· 92 88 subf r6,r0,r6 93 89 cmplwi 0,r4,0 94 90 bne 2f /* Use normal procedure if r4 is not zero */ 91 + _GLOBAL(memset_nocache_branch) 92 + b 2f /* Skip optimised bloc until cache is enabled */ 95 93 96 94 clrlwi r7,r6,32-LG_CACHELINE_BYTES 97 95 add r8,r7,r5 ··· 134 128 * the destination area is cacheable. 135 129 * We only use this version if the source and dest don't overlap. 136 130 * -- paulus. 131 + * 132 + * During early init, cache might not be active yet, so dcbz cannot be used. 133 + * We therefore jump to generic_memcpy which doesn't use dcbz. This jump is 134 + * replaced by a nop once cache is active. This is done in machine_init() 137 135 */ 138 136 _GLOBAL(memmove) 139 137 cmplw 0,r3,r4 ··· 145 135 /* fall through */ 146 136 147 137 _GLOBAL(memcpy) 138 + b generic_memcpy 148 139 add r7,r3,r5 /* test if the src & dst overlap */ 149 140 add r8,r4,r5 150 141 cmplw 0,r4,r7
+2 -1
arch/powerpc/mm/hugepage-hash64.c
··· 85 85 BUG_ON(index >= 4096); 86 86 87 87 vpn = hpt_vpn(ea, vsid, ssize); 88 - hash = hpt_hash(vpn, shift, ssize); 89 88 hpte_slot_array = get_hpte_slot_array(pmdp); 90 89 if (psize == MMU_PAGE_4K) { 91 90 /* ··· 100 101 valid = hpte_valid(hpte_slot_array, index); 101 102 if (valid) { 102 103 /* update the hpte bits */ 104 + hash = hpt_hash(vpn, shift, ssize); 103 105 hidx = hpte_hash_index(hpte_slot_array, index); 104 106 if (hidx & _PTEIDX_SECONDARY) 105 107 hash = ~hash; ··· 126 126 if (!valid) { 127 127 unsigned long hpte_group; 128 128 129 + hash = hpt_hash(vpn, shift, ssize); 129 130 /* insert new entry */ 130 131 pa = pmd_pfn(__pmd(old_pmd)) << PAGE_SHIFT; 131 132 new_pmd |= _PAGE_HASHPTE;
+3 -2
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
··· 104 104 return irq_linear_revmap(cpld_pic_host, cpld_irq); 105 105 } 106 106 107 - static void 108 - cpld_pic_cascade(unsigned int irq, struct irq_desc *desc) 107 + static void cpld_pic_cascade(struct irq_desc *desc) 109 108 { 109 + unsigned int irq; 110 + 110 111 irq = cpld_pic_get_irq(0, PCI_IGNORE, &cpld_regs->pci_status, 111 112 &cpld_regs->pci_mask); 112 113 if (irq != NO_IRQ) {
+1 -1
arch/powerpc/platforms/52xx/media5200.c
··· 80 80 .irq_mask_ack = media5200_irq_mask, 81 81 }; 82 82 83 - void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc) 83 + static void media5200_irq_cascade(struct irq_desc *desc) 84 84 { 85 85 struct irq_chip *chip = irq_desc_get_chip(desc); 86 86 int sub_virq, val;
+1 -1
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
··· 191 191 .irq_set_type = mpc52xx_gpt_irq_set_type, 192 192 }; 193 193 194 - void mpc52xx_gpt_irq_cascade(unsigned int virq, struct irq_desc *desc) 194 + static void mpc52xx_gpt_irq_cascade(struct irq_desc *desc) 195 195 { 196 196 struct mpc52xx_gpt_priv *gpt = irq_desc_get_handler_data(desc); 197 197 int sub_virq;
+1 -1
arch/powerpc/platforms/52xx/mpc52xx_pic.c
··· 196 196 ctrl_reg |= (type << (22 - (l2irq * 2))); 197 197 out_be32(&intr->ctrl, ctrl_reg); 198 198 199 - __irq_set_handler_locked(d->irq, handler); 199 + irq_set_handler_locked(d, handler); 200 200 201 201 return 0; 202 202 }
+1 -1
arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
··· 78 78 .irq_disable = pq2ads_pci_mask_irq 79 79 }; 80 80 81 - static void pq2ads_pci_irq_demux(unsigned int irq, struct irq_desc *desc) 81 + static void pq2ads_pci_irq_demux(struct irq_desc *desc) 82 82 { 83 83 struct pq2ads_pci_pic *priv = irq_desc_get_handler_data(desc); 84 84 u32 stat, mask, pend;
+1 -1
arch/powerpc/platforms/85xx/common.c
··· 49 49 return of_platform_bus_probe(NULL, mpc85xx_common_ids, NULL); 50 50 } 51 51 #ifdef CONFIG_CPM2 52 - static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) 52 + static void cpm2_cascade(struct irq_desc *desc) 53 53 { 54 54 struct irq_chip *chip = irq_desc_get_chip(desc); 55 55 int cascade_irq;
+2 -3
arch/powerpc/platforms/85xx/mpc85xx_cds.c
··· 192 192 } 193 193 194 194 #ifdef CONFIG_PPC_I8259 195 - static void mpc85xx_8259_cascade_handler(unsigned int irq, 196 - struct irq_desc *desc) 195 + static void mpc85xx_8259_cascade_handler(struct irq_desc *desc) 197 196 { 198 197 unsigned int cascade_irq = i8259_irq(); 199 198 ··· 201 202 generic_handle_irq(cascade_irq); 202 203 203 204 /* check for any interrupts from the shared IRQ line */ 204 - handle_fasteoi_irq(irq, desc); 205 + handle_fasteoi_irq(desc); 205 206 } 206 207 207 208 static irqreturn_t mpc85xx_8259_cascade_action(int irq, void *dev_id)
+1 -1
arch/powerpc/platforms/85xx/mpc85xx_ds.c
··· 46 46 #endif 47 47 48 48 #ifdef CONFIG_PPC_I8259 49 - static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc) 49 + static void mpc85xx_8259_cascade(struct irq_desc *desc) 50 50 { 51 51 struct irq_chip *chip = irq_desc_get_chip(desc); 52 52 unsigned int cascade_irq = i8259_irq();
+2 -1
arch/powerpc/platforms/85xx/socrates_fpga_pic.c
··· 91 91 (irq_hw_number_t)i); 92 92 } 93 93 94 - void socrates_fpga_pic_cascade(unsigned int irq, struct irq_desc *desc) 94 + static void socrates_fpga_pic_cascade(struct irq_desc *desc) 95 95 { 96 96 struct irq_chip *chip = irq_desc_get_chip(desc); 97 + unsigned int irq = irq_desc_get_irq(desc); 97 98 unsigned int cascade_irq; 98 99 99 100 /*
+1 -1
arch/powerpc/platforms/86xx/pic.c
··· 17 17 #include <asm/i8259.h> 18 18 19 19 #ifdef CONFIG_PPC_I8259 20 - static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc) 20 + static void mpc86xx_8259_cascade(struct irq_desc *desc) 21 21 { 22 22 struct irq_chip *chip = irq_desc_get_chip(desc); 23 23 unsigned int cascade_irq = i8259_irq();
+1 -1
arch/powerpc/platforms/8xx/m8xx_setup.c
··· 214 214 panic("Restart failed\n"); 215 215 } 216 216 217 - static void cpm_cascade(unsigned int irq, struct irq_desc *desc) 217 + static void cpm_cascade(struct irq_desc *desc) 218 218 { 219 219 struct irq_chip *chip = irq_desc_get_chip(desc); 220 220 int cascade_irq = cpm_get_irq();
+1 -1
arch/powerpc/platforms/cell/axon_msi.c
··· 93 93 dcr_write(msic->dcr_host, dcr_n, val); 94 94 } 95 95 96 - static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc) 96 + static void axon_msi_cascade(struct irq_desc *desc) 97 97 { 98 98 struct irq_chip *chip = irq_desc_get_chip(desc); 99 99 struct axon_msic *msic = irq_desc_get_handler_data(desc);
+2 -1
arch/powerpc/platforms/cell/interrupt.c
··· 99 99 { 100 100 } 101 101 102 - static void iic_ioexc_cascade(unsigned int irq, struct irq_desc *desc) 102 + static void iic_ioexc_cascade(struct irq_desc *desc) 103 103 { 104 104 struct irq_chip *chip = irq_desc_get_chip(desc); 105 105 struct cbe_iic_regs __iomem *node_iic = 106 106 (void __iomem *)irq_desc_get_handler_data(desc); 107 + unsigned int irq = irq_desc_get_irq(desc); 107 108 unsigned int base = (irq & 0xffffff00) | IIC_IRQ_TYPE_IOEXC; 108 109 unsigned long bits, ack; 109 110 int cascade;
+1 -1
arch/powerpc/platforms/cell/spider-pic.c
··· 199 199 .xlate = spider_host_xlate, 200 200 }; 201 201 202 - static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc) 202 + static void spider_irq_cascade(struct irq_desc *desc) 203 203 { 204 204 struct irq_chip *chip = irq_desc_get_chip(desc); 205 205 struct spider_pic *pic = irq_desc_get_handler_data(desc);
+1 -1
arch/powerpc/platforms/chrp/setup.c
··· 363 363 if (ppc_md.progress) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0); 364 364 } 365 365 366 - static void chrp_8259_cascade(unsigned int irq, struct irq_desc *desc) 366 + static void chrp_8259_cascade(struct irq_desc *desc) 367 367 { 368 368 struct irq_chip *chip = irq_desc_get_chip(desc); 369 369 unsigned int cascade_irq = i8259_irq();
+1 -2
arch/powerpc/platforms/embedded6xx/hlwd-pic.c
··· 120 120 return irq_linear_revmap(h, irq); 121 121 } 122 122 123 - static void hlwd_pic_irq_cascade(unsigned int cascade_virq, 124 - struct irq_desc *desc) 123 + static void hlwd_pic_irq_cascade(struct irq_desc *desc) 125 124 { 126 125 struct irq_chip *chip = irq_desc_get_chip(desc); 127 126 struct irq_domain *irq_domain = irq_desc_get_handler_data(desc);
+1 -1
arch/powerpc/platforms/embedded6xx/mvme5100.c
··· 42 42 static phys_addr_t pci_membase; 43 43 static u_char *restart; 44 44 45 - static void mvme5100_8259_cascade(unsigned int irq, struct irq_desc *desc) 45 + static void mvme5100_8259_cascade(struct irq_desc *desc) 46 46 { 47 47 struct irq_chip *chip = irq_desc_get_chip(desc); 48 48 unsigned int cascade_irq = i8259_irq();
+3 -2
arch/powerpc/platforms/pasemi/msi.c
··· 63 63 static void pasemi_msi_teardown_msi_irqs(struct pci_dev *pdev) 64 64 { 65 65 struct msi_desc *entry; 66 + irq_hw_number_t hwirq; 66 67 67 68 pr_debug("pasemi_msi_teardown_msi_irqs, pdev %p\n", pdev); 68 69 ··· 71 70 if (entry->irq == NO_IRQ) 72 71 continue; 73 72 73 + hwirq = virq_to_hw(entry->irq); 74 74 irq_set_msi_desc(entry->irq, NULL); 75 - msi_bitmap_free_hwirqs(&msi_mpic->msi_bitmap, 76 - virq_to_hw(entry->irq), ALLOC_CHUNK); 77 75 irq_dispose_mapping(entry->irq); 76 + msi_bitmap_free_hwirqs(&msi_mpic->msi_bitmap, hwirq, ALLOC_CHUNK); 78 77 } 79 78 80 79 return;
+15 -1
arch/powerpc/platforms/powernv/pci-ioda.c
··· 2049 2049 struct iommu_table *tbl = NULL; 2050 2050 long rc; 2051 2051 2052 + /* 2053 + * crashkernel= specifies the kdump kernel's maximum memory at 2054 + * some offset and there is no guaranteed the result is a power 2055 + * of 2, which will cause errors later. 2056 + */ 2057 + const u64 max_memory = __rounddown_pow_of_two(memory_hotplug_max()); 2058 + 2059 + /* 2060 + * In memory constrained environments, e.g. kdump kernel, the 2061 + * DMA window can be larger than available memory, which will 2062 + * cause errors later. 2063 + */ 2064 + const u64 window_size = min((u64)pe->table_group.tce32_size, max_memory); 2065 + 2052 2066 rc = pnv_pci_ioda2_create_table(&pe->table_group, 0, 2053 2067 IOMMU_PAGE_SHIFT_4K, 2054 - pe->table_group.tce32_size, 2068 + window_size, 2055 2069 POWERNV_IOMMU_DEFAULT_LEVELS, &tbl); 2056 2070 if (rc) { 2057 2071 pe_err(pe, "Failed to create 32-bit TCE table, err %ld",
+3 -2
arch/powerpc/platforms/powernv/pci.c
··· 99 99 struct pci_controller *hose = pci_bus_to_host(pdev->bus); 100 100 struct pnv_phb *phb = hose->private_data; 101 101 struct msi_desc *entry; 102 + irq_hw_number_t hwirq; 102 103 103 104 if (WARN_ON(!phb)) 104 105 return; ··· 107 106 for_each_pci_msi_entry(entry, pdev) { 108 107 if (entry->irq == NO_IRQ) 109 108 continue; 109 + hwirq = virq_to_hw(entry->irq); 110 110 irq_set_msi_desc(entry->irq, NULL); 111 - msi_bitmap_free_hwirqs(&phb->msi_bmp, 112 - virq_to_hw(entry->irq) - phb->msi_base, 1); 113 111 irq_dispose_mapping(entry->irq); 112 + msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq - phb->msi_base, 1); 114 113 } 115 114 } 116 115 #endif /* CONFIG_PCI_MSI */
+3 -1
arch/powerpc/platforms/pseries/dlpar.c
··· 422 422 423 423 dn = dlpar_configure_connector(cpu_to_be32(drc_index), parent); 424 424 of_node_put(parent); 425 - if (!dn) 425 + if (!dn) { 426 + dlpar_release_drc(drc_index); 426 427 return -EINVAL; 428 + } 427 429 428 430 rc = dlpar_attach_node(dn); 429 431 if (rc) {
+1 -1
arch/powerpc/platforms/pseries/setup.c
··· 111 111 fwnmi_active = 1; 112 112 } 113 113 114 - static void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc) 114 + static void pseries_8259_cascade(struct irq_desc *desc) 115 115 { 116 116 struct irq_chip *chip = irq_desc_get_chip(desc); 117 117 unsigned int cascade_irq = i8259_irq();
+2 -2
arch/powerpc/sysdev/cpm2_pic.c
··· 155 155 156 156 irqd_set_trigger_type(d, flow_type); 157 157 if (flow_type & IRQ_TYPE_LEVEL_LOW) 158 - __irq_set_handler_locked(d->irq, handle_level_irq); 158 + irq_set_handler_locked(d, handle_level_irq); 159 159 else 160 - __irq_set_handler_locked(d->irq, handle_edge_irq); 160 + irq_set_handler_locked(d, handle_edge_irq); 161 161 162 162 /* internal IRQ senses are LEVEL_LOW 163 163 * EXT IRQ and Port C IRQ senses are programmable
+3 -2
arch/powerpc/sysdev/fsl_msi.c
··· 128 128 { 129 129 struct msi_desc *entry; 130 130 struct fsl_msi *msi_data; 131 + irq_hw_number_t hwirq; 131 132 132 133 for_each_pci_msi_entry(entry, pdev) { 133 134 if (entry->irq == NO_IRQ) 134 135 continue; 136 + hwirq = virq_to_hw(entry->irq); 135 137 msi_data = irq_get_chip_data(entry->irq); 136 138 irq_set_msi_desc(entry->irq, NULL); 137 - msi_bitmap_free_hwirqs(&msi_data->bitmap, 138 - virq_to_hw(entry->irq), 1); 139 139 irq_dispose_mapping(entry->irq); 140 + msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1); 140 141 } 141 142 142 143 return;
+1 -1
arch/powerpc/sysdev/ge/ge_pic.c
··· 91 91 * should be masked out. 92 92 */ 93 93 94 - void gef_pic_cascade(unsigned int irq, struct irq_desc *desc) 94 + static void gef_pic_cascade(struct irq_desc *desc) 95 95 { 96 96 struct irq_chip *chip = irq_desc_get_chip(desc); 97 97 unsigned int cascade_irq;
-2
arch/powerpc/sysdev/ge/ge_pic.h
··· 1 1 #ifndef __GEF_PIC_H__ 2 2 #define __GEF_PIC_H__ 3 3 4 - 5 - void gef_pic_cascade(unsigned int, struct irq_desc *); 6 4 unsigned int gef_pic_get_irq(void); 7 5 void gef_pic_init(struct device_node *); 8 6
+2 -2
arch/powerpc/sysdev/ipic.c
··· 624 624 625 625 irqd_set_trigger_type(d, flow_type); 626 626 if (flow_type & IRQ_TYPE_LEVEL_LOW) { 627 - __irq_set_handler_locked(d->irq, handle_level_irq); 627 + irq_set_handler_locked(d, handle_level_irq); 628 628 d->chip = &ipic_level_irq_chip; 629 629 } else { 630 - __irq_set_handler_locked(d->irq, handle_edge_irq); 630 + irq_set_handler_locked(d, handle_edge_irq); 631 631 d->chip = &ipic_edge_irq_chip; 632 632 } 633 633
+1 -1
arch/powerpc/sysdev/mpc8xx_pic.c
··· 55 55 unsigned int siel = in_be32(&siu_reg->sc_siel); 56 56 siel |= mpc8xx_irqd_to_bit(d); 57 57 out_be32(&siu_reg->sc_siel, siel); 58 - __irq_set_handler_locked(d->irq, handle_edge_irq); 58 + irq_set_handler_locked(d, handle_edge_irq); 59 59 } 60 60 return 0; 61 61 }
+1 -1
arch/powerpc/sysdev/mpic.c
··· 1181 1181 } 1182 1182 1183 1183 /* IRQ handler for a secondary MPIC cascaded from another IRQ controller */ 1184 - static void mpic_cascade(unsigned int irq, struct irq_desc *desc) 1184 + static void mpic_cascade(struct irq_desc *desc) 1185 1185 { 1186 1186 struct irq_chip *chip = irq_desc_get_chip(desc); 1187 1187 struct mpic *mpic = irq_desc_get_handler_data(desc);
+3 -2
arch/powerpc/sysdev/mpic_u3msi.c
··· 107 107 static void u3msi_teardown_msi_irqs(struct pci_dev *pdev) 108 108 { 109 109 struct msi_desc *entry; 110 + irq_hw_number_t hwirq; 110 111 111 112 for_each_pci_msi_entry(entry, pdev) { 112 113 if (entry->irq == NO_IRQ) 113 114 continue; 114 115 116 + hwirq = virq_to_hw(entry->irq); 115 117 irq_set_msi_desc(entry->irq, NULL); 116 - msi_bitmap_free_hwirqs(&msi_mpic->msi_bitmap, 117 - virq_to_hw(entry->irq), 1); 118 118 irq_dispose_mapping(entry->irq); 119 + msi_bitmap_free_hwirqs(&msi_mpic->msi_bitmap, hwirq, 1); 119 120 } 120 121 121 122 return;
+3 -2
arch/powerpc/sysdev/ppc4xx_msi.c
··· 124 124 { 125 125 struct msi_desc *entry; 126 126 struct ppc4xx_msi *msi_data = &ppc4xx_msi; 127 + irq_hw_number_t hwirq; 127 128 128 129 dev_dbg(&dev->dev, "PCIE-MSI: tearing down msi irqs\n"); 129 130 130 131 for_each_pci_msi_entry(entry, dev) { 131 132 if (entry->irq == NO_IRQ) 132 133 continue; 134 + hwirq = virq_to_hw(entry->irq); 133 135 irq_set_msi_desc(entry->irq, NULL); 134 - msi_bitmap_free_hwirqs(&msi_data->bitmap, 135 - virq_to_hw(entry->irq), 1); 136 136 irq_dispose_mapping(entry->irq); 137 + msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1); 137 138 } 138 139 } 139 140
+2 -2
arch/powerpc/sysdev/qe_lib/qe_ic.c
··· 311 311 } 312 312 313 313 void __init qe_ic_init(struct device_node *node, unsigned int flags, 314 - void (*low_handler)(unsigned int irq, struct irq_desc *desc), 315 - void (*high_handler)(unsigned int irq, struct irq_desc *desc)) 314 + void (*low_handler)(struct irq_desc *desc), 315 + void (*high_handler)(struct irq_desc *desc)) 316 316 { 317 317 struct qe_ic *qe_ic; 318 318 struct resource res;
+1 -1
arch/powerpc/sysdev/tsi108_pci.c
··· 428 428 init_pci_source(); 429 429 } 430 430 431 - void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc) 431 + void tsi108_irq_cascade(struct irq_desc *desc) 432 432 { 433 433 struct irq_chip *chip = irq_desc_get_chip(desc); 434 434 unsigned int cascade_irq = get_pci_source();
+1 -1
arch/powerpc/sysdev/uic.c
··· 194 194 .xlate = irq_domain_xlate_twocell, 195 195 }; 196 196 197 - void uic_irq_cascade(unsigned int virq, struct irq_desc *desc) 197 + static void uic_irq_cascade(struct irq_desc *desc) 198 198 { 199 199 struct irq_chip *chip = irq_desc_get_chip(desc); 200 200 struct irq_data *idata = irq_desc_get_irq_data(desc);
+1 -1
arch/powerpc/sysdev/xics/ics-opal.c
··· 54 54 if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS) 55 55 return; 56 56 57 - server = xics_get_irq_server(d->irq, d->affinity, 0); 57 + server = xics_get_irq_server(d->irq, irq_data_get_affinity_mask(d), 0); 58 58 server = ics_opal_mangle_server(server); 59 59 60 60 rc = opal_set_xive(hw_irq, server, DEFAULT_PRIORITY);
+1 -1
arch/powerpc/sysdev/xics/ics-rtas.c
··· 47 47 if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS) 48 48 return; 49 49 50 - server = xics_get_irq_server(d->irq, d->affinity, 0); 50 + server = xics_get_irq_server(d->irq, irq_data_get_affinity_mask(d), 0); 51 51 52 52 call_status = rtas_call(ibm_set_xive, 3, 1, NULL, hw_irq, server, 53 53 DEFAULT_PRIORITY);
+1 -1
arch/powerpc/sysdev/xilinx_intc.c
··· 222 222 /* 223 223 * Support code for cascading to 8259 interrupt controllers 224 224 */ 225 - static void xilinx_i8259_cascade(unsigned int irq, struct irq_desc *desc) 225 + static void xilinx_i8259_cascade(struct irq_desc *desc) 226 226 { 227 227 struct irq_chip *chip = irq_desc_get_chip(desc); 228 228 unsigned int cascade_irq = i8259_irq();
-5
arch/s390/configs/zfcpdump_defconfig
··· 1 1 # CONFIG_SWAP is not set 2 2 CONFIG_NO_HZ=y 3 3 CONFIG_HIGH_RES_TIMERS=y 4 - CONFIG_RCU_FAST_NO_HZ=y 5 4 CONFIG_BLK_DEV_INITRD=y 6 5 CONFIG_CC_OPTIMIZE_FOR_SIZE=y 7 6 # CONFIG_COMPAT_BRK is not set ··· 53 54 # CONFIG_MONWRITER is not set 54 55 # CONFIG_S390_VMUR is not set 55 56 # CONFIG_HID is not set 56 - CONFIG_MEMSTICK=y 57 - CONFIG_MEMSTICK_DEBUG=y 58 - CONFIG_MEMSTICK_UNSAFE_RESUME=y 59 - CONFIG_MSPRO_BLOCK=y 60 57 # CONFIG_IOMMU_SUPPORT is not set 61 58 CONFIG_EXT2_FS=y 62 59 CONFIG_EXT3_FS=y
+1
arch/s390/include/asm/kvm_host.h
··· 210 210 u32 exit_validity; 211 211 u32 exit_instruction; 212 212 u32 halt_successful_poll; 213 + u32 halt_attempted_poll; 213 214 u32 halt_wakeup; 214 215 u32 instruction_lctl; 215 216 u32 instruction_lctlg;
-20
arch/s390/include/asm/unistd.h
··· 8 8 9 9 #include <uapi/asm/unistd.h> 10 10 11 - 12 11 #define __IGNORE_time 13 - 14 - /* Ignore system calls that are also reachable via sys_socketcall */ 15 - #define __IGNORE_recvmmsg 16 - #define __IGNORE_sendmmsg 17 - #define __IGNORE_socket 18 - #define __IGNORE_socketpair 19 - #define __IGNORE_bind 20 - #define __IGNORE_connect 21 - #define __IGNORE_listen 22 - #define __IGNORE_accept4 23 - #define __IGNORE_getsockopt 24 - #define __IGNORE_setsockopt 25 - #define __IGNORE_getsockname 26 - #define __IGNORE_getpeername 27 - #define __IGNORE_sendto 28 - #define __IGNORE_sendmsg 29 - #define __IGNORE_recvfrom 30 - #define __IGNORE_recvmsg 31 - #define __IGNORE_shutdown 32 12 33 13 #define __ARCH_WANT_OLD_READDIR 34 14 #define __ARCH_WANT_SYS_ALARM
+20 -1
arch/s390/include/uapi/asm/unistd.h
··· 290 290 #define __NR_s390_pci_mmio_write 352 291 291 #define __NR_s390_pci_mmio_read 353 292 292 #define __NR_execveat 354 293 - #define NR_syscalls 355 293 + #define __NR_userfaultfd 355 294 + #define __NR_membarrier 356 295 + #define __NR_recvmmsg 357 296 + #define __NR_sendmmsg 358 297 + #define __NR_socket 359 298 + #define __NR_socketpair 360 299 + #define __NR_bind 361 300 + #define __NR_connect 362 301 + #define __NR_listen 363 302 + #define __NR_accept4 364 303 + #define __NR_getsockopt 365 304 + #define __NR_setsockopt 366 305 + #define __NR_getsockname 367 306 + #define __NR_getpeername 368 307 + #define __NR_sendto 369 308 + #define __NR_sendmsg 370 309 + #define __NR_recvfrom 371 310 + #define __NR_recvmsg 372 311 + #define __NR_shutdown 373 312 + #define NR_syscalls 374 294 313 295 314 /* 296 315 * There are some system calls that are not present on 64 bit, some
+23 -4
arch/s390/kernel/compat_signal.c
··· 48 48 struct ucontext32 uc; 49 49 } rt_sigframe32; 50 50 51 + static inline void sigset_to_sigset32(unsigned long *set64, 52 + compat_sigset_word *set32) 53 + { 54 + set32[0] = (compat_sigset_word) set64[0]; 55 + set32[1] = (compat_sigset_word)(set64[0] >> 32); 56 + } 57 + 58 + static inline void sigset32_to_sigset(compat_sigset_word *set32, 59 + unsigned long *set64) 60 + { 61 + set64[0] = (unsigned long) set32[0] | ((unsigned long) set32[1] << 32); 62 + } 63 + 51 64 int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from) 52 65 { 53 66 int err; ··· 294 281 { 295 282 struct pt_regs *regs = task_pt_regs(current); 296 283 sigframe32 __user *frame = (sigframe32 __user *)regs->gprs[15]; 284 + compat_sigset_t cset; 297 285 sigset_t set; 298 286 299 - if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE32)) 287 + if (__copy_from_user(&cset.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE32)) 300 288 goto badframe; 289 + sigset32_to_sigset(cset.sig, set.sig); 301 290 set_current_blocked(&set); 302 291 save_fpu_regs(); 303 292 if (restore_sigregs32(regs, &frame->sregs)) ··· 317 302 { 318 303 struct pt_regs *regs = task_pt_regs(current); 319 304 rt_sigframe32 __user *frame = (rt_sigframe32 __user *)regs->gprs[15]; 305 + compat_sigset_t cset; 320 306 sigset_t set; 321 307 322 - if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) 308 + if (__copy_from_user(&cset, &frame->uc.uc_sigmask, sizeof(cset))) 323 309 goto badframe; 310 + sigset32_to_sigset(cset.sig, set.sig); 324 311 set_current_blocked(&set); 325 312 if (compat_restore_altstack(&frame->uc.uc_stack)) 326 313 goto badframe; ··· 394 377 return -EFAULT; 395 378 396 379 /* Create struct sigcontext32 on the signal stack */ 397 - memcpy(&sc.oldmask, &set->sig, _SIGMASK_COPY_SIZE32); 380 + sigset_to_sigset32(set->sig, sc.oldmask); 398 381 sc.sregs = (__u32)(unsigned long __force) &frame->sregs; 399 382 if (__copy_to_user(&frame->sc, &sc, sizeof(frame->sc))) 400 383 return -EFAULT; ··· 455 438 static int setup_rt_frame32(struct ksignal *ksig, sigset_t *set, 456 439 struct pt_regs *regs) 457 440 { 441 + compat_sigset_t cset; 458 442 rt_sigframe32 __user *frame; 459 443 unsigned long restorer; 460 444 size_t frame_size; ··· 503 485 store_sigregs(); 504 486 505 487 /* Create ucontext on the signal stack. */ 488 + sigset_to_sigset32(set->sig, cset.sig); 506 489 if (__put_user(uc_flags, &frame->uc.uc_flags) || 507 490 __put_user(0, &frame->uc.uc_link) || 508 491 __compat_save_altstack(&frame->uc.uc_stack, regs->gprs[15]) || 509 492 save_sigregs32(regs, &frame->uc.uc_mcontext) || 510 - __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)) || 493 + __copy_to_user(&frame->uc.uc_sigmask, &cset, sizeof(cset)) || 511 494 save_sigregs_ext32(regs, &frame->uc.uc_mcontext_ext)) 512 495 return -EFAULT; 513 496
+13 -57
arch/s390/kernel/compat_wrapper.c
··· 52 52 * the regular system call wrappers. 53 53 */ 54 54 #define COMPAT_SYSCALL_WRAPx(x, name, ...) \ 55 - asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ 56 - asmlinkage long compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__));\ 57 - asmlinkage long compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__)) \ 58 - { \ 59 - return sys##name(__MAP(x,__SC_COMPAT_CAST,__VA_ARGS__)); \ 60 - } 55 + asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ 56 + asmlinkage long notrace compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__));\ 57 + asmlinkage long notrace compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__)) \ 58 + { \ 59 + return sys##name(__MAP(x,__SC_COMPAT_CAST,__VA_ARGS__)); \ 60 + } 61 61 62 - COMPAT_SYSCALL_WRAP1(exit, int, error_code); 63 - COMPAT_SYSCALL_WRAP1(close, unsigned int, fd); 64 62 COMPAT_SYSCALL_WRAP2(creat, const char __user *, pathname, umode_t, mode); 65 63 COMPAT_SYSCALL_WRAP2(link, const char __user *, oldname, const char __user *, newname); 66 64 COMPAT_SYSCALL_WRAP1(unlink, const char __user *, pathname); ··· 66 68 COMPAT_SYSCALL_WRAP3(mknod, const char __user *, filename, umode_t, mode, unsigned, dev); 67 69 COMPAT_SYSCALL_WRAP2(chmod, const char __user *, filename, umode_t, mode); 68 70 COMPAT_SYSCALL_WRAP1(oldumount, char __user *, name); 69 - COMPAT_SYSCALL_WRAP1(alarm, unsigned int, seconds); 70 71 COMPAT_SYSCALL_WRAP2(access, const char __user *, filename, int, mode); 71 - COMPAT_SYSCALL_WRAP1(nice, int, increment); 72 - COMPAT_SYSCALL_WRAP2(kill, int, pid, int, sig); 73 72 COMPAT_SYSCALL_WRAP2(rename, const char __user *, oldname, const char __user *, newname); 74 73 COMPAT_SYSCALL_WRAP2(mkdir, const char __user *, pathname, umode_t, mode); 75 74 COMPAT_SYSCALL_WRAP1(rmdir, const char __user *, pathname); 76 - COMPAT_SYSCALL_WRAP1(dup, unsigned int, fildes); 77 75 COMPAT_SYSCALL_WRAP1(pipe, int __user *, fildes); 78 76 COMPAT_SYSCALL_WRAP1(brk, unsigned long, brk); 79 77 COMPAT_SYSCALL_WRAP2(signal, int, sig, __sighandler_t, handler); 80 78 COMPAT_SYSCALL_WRAP1(acct, const char __user *, name); 81 79 COMPAT_SYSCALL_WRAP2(umount, char __user *, name, int, flags); 82 - COMPAT_SYSCALL_WRAP2(setpgid, pid_t, pid, pid_t, pgid); 83 - COMPAT_SYSCALL_WRAP1(umask, int, mask); 84 80 COMPAT_SYSCALL_WRAP1(chroot, const char __user *, filename); 85 - COMPAT_SYSCALL_WRAP2(dup2, unsigned int, oldfd, unsigned int, newfd); 86 81 COMPAT_SYSCALL_WRAP3(sigsuspend, int, unused1, int, unused2, old_sigset_t, mask); 87 82 COMPAT_SYSCALL_WRAP2(sethostname, char __user *, name, int, len); 88 83 COMPAT_SYSCALL_WRAP2(symlink, const char __user *, old, const char __user *, new); ··· 84 93 COMPAT_SYSCALL_WRAP2(swapon, const char __user *, specialfile, int, swap_flags); 85 94 COMPAT_SYSCALL_WRAP4(reboot, int, magic1, int, magic2, unsigned int, cmd, void __user *, arg); 86 95 COMPAT_SYSCALL_WRAP2(munmap, unsigned long, addr, size_t, len); 87 - COMPAT_SYSCALL_WRAP2(fchmod, unsigned int, fd, umode_t, mode); 88 - COMPAT_SYSCALL_WRAP2(getpriority, int, which, int, who); 89 - COMPAT_SYSCALL_WRAP3(setpriority, int, which, int, who, int, niceval); 90 96 COMPAT_SYSCALL_WRAP3(syslog, int, type, char __user *, buf, int, len); 91 97 COMPAT_SYSCALL_WRAP1(swapoff, const char __user *, specialfile); 92 - COMPAT_SYSCALL_WRAP1(fsync, unsigned int, fd); 93 98 COMPAT_SYSCALL_WRAP2(setdomainname, char __user *, name, int, len); 94 99 COMPAT_SYSCALL_WRAP1(newuname, struct new_utsname __user *, name); 95 100 COMPAT_SYSCALL_WRAP3(mprotect, unsigned long, start, size_t, len, unsigned long, prot); 96 101 COMPAT_SYSCALL_WRAP3(init_module, void __user *, umod, unsigned long, len, const char __user *, uargs); 97 102 COMPAT_SYSCALL_WRAP2(delete_module, const char __user *, name_user, unsigned int, flags); 98 103 COMPAT_SYSCALL_WRAP4(quotactl, unsigned int, cmd, const char __user *, special, qid_t, id, void __user *, addr); 99 - COMPAT_SYSCALL_WRAP1(getpgid, pid_t, pid); 100 - COMPAT_SYSCALL_WRAP1(fchdir, unsigned int, fd); 101 104 COMPAT_SYSCALL_WRAP2(bdflush, int, func, long, data); 102 105 COMPAT_SYSCALL_WRAP3(sysfs, int, option, unsigned long, arg1, unsigned long, arg2); 103 - COMPAT_SYSCALL_WRAP1(s390_personality, unsigned int, personality); 104 106 COMPAT_SYSCALL_WRAP5(llseek, unsigned int, fd, unsigned long, high, unsigned long, low, loff_t __user *, result, unsigned int, whence); 105 - COMPAT_SYSCALL_WRAP2(flock, unsigned int, fd, unsigned int, cmd); 106 107 COMPAT_SYSCALL_WRAP3(msync, unsigned long, start, size_t, len, int, flags); 107 - COMPAT_SYSCALL_WRAP1(getsid, pid_t, pid); 108 - COMPAT_SYSCALL_WRAP1(fdatasync, unsigned int, fd); 109 108 COMPAT_SYSCALL_WRAP2(mlock, unsigned long, start, size_t, len); 110 109 COMPAT_SYSCALL_WRAP2(munlock, unsigned long, start, size_t, len); 111 - COMPAT_SYSCALL_WRAP1(mlockall, int, flags); 112 110 COMPAT_SYSCALL_WRAP2(sched_setparam, pid_t, pid, struct sched_param __user *, param); 113 111 COMPAT_SYSCALL_WRAP2(sched_getparam, pid_t, pid, struct sched_param __user *, param); 114 112 COMPAT_SYSCALL_WRAP3(sched_setscheduler, pid_t, pid, int, policy, struct sched_param __user *, param); 115 - COMPAT_SYSCALL_WRAP1(sched_getscheduler, pid_t, pid); 116 - COMPAT_SYSCALL_WRAP1(sched_get_priority_max, int, policy); 117 - COMPAT_SYSCALL_WRAP1(sched_get_priority_min, int, policy); 118 113 COMPAT_SYSCALL_WRAP5(mremap, unsigned long, addr, unsigned long, old_len, unsigned long, new_len, unsigned long, flags, unsigned long, new_addr); 119 114 COMPAT_SYSCALL_WRAP3(poll, struct pollfd __user *, ufds, unsigned int, nfds, int, timeout); 120 115 COMPAT_SYSCALL_WRAP5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, unsigned long, arg4, unsigned long, arg5); ··· 108 131 COMPAT_SYSCALL_WRAP2(capget, cap_user_header_t, header, cap_user_data_t, dataptr); 109 132 COMPAT_SYSCALL_WRAP2(capset, cap_user_header_t, header, const cap_user_data_t, data); 110 133 COMPAT_SYSCALL_WRAP3(lchown, const char __user *, filename, uid_t, user, gid_t, group); 111 - COMPAT_SYSCALL_WRAP2(setreuid, uid_t, ruid, uid_t, euid); 112 - COMPAT_SYSCALL_WRAP2(setregid, gid_t, rgid, gid_t, egid); 113 134 COMPAT_SYSCALL_WRAP2(getgroups, int, gidsetsize, gid_t __user *, grouplist); 114 135 COMPAT_SYSCALL_WRAP2(setgroups, int, gidsetsize, gid_t __user *, grouplist); 115 - COMPAT_SYSCALL_WRAP3(fchown, unsigned int, fd, uid_t, user, gid_t, group); 116 - COMPAT_SYSCALL_WRAP3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid); 117 136 COMPAT_SYSCALL_WRAP3(getresuid, uid_t __user *, ruid, uid_t __user *, euid, uid_t __user *, suid); 118 - COMPAT_SYSCALL_WRAP3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid); 119 137 COMPAT_SYSCALL_WRAP3(getresgid, gid_t __user *, rgid, gid_t __user *, egid, gid_t __user *, sgid); 120 138 COMPAT_SYSCALL_WRAP3(chown, const char __user *, filename, uid_t, user, gid_t, group); 121 - COMPAT_SYSCALL_WRAP1(setuid, uid_t, uid); 122 - COMPAT_SYSCALL_WRAP1(setgid, gid_t, gid); 123 - COMPAT_SYSCALL_WRAP1(setfsuid, uid_t, uid); 124 - COMPAT_SYSCALL_WRAP1(setfsgid, gid_t, gid); 125 139 COMPAT_SYSCALL_WRAP2(pivot_root, const char __user *, new_root, const char __user *, put_old); 126 140 COMPAT_SYSCALL_WRAP3(mincore, unsigned long, start, size_t, len, unsigned char __user *, vec); 127 141 COMPAT_SYSCALL_WRAP3(madvise, unsigned long, start, size_t, len, int, behavior); ··· 129 161 COMPAT_SYSCALL_WRAP2(removexattr, const char __user *, path, const char __user *, name); 130 162 COMPAT_SYSCALL_WRAP2(lremovexattr, const char __user *, path, const char __user *, name); 131 163 COMPAT_SYSCALL_WRAP2(fremovexattr, int, fd, const char __user *, name); 132 - COMPAT_SYSCALL_WRAP1(exit_group, int, error_code); 133 164 COMPAT_SYSCALL_WRAP1(set_tid_address, int __user *, tidptr); 134 - COMPAT_SYSCALL_WRAP1(epoll_create, int, size); 135 165 COMPAT_SYSCALL_WRAP4(epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event __user *, event); 136 166 COMPAT_SYSCALL_WRAP4(epoll_wait, int, epfd, struct epoll_event __user *, events, int, maxevents, int, timeout); 137 - COMPAT_SYSCALL_WRAP1(timer_getoverrun, timer_t, timer_id); 138 - COMPAT_SYSCALL_WRAP1(timer_delete, compat_timer_t, compat_timer_id); 139 167 COMPAT_SYSCALL_WRAP1(io_destroy, aio_context_t, ctx); 140 168 COMPAT_SYSCALL_WRAP3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb, struct io_event __user *, result); 141 169 COMPAT_SYSCALL_WRAP1(mq_unlink, const char __user *, name); 142 170 COMPAT_SYSCALL_WRAP5(add_key, const char __user *, tp, const char __user *, dsc, const void __user *, pld, size_t, len, key_serial_t, id); 143 171 COMPAT_SYSCALL_WRAP4(request_key, const char __user *, tp, const char __user *, dsc, const char __user *, info, key_serial_t, id); 144 172 COMPAT_SYSCALL_WRAP5(remap_file_pages, unsigned long, start, unsigned long, size, unsigned long, prot, unsigned long, pgoff, unsigned long, flags); 145 - COMPAT_SYSCALL_WRAP3(ioprio_set, int, which, int, who, int, ioprio); 146 - COMPAT_SYSCALL_WRAP2(ioprio_get, int, which, int, who); 147 173 COMPAT_SYSCALL_WRAP3(inotify_add_watch, int, fd, const char __user *, path, u32, mask); 148 - COMPAT_SYSCALL_WRAP2(inotify_rm_watch, int, fd, __s32, wd); 149 174 COMPAT_SYSCALL_WRAP3(mkdirat, int, dfd, const char __user *, pathname, umode_t, mode); 150 175 COMPAT_SYSCALL_WRAP4(mknodat, int, dfd, const char __user *, filename, umode_t, mode, unsigned, dev); 151 176 COMPAT_SYSCALL_WRAP5(fchownat, int, dfd, const char __user *, filename, uid_t, user, gid_t, group, int, flag); ··· 153 192 COMPAT_SYSCALL_WRAP6(splice, int, fd_in, loff_t __user *, off_in, int, fd_out, loff_t __user *, off_out, size_t, len, unsigned int, flags); 154 193 COMPAT_SYSCALL_WRAP4(tee, int, fdin, int, fdout, size_t, len, unsigned int, flags); 155 194 COMPAT_SYSCALL_WRAP3(getcpu, unsigned __user *, cpu, unsigned __user *, node, struct getcpu_cache __user *, cache); 156 - COMPAT_SYSCALL_WRAP1(eventfd, unsigned int, count); 157 - COMPAT_SYSCALL_WRAP2(timerfd_create, int, clockid, int, flags); 158 - COMPAT_SYSCALL_WRAP2(eventfd2, unsigned int, count, int, flags); 159 - COMPAT_SYSCALL_WRAP1(inotify_init1, int, flags); 160 195 COMPAT_SYSCALL_WRAP2(pipe2, int __user *, fildes, int, flags); 161 - COMPAT_SYSCALL_WRAP3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags); 162 - COMPAT_SYSCALL_WRAP1(epoll_create1, int, flags); 163 - COMPAT_SYSCALL_WRAP2(tkill, int, pid, int, sig); 164 - COMPAT_SYSCALL_WRAP3(tgkill, int, tgid, int, pid, int, sig); 165 196 COMPAT_SYSCALL_WRAP5(perf_event_open, struct perf_event_attr __user *, attr_uptr, pid_t, pid, int, cpu, int, group_fd, unsigned long, flags); 166 197 COMPAT_SYSCALL_WRAP5(clone, unsigned long, newsp, unsigned long, clone_flags, int __user *, parent_tidptr, int __user *, child_tidptr, unsigned long, tls); 167 - COMPAT_SYSCALL_WRAP2(fanotify_init, unsigned int, flags, unsigned int, event_f_flags); 168 198 COMPAT_SYSCALL_WRAP4(prlimit64, pid_t, pid, unsigned int, resource, const struct rlimit64 __user *, new_rlim, struct rlimit64 __user *, old_rlim); 169 199 COMPAT_SYSCALL_WRAP5(name_to_handle_at, int, dfd, const char __user *, name, struct file_handle __user *, handle, int __user *, mnt_id, int, flag); 170 - COMPAT_SYSCALL_WRAP1(syncfs, int, fd); 171 - COMPAT_SYSCALL_WRAP2(setns, int, fd, int, nstype); 172 - COMPAT_SYSCALL_WRAP2(s390_runtime_instr, int, command, int, signum); 173 200 COMPAT_SYSCALL_WRAP5(kcmp, pid_t, pid1, pid_t, pid2, int, type, unsigned long, idx1, unsigned long, idx2); 174 201 COMPAT_SYSCALL_WRAP3(finit_module, int, fd, const char __user *, uargs, int, flags); 175 202 COMPAT_SYSCALL_WRAP3(sched_setattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, flags); ··· 169 220 COMPAT_SYSCALL_WRAP3(bpf, int, cmd, union bpf_attr *, attr, unsigned int, size); 170 221 COMPAT_SYSCALL_WRAP3(s390_pci_mmio_write, const unsigned long, mmio_addr, const void __user *, user_buffer, const size_t, length); 171 222 COMPAT_SYSCALL_WRAP3(s390_pci_mmio_read, const unsigned long, mmio_addr, void __user *, user_buffer, const size_t, length); 223 + COMPAT_SYSCALL_WRAP4(socketpair, int, family, int, type, int, protocol, int __user *, usockvec); 224 + COMPAT_SYSCALL_WRAP3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen); 225 + COMPAT_SYSCALL_WRAP3(connect, int, fd, struct sockaddr __user *, uservaddr, int, addrlen); 226 + COMPAT_SYSCALL_WRAP4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr, int __user *, upeer_addrlen, int, flags); 227 + COMPAT_SYSCALL_WRAP3(getsockname, int, fd, struct sockaddr __user *, usockaddr, int __user *, usockaddr_len); 228 + COMPAT_SYSCALL_WRAP3(getpeername, int, fd, struct sockaddr __user *, usockaddr, int __user *, usockaddr_len); 229 + COMPAT_SYSCALL_WRAP6(sendto, int, fd, void __user *, buff, size_t, len, unsigned int, flags, struct sockaddr __user *, addr, int, addr_len);
+2
arch/s390/kernel/entry.S
··· 1191 1191 clg %r9,BASED(.Lcleanup_save_fpu_fpc_end) 1192 1192 jhe 1f 1193 1193 lg %r2,__LC_CURRENT 1194 + aghi %r2,__TASK_thread 1194 1195 0: # Store floating-point controls 1195 1196 stfpc __THREAD_FPU_fpc(%r2) 1196 1197 1: # Load register save area and check if VX is active ··· 1253 1252 clg %r9,BASED(.Lcleanup_load_fpu_regs_vx_ctl) 1254 1253 jhe 6f 1255 1254 lg %r4,__LC_CURRENT 1255 + aghi %r4,__TASK_thread 1256 1256 lfpc __THREAD_FPU_fpc(%r4) 1257 1257 tm __THREAD_FPU_flags+3(%r4),FPU_USE_VX # VX-enabled task ? 1258 1258 lg %r4,__THREAD_FPU_regs(%r4) # %r4 <- reg save area
+8 -4
arch/s390/kernel/perf_cpum_cf.c
··· 157 157 158 158 cpuhw = &get_cpu_var(cpu_hw_events); 159 159 160 - /* check authorization for cpu counter sets */ 160 + /* Check authorization for cpu counter sets. 161 + * If the particular CPU counter set is not authorized, 162 + * return with -ENOENT in order to fall back to other 163 + * PMUs that might suffice the event request. 164 + */ 161 165 ctrs_state = cpumf_state_ctl[hwc->config_base]; 162 166 if (!(ctrs_state & cpuhw->info.auth_ctl)) 163 - err = -EPERM; 167 + err = -ENOENT; 164 168 165 169 put_cpu_var(cpu_hw_events); 166 170 return err; ··· 540 536 */ 541 537 if (!(cpuhw->flags & PERF_EVENT_TXN)) 542 538 if (validate_ctr_auth(&event->hw)) 543 - return -EPERM; 539 + return -ENOENT; 544 540 545 541 ctr_set_enable(&cpuhw->state, event->hw.config_base); 546 542 event->hw.state = PERF_HES_UPTODATE | PERF_HES_STOPPED; ··· 615 611 state = cpuhw->state & ~((1 << CPUMF_LCCTL_ENABLE_SHIFT) - 1); 616 612 state >>= CPUMF_LCCTL_ENABLE_SHIFT; 617 613 if ((state & cpuhw->info.auth_ctl) != state) 618 - return -EPERM; 614 + return -ENOENT; 619 615 620 616 cpuhw->flags &= ~PERF_EVENT_TXN; 621 617 perf_pmu_enable(pmu);
+3 -35
arch/s390/kernel/swsusp.S
··· 30 30 aghi %r15,-STACK_FRAME_OVERHEAD 31 31 stg %r1,__SF_BACKCHAIN(%r15) 32 32 33 + /* Store FPU registers */ 34 + brasl %r14,save_fpu_regs 35 + 33 36 /* Deactivate DAT */ 34 37 stnsm __SF_EMPTY(%r15),0xfb 35 38 ··· 50 47 51 48 /* Store registers */ 52 49 mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */ 53 - stfpc 0x31c(%r1) /* store fpu control */ 54 - std 0,0x200(%r1) /* store f0 */ 55 - std 1,0x208(%r1) /* store f1 */ 56 - std 2,0x210(%r1) /* store f2 */ 57 - std 3,0x218(%r1) /* store f3 */ 58 - std 4,0x220(%r1) /* store f4 */ 59 - std 5,0x228(%r1) /* store f5 */ 60 - std 6,0x230(%r1) /* store f6 */ 61 - std 7,0x238(%r1) /* store f7 */ 62 - std 8,0x240(%r1) /* store f8 */ 63 - std 9,0x248(%r1) /* store f9 */ 64 - std 10,0x250(%r1) /* store f10 */ 65 - std 11,0x258(%r1) /* store f11 */ 66 - std 12,0x260(%r1) /* store f12 */ 67 - std 13,0x268(%r1) /* store f13 */ 68 - std 14,0x270(%r1) /* store f14 */ 69 - std 15,0x278(%r1) /* store f15 */ 70 50 stam %a0,%a15,0x340(%r1) /* store access registers */ 71 51 stctg %c0,%c15,0x380(%r1) /* store control registers */ 72 52 stmg %r0,%r15,0x280(%r1) /* store general registers */ ··· 234 248 235 249 lctlg %c0,%c15,0x380(%r13) /* load control registers */ 236 250 lam %a0,%a15,0x340(%r13) /* load access registers */ 237 - 238 - lfpc 0x31c(%r13) /* load fpu control */ 239 - ld 0,0x200(%r13) /* load f0 */ 240 - ld 1,0x208(%r13) /* load f1 */ 241 - ld 2,0x210(%r13) /* load f2 */ 242 - ld 3,0x218(%r13) /* load f3 */ 243 - ld 4,0x220(%r13) /* load f4 */ 244 - ld 5,0x228(%r13) /* load f5 */ 245 - ld 6,0x230(%r13) /* load f6 */ 246 - ld 7,0x238(%r13) /* load f7 */ 247 - ld 8,0x240(%r13) /* load f8 */ 248 - ld 9,0x248(%r13) /* load f9 */ 249 - ld 10,0x250(%r13) /* load f10 */ 250 - ld 11,0x258(%r13) /* load f11 */ 251 - ld 12,0x260(%r13) /* load f12 */ 252 - ld 13,0x268(%r13) /* load f13 */ 253 - ld 14,0x270(%r13) /* load f14 */ 254 - ld 15,0x278(%r13) /* load f15 */ 255 251 256 252 /* Load old stack */ 257 253 lg %r15,0x2f8(%r13)
+70 -51
arch/s390/kernel/syscalls.S
··· 9 9 #define NI_SYSCALL SYSCALL(sys_ni_syscall,sys_ni_syscall) 10 10 11 11 NI_SYSCALL /* 0 */ 12 - SYSCALL(sys_exit,compat_sys_exit) 12 + SYSCALL(sys_exit,sys_exit) 13 13 SYSCALL(sys_fork,sys_fork) 14 14 SYSCALL(sys_read,compat_sys_s390_read) 15 15 SYSCALL(sys_write,compat_sys_s390_write) 16 16 SYSCALL(sys_open,compat_sys_open) /* 5 */ 17 - SYSCALL(sys_close,compat_sys_close) 17 + SYSCALL(sys_close,sys_close) 18 18 SYSCALL(sys_restart_syscall,sys_restart_syscall) 19 19 SYSCALL(sys_creat,compat_sys_creat) 20 20 SYSCALL(sys_link,compat_sys_link) ··· 35 35 SYSCALL(sys_ni_syscall,compat_sys_s390_getuid16) /* old getuid16 syscall*/ 36 36 SYSCALL(sys_ni_syscall,compat_sys_stime) /* 25 old stime syscall */ 37 37 SYSCALL(sys_ptrace,compat_sys_ptrace) 38 - SYSCALL(sys_alarm,compat_sys_alarm) 38 + SYSCALL(sys_alarm,sys_alarm) 39 39 NI_SYSCALL /* old fstat syscall */ 40 40 SYSCALL(sys_pause,sys_pause) 41 41 SYSCALL(sys_utime,compat_sys_utime) /* 30 */ 42 42 NI_SYSCALL /* old stty syscall */ 43 43 NI_SYSCALL /* old gtty syscall */ 44 44 SYSCALL(sys_access,compat_sys_access) 45 - SYSCALL(sys_nice,compat_sys_nice) 45 + SYSCALL(sys_nice,sys_nice) 46 46 NI_SYSCALL /* 35 old ftime syscall */ 47 47 SYSCALL(sys_sync,sys_sync) 48 - SYSCALL(sys_kill,compat_sys_kill) 48 + SYSCALL(sys_kill,sys_kill) 49 49 SYSCALL(sys_rename,compat_sys_rename) 50 50 SYSCALL(sys_mkdir,compat_sys_mkdir) 51 51 SYSCALL(sys_rmdir,compat_sys_rmdir) /* 40 */ 52 - SYSCALL(sys_dup,compat_sys_dup) 52 + SYSCALL(sys_dup,sys_dup) 53 53 SYSCALL(sys_pipe,compat_sys_pipe) 54 54 SYSCALL(sys_times,compat_sys_times) 55 55 NI_SYSCALL /* old prof syscall */ ··· 65 65 SYSCALL(sys_ioctl,compat_sys_ioctl) 66 66 SYSCALL(sys_fcntl,compat_sys_fcntl) /* 55 */ 67 67 NI_SYSCALL /* intel mpx syscall */ 68 - SYSCALL(sys_setpgid,compat_sys_setpgid) 68 + SYSCALL(sys_setpgid,sys_setpgid) 69 69 NI_SYSCALL /* old ulimit syscall */ 70 70 NI_SYSCALL /* old uname syscall */ 71 - SYSCALL(sys_umask,compat_sys_umask) /* 60 */ 71 + SYSCALL(sys_umask,sys_umask) /* 60 */ 72 72 SYSCALL(sys_chroot,compat_sys_chroot) 73 73 SYSCALL(sys_ustat,compat_sys_ustat) 74 - SYSCALL(sys_dup2,compat_sys_dup2) 74 + SYSCALL(sys_dup2,sys_dup2) 75 75 SYSCALL(sys_getppid,sys_getppid) 76 76 SYSCALL(sys_getpgrp,sys_getpgrp) /* 65 */ 77 77 SYSCALL(sys_setsid,sys_setsid) ··· 102 102 SYSCALL(sys_munmap,compat_sys_munmap) 103 103 SYSCALL(sys_truncate,compat_sys_truncate) 104 104 SYSCALL(sys_ftruncate,compat_sys_ftruncate) 105 - SYSCALL(sys_fchmod,compat_sys_fchmod) 105 + SYSCALL(sys_fchmod,sys_fchmod) 106 106 SYSCALL(sys_ni_syscall,compat_sys_s390_fchown16) /* 95 old fchown16 syscall*/ 107 - SYSCALL(sys_getpriority,compat_sys_getpriority) 108 - SYSCALL(sys_setpriority,compat_sys_setpriority) 107 + SYSCALL(sys_getpriority,sys_getpriority) 108 + SYSCALL(sys_setpriority,sys_setpriority) 109 109 NI_SYSCALL /* old profil syscall */ 110 110 SYSCALL(sys_statfs,compat_sys_statfs) 111 111 SYSCALL(sys_fstatfs,compat_sys_fstatfs) /* 100 */ ··· 126 126 SYSCALL(sys_swapoff,compat_sys_swapoff) /* 115 */ 127 127 SYSCALL(sys_sysinfo,compat_sys_sysinfo) 128 128 SYSCALL(sys_s390_ipc,compat_sys_s390_ipc) 129 - SYSCALL(sys_fsync,compat_sys_fsync) 129 + SYSCALL(sys_fsync,sys_fsync) 130 130 SYSCALL(sys_sigreturn,compat_sys_sigreturn) 131 131 SYSCALL(sys_clone,compat_sys_clone) /* 120 */ 132 132 SYSCALL(sys_setdomainname,compat_sys_setdomainname) ··· 140 140 SYSCALL(sys_delete_module,compat_sys_delete_module) 141 141 NI_SYSCALL /* 130: old get_kernel_syms */ 142 142 SYSCALL(sys_quotactl,compat_sys_quotactl) 143 - SYSCALL(sys_getpgid,compat_sys_getpgid) 144 - SYSCALL(sys_fchdir,compat_sys_fchdir) 143 + SYSCALL(sys_getpgid,sys_getpgid) 144 + SYSCALL(sys_fchdir,sys_fchdir) 145 145 SYSCALL(sys_bdflush,compat_sys_bdflush) 146 146 SYSCALL(sys_sysfs,compat_sys_sysfs) /* 135 */ 147 - SYSCALL(sys_s390_personality,compat_sys_s390_personality) 147 + SYSCALL(sys_s390_personality,sys_s390_personality) 148 148 NI_SYSCALL /* for afs_syscall */ 149 149 SYSCALL(sys_ni_syscall,compat_sys_s390_setfsuid16) /* old setfsuid16 syscall */ 150 150 SYSCALL(sys_ni_syscall,compat_sys_s390_setfsgid16) /* old setfsgid16 syscall */ 151 151 SYSCALL(sys_llseek,compat_sys_llseek) /* 140 */ 152 152 SYSCALL(sys_getdents,compat_sys_getdents) 153 153 SYSCALL(sys_select,compat_sys_select) 154 - SYSCALL(sys_flock,compat_sys_flock) 154 + SYSCALL(sys_flock,sys_flock) 155 155 SYSCALL(sys_msync,compat_sys_msync) 156 156 SYSCALL(sys_readv,compat_sys_readv) /* 145 */ 157 157 SYSCALL(sys_writev,compat_sys_writev) 158 - SYSCALL(sys_getsid,compat_sys_getsid) 159 - SYSCALL(sys_fdatasync,compat_sys_fdatasync) 158 + SYSCALL(sys_getsid,sys_getsid) 159 + SYSCALL(sys_fdatasync,sys_fdatasync) 160 160 SYSCALL(sys_sysctl,compat_sys_sysctl) 161 161 SYSCALL(sys_mlock,compat_sys_mlock) /* 150 */ 162 162 SYSCALL(sys_munlock,compat_sys_munlock) 163 - SYSCALL(sys_mlockall,compat_sys_mlockall) 163 + SYSCALL(sys_mlockall,sys_mlockall) 164 164 SYSCALL(sys_munlockall,sys_munlockall) 165 165 SYSCALL(sys_sched_setparam,compat_sys_sched_setparam) 166 166 SYSCALL(sys_sched_getparam,compat_sys_sched_getparam) /* 155 */ 167 167 SYSCALL(sys_sched_setscheduler,compat_sys_sched_setscheduler) 168 - SYSCALL(sys_sched_getscheduler,compat_sys_sched_getscheduler) 168 + SYSCALL(sys_sched_getscheduler,sys_sched_getscheduler) 169 169 SYSCALL(sys_sched_yield,sys_sched_yield) 170 - SYSCALL(sys_sched_get_priority_max,compat_sys_sched_get_priority_max) 171 - SYSCALL(sys_sched_get_priority_min,compat_sys_sched_get_priority_min) /* 160 */ 170 + SYSCALL(sys_sched_get_priority_max,sys_sched_get_priority_max) 171 + SYSCALL(sys_sched_get_priority_min,sys_sched_get_priority_min) /* 160 */ 172 172 SYSCALL(sys_sched_rr_get_interval,compat_sys_sched_rr_get_interval) 173 173 SYSCALL(sys_nanosleep,compat_sys_nanosleep) 174 174 SYSCALL(sys_mremap,compat_sys_mremap) ··· 211 211 SYSCALL(sys_getgid,sys_getgid) /* 200 */ 212 212 SYSCALL(sys_geteuid,sys_geteuid) 213 213 SYSCALL(sys_getegid,sys_getegid) 214 - SYSCALL(sys_setreuid,compat_sys_setreuid) 215 - SYSCALL(sys_setregid,compat_sys_setregid) 214 + SYSCALL(sys_setreuid,sys_setreuid) 215 + SYSCALL(sys_setregid,sys_setregid) 216 216 SYSCALL(sys_getgroups,compat_sys_getgroups) /* 205 */ 217 217 SYSCALL(sys_setgroups,compat_sys_setgroups) 218 - SYSCALL(sys_fchown,compat_sys_fchown) 219 - SYSCALL(sys_setresuid,compat_sys_setresuid) 218 + SYSCALL(sys_fchown,sys_fchown) 219 + SYSCALL(sys_setresuid,sys_setresuid) 220 220 SYSCALL(sys_getresuid,compat_sys_getresuid) 221 - SYSCALL(sys_setresgid,compat_sys_setresgid) /* 210 */ 221 + SYSCALL(sys_setresgid,sys_setresgid) /* 210 */ 222 222 SYSCALL(sys_getresgid,compat_sys_getresgid) 223 223 SYSCALL(sys_chown,compat_sys_chown) 224 - SYSCALL(sys_setuid,compat_sys_setuid) 225 - SYSCALL(sys_setgid,compat_sys_setgid) 226 - SYSCALL(sys_setfsuid,compat_sys_setfsuid) /* 215 */ 227 - SYSCALL(sys_setfsgid,compat_sys_setfsgid) 224 + SYSCALL(sys_setuid,sys_setuid) 225 + SYSCALL(sys_setgid,sys_setgid) 226 + SYSCALL(sys_setfsuid,sys_setfsuid) /* 215 */ 227 + SYSCALL(sys_setfsgid,sys_setfsgid) 228 228 SYSCALL(sys_pivot_root,compat_sys_pivot_root) 229 229 SYSCALL(sys_mincore,compat_sys_mincore) 230 230 SYSCALL(sys_madvise,compat_sys_madvise) ··· 245 245 SYSCALL(sys_lremovexattr,compat_sys_lremovexattr) 246 246 SYSCALL(sys_fremovexattr,compat_sys_fremovexattr) /* 235 */ 247 247 SYSCALL(sys_gettid,sys_gettid) 248 - SYSCALL(sys_tkill,compat_sys_tkill) 248 + SYSCALL(sys_tkill,sys_tkill) 249 249 SYSCALL(sys_futex,compat_sys_futex) 250 250 SYSCALL(sys_sched_setaffinity,compat_sys_sched_setaffinity) 251 251 SYSCALL(sys_sched_getaffinity,compat_sys_sched_getaffinity) /* 240 */ 252 - SYSCALL(sys_tgkill,compat_sys_tgkill) 252 + SYSCALL(sys_tgkill,sys_tgkill) 253 253 NI_SYSCALL /* reserved for TUX */ 254 254 SYSCALL(sys_io_setup,compat_sys_io_setup) 255 255 SYSCALL(sys_io_destroy,compat_sys_io_destroy) 256 256 SYSCALL(sys_io_getevents,compat_sys_io_getevents) /* 245 */ 257 257 SYSCALL(sys_io_submit,compat_sys_io_submit) 258 258 SYSCALL(sys_io_cancel,compat_sys_io_cancel) 259 - SYSCALL(sys_exit_group,compat_sys_exit_group) 260 - SYSCALL(sys_epoll_create,compat_sys_epoll_create) 259 + SYSCALL(sys_exit_group,sys_exit_group) 260 + SYSCALL(sys_epoll_create,sys_epoll_create) 261 261 SYSCALL(sys_epoll_ctl,compat_sys_epoll_ctl) /* 250 */ 262 262 SYSCALL(sys_epoll_wait,compat_sys_epoll_wait) 263 263 SYSCALL(sys_set_tid_address,compat_sys_set_tid_address) ··· 265 265 SYSCALL(sys_timer_create,compat_sys_timer_create) 266 266 SYSCALL(sys_timer_settime,compat_sys_timer_settime) /* 255 */ 267 267 SYSCALL(sys_timer_gettime,compat_sys_timer_gettime) 268 - SYSCALL(sys_timer_getoverrun,compat_sys_timer_getoverrun) 269 - SYSCALL(sys_timer_delete,compat_sys_timer_delete) 268 + SYSCALL(sys_timer_getoverrun,sys_timer_getoverrun) 269 + SYSCALL(sys_timer_delete,sys_timer_delete) 270 270 SYSCALL(sys_clock_settime,compat_sys_clock_settime) 271 271 SYSCALL(sys_clock_gettime,compat_sys_clock_gettime) /* 260 */ 272 272 SYSCALL(sys_clock_getres,compat_sys_clock_getres) ··· 290 290 SYSCALL(sys_request_key,compat_sys_request_key) 291 291 SYSCALL(sys_keyctl,compat_sys_keyctl) /* 280 */ 292 292 SYSCALL(sys_waitid,compat_sys_waitid) 293 - SYSCALL(sys_ioprio_set,compat_sys_ioprio_set) 294 - SYSCALL(sys_ioprio_get,compat_sys_ioprio_get) 293 + SYSCALL(sys_ioprio_set,sys_ioprio_set) 294 + SYSCALL(sys_ioprio_get,sys_ioprio_get) 295 295 SYSCALL(sys_inotify_init,sys_inotify_init) 296 296 SYSCALL(sys_inotify_add_watch,compat_sys_inotify_add_watch) /* 285 */ 297 - SYSCALL(sys_inotify_rm_watch,compat_sys_inotify_rm_watch) 297 + SYSCALL(sys_inotify_rm_watch,sys_inotify_rm_watch) 298 298 SYSCALL(sys_migrate_pages,compat_sys_migrate_pages) 299 299 SYSCALL(sys_openat,compat_sys_openat) 300 300 SYSCALL(sys_mkdirat,compat_sys_mkdirat) ··· 326 326 SYSCALL(sys_utimensat,compat_sys_utimensat) /* 315 */ 327 327 SYSCALL(sys_signalfd,compat_sys_signalfd) 328 328 NI_SYSCALL /* 317 old sys_timer_fd */ 329 - SYSCALL(sys_eventfd,compat_sys_eventfd) 330 - SYSCALL(sys_timerfd_create,compat_sys_timerfd_create) 329 + SYSCALL(sys_eventfd,sys_eventfd) 330 + SYSCALL(sys_timerfd_create,sys_timerfd_create) 331 331 SYSCALL(sys_timerfd_settime,compat_sys_timerfd_settime) /* 320 */ 332 332 SYSCALL(sys_timerfd_gettime,compat_sys_timerfd_gettime) 333 333 SYSCALL(sys_signalfd4,compat_sys_signalfd4) 334 - SYSCALL(sys_eventfd2,compat_sys_eventfd2) 335 - SYSCALL(sys_inotify_init1,compat_sys_inotify_init1) 334 + SYSCALL(sys_eventfd2,sys_eventfd2) 335 + SYSCALL(sys_inotify_init1,sys_inotify_init1) 336 336 SYSCALL(sys_pipe2,compat_sys_pipe2) /* 325 */ 337 - SYSCALL(sys_dup3,compat_sys_dup3) 338 - SYSCALL(sys_epoll_create1,compat_sys_epoll_create1) 337 + SYSCALL(sys_dup3,sys_dup3) 338 + SYSCALL(sys_epoll_create1,sys_epoll_create1) 339 339 SYSCALL(sys_preadv,compat_sys_preadv) 340 340 SYSCALL(sys_pwritev,compat_sys_pwritev) 341 341 SYSCALL(sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo) /* 330 */ 342 342 SYSCALL(sys_perf_event_open,compat_sys_perf_event_open) 343 - SYSCALL(sys_fanotify_init,compat_sys_fanotify_init) 343 + SYSCALL(sys_fanotify_init,sys_fanotify_init) 344 344 SYSCALL(sys_fanotify_mark,compat_sys_fanotify_mark) 345 345 SYSCALL(sys_prlimit64,compat_sys_prlimit64) 346 346 SYSCALL(sys_name_to_handle_at,compat_sys_name_to_handle_at) /* 335 */ 347 347 SYSCALL(sys_open_by_handle_at,compat_sys_open_by_handle_at) 348 348 SYSCALL(sys_clock_adjtime,compat_sys_clock_adjtime) 349 - SYSCALL(sys_syncfs,compat_sys_syncfs) 350 - SYSCALL(sys_setns,compat_sys_setns) 349 + SYSCALL(sys_syncfs,sys_syncfs) 350 + SYSCALL(sys_setns,sys_setns) 351 351 SYSCALL(sys_process_vm_readv,compat_sys_process_vm_readv) /* 340 */ 352 352 SYSCALL(sys_process_vm_writev,compat_sys_process_vm_writev) 353 - SYSCALL(sys_s390_runtime_instr,compat_sys_s390_runtime_instr) 353 + SYSCALL(sys_s390_runtime_instr,sys_s390_runtime_instr) 354 354 SYSCALL(sys_kcmp,compat_sys_kcmp) 355 355 SYSCALL(sys_finit_module,compat_sys_finit_module) 356 356 SYSCALL(sys_sched_setattr,compat_sys_sched_setattr) /* 345 */ ··· 363 363 SYSCALL(sys_s390_pci_mmio_write,compat_sys_s390_pci_mmio_write) 364 364 SYSCALL(sys_s390_pci_mmio_read,compat_sys_s390_pci_mmio_read) 365 365 SYSCALL(sys_execveat,compat_sys_execveat) 366 + SYSCALL(sys_userfaultfd,sys_userfaultfd) /* 355 */ 367 + SYSCALL(sys_membarrier,sys_membarrier) 368 + SYSCALL(sys_recvmmsg,compat_sys_recvmmsg) 369 + SYSCALL(sys_sendmmsg,compat_sys_sendmmsg) 370 + SYSCALL(sys_socket,sys_socket) 371 + SYSCALL(sys_socketpair,compat_sys_socketpair) /* 360 */ 372 + SYSCALL(sys_bind,sys_bind) 373 + SYSCALL(sys_connect,sys_connect) 374 + SYSCALL(sys_listen,sys_listen) 375 + SYSCALL(sys_accept4,sys_accept4) 376 + SYSCALL(sys_getsockopt,compat_sys_getsockopt) /* 365 */ 377 + SYSCALL(sys_setsockopt,compat_sys_setsockopt) 378 + SYSCALL(sys_getsockname,compat_sys_getsockname) 379 + SYSCALL(sys_getpeername,compat_sys_getpeername) 380 + SYSCALL(sys_sendto,compat_sys_sendto) 381 + SYSCALL(sys_sendmsg,compat_sys_sendmsg) /* 370 */ 382 + SYSCALL(sys_recvfrom,compat_sys_recvfrom) 383 + SYSCALL(sys_recvmsg,compat_sys_recvmsg) 384 + SYSCALL(sys_shutdown,sys_shutdown)
+8 -4
arch/s390/kernel/vtime.c
··· 89 89 if (smp_cpu_mtid && 90 90 time_after64(jiffies_64, __this_cpu_read(mt_scaling_jiffies))) { 91 91 u64 cycles_new[32], *cycles_old; 92 - u64 delta, mult, div; 92 + u64 delta, fac, mult, div; 93 93 94 94 cycles_old = this_cpu_ptr(mt_cycles); 95 95 if (stcctm5(smp_cpu_mtid + 1, cycles_new) < 2) { 96 + fac = 1; 96 97 mult = div = 0; 97 98 for (i = 0; i <= smp_cpu_mtid; i++) { 98 99 delta = cycles_new[i] - cycles_old[i]; 99 - mult += delta; 100 - div += (i + 1) * delta; 100 + div += delta; 101 + mult *= i + 1; 102 + mult += delta * fac; 103 + fac *= i + 1; 101 104 } 102 - if (mult > 0) { 105 + div *= fac; 106 + if (div > 0) { 103 107 /* Update scaling factor */ 104 108 __this_cpu_write(mt_scaling_mult, mult); 105 109 __this_cpu_write(mt_scaling_div, div);
+2 -1
arch/s390/kvm/kvm-s390.c
··· 63 63 { "exit_program_interruption", VCPU_STAT(exit_program_interruption) }, 64 64 { "exit_instr_and_program_int", VCPU_STAT(exit_instr_and_program) }, 65 65 { "halt_successful_poll", VCPU_STAT(halt_successful_poll) }, 66 + { "halt_attempted_poll", VCPU_STAT(halt_attempted_poll) }, 66 67 { "halt_wakeup", VCPU_STAT(halt_wakeup) }, 67 68 { "instruction_lctlg", VCPU_STAT(instruction_lctlg) }, 68 69 { "instruction_lctl", VCPU_STAT(instruction_lctl) }, ··· 1575 1574 1576 1575 static void kvm_s390_vcpu_request_handled(struct kvm_vcpu *vcpu) 1577 1576 { 1578 - atomic_or(PROG_REQUEST, &vcpu->arch.sie_block->prog20); 1577 + atomic_andnot(PROG_REQUEST, &vcpu->arch.sie_block->prog20); 1579 1578 } 1580 1579 1581 1580 /*
+1 -1
arch/sh/boards/mach-se/7343/irq.c
··· 29 29 static void __iomem *se7343_irq_regs; 30 30 struct irq_domain *se7343_irq_domain; 31 31 32 - static void se7343_irq_demux(unsigned int irq, struct irq_desc *desc) 32 + static void se7343_irq_demux(struct irq_desc *desc) 33 33 { 34 34 struct irq_data *data = irq_desc_get_irq_data(desc); 35 35 struct irq_chip *chip = irq_data_get_irq_chip(data);
+1 -1
arch/sh/boards/mach-se/7722/irq.c
··· 28 28 static void __iomem *se7722_irq_regs; 29 29 struct irq_domain *se7722_irq_domain; 30 30 31 - static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc) 31 + static void se7722_irq_demux(struct irq_desc *desc) 32 32 { 33 33 struct irq_data *data = irq_desc_get_irq_data(desc); 34 34 struct irq_chip *chip = irq_data_get_irq_chip(data);
+1 -1
arch/sh/boards/mach-se/7724/irq.c
··· 92 92 .irq_unmask = enable_se7724_irq, 93 93 }; 94 94 95 - static void se7724_irq_demux(unsigned int __irq, struct irq_desc *desc) 95 + static void se7724_irq_demux(struct irq_desc *desc) 96 96 { 97 97 unsigned int irq = irq_desc_get_irq(desc); 98 98 struct fpga_irq set = get_fpga_irq(irq);
+1 -1
arch/sh/boards/mach-x3proto/gpio.c
··· 60 60 return virq; 61 61 } 62 62 63 - static void x3proto_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 63 + static void x3proto_gpio_irq_handler(struct irq_desc *desc) 64 64 { 65 65 struct irq_data *data = irq_desc_get_irq_data(desc); 66 66 struct irq_chip *chip = irq_data_get_irq_chip(data);
+1 -1
arch/sh/cchips/hd6446x/hd64461.c
··· 56 56 .irq_unmask = hd64461_unmask_irq, 57 57 }; 58 58 59 - static void hd64461_irq_demux(unsigned int irq, struct irq_desc *desc) 59 + static void hd64461_irq_demux(struct irq_desc *desc) 60 60 { 61 61 unsigned short intv = __raw_readw(HD64461_NIRR); 62 62 unsigned int ext_irq = HD64461_IRQBASE;
+1 -1
arch/sparc/kernel/leon_kernel.c
··· 53 53 } 54 54 55 55 /* Handle one or multiple IRQs from the extended interrupt controller */ 56 - static void leon_handle_ext_irq(unsigned int irq, struct irq_desc *desc) 56 + static void leon_handle_ext_irq(struct irq_desc *desc) 57 57 { 58 58 unsigned int eirq; 59 59 struct irq_bucket *p;
+1 -1
arch/sparc/kernel/leon_pci_grpci1.c
··· 357 357 }; 358 358 359 359 /* Handle one or multiple IRQs from the PCI core */ 360 - static void grpci1_pci_flow_irq(unsigned int irq, struct irq_desc *desc) 360 + static void grpci1_pci_flow_irq(struct irq_desc *desc) 361 361 { 362 362 struct grpci1_priv *priv = grpci1priv; 363 363 int i, ack = 0;
+1 -1
arch/sparc/kernel/leon_pci_grpci2.c
··· 498 498 }; 499 499 500 500 /* Handle one or multiple IRQs from the PCI core */ 501 - static void grpci2_pci_flow_irq(unsigned int irq, struct irq_desc *desc) 501 + static void grpci2_pci_flow_irq(struct irq_desc *desc) 502 502 { 503 503 struct grpci2_priv *priv = grpci2priv; 504 504 int i, ack = 0;
+2 -3
arch/tile/kernel/pci_gx.c
··· 304 304 * to Linux which just calls handle_level_irq() after clearing the 305 305 * MAC INTx Assert status bit associated with this interrupt. 306 306 */ 307 - static void trio_handle_level_irq(unsigned int __irq, struct irq_desc *desc) 307 + static void trio_handle_level_irq(struct irq_desc *desc) 308 308 { 309 309 struct pci_controller *controller = irq_desc_get_handler_data(desc); 310 310 gxio_trio_context_t *trio_context = controller->trio; 311 311 uint64_t intx = (uint64_t)irq_desc_get_chip_data(desc); 312 - unsigned int irq = irq_desc_get_irq(desc); 313 312 int mac = controller->mac; 314 313 unsigned int reg_offset; 315 314 uint64_t level_mask; 316 315 317 - handle_level_irq(irq, desc); 316 + handle_level_irq(desc); 318 317 319 318 /* 320 319 * Clear the INTx Level status, otherwise future interrupts are
+1 -1
arch/unicore32/kernel/irq.c
··· 112 112 * irq_controller_lock held, and IRQs disabled. Decode the IRQ 113 113 * and call the handler. 114 114 */ 115 - static void puv3_gpio_handler(unsigned int __irq, struct irq_desc *desc) 115 + static void puv3_gpio_handler(struct irq_desc *desc) 116 116 { 117 117 unsigned int mask, irq; 118 118
+1
arch/x86/include/asm/kvm_host.h
··· 711 711 u32 nmi_window_exits; 712 712 u32 halt_exits; 713 713 u32 halt_successful_poll; 714 + u32 halt_attempted_poll; 714 715 u32 halt_wakeup; 715 716 u32 request_irq_exits; 716 717 u32 irq_exits;
+1 -3
arch/x86/kernel/apic/vector.c
··· 489 489 490 490 err = assign_irq_vector(irq, data, dest); 491 491 if (err) { 492 - struct irq_data *top = irq_get_irq_data(irq); 493 - 494 492 if (assign_irq_vector(irq, data, 495 - irq_data_get_affinity_mask(top))) 493 + irq_data_get_affinity_mask(irq_data))) 496 494 pr_err("Failed to recover vector for irq %d\n", irq); 497 495 return err; 498 496 }
+7 -12
arch/x86/kernel/irq_32.c
··· 68 68 return (void *)(current_stack_pointer() & ~(THREAD_SIZE - 1)); 69 69 } 70 70 71 - static inline int 72 - execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) 71 + static inline int execute_on_irq_stack(int overflow, struct irq_desc *desc) 73 72 { 74 73 struct irq_stack *curstk, *irqstk; 75 - u32 *isp, *prev_esp, arg1, arg2; 74 + u32 *isp, *prev_esp, arg1; 76 75 77 76 curstk = (struct irq_stack *) current_stack(); 78 77 irqstk = __this_cpu_read(hardirq_stack); ··· 97 98 asm volatile("xchgl %%ebx,%%esp \n" 98 99 "call *%%edi \n" 99 100 "movl %%ebx,%%esp \n" 100 - : "=a" (arg1), "=d" (arg2), "=b" (isp) 101 - : "0" (irq), "1" (desc), "2" (isp), 101 + : "=a" (arg1), "=b" (isp) 102 + : "0" (desc), "1" (isp), 102 103 "D" (desc->handle_irq) 103 104 : "memory", "cc", "ecx"); 104 105 return 1; ··· 149 150 150 151 bool handle_irq(struct irq_desc *desc, struct pt_regs *regs) 151 152 { 152 - unsigned int irq; 153 - int overflow; 154 - 155 - overflow = check_stack_overflow(); 153 + int overflow = check_stack_overflow(); 156 154 157 155 if (IS_ERR_OR_NULL(desc)) 158 156 return false; 159 157 160 - irq = irq_desc_get_irq(desc); 161 - if (user_mode(regs) || !execute_on_irq_stack(overflow, desc, irq)) { 158 + if (user_mode(regs) || !execute_on_irq_stack(overflow, desc)) { 162 159 if (unlikely(overflow)) 163 160 print_stack_overflow(); 164 - generic_handle_irq_desc(irq, desc); 161 + generic_handle_irq_desc(desc); 165 162 } 166 163 167 164 return true;
+1 -1
arch/x86/kernel/irq_64.c
··· 75 75 if (unlikely(IS_ERR_OR_NULL(desc))) 76 76 return false; 77 77 78 - generic_handle_irq_desc(irq_desc_get_irq(desc), desc); 78 + generic_handle_irq_desc(desc); 79 79 return true; 80 80 }
+1 -1
arch/x86/kernel/pci-dma.c
··· 131 131 132 132 bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp) 133 133 { 134 - *gfp = dma_alloc_coherent_gfp_flags(*dev, *gfp); 135 134 *gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); 135 + *gfp = dma_alloc_coherent_gfp_flags(*dev, *gfp); 136 136 137 137 if (!*dev) 138 138 *dev = &x86_dma_fallback_dev;
+2
arch/x86/kvm/vmx.c
··· 6064 6064 memcpy(vmx_msr_bitmap_longmode_x2apic, 6065 6065 vmx_msr_bitmap_longmode, PAGE_SIZE); 6066 6066 6067 + set_bit(0, vmx_vpid_bitmap); /* 0 is reserved for host */ 6068 + 6067 6069 if (enable_apicv) { 6068 6070 for (msr = 0x800; msr <= 0x8ff; msr++) 6069 6071 vmx_disable_intercept_msr_read_x2apic(msr);
+1
arch/x86/kvm/x86.c
··· 149 149 { "nmi_window", VCPU_STAT(nmi_window_exits) }, 150 150 { "halt_exits", VCPU_STAT(halt_exits) }, 151 151 { "halt_successful_poll", VCPU_STAT(halt_successful_poll) }, 152 + { "halt_attempted_poll", VCPU_STAT(halt_attempted_poll) }, 152 153 { "halt_wakeup", VCPU_STAT(halt_wakeup) }, 153 154 { "hypercalls", VCPU_STAT(hypercalls) }, 154 155 { "request_irq", VCPU_STAT(request_irq_exits) },
+1 -1
arch/x86/lguest/boot.c
··· 1015 1015 * This is the Guest timer interrupt handler (hardware interrupt 0). We just 1016 1016 * call the clockevent infrastructure and it does whatever needs doing. 1017 1017 */ 1018 - static void lguest_time_irq(unsigned int irq, struct irq_desc *desc) 1018 + static void lguest_time_irq(struct irq_desc *desc) 1019 1019 { 1020 1020 unsigned long flags; 1021 1021
+5
block/bio-integrity.c
··· 140 140 141 141 iv = bip->bip_vec + bip->bip_vcnt; 142 142 143 + if (bip->bip_vcnt && 144 + bvec_gap_to_prev(bdev_get_queue(bio->bi_bdev), 145 + &bip->bip_vec[bip->bip_vcnt - 1], offset)) 146 + return 0; 147 + 143 148 iv->bv_page = page; 144 149 iv->bv_len = len; 145 150 iv->bv_offset = offset;
+3
block/blk-cgroup.c
··· 370 370 blkg_destroy(blkg); 371 371 spin_unlock(&blkcg->lock); 372 372 } 373 + 374 + q->root_blkg = NULL; 375 + q->root_rl.blkg = NULL; 373 376 } 374 377 375 378 /*
+3
block/blk-integrity.c
··· 204 204 q->limits.max_integrity_segments) 205 205 return false; 206 206 207 + if (integrity_req_gap_back_merge(req, next->bio)) 208 + return false; 209 + 207 210 return true; 208 211 } 209 212 EXPORT_SYMBOL(blk_integrity_merge_rq);
+24 -2
block/blk-map.c
··· 9 9 10 10 #include "blk.h" 11 11 12 + static bool iovec_gap_to_prv(struct request_queue *q, 13 + struct iovec *prv, struct iovec *cur) 14 + { 15 + unsigned long prev_end; 16 + 17 + if (!queue_virt_boundary(q)) 18 + return false; 19 + 20 + if (prv->iov_base == NULL && prv->iov_len == 0) 21 + /* prv is not set - don't check */ 22 + return false; 23 + 24 + prev_end = (unsigned long)(prv->iov_base + prv->iov_len); 25 + 26 + return (((unsigned long)cur->iov_base & queue_virt_boundary(q)) || 27 + prev_end & queue_virt_boundary(q)); 28 + } 29 + 12 30 int blk_rq_append_bio(struct request_queue *q, struct request *rq, 13 31 struct bio *bio) 14 32 { ··· 85 67 struct bio *bio; 86 68 int unaligned = 0; 87 69 struct iov_iter i; 88 - struct iovec iov; 70 + struct iovec iov, prv = {.iov_base = NULL, .iov_len = 0}; 89 71 90 72 if (!iter || !iter->count) 91 73 return -EINVAL; ··· 99 81 /* 100 82 * Keep going so we check length of all segments 101 83 */ 102 - if (uaddr & queue_dma_alignment(q)) 84 + if ((uaddr & queue_dma_alignment(q)) || 85 + iovec_gap_to_prv(q, &prv, &iov)) 103 86 unaligned = 1; 87 + 88 + prv.iov_base = iov.iov_base; 89 + prv.iov_len = iov.iov_len; 104 90 } 105 91 106 92 if (unaligned || (q->dma_pad_mask & iter->count) || map_data)
+23 -36
block/blk-merge.c
··· 66 66 struct bio *bio, 67 67 struct bio_set *bs) 68 68 { 69 - struct bio *split; 70 - struct bio_vec bv, bvprv; 69 + struct bio_vec bv, bvprv, *bvprvp = NULL; 71 70 struct bvec_iter iter; 72 71 unsigned seg_size = 0, nsegs = 0, sectors = 0; 73 - int prev = 0; 74 72 75 73 bio_for_each_segment(bv, bio, iter) { 76 - sectors += bv.bv_len >> 9; 77 - 78 - if (sectors > queue_max_sectors(q)) 74 + if (sectors + (bv.bv_len >> 9) > queue_max_sectors(q)) 79 75 goto split; 80 76 81 77 /* 82 78 * If the queue doesn't support SG gaps and adding this 83 79 * offset would create a gap, disallow it. 84 80 */ 85 - if (prev && bvec_gap_to_prev(q, &bvprv, bv.bv_offset)) 81 + if (bvprvp && bvec_gap_to_prev(q, bvprvp, bv.bv_offset)) 86 82 goto split; 87 83 88 - if (prev && blk_queue_cluster(q)) { 84 + if (bvprvp && blk_queue_cluster(q)) { 89 85 if (seg_size + bv.bv_len > queue_max_segment_size(q)) 90 86 goto new_segment; 91 - if (!BIOVEC_PHYS_MERGEABLE(&bvprv, &bv)) 87 + if (!BIOVEC_PHYS_MERGEABLE(bvprvp, &bv)) 92 88 goto new_segment; 93 - if (!BIOVEC_SEG_BOUNDARY(q, &bvprv, &bv)) 89 + if (!BIOVEC_SEG_BOUNDARY(q, bvprvp, &bv)) 94 90 goto new_segment; 95 91 96 92 seg_size += bv.bv_len; 97 93 bvprv = bv; 98 - prev = 1; 94 + bvprvp = &bv; 95 + sectors += bv.bv_len >> 9; 99 96 continue; 100 97 } 101 98 new_segment: ··· 101 104 102 105 nsegs++; 103 106 bvprv = bv; 104 - prev = 1; 107 + bvprvp = &bv; 105 108 seg_size = bv.bv_len; 109 + sectors += bv.bv_len >> 9; 106 110 } 107 111 108 112 return NULL; 109 113 split: 110 - split = bio_clone_bioset(bio, GFP_NOIO, bs); 111 - 112 - split->bi_iter.bi_size -= iter.bi_size; 113 - bio->bi_iter = iter; 114 - 115 - if (bio_integrity(bio)) { 116 - bio_integrity_advance(bio, split->bi_iter.bi_size); 117 - bio_integrity_trim(split, 0, bio_sectors(split)); 118 - } 119 - 120 - return split; 114 + return bio_split(bio, sectors, GFP_NOIO, bs); 121 115 } 122 116 123 117 void blk_queue_split(struct request_queue *q, struct bio **bio, ··· 427 439 int ll_back_merge_fn(struct request_queue *q, struct request *req, 428 440 struct bio *bio) 429 441 { 442 + if (req_gap_back_merge(req, bio)) 443 + return 0; 444 + if (blk_integrity_rq(req) && 445 + integrity_req_gap_back_merge(req, bio)) 446 + return 0; 430 447 if (blk_rq_sectors(req) + bio_sectors(bio) > 431 448 blk_rq_get_max_sectors(req)) { 432 449 req->cmd_flags |= REQ_NOMERGE; ··· 450 457 int ll_front_merge_fn(struct request_queue *q, struct request *req, 451 458 struct bio *bio) 452 459 { 460 + 461 + if (req_gap_front_merge(req, bio)) 462 + return 0; 463 + if (blk_integrity_rq(req) && 464 + integrity_req_gap_front_merge(req, bio)) 465 + return 0; 453 466 if (blk_rq_sectors(req) + bio_sectors(bio) > 454 467 blk_rq_get_max_sectors(req)) { 455 468 req->cmd_flags |= REQ_NOMERGE; ··· 482 483 return !q->mq_ops && req->special; 483 484 } 484 485 485 - static int req_gap_to_prev(struct request *req, struct bio *next) 486 - { 487 - struct bio *prev = req->biotail; 488 - 489 - return bvec_gap_to_prev(req->q, &prev->bi_io_vec[prev->bi_vcnt - 1], 490 - next->bi_io_vec[0].bv_offset); 491 - } 492 - 493 486 static int ll_merge_requests_fn(struct request_queue *q, struct request *req, 494 487 struct request *next) 495 488 { ··· 496 505 if (req_no_special_merge(req) || req_no_special_merge(next)) 497 506 return 0; 498 507 499 - if (req_gap_to_prev(req, next->bio)) 508 + if (req_gap_back_merge(req, next->bio)) 500 509 return 0; 501 510 502 511 /* ··· 702 711 /* must be using the same buffer */ 703 712 if (rq->cmd_flags & REQ_WRITE_SAME && 704 713 !blk_write_same_mergeable(rq->bio, bio)) 705 - return false; 706 - 707 - /* Only check gaps if the bio carries data */ 708 - if (bio_has_data(bio) && req_gap_to_prev(rq, bio)) 709 714 return false; 710 715 711 716 return true;
+3 -1
block/bounce.c
··· 128 128 struct bio *bio_orig = bio->bi_private; 129 129 struct bio_vec *bvec, *org_vec; 130 130 int i; 131 + int start = bio_orig->bi_iter.bi_idx; 131 132 132 133 /* 133 134 * free up bounce indirect pages used 134 135 */ 135 136 bio_for_each_segment_all(bvec, bio, i) { 136 - org_vec = bio_orig->bi_io_vec + i; 137 + org_vec = bio_orig->bi_io_vec + i + start; 138 + 137 139 if (bvec->bv_page == org_vec->bv_page) 138 140 continue; 139 141
+4 -8
drivers/acpi/bus.c
··· 315 315 316 316 capbuf[OSC_QUERY_DWORD] = OSC_QUERY_ENABLE; 317 317 capbuf[OSC_SUPPORT_DWORD] = OSC_SB_PR3_SUPPORT; /* _PR3 is in use */ 318 - #if defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR) ||\ 319 - defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR_MODULE) 320 - capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PAD_SUPPORT; 321 - #endif 322 - 323 - #if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE) 324 - capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PPC_OST_SUPPORT; 325 - #endif 318 + if (IS_ENABLED(CONFIG_ACPI_PROCESSOR_AGGREGATOR)) 319 + capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PAD_SUPPORT; 320 + if (IS_ENABLED(CONFIG_ACPI_PROCESSOR)) 321 + capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PPC_OST_SUPPORT; 326 322 327 323 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT; 328 324
+5 -6
drivers/acpi/int340x_thermal.c
··· 33 33 static int int340x_thermal_handler_attach(struct acpi_device *adev, 34 34 const struct acpi_device_id *id) 35 35 { 36 - #if defined(CONFIG_INT340X_THERMAL) || defined(CONFIG_INT340X_THERMAL_MODULE) 37 - acpi_create_platform_device(adev); 38 - #elif defined(INTEL_SOC_DTS_THERMAL) || defined(INTEL_SOC_DTS_THERMAL_MODULE) 39 - /* Intel SoC DTS thermal driver needs INT3401 to set IRQ descriptor */ 40 - if (id->driver_data == INT3401_DEVICE) 36 + if (IS_ENABLED(CONFIG_INT340X_THERMAL)) 41 37 acpi_create_platform_device(adev); 42 - #endif 38 + /* Intel SoC DTS thermal driver needs INT3401 to set IRQ descriptor */ 39 + else if (IS_ENABLED(CONFIG_INTEL_SOC_DTS_THERMAL) && 40 + id->driver_data == INT3401_DEVICE) 41 + acpi_create_platform_device(adev); 43 42 return 1; 44 43 } 45 44
+3 -15
drivers/base/platform-msi.c
··· 63 63 unsigned int virq, irq_hw_number_t hwirq, 64 64 msi_alloc_info_t *arg) 65 65 { 66 - struct irq_data *data; 67 - 68 - irq_domain_set_hwirq_and_chip(domain, virq, hwirq, 69 - info->chip, info->chip_data); 70 - 71 - /* 72 - * Save the MSI descriptor in handler_data so that the 73 - * irq_write_msi_msg callback can retrieve it (and the 74 - * associated device). 75 - */ 76 - data = irq_domain_get_irq_data(domain, virq); 77 - data->handler_data = arg->desc; 78 - 79 - return 0; 66 + return irq_domain_set_hwirq_and_chip(domain, virq, hwirq, 67 + info->chip, info->chip_data); 80 68 } 81 69 #else 82 70 #define platform_msi_set_desc NULL ··· 85 97 86 98 static void platform_msi_write_msg(struct irq_data *data, struct msi_msg *msg) 87 99 { 88 - struct msi_desc *desc = irq_data_get_irq_handler_data(data); 100 + struct msi_desc *desc = irq_data_get_msi_desc(data); 89 101 struct platform_msi_priv_data *priv_data; 90 102 91 103 priv_data = desc->platform.msi_priv_data;
+18 -18
drivers/block/null_blk.c
··· 406 406 .complete = null_softirq_done_fn, 407 407 }; 408 408 409 + static void cleanup_queue(struct nullb_queue *nq) 410 + { 411 + kfree(nq->tag_map); 412 + kfree(nq->cmds); 413 + } 414 + 415 + static void cleanup_queues(struct nullb *nullb) 416 + { 417 + int i; 418 + 419 + for (i = 0; i < nullb->nr_queues; i++) 420 + cleanup_queue(&nullb->queues[i]); 421 + 422 + kfree(nullb->queues); 423 + } 424 + 409 425 static void null_del_dev(struct nullb *nullb) 410 426 { 411 427 list_del_init(&nullb->list); ··· 431 415 if (queue_mode == NULL_Q_MQ) 432 416 blk_mq_free_tag_set(&nullb->tag_set); 433 417 put_disk(nullb->disk); 418 + cleanup_queues(nullb); 434 419 kfree(nullb); 435 420 } 436 421 ··· 474 457 } 475 458 476 459 return 0; 477 - } 478 - 479 - static void cleanup_queue(struct nullb_queue *nq) 480 - { 481 - kfree(nq->tag_map); 482 - kfree(nq->cmds); 483 - } 484 - 485 - static void cleanup_queues(struct nullb *nullb) 486 - { 487 - int i; 488 - 489 - for (i = 0; i < nullb->nr_queues; i++) 490 - cleanup_queue(&nullb->queues[i]); 491 - 492 - kfree(nullb->queues); 493 460 } 494 461 495 462 static int setup_queues(struct nullb *nullb) ··· 589 588 blk_queue_physical_block_size(nullb->q, bs); 590 589 591 590 size = gb * 1024 * 1024 * 1024ULL; 592 - sector_div(size, bs); 593 - set_capacity(disk, size); 591 + set_capacity(disk, size >> 9); 594 592 595 593 disk->flags |= GENHD_FL_EXT_DEVT | GENHD_FL_SUPPRESS_PARTITION_INFO; 596 594 disk->major = null_major;
+2 -1
drivers/clk/clk.c
··· 2437 2437 hlist_for_each_entry_safe(orphan, tmp2, &clk_orphan_list, child_node) { 2438 2438 if (orphan->num_parents && orphan->ops->get_parent) { 2439 2439 i = orphan->ops->get_parent(orphan->hw); 2440 - if (!strcmp(core->name, orphan->parent_names[i])) 2440 + if (i >= 0 && i < orphan->num_parents && 2441 + !strcmp(core->name, orphan->parent_names[i])) 2441 2442 clk_core_reparent(orphan, core); 2442 2443 continue; 2443 2444 }
+6
drivers/clk/rockchip/clk-rk3368.c
··· 818 818 GATE(0, "sclk_timer00", "xin24m", CLK_IGNORE_UNUSED, RK3368_CLKGATE_CON(24), 0, GFLAGS), 819 819 }; 820 820 821 + static const char *const rk3368_critical_clocks[] __initconst = { 822 + "pclk_pd_pmu", 823 + }; 824 + 821 825 static void __init rk3368_clk_init(struct device_node *np) 822 826 { 823 827 void __iomem *reg_base; ··· 866 862 RK3368_GRF_SOC_STATUS0); 867 863 rockchip_clk_register_branches(rk3368_clk_branches, 868 864 ARRAY_SIZE(rk3368_clk_branches)); 865 + rockchip_clk_protect_critical(rk3368_critical_clocks, 866 + ARRAY_SIZE(rk3368_critical_clocks)); 869 867 870 868 rockchip_clk_register_armclk(ARMCLKB, "armclkb", 871 869 mux_armclkb_p, ARRAY_SIZE(mux_armclkb_p),
+4 -4
drivers/clk/st/clkgen-fsyn.c
··· 307 307 .get_rate = clk_fs660c32_dig_get_rate, 308 308 }; 309 309 310 - static const struct clkgen_quadfs_data st_fs660c32_C_407 = { 310 + static const struct clkgen_quadfs_data st_fs660c32_C = { 311 311 .nrst_present = true, 312 312 .nrst = { CLKGEN_FIELD(0x2f0, 0x1, 0), 313 313 CLKGEN_FIELD(0x2f0, 0x1, 1), ··· 350 350 .get_rate = clk_fs660c32_dig_get_rate, 351 351 }; 352 352 353 - static const struct clkgen_quadfs_data st_fs660c32_D_407 = { 353 + static const struct clkgen_quadfs_data st_fs660c32_D = { 354 354 .nrst_present = true, 355 355 .nrst = { CLKGEN_FIELD(0x2a0, 0x1, 0), 356 356 CLKGEN_FIELD(0x2a0, 0x1, 1), ··· 1077 1077 }, 1078 1078 { 1079 1079 .compatible = "st,stih407-quadfs660-C", 1080 - .data = &st_fs660c32_C_407 1080 + .data = &st_fs660c32_C 1081 1081 }, 1082 1082 { 1083 1083 .compatible = "st,stih407-quadfs660-D", 1084 - .data = &st_fs660c32_D_407 1084 + .data = &st_fs660c32_D 1085 1085 }, 1086 1086 {} 1087 1087 };
+6 -6
drivers/clk/st/clkgen-pll.c
··· 193 193 .ops = &stm_pll3200c32_ops, 194 194 }; 195 195 196 - static const struct clkgen_pll_data st_pll3200c32_407_c0_0 = { 196 + static const struct clkgen_pll_data st_pll3200c32_cx_0 = { 197 197 /* 407 C0 PLL0 */ 198 198 .pdn_status = CLKGEN_FIELD(0x2a0, 0x1, 8), 199 199 .locked_status = CLKGEN_FIELD(0x2a0, 0x1, 24), ··· 205 205 .ops = &stm_pll3200c32_ops, 206 206 }; 207 207 208 - static const struct clkgen_pll_data st_pll3200c32_407_c0_1 = { 208 + static const struct clkgen_pll_data st_pll3200c32_cx_1 = { 209 209 /* 407 C0 PLL1 */ 210 210 .pdn_status = CLKGEN_FIELD(0x2c8, 0x1, 8), 211 211 .locked_status = CLKGEN_FIELD(0x2c8, 0x1, 24), ··· 624 624 .data = &st_pll3200c32_407_a0, 625 625 }, 626 626 { 627 - .compatible = "st,stih407-plls-c32-c0_0", 628 - .data = &st_pll3200c32_407_c0_0, 627 + .compatible = "st,plls-c32-cx_0", 628 + .data = &st_pll3200c32_cx_0, 629 629 }, 630 630 { 631 - .compatible = "st,stih407-plls-c32-c0_1", 632 - .data = &st_pll3200c32_407_c0_1, 631 + .compatible = "st,plls-c32-cx_1", 632 + .data = &st_pll3200c32_cx_1, 633 633 }, 634 634 { 635 635 .compatible = "st,stih407-plls-c32-a9",
+7 -1
drivers/clk/tegra/clk-dfll.c
··· 682 682 struct dev_pm_opp *opp; 683 683 int i, uv; 684 684 685 + rcu_read_lock(); 686 + 685 687 opp = dev_pm_opp_find_freq_ceil(td->soc->dev, &rate); 686 - if (IS_ERR(opp)) 688 + if (IS_ERR(opp)) { 689 + rcu_read_unlock(); 687 690 return PTR_ERR(opp); 691 + } 688 692 uv = dev_pm_opp_get_voltage(opp); 693 + 694 + rcu_read_unlock(); 689 695 690 696 for (i = 0; i < td->i2c_lut_size; i++) { 691 697 if (regulator_list_voltage(td->vdd_reg, td->i2c_lut[i]) == uv)
+1 -2
drivers/cpufreq/acpi-cpufreq.c
··· 375 375 376 376 pr_debug("get_cur_freq_on_cpu (%d)\n", cpu); 377 377 378 - policy = cpufreq_cpu_get(cpu); 378 + policy = cpufreq_cpu_get_raw(cpu); 379 379 if (unlikely(!policy)) 380 380 return 0; 381 381 382 382 data = policy->driver_data; 383 - cpufreq_cpu_put(policy); 384 383 if (unlikely(!data || !data->freq_table)) 385 384 return 0; 386 385
+2 -2
drivers/cpufreq/cpufreq.c
··· 238 238 } 239 239 EXPORT_SYMBOL_GPL(cpufreq_generic_init); 240 240 241 - /* Only for cpufreq core internal use */ 242 - static struct cpufreq_policy *cpufreq_cpu_get_raw(unsigned int cpu) 241 + struct cpufreq_policy *cpufreq_cpu_get_raw(unsigned int cpu) 243 242 { 244 243 struct cpufreq_policy *policy = per_cpu(cpufreq_cpu_data, cpu); 245 244 246 245 return policy && cpumask_test_cpu(cpu, policy->cpus) ? policy : NULL; 247 246 } 247 + EXPORT_SYMBOL_GPL(cpufreq_cpu_get_raw); 248 248 249 249 unsigned int cpufreq_generic_get(unsigned int cpu) 250 250 {
+6 -6
drivers/devfreq/devfreq.c
··· 53 53 { 54 54 struct devfreq *tmp_devfreq; 55 55 56 - if (unlikely(IS_ERR_OR_NULL(dev))) { 56 + if (IS_ERR_OR_NULL(dev)) { 57 57 pr_err("DEVFREQ: %s: Invalid parameters\n", __func__); 58 58 return ERR_PTR(-EINVAL); 59 59 } ··· 133 133 { 134 134 struct devfreq_governor *tmp_governor; 135 135 136 - if (unlikely(IS_ERR_OR_NULL(name))) { 136 + if (IS_ERR_OR_NULL(name)) { 137 137 pr_err("DEVFREQ: %s: Invalid parameters\n", __func__); 138 138 return ERR_PTR(-EINVAL); 139 139 } ··· 177 177 return err; 178 178 179 179 /* 180 - * Adjust the freuqency with user freq and QoS. 180 + * Adjust the frequency with user freq and QoS. 181 181 * 182 - * List from the highest proiority 183 - * max_freq (probably called by thermal when it's too hot) 182 + * List from the highest priority 183 + * max_freq 184 184 * min_freq 185 185 */ 186 186 ··· 482 482 devfreq->profile->max_state * 483 483 devfreq->profile->max_state, 484 484 GFP_KERNEL); 485 - devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned int) * 485 + devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned long) * 486 486 devfreq->profile->max_state, 487 487 GFP_KERNEL); 488 488 devfreq->last_stat_updated = jiffies;
+2 -1
drivers/devfreq/event/exynos-ppmu.c
··· 319 319 case PPMU_PMNCNT3: 320 320 pmcnt_high = __raw_readl(info->ppmu.base + PPMU_V2_PMCNT3_HIGH); 321 321 pmcnt_low = __raw_readl(info->ppmu.base + PPMU_V2_PMCNT3_LOW); 322 - load_count = (u64)((pmcnt_high & 0xff) << 32) + (u64)pmcnt_low; 322 + load_count = ((u64)((pmcnt_high & 0xff)) << 32) 323 + + (u64)pmcnt_low; 323 324 break; 324 325 } 325 326 edata->load_count = load_count;
+18 -15
drivers/devfreq/governor_simpleondemand.c
··· 21 21 static int devfreq_simple_ondemand_func(struct devfreq *df, 22 22 unsigned long *freq) 23 23 { 24 - struct devfreq_dev_status stat; 25 - int err = df->profile->get_dev_status(df->dev.parent, &stat); 24 + int err; 25 + struct devfreq_dev_status *stat; 26 26 unsigned long long a, b; 27 27 unsigned int dfso_upthreshold = DFSO_UPTHRESHOLD; 28 28 unsigned int dfso_downdifferential = DFSO_DOWNDIFFERENCTIAL; 29 29 struct devfreq_simple_ondemand_data *data = df->data; 30 30 unsigned long max = (df->max_freq) ? df->max_freq : UINT_MAX; 31 31 32 + err = devfreq_update_stats(df); 32 33 if (err) 33 34 return err; 35 + 36 + stat = &df->last_status; 34 37 35 38 if (data) { 36 39 if (data->upthreshold) ··· 46 43 return -EINVAL; 47 44 48 45 /* Assume MAX if it is going to be divided by zero */ 49 - if (stat.total_time == 0) { 46 + if (stat->total_time == 0) { 50 47 *freq = max; 51 48 return 0; 52 49 } 53 50 54 51 /* Prevent overflow */ 55 - if (stat.busy_time >= (1 << 24) || stat.total_time >= (1 << 24)) { 56 - stat.busy_time >>= 7; 57 - stat.total_time >>= 7; 52 + if (stat->busy_time >= (1 << 24) || stat->total_time >= (1 << 24)) { 53 + stat->busy_time >>= 7; 54 + stat->total_time >>= 7; 58 55 } 59 56 60 57 /* Set MAX if it's busy enough */ 61 - if (stat.busy_time * 100 > 62 - stat.total_time * dfso_upthreshold) { 58 + if (stat->busy_time * 100 > 59 + stat->total_time * dfso_upthreshold) { 63 60 *freq = max; 64 61 return 0; 65 62 } 66 63 67 64 /* Set MAX if we do not know the initial frequency */ 68 - if (stat.current_frequency == 0) { 65 + if (stat->current_frequency == 0) { 69 66 *freq = max; 70 67 return 0; 71 68 } 72 69 73 70 /* Keep the current frequency */ 74 - if (stat.busy_time * 100 > 75 - stat.total_time * (dfso_upthreshold - dfso_downdifferential)) { 76 - *freq = stat.current_frequency; 71 + if (stat->busy_time * 100 > 72 + stat->total_time * (dfso_upthreshold - dfso_downdifferential)) { 73 + *freq = stat->current_frequency; 77 74 return 0; 78 75 } 79 76 80 77 /* Set the desired frequency based on the load */ 81 - a = stat.busy_time; 82 - a *= stat.current_frequency; 83 - b = div_u64(a, stat.total_time); 78 + a = stat->busy_time; 79 + a *= stat->current_frequency; 80 + b = div_u64(a, stat->total_time); 84 81 b *= 100; 85 82 b = div_u64(b, (dfso_upthreshold - dfso_downdifferential / 2)); 86 83 *freq = (unsigned long) b;
+5 -3
drivers/devfreq/tegra-devfreq.c
··· 541 541 static int tegra_governor_get_target(struct devfreq *devfreq, 542 542 unsigned long *freq) 543 543 { 544 - struct devfreq_dev_status stat; 544 + struct devfreq_dev_status *stat; 545 545 struct tegra_devfreq *tegra; 546 546 struct tegra_devfreq_device *dev; 547 547 unsigned long target_freq = 0; 548 548 unsigned int i; 549 549 int err; 550 550 551 - err = devfreq->profile->get_dev_status(devfreq->dev.parent, &stat); 551 + err = devfreq_update_stats(devfreq); 552 552 if (err) 553 553 return err; 554 554 555 - tegra = stat.private_data; 555 + stat = &devfreq->last_status; 556 + 557 + tegra = stat->private_data; 556 558 557 559 for (i = 0; i < ARRAY_SIZE(tegra->devices); i++) { 558 560 dev = &tegra->devices[i];
+1 -1
drivers/dma/ipu/ipu_irq.c
··· 266 266 } 267 267 268 268 /* Chained IRQ handler for IPU function and error interrupt */ 269 - static void ipu_irq_handler(unsigned int __irq, struct irq_desc *desc) 269 + static void ipu_irq_handler(struct irq_desc *desc) 270 270 { 271 271 struct ipu *ipu = irq_desc_get_handler_data(desc); 272 272 u32 status;
+2 -4
drivers/gpio/gpio-altera.c
··· 201 201 return 0; 202 202 } 203 203 204 - static void altera_gpio_irq_edge_handler(unsigned int irq, 205 - struct irq_desc *desc) 204 + static void altera_gpio_irq_edge_handler(struct irq_desc *desc) 206 205 { 207 206 struct altera_gpio_chip *altera_gc; 208 207 struct irq_chip *chip; ··· 230 231 } 231 232 232 233 233 - static void altera_gpio_irq_leveL_high_handler(unsigned int irq, 234 - struct irq_desc *desc) 234 + static void altera_gpio_irq_leveL_high_handler(struct irq_desc *desc) 235 235 { 236 236 struct altera_gpio_chip *altera_gc; 237 237 struct irq_chip *chip;
+1 -1
drivers/gpio/gpio-bcm-kona.c
··· 433 433 return 0; 434 434 } 435 435 436 - static void bcm_kona_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 436 + static void bcm_kona_gpio_irq_handler(struct irq_desc *desc) 437 437 { 438 438 void __iomem *reg_base; 439 439 int bit, bank_id;
+1 -1
drivers/gpio/gpio-brcmstb.c
··· 236 236 } 237 237 238 238 /* Each UPG GIO block has one IRQ for all banks */ 239 - static void brcmstb_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 239 + static void brcmstb_gpio_irq_handler(struct irq_desc *desc) 240 240 { 241 241 struct gpio_chip *gc = irq_desc_get_handler_data(desc); 242 242 struct brcmstb_gpio_priv *priv = brcmstb_gpio_gc_to_priv(gc);
+1 -2
drivers/gpio/gpio-davinci.c
··· 326 326 .flags = IRQCHIP_SET_TYPE_MASKED, 327 327 }; 328 328 329 - static void 330 - gpio_irq_handler(unsigned __irq, struct irq_desc *desc) 329 + static void gpio_irq_handler(struct irq_desc *desc) 331 330 { 332 331 unsigned int irq = irq_desc_get_irq(desc); 333 332 struct davinci_gpio_regs __iomem *g;
+1 -1
drivers/gpio/gpio-dwapb.c
··· 147 147 return ret; 148 148 } 149 149 150 - static void dwapb_irq_handler(u32 irq, struct irq_desc *desc) 150 + static void dwapb_irq_handler(struct irq_desc *desc) 151 151 { 152 152 struct dwapb_gpio *gpio = irq_desc_get_handler_data(desc); 153 153 struct irq_chip *chip = irq_desc_get_chip(desc);
+2 -3
drivers/gpio/gpio-ep93xx.c
··· 78 78 EP93XX_GPIO_REG(int_debounce_register_offset[port])); 79 79 } 80 80 81 - static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc) 81 + static void ep93xx_gpio_ab_irq_handler(struct irq_desc *desc) 82 82 { 83 83 unsigned char status; 84 84 int i; ··· 100 100 } 101 101 } 102 102 103 - static void ep93xx_gpio_f_irq_handler(unsigned int __irq, 104 - struct irq_desc *desc) 103 + static void ep93xx_gpio_f_irq_handler(struct irq_desc *desc) 105 104 { 106 105 /* 107 106 * map discontiguous hw irq range to continuous sw irq range:
+1 -1
drivers/gpio/gpio-intel-mid.c
··· 301 301 }; 302 302 MODULE_DEVICE_TABLE(pci, intel_gpio_ids); 303 303 304 - static void intel_mid_irq_handler(unsigned irq, struct irq_desc *desc) 304 + static void intel_mid_irq_handler(struct irq_desc *desc) 305 305 { 306 306 struct gpio_chip *gc = irq_desc_get_handler_data(desc); 307 307 struct intel_mid_gpio *priv = to_intel_gpio_priv(gc);
+1 -1
drivers/gpio/gpio-lynxpoint.c
··· 234 234 return 0; 235 235 } 236 236 237 - static void lp_gpio_irq_handler(unsigned hwirq, struct irq_desc *desc) 237 + static void lp_gpio_irq_handler(struct irq_desc *desc) 238 238 { 239 239 struct irq_data *data = irq_desc_get_irq_data(desc); 240 240 struct gpio_chip *gc = irq_desc_get_handler_data(desc);
+1 -1
drivers/gpio/gpio-mpc8xxx.c
··· 194 194 return -ENXIO; 195 195 } 196 196 197 - static void mpc8xxx_gpio_irq_cascade(unsigned int irq, struct irq_desc *desc) 197 + static void mpc8xxx_gpio_irq_cascade(struct irq_desc *desc) 198 198 { 199 199 struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_desc_get_handler_data(desc); 200 200 struct irq_chip *chip = irq_desc_get_chip(desc);
+1 -1
drivers/gpio/gpio-msic.c
··· 232 232 .irq_bus_sync_unlock = msic_bus_sync_unlock, 233 233 }; 234 234 235 - static void msic_gpio_irq_handler(unsigned irq, struct irq_desc *desc) 235 + static void msic_gpio_irq_handler(struct irq_desc *desc) 236 236 { 237 237 struct irq_data *data = irq_desc_get_irq_data(desc); 238 238 struct msic_gpio *mg = irq_data_get_irq_handler_data(data);
+1 -1
drivers/gpio/gpio-msm-v2.c
··· 305 305 * which have been set as summary IRQ lines and which are triggered, 306 306 * and to call their interrupt handlers. 307 307 */ 308 - static void msm_summary_irq_handler(unsigned int irq, struct irq_desc *desc) 308 + static void msm_summary_irq_handler(struct irq_desc *desc) 309 309 { 310 310 unsigned long i; 311 311 struct irq_chip *chip = irq_desc_get_chip(desc);
+1 -1
drivers/gpio/gpio-mvebu.c
··· 458 458 return 0; 459 459 } 460 460 461 - static void mvebu_gpio_irq_handler(unsigned int __irq, struct irq_desc *desc) 461 + static void mvebu_gpio_irq_handler(struct irq_desc *desc) 462 462 { 463 463 struct mvebu_gpio_chip *mvchip = irq_desc_get_handler_data(desc); 464 464 struct irq_chip *chip = irq_desc_get_chip(desc);
+2 -2
drivers/gpio/gpio-mxc.c
··· 272 272 } 273 273 274 274 /* MX1 and MX3 has one interrupt *per* gpio port */ 275 - static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc) 275 + static void mx3_gpio_irq_handler(struct irq_desc *desc) 276 276 { 277 277 u32 irq_stat; 278 278 struct mxc_gpio_port *port = irq_desc_get_handler_data(desc); ··· 288 288 } 289 289 290 290 /* MX2 has one interrupt *for all* gpio ports */ 291 - static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc) 291 + static void mx2_gpio_irq_handler(struct irq_desc *desc) 292 292 { 293 293 u32 irq_msk, irq_stat; 294 294 struct mxc_gpio_port *port;
+1 -1
drivers/gpio/gpio-mxs.c
··· 154 154 } 155 155 156 156 /* MXS has one interrupt *per* gpio port */ 157 - static void mxs_gpio_irq_handler(u32 irq, struct irq_desc *desc) 157 + static void mxs_gpio_irq_handler(struct irq_desc *desc) 158 158 { 159 159 u32 irq_stat; 160 160 struct mxs_gpio_port *port = irq_desc_get_handler_data(desc);
+1 -1
drivers/gpio/gpio-omap.c
··· 709 709 * line's interrupt handler has been run, we may miss some nested 710 710 * interrupts. 711 711 */ 712 - static void omap_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 712 + static void omap_gpio_irq_handler(struct irq_desc *desc) 713 713 { 714 714 void __iomem *isr_reg = NULL; 715 715 u32 isr;
+1 -1
drivers/gpio/gpio-pl061.c
··· 187 187 return 0; 188 188 } 189 189 190 - static void pl061_irq_handler(unsigned irq, struct irq_desc *desc) 190 + static void pl061_irq_handler(struct irq_desc *desc) 191 191 { 192 192 unsigned long pending; 193 193 int offset;
+1 -1
drivers/gpio/gpio-pxa.c
··· 401 401 return 0; 402 402 } 403 403 404 - static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) 404 + static void pxa_gpio_demux_handler(struct irq_desc *desc) 405 405 { 406 406 struct pxa_gpio_chip *c; 407 407 int loop, gpio, gpio_base, n;
+1 -2
drivers/gpio/gpio-sa1100.c
··· 172 172 * irq_controller_lock held, and IRQs disabled. Decode the IRQ 173 173 * and call the handler. 174 174 */ 175 - static void 176 - sa1100_gpio_handler(unsigned int __irq, struct irq_desc *desc) 175 + static void sa1100_gpio_handler(struct irq_desc *desc) 177 176 { 178 177 unsigned int irq, mask; 179 178
+1 -1
drivers/gpio/gpio-tegra.c
··· 266 266 gpiochip_unlock_as_irq(&tegra_gpio_chip, gpio); 267 267 } 268 268 269 - static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 269 + static void tegra_gpio_irq_handler(struct irq_desc *desc) 270 270 { 271 271 int port; 272 272 int pin;
+1 -1
drivers/gpio/gpio-timberdale.c
··· 192 192 return ret; 193 193 } 194 194 195 - static void timbgpio_irq(unsigned int irq, struct irq_desc *desc) 195 + static void timbgpio_irq(struct irq_desc *desc) 196 196 { 197 197 struct timbgpio *tgpio = irq_desc_get_handler_data(desc); 198 198 struct irq_data *data = irq_desc_get_irq_data(desc);
+2 -2
drivers/gpio/gpio-tz1090.c
··· 375 375 #define gpio_set_irq_wake NULL 376 376 #endif 377 377 378 - static void tz1090_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 378 + static void tz1090_gpio_irq_handler(struct irq_desc *desc) 379 379 { 380 380 irq_hw_number_t hw; 381 381 unsigned int irq_stat, irq_no; ··· 400 400 == IRQ_TYPE_EDGE_BOTH) 401 401 tz1090_gpio_irq_next_edge(bank, hw); 402 402 403 - generic_handle_irq_desc(irq_no, child_desc); 403 + generic_handle_irq_desc(child_desc); 404 404 } 405 405 } 406 406
+3 -3
drivers/gpio/gpio-vf610.c
··· 120 120 return pinctrl_gpio_direction_output(chip->base + gpio); 121 121 } 122 122 123 - static void vf610_gpio_irq_handler(u32 irq, struct irq_desc *desc) 123 + static void vf610_gpio_irq_handler(struct irq_desc *desc) 124 124 { 125 125 struct vf610_gpio_port *port = irq_desc_get_handler_data(desc); 126 126 struct irq_chip *chip = irq_desc_get_chip(desc); ··· 176 176 port->irqc[d->hwirq] = irqc; 177 177 178 178 if (type & IRQ_TYPE_LEVEL_MASK) 179 - __irq_set_handler_locked(d->irq, handle_level_irq); 179 + irq_set_handler_locked(d, handle_level_irq); 180 180 else 181 - __irq_set_handler_locked(d->irq, handle_edge_irq); 181 + irq_set_handler_locked(d, handle_edge_irq); 182 182 183 183 return 0; 184 184 }
+1 -1
drivers/gpio/gpio-zx.c
··· 177 177 return 0; 178 178 } 179 179 180 - static void zx_irq_handler(unsigned irq, struct irq_desc *desc) 180 + static void zx_irq_handler(struct irq_desc *desc) 181 181 { 182 182 unsigned long pending; 183 183 int offset;
+1 -1
drivers/gpio/gpio-zynq.c
··· 514 514 * application for that pin. 515 515 * Note: A bug is reported if no handler is set for the gpio pin. 516 516 */ 517 - static void zynq_gpio_irqhandler(unsigned int irq, struct irq_desc *desc) 517 + static void zynq_gpio_irqhandler(struct irq_desc *desc) 518 518 { 519 519 u32 int_sts, int_enb; 520 520 unsigned int bank_num;
-1
drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c
··· 178 178 179 179 irq_set_chip_and_handler(irq, &mdp5_hw_irq_chip, handle_level_irq); 180 180 irq_set_chip_data(irq, mdp5_kms); 181 - set_irq_flags(irq, IRQF_VALID); 182 181 183 182 return 0; 184 183 }
+3 -4
drivers/gpu/ipu-v3/ipu-common.c
··· 912 912 } 913 913 } 914 914 915 - static void ipu_irq_handler(unsigned int irq, struct irq_desc *desc) 915 + static void ipu_irq_handler(struct irq_desc *desc) 916 916 { 917 917 struct ipu_soc *ipu = irq_desc_get_handler_data(desc); 918 918 struct irq_chip *chip = irq_desc_get_chip(desc); ··· 925 925 chained_irq_exit(chip, desc); 926 926 } 927 927 928 - static void ipu_err_irq_handler(unsigned int irq, struct irq_desc *desc) 928 + static void ipu_err_irq_handler(struct irq_desc *desc) 929 929 { 930 930 struct ipu_soc *ipu = irq_desc_get_handler_data(desc); 931 931 struct irq_chip *chip = irq_desc_get_chip(desc); ··· 1099 1099 } 1100 1100 1101 1101 ret = irq_alloc_domain_generic_chips(ipu->domain, 32, 1, "IPU", 1102 - handle_level_irq, 0, 1103 - IRQF_VALID, 0); 1102 + handle_level_irq, 0, 0, 0); 1104 1103 if (ret < 0) { 1105 1104 dev_err(ipu->dev, "failed to alloc generic irq chips\n"); 1106 1105 irq_domain_remove(ipu->domain);
+3 -5
drivers/irqchip/exynos-combiner.c
··· 65 65 __raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_SET); 66 66 } 67 67 68 - static void combiner_handle_cascade_irq(unsigned int __irq, 69 - struct irq_desc *desc) 68 + static void combiner_handle_cascade_irq(struct irq_desc *desc) 70 69 { 71 70 struct combiner_chip_data *chip_data = irq_desc_get_handler_data(desc); 72 71 struct irq_chip *chip = irq_desc_get_chip(desc); 73 - unsigned int irq = irq_desc_get_irq(desc); 74 72 unsigned int cascade_irq, combiner_irq; 75 73 unsigned long status; 76 74 ··· 86 88 cascade_irq = irq_find_mapping(combiner_irq_domain, combiner_irq); 87 89 88 90 if (unlikely(!cascade_irq)) 89 - handle_bad_irq(irq, desc); 91 + handle_bad_irq(desc); 90 92 else 91 93 generic_handle_irq(cascade_irq); 92 94 ··· 163 165 164 166 irq_set_chip_and_handler(irq, &combiner_chip, handle_level_irq); 165 167 irq_set_chip_data(irq, &combiner_data[hw >> 3]); 166 - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 168 + irq_set_probe(irq); 167 169 168 170 return 0; 169 171 }
+2 -4
drivers/irqchip/irq-armada-370-xp.c
··· 200 200 { 201 201 irq_set_chip_and_handler(virq, &armada_370_xp_msi_irq_chip, 202 202 handle_simple_irq); 203 - set_irq_flags(virq, IRQF_VALID); 204 203 205 204 return 0; 206 205 } ··· 316 317 irq_set_chip_and_handler(virq, &armada_370_xp_irq_chip, 317 318 handle_level_irq); 318 319 } 319 - set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); 320 + irq_set_probe(virq); 320 321 321 322 return 0; 322 323 } ··· 446 447 static void armada_370_xp_handle_msi_irq(struct pt_regs *r, bool b) {} 447 448 #endif 448 449 449 - static void armada_370_xp_mpic_handle_cascade_irq(unsigned int irq, 450 - struct irq_desc *desc) 450 + static void armada_370_xp_mpic_handle_cascade_irq(struct irq_desc *desc) 451 451 { 452 452 struct irq_chip *chip = irq_desc_get_chip(desc); 453 453 unsigned long irqmap, irqn, irqsrc, cpuid;
+3 -3
drivers/irqchip/irq-bcm2835.c
··· 96 96 static struct armctrl_ic intc __read_mostly; 97 97 static void __exception_irq_entry bcm2835_handle_irq( 98 98 struct pt_regs *regs); 99 - static void bcm2836_chained_handle_irq(unsigned int irq, struct irq_desc *desc); 99 + static void bcm2836_chained_handle_irq(struct irq_desc *desc); 100 100 101 101 static void armctrl_mask_irq(struct irq_data *d) 102 102 { ··· 166 166 BUG_ON(irq <= 0); 167 167 irq_set_chip_and_handler(irq, &armctrl_chip, 168 168 handle_level_irq); 169 - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 169 + irq_set_probe(irq); 170 170 } 171 171 } 172 172 ··· 245 245 handle_IRQ(irq_linear_revmap(intc.domain, hwirq), regs); 246 246 } 247 247 248 - static void bcm2836_chained_handle_irq(unsigned int irq, struct irq_desc *desc) 248 + static void bcm2836_chained_handle_irq(struct irq_desc *desc) 249 249 { 250 250 u32 hwirq; 251 251
+1 -1
drivers/irqchip/irq-bcm7038-l1.c
··· 115 115 writel(val, reg); 116 116 } 117 117 118 - static void bcm7038_l1_irq_handle(unsigned int irq, struct irq_desc *desc) 118 + static void bcm7038_l1_irq_handle(struct irq_desc *desc) 119 119 { 120 120 struct bcm7038_l1_chip *intc = irq_desc_get_handler_data(desc); 121 121 struct bcm7038_l1_cpu *cpu;
+1 -1
drivers/irqchip/irq-bcm7120-l2.c
··· 56 56 const __be32 *map_mask_prop; 57 57 }; 58 58 59 - static void bcm7120_l2_intc_irq_handle(unsigned int irq, struct irq_desc *desc) 59 + static void bcm7120_l2_intc_irq_handle(struct irq_desc *desc) 60 60 { 61 61 struct bcm7120_l1_intc_data *data = irq_desc_get_handler_data(desc); 62 62 struct bcm7120_l2_intc_data *b = data->b;
+3 -4
drivers/irqchip/irq-brcmstb-l2.c
··· 49 49 u32 saved_mask; /* for suspend/resume */ 50 50 }; 51 51 52 - static void brcmstb_l2_intc_irq_handle(unsigned int __irq, 53 - struct irq_desc *desc) 52 + static void brcmstb_l2_intc_irq_handle(struct irq_desc *desc) 54 53 { 55 54 struct brcmstb_l2_intc_data *b = irq_desc_get_handler_data(desc); 56 55 struct irq_chip_generic *gc = irq_get_domain_generic_chip(b->domain, 0); 57 56 struct irq_chip *chip = irq_desc_get_chip(desc); 58 - unsigned int irq = irq_desc_get_irq(desc); 57 + unsigned int irq; 59 58 u32 status; 60 59 61 60 chained_irq_enter(chip, desc); ··· 64 65 65 66 if (status == 0) { 66 67 raw_spin_lock(&desc->lock); 67 - handle_bad_irq(irq, desc); 68 + handle_bad_irq(desc); 68 69 raw_spin_unlock(&desc->lock); 69 70 goto out; 70 71 }
+3 -3
drivers/irqchip/irq-clps711x.c
··· 132 132 irq_hw_number_t hw) 133 133 { 134 134 irq_flow_handler_t handler = handle_level_irq; 135 - unsigned int flags = IRQF_VALID | IRQF_PROBE; 135 + unsigned int flags = 0; 136 136 137 137 if (!clps711x_irqs[hw].flags) 138 138 return 0; 139 139 140 140 if (clps711x_irqs[hw].flags & CLPS711X_FLAG_FIQ) { 141 141 handler = handle_bad_irq; 142 - flags |= IRQF_NOAUTOEN; 142 + flags |= IRQ_NOAUTOEN; 143 143 } else if (clps711x_irqs[hw].eoi) { 144 144 handler = handle_fasteoi_irq; 145 145 } ··· 149 149 writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi); 150 150 151 151 irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler); 152 - set_irq_flags(virq, flags); 152 + irq_modify_status(virq, IRQ_NOPROBE, flags); 153 153 154 154 return 0; 155 155 }
+1 -1
drivers/irqchip/irq-dw-apb-ictl.c
··· 26 26 #define APB_INT_FINALSTATUS_H 0x34 27 27 #define APB_INT_BASE_OFFSET 0x04 28 28 29 - static void dw_apb_ictl_handler(unsigned int irq, struct irq_desc *desc) 29 + static void dw_apb_ictl_handler(struct irq_desc *desc) 30 30 { 31 31 struct irq_domain *d = irq_desc_get_handler_data(desc); 32 32 struct irq_chip *chip = irq_desc_get_chip(desc);
+2 -2
drivers/irqchip/irq-gic-v2m.c
··· 95 95 struct v2m_data *v2m = irq_data_get_irq_chip_data(data); 96 96 phys_addr_t addr = v2m->res.start + V2M_MSI_SETSPI_NS; 97 97 98 - msg->address_hi = (u32) (addr >> 32); 99 - msg->address_lo = (u32) (addr); 98 + msg->address_hi = upper_32_bits(addr); 99 + msg->address_lo = lower_32_bits(addr); 100 100 msg->data = data->hwirq; 101 101 } 102 102
+5 -1
drivers/irqchip/irq-gic-v3-its.c
··· 898 898 * non-cacheable as well. 899 899 */ 900 900 shr = tmp & GITS_BASER_SHAREABILITY_MASK; 901 - if (!shr) 901 + if (!shr) { 902 902 cache = GITS_BASER_nC; 903 + __flush_dcache_area(base, alloc_size); 904 + } 903 905 goto retry_baser; 904 906 } 905 907 ··· 1141 1139 kfree(col_map); 1142 1140 return NULL; 1143 1141 } 1142 + 1143 + __flush_dcache_area(itt, sz); 1144 1144 1145 1145 dev->its = its; 1146 1146 dev->itt = itt;
+8 -11
drivers/irqchip/irq-gic-v3.c
··· 70 70 return gic_irq(d) < 32; 71 71 } 72 72 73 - static inline bool forwarded_irq(struct irq_data *d) 74 - { 75 - return d->handler_data != NULL; 76 - } 77 - 78 73 static inline void __iomem *gic_dist_base(struct irq_data *d) 79 74 { 80 75 if (gic_irq_in_rdist(d)) /* SGI+PPI -> SGI_base for this CPU */ ··· 244 249 * disabled/masked will not get "stuck", because there is 245 250 * noone to deactivate it (guest is being terminated). 246 251 */ 247 - if (forwarded_irq(d)) 252 + if (irqd_is_forwarded_to_vcpu(d)) 248 253 gic_poke_irq(d, GICD_ICACTIVER); 249 254 } 250 255 ··· 319 324 * No need to deactivate an LPI, or an interrupt that 320 325 * is is getting forwarded to a vcpu. 321 326 */ 322 - if (gic_irq(d) >= 8192 || forwarded_irq(d)) 327 + if (gic_irq(d) >= 8192 || irqd_is_forwarded_to_vcpu(d)) 323 328 return; 324 329 gic_write_dir(gic_irq(d)); 325 330 } ··· 352 357 353 358 static int gic_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu) 354 359 { 355 - d->handler_data = vcpu; 360 + if (vcpu) 361 + irqd_set_forwarded_to_vcpu(d); 362 + else 363 + irqd_clr_forwarded_to_vcpu(d); 356 364 return 0; 357 365 } 358 366 ··· 752 754 irq_set_percpu_devid(irq); 753 755 irq_domain_set_info(d, irq, hw, chip, d->host_data, 754 756 handle_percpu_devid_irq, NULL, NULL); 755 - set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN); 757 + irq_set_status_flags(irq, IRQ_NOAUTOEN); 756 758 } 757 759 /* SPIs */ 758 760 if (hw >= 32 && hw < gic_data.irq_nr) { 759 761 irq_domain_set_info(d, irq, hw, chip, d->host_data, 760 762 handle_fasteoi_irq, NULL, NULL); 761 - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 763 + irq_set_probe(irq); 762 764 } 763 765 /* LPIs */ 764 766 if (hw >= 8192 && hw < GIC_ID_NR) { ··· 766 768 return -EPERM; 767 769 irq_domain_set_info(d, irq, hw, chip, d->host_data, 768 770 handle_fasteoi_irq, NULL, NULL); 769 - set_irq_flags(irq, IRQF_VALID); 770 771 } 771 772 772 773 return 0;
+52 -34
drivers/irqchip/irq-gic.c
··· 145 145 void *data = irq_data_get_irq_handler_data(d); 146 146 147 147 /* 148 - * If handler_data pointing to one of the secondary GICs, then 149 - * this is a cascading interrupt, and it cannot possibly be 150 - * forwarded. 148 + * If handler_data is set, this is a cascading interrupt, and 149 + * it cannot possibly be forwarded. 151 150 */ 152 - if (data >= (void *)(gic_data + 1) && 153 - data < (void *)(gic_data + MAX_GIC_NR)) 154 - return true; 155 - 156 - return false; 157 - } 158 - 159 - static inline bool forwarded_irq(struct irq_data *d) 160 - { 161 - /* 162 - * A forwarded interrupt: 163 - * - is on the primary GIC 164 - * - has its handler_data set to a value 165 - * - that isn't a secondary GIC 166 - */ 167 - if (d->handler_data && !cascading_gic_irq(d)) 168 - return true; 169 - 170 - return false; 151 + return data != NULL; 171 152 } 172 153 173 154 /* ··· 182 201 * disabled/masked will not get "stuck", because there is 183 202 * noone to deactivate it (guest is being terminated). 184 203 */ 185 - if (forwarded_irq(d)) 204 + if (irqd_is_forwarded_to_vcpu(d)) 186 205 gic_poke_irq(d, GIC_DIST_ACTIVE_CLEAR); 187 206 } 188 207 ··· 199 218 static void gic_eoimode1_eoi_irq(struct irq_data *d) 200 219 { 201 220 /* Do not deactivate an IRQ forwarded to a vcpu. */ 202 - if (forwarded_irq(d)) 221 + if (irqd_is_forwarded_to_vcpu(d)) 203 222 return; 204 223 205 224 writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_DEACTIVATE); ··· 277 296 if (cascading_gic_irq(d)) 278 297 return -EINVAL; 279 298 280 - d->handler_data = vcpu; 299 + if (vcpu) 300 + irqd_set_forwarded_to_vcpu(d); 301 + else 302 + irqd_clr_forwarded_to_vcpu(d); 281 303 return 0; 282 304 } 283 305 ··· 341 357 } while (1); 342 358 } 343 359 344 - static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) 360 + static void gic_handle_cascade_irq(struct irq_desc *desc) 345 361 { 346 362 struct gic_chip_data *chip_data = irq_desc_get_handler_data(desc); 347 363 struct irq_chip *chip = irq_desc_get_chip(desc); ··· 360 376 361 377 cascade_irq = irq_find_mapping(chip_data->domain, gic_irq); 362 378 if (unlikely(gic_irq < 32 || gic_irq > 1020)) 363 - handle_bad_irq(cascade_irq, desc); 379 + handle_bad_irq(desc); 364 380 else 365 381 generic_handle_irq(cascade_irq); 366 382 ··· 890 906 irq_set_percpu_devid(irq); 891 907 irq_domain_set_info(d, irq, hw, chip, d->host_data, 892 908 handle_percpu_devid_irq, NULL, NULL); 893 - set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN); 909 + irq_set_status_flags(irq, IRQ_NOAUTOEN); 894 910 } else { 895 911 irq_domain_set_info(d, irq, hw, chip, d->host_data, 896 912 handle_fasteoi_irq, NULL, NULL); 897 - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 913 + irq_set_probe(irq); 898 914 } 899 915 return 0; 900 916 } ··· 1103 1119 #ifdef CONFIG_OF 1104 1120 static int gic_cnt __initdata; 1105 1121 1122 + static bool gic_check_eoimode(struct device_node *node, void __iomem **base) 1123 + { 1124 + struct resource cpuif_res; 1125 + 1126 + of_address_to_resource(node, 1, &cpuif_res); 1127 + 1128 + if (!is_hyp_mode_available()) 1129 + return false; 1130 + if (resource_size(&cpuif_res) < SZ_8K) 1131 + return false; 1132 + if (resource_size(&cpuif_res) == SZ_128K) { 1133 + u32 val_low, val_high; 1134 + 1135 + /* 1136 + * Verify that we have the first 4kB of a GIC400 1137 + * aliased over the first 64kB by checking the 1138 + * GICC_IIDR register on both ends. 1139 + */ 1140 + val_low = readl_relaxed(*base + GIC_CPU_IDENT); 1141 + val_high = readl_relaxed(*base + GIC_CPU_IDENT + 0xf000); 1142 + if ((val_low & 0xffff0fff) != 0x0202043B || 1143 + val_low != val_high) 1144 + return false; 1145 + 1146 + /* 1147 + * Move the base up by 60kB, so that we have a 8kB 1148 + * contiguous region, which allows us to use GICC_DIR 1149 + * at its normal offset. Please pass me that bucket. 1150 + */ 1151 + *base += 0xf000; 1152 + cpuif_res.start += 0xf000; 1153 + pr_warn("GIC: Adjusting CPU interface base to %pa", 1154 + &cpuif_res.start); 1155 + } 1156 + 1157 + return true; 1158 + } 1159 + 1106 1160 static int __init 1107 1161 gic_of_init(struct device_node *node, struct device_node *parent) 1108 1162 { 1109 1163 void __iomem *cpu_base; 1110 1164 void __iomem *dist_base; 1111 - struct resource cpu_res; 1112 1165 u32 percpu_offset; 1113 1166 int irq; 1114 1167 ··· 1158 1137 cpu_base = of_iomap(node, 1); 1159 1138 WARN(!cpu_base, "unable to map gic cpu registers\n"); 1160 1139 1161 - of_address_to_resource(node, 1, &cpu_res); 1162 - 1163 1140 /* 1164 1141 * Disable split EOI/Deactivate if either HYP is not available 1165 1142 * or the CPU interface is too small. 1166 1143 */ 1167 - if (gic_cnt == 0 && (!is_hyp_mode_available() || 1168 - resource_size(&cpu_res) < SZ_8K)) 1144 + if (gic_cnt == 0 && !gic_check_eoimode(node, &cpu_base)) 1169 1145 static_key_slow_dec(&supports_deactivate); 1170 1146 1171 1147 if (of_property_read_u32(node, "cpu-offset", &percpu_offset))
+2 -2
drivers/irqchip/irq-hip04.c
··· 307 307 irq_set_percpu_devid(irq); 308 308 irq_set_chip_and_handler(irq, &hip04_irq_chip, 309 309 handle_percpu_devid_irq); 310 - set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN); 310 + irq_set_status_flags(irq, IRQ_NOAUTOEN); 311 311 } else { 312 312 irq_set_chip_and_handler(irq, &hip04_irq_chip, 313 313 handle_fasteoi_irq); 314 - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 314 + irq_set_probe(irq); 315 315 } 316 316 irq_set_chip_data(irq, d->host_data); 317 317 return 0;
+1 -1
drivers/irqchip/irq-i8259.c
··· 352 352 __init_i8259_irqs(NULL); 353 353 } 354 354 355 - static void i8259_irq_dispatch(unsigned int __irq, struct irq_desc *desc) 355 + static void i8259_irq_dispatch(struct irq_desc *desc) 356 356 { 357 357 struct irq_domain *domain = irq_desc_get_handler_data(desc); 358 358 int hwirq = i8259_irq();
+2 -2
drivers/irqchip/irq-imgpdc.c
··· 218 218 return 0; 219 219 } 220 220 221 - static void pdc_intc_perip_isr(unsigned int __irq, struct irq_desc *desc) 221 + static void pdc_intc_perip_isr(struct irq_desc *desc) 222 222 { 223 223 unsigned int irq = irq_desc_get_irq(desc); 224 224 struct pdc_intc_priv *priv; ··· 240 240 generic_handle_irq(irq_no); 241 241 } 242 242 243 - static void pdc_intc_syswake_isr(unsigned int irq, struct irq_desc *desc) 243 + static void pdc_intc_syswake_isr(struct irq_desc *desc) 244 244 { 245 245 struct pdc_intc_priv *priv; 246 246 unsigned int syswake, irq_no;
+2 -2
drivers/irqchip/irq-keystone.c
··· 83 83 /* nothing to do here */ 84 84 } 85 85 86 - static void keystone_irq_handler(unsigned __irq, struct irq_desc *desc) 86 + static void keystone_irq_handler(struct irq_desc *desc) 87 87 { 88 88 unsigned int irq = irq_desc_get_irq(desc); 89 89 struct keystone_irq_device *kirq = irq_desc_get_handler_data(desc); ··· 127 127 128 128 irq_set_chip_data(virq, kirq); 129 129 irq_set_chip_and_handler(virq, &kirq->chip, handle_level_irq); 130 - set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); 130 + irq_set_probe(virq); 131 131 return 0; 132 132 } 133 133
+1 -1
drivers/irqchip/irq-metag-ext.c
··· 446 446 * Whilst using TR2 to detect external interrupts is a software convention it is 447 447 * (hopefully) unlikely to change. 448 448 */ 449 - static void meta_intc_irq_demux(unsigned int irq, struct irq_desc *desc) 449 + static void meta_intc_irq_demux(struct irq_desc *desc) 450 450 { 451 451 struct meta_intc_priv *priv = &meta_intc_priv; 452 452 irq_hw_number_t hw;
+1 -1
drivers/irqchip/irq-metag.c
··· 220 220 * occurred. It is this function's job to demux this irq and 221 221 * figure out exactly which trigger needs servicing. 222 222 */ 223 - static void metag_internal_irq_demux(unsigned int irq, struct irq_desc *desc) 223 + static void metag_internal_irq_demux(struct irq_desc *desc) 224 224 { 225 225 struct metag_internal_irq_priv *priv = irq_desc_get_handler_data(desc); 226 226 irq_hw_number_t hw;
+1 -1
drivers/irqchip/irq-mips-gic.c
··· 546 546 gic_handle_shared_int(false); 547 547 } 548 548 549 - static void gic_irq_dispatch(unsigned int irq, struct irq_desc *desc) 549 + static void gic_irq_dispatch(struct irq_desc *desc) 550 550 { 551 551 gic_handle_local_int(true); 552 552 gic_handle_shared_int(true);
+1 -4
drivers/irqchip/irq-mmp.c
··· 129 129 .irq_unmask = icu_unmask_irq, 130 130 }; 131 131 132 - static void icu_mux_irq_demux(unsigned int __irq, struct irq_desc *desc) 132 + static void icu_mux_irq_demux(struct irq_desc *desc) 133 133 { 134 134 unsigned int irq = irq_desc_get_irq(desc); 135 135 struct irq_domain *domain; ··· 164 164 irq_hw_number_t hw) 165 165 { 166 166 irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq); 167 - set_irq_flags(irq, IRQF_VALID); 168 167 return 0; 169 168 } 170 169 ··· 233 234 for (irq = 0; irq < 64; irq++) { 234 235 icu_mask_irq(irq_get_irq_data(irq)); 235 236 irq_set_chip_and_handler(irq, &icu_irq_chip, handle_level_irq); 236 - set_irq_flags(irq, IRQF_VALID); 237 237 } 238 238 irq_set_default_host(icu_data[0].domain); 239 239 set_handle_irq(mmp_handle_irq); ··· 335 337 irq_set_chip_and_handler(irq, &icu_irq_chip, 336 338 handle_level_irq); 337 339 } 338 - set_irq_flags(irq, IRQF_VALID); 339 340 } 340 341 irq_set_default_host(icu_data[0].domain); 341 342 set_handle_irq(mmp2_handle_irq);
-1
drivers/irqchip/irq-mxs.c
··· 84 84 irq_hw_number_t hw) 85 85 { 86 86 irq_set_chip_and_handler(virq, &mxs_icoll_chip, handle_level_irq); 87 - set_irq_flags(virq, IRQF_VALID); 88 87 89 88 return 0; 90 89 }
+1 -1
drivers/irqchip/irq-orion.c
··· 106 106 #define ORION_BRIDGE_IRQ_CAUSE 0x00 107 107 #define ORION_BRIDGE_IRQ_MASK 0x04 108 108 109 - static void orion_bridge_irq_handler(unsigned int irq, struct irq_desc *desc) 109 + static void orion_bridge_irq_handler(struct irq_desc *desc) 110 110 { 111 111 struct irq_domain *d = irq_desc_get_handler_data(desc); 112 112
+10 -1
drivers/irqchip/irq-renesas-intc-irqpin.c
··· 283 283 static int intc_irqpin_irq_set_wake(struct irq_data *d, unsigned int on) 284 284 { 285 285 struct intc_irqpin_priv *p = irq_data_get_irq_chip_data(d); 286 + int hw_irq = irqd_to_hwirq(d); 287 + 288 + irq_set_irq_wake(p->irq[hw_irq].requested_irq, on); 286 289 287 290 if (!p->clk) 288 291 return 0; ··· 335 332 return status; 336 333 } 337 334 335 + /* 336 + * This lock class tells lockdep that INTC External IRQ Pin irqs are in a 337 + * different category than their parents, so it won't report false recursion. 338 + */ 339 + static struct lock_class_key intc_irqpin_irq_lock_class; 340 + 338 341 static int intc_irqpin_irq_domain_map(struct irq_domain *h, unsigned int virq, 339 342 irq_hw_number_t hw) 340 343 { ··· 351 342 352 343 intc_irqpin_dbg(&p->irq[hw], "map"); 353 344 irq_set_chip_data(virq, h->host_data); 345 + irq_set_lockdep_class(virq, &intc_irqpin_irq_lock_class); 354 346 irq_set_chip_and_handler(virq, &p->irq_chip, handle_level_irq); 355 - set_irq_flags(virq, IRQF_VALID); /* kill me now */ 356 347 return 0; 357 348 } 358 349
+10
drivers/irqchip/irq-renesas-irqc.c
··· 121 121 static int irqc_irq_set_wake(struct irq_data *d, unsigned int on) 122 122 { 123 123 struct irqc_priv *p = irq_data_get_irq_chip_data(d); 124 + int hw_irq = irqd_to_hwirq(d); 125 + 126 + irq_set_irq_wake(p->irq[hw_irq].requested_irq, on); 124 127 125 128 if (!p->clk) 126 129 return 0; ··· 153 150 return IRQ_NONE; 154 151 } 155 152 153 + /* 154 + * This lock class tells lockdep that IRQC irqs are in a different 155 + * category than their parents, so it won't report false recursion. 156 + */ 157 + static struct lock_class_key irqc_irq_lock_class; 158 + 156 159 static int irqc_irq_domain_map(struct irq_domain *h, unsigned int virq, 157 160 irq_hw_number_t hw) 158 161 { ··· 166 157 167 158 irqc_dbg(&p->irq[hw], "map"); 168 159 irq_set_chip_data(virq, h->host_data); 160 + irq_set_lockdep_class(virq, &irqc_irq_lock_class); 169 161 irq_set_chip_and_handler(virq, &p->irq_chip, handle_level_irq); 170 162 return 0; 171 163 }
+3 -13
drivers/irqchip/irq-s3c24xx.c
··· 298 298 .irq_set_type = s3c_irqext0_type, 299 299 }; 300 300 301 - static void s3c_irq_demux(unsigned int __irq, struct irq_desc *desc) 301 + static void s3c_irq_demux(struct irq_desc *desc) 302 302 { 303 303 struct irq_chip *chip = irq_desc_get_chip(desc); 304 304 struct s3c_irq_data *irq_data = irq_desc_get_chip_data(desc); ··· 466 466 467 467 irq_set_chip_data(virq, irq_data); 468 468 469 - set_irq_flags(virq, IRQF_VALID); 470 - 471 469 if (parent_intc && irq_data->type != S3C_IRQTYPE_NONE) { 472 470 if (irq_data->parent_irq > 31) { 473 471 pr_err("irq-s3c24xx: parent irq %lu is out of range\n", 474 472 irq_data->parent_irq); 475 - goto err; 473 + return -EINVAL; 476 474 } 477 475 478 476 parent_irq_data = &parent_intc->irqs[irq_data->parent_irq]; ··· 483 485 if (!irqno) { 484 486 pr_err("irq-s3c24xx: could not find mapping for parent irq %lu\n", 485 487 irq_data->parent_irq); 486 - goto err; 488 + return -EINVAL; 487 489 } 488 490 irq_set_chained_handler(irqno, s3c_irq_demux); 489 491 } 490 492 491 493 return 0; 492 - 493 - err: 494 - set_irq_flags(virq, 0); 495 - 496 - /* the only error can result from bad mapping data*/ 497 - return -EINVAL; 498 494 } 499 495 500 496 static const struct irq_domain_ops s3c24xx_irq_ops = { ··· 1165 1173 handle_edge_irq); 1166 1174 1167 1175 irq_set_chip_data(virq, irq_data); 1168 - 1169 - set_irq_flags(virq, IRQF_VALID); 1170 1176 1171 1177 return 0; 1172 1178 }
+1 -1
drivers/irqchip/irq-sun4i.c
··· 83 83 irq_hw_number_t hw) 84 84 { 85 85 irq_set_chip_and_handler(virq, &sun4i_irq_chip, handle_fasteoi_irq); 86 - set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); 86 + irq_set_probe(virq); 87 87 88 88 return 0; 89 89 }
+1 -1
drivers/irqchip/irq-sunxi-nmi.c
··· 58 58 return irq_reg_readl(gc, off); 59 59 } 60 60 61 - static void sunxi_sc_nmi_handle_irq(unsigned int irq, struct irq_desc *desc) 61 + static void sunxi_sc_nmi_handle_irq(struct irq_desc *desc) 62 62 { 63 63 struct irq_domain *domain = irq_desc_get_handler_data(desc); 64 64 struct irq_chip *chip = irq_desc_get_chip(desc);
+1 -1
drivers/irqchip/irq-tb10x.c
··· 97 97 return IRQ_SET_MASK_OK; 98 98 } 99 99 100 - static void tb10x_irq_cascade(unsigned int __irq, struct irq_desc *desc) 100 + static void tb10x_irq_cascade(struct irq_desc *desc) 101 101 { 102 102 struct irq_domain *domain = irq_desc_get_handler_data(desc); 103 103 unsigned int irq = irq_desc_get_irq(desc);
+5 -5
drivers/irqchip/irq-versatile-fpga.c
··· 65 65 writel(mask, f->base + IRQ_ENABLE_SET); 66 66 } 67 67 68 - static void fpga_irq_handle(unsigned int __irq, struct irq_desc *desc) 68 + static void fpga_irq_handle(struct irq_desc *desc) 69 69 { 70 70 struct fpga_irq_data *f = irq_desc_get_handler_data(desc); 71 - unsigned int irq = irq_desc_get_irq(desc); 72 71 u32 status = readl(f->base + IRQ_STATUS); 73 72 74 73 if (status == 0) { 75 - do_bad_IRQ(irq, desc); 74 + do_bad_IRQ(desc); 76 75 return; 77 76 } 78 77 79 78 do { 80 - irq = ffs(status) - 1; 79 + unsigned int irq = ffs(status) - 1; 80 + 81 81 status &= ~(1 << irq); 82 82 generic_handle_irq(irq_find_mapping(f->domain, irq)); 83 83 } while (status); ··· 128 128 irq_set_chip_data(irq, f); 129 129 irq_set_chip_and_handler(irq, &f->chip, 130 130 handle_level_irq); 131 - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 131 + irq_set_probe(irq); 132 132 return 0; 133 133 } 134 134
+2 -2
drivers/irqchip/irq-vic.c
··· 201 201 return -EPERM; 202 202 irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq); 203 203 irq_set_chip_data(irq, v->base); 204 - set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 204 + irq_set_probe(irq); 205 205 return 0; 206 206 } 207 207 ··· 225 225 return handled; 226 226 } 227 227 228 - static void vic_handle_irq_cascaded(unsigned int irq, struct irq_desc *desc) 228 + static void vic_handle_irq_cascaded(struct irq_desc *desc) 229 229 { 230 230 u32 stat, hwirq; 231 231 struct irq_chip *host_chip = irq_desc_get_chip(desc);
-1
drivers/irqchip/irq-vt8500.c
··· 167 167 irq_hw_number_t hw) 168 168 { 169 169 irq_set_chip_and_handler(virq, &vt8500_irq_chip, handle_level_irq); 170 - set_irq_flags(virq, IRQF_VALID); 171 170 172 171 return 0; 173 172 }
+1 -2
drivers/irqchip/spear-shirq.c
··· 182 182 &spear320_shirq_intrcomm_ras, 183 183 }; 184 184 185 - static void shirq_handler(unsigned __irq, struct irq_desc *desc) 185 + static void shirq_handler(struct irq_desc *desc) 186 186 { 187 187 struct spear_shirq *shirq = irq_desc_get_handler_data(desc); 188 188 u32 pend; ··· 211 211 for (i = 0; i < shirq->nr_irqs; i++) { 212 212 irq_set_chip_and_handler(shirq->virq_base + i, 213 213 shirq->irq_chip, handle_simple_irq); 214 - set_irq_flags(shirq->virq_base + i, IRQF_VALID); 215 214 irq_set_chip_data(shirq->virq_base + i, shirq); 216 215 } 217 216 }
+2 -1
drivers/leds/Kconfig
··· 170 170 171 171 config LEDS_IPAQ_MICRO 172 172 tristate "LED Support for the Compaq iPAQ h3xxx" 173 + depends on LEDS_CLASS 173 174 depends on MFD_IPAQ_MICRO 174 175 help 175 176 Choose this option if you want to use the notification LED on ··· 230 229 tristate "Common Driver for TI/National LP5521/5523/55231/5562/8501" 231 230 depends on LEDS_LP5521 || LEDS_LP5523 || LEDS_LP5562 || LEDS_LP8501 232 231 select FW_LOADER 233 - select FW_LOADER_USER_HELPER_FALLBACK 232 + select FW_LOADER_USER_HELPER 234 233 help 235 234 This option supports common operations for LP5521/5523/55231/5562/8501 236 235 devices.
+2 -1
drivers/leds/leds-aat1290.c
··· 331 331 cfg->max_brightness = b + 1; 332 332 } 333 333 334 - int init_mm_current_scale(struct aat1290_led *led, 334 + static int init_mm_current_scale(struct aat1290_led *led, 335 335 struct aat1290_led_config_data *cfg) 336 336 { 337 337 int max_mm_current_percent[] = { 20, 22, 25, 28, 32, 36, 40, 45, 50, 56, ··· 559 559 { .compatible = "skyworks,aat1290" }, 560 560 {}, 561 561 }; 562 + MODULE_DEVICE_TABLE(of, aat1290_led_dt_match); 562 563 563 564 static struct platform_driver aat1290_led_driver = { 564 565 .probe = aat1290_led_probe,
+1
drivers/leds/leds-bcm6328.c
··· 395 395 { .compatible = "brcm,bcm6328-leds", }, 396 396 { }, 397 397 }; 398 + MODULE_DEVICE_TABLE(of, bcm6328_leds_of_match); 398 399 399 400 static struct platform_driver bcm6328_leds_driver = { 400 401 .probe = bcm6328_leds_probe,
+1
drivers/leds/leds-bcm6358.c
··· 226 226 { .compatible = "brcm,bcm6358-leds", }, 227 227 { }, 228 228 }; 229 + MODULE_DEVICE_TABLE(of, bcm6358_leds_of_match); 229 230 230 231 static struct platform_driver bcm6358_leds_driver = { 231 232 .probe = bcm6358_leds_probe,
+1
drivers/leds/leds-ktd2692.c
··· 426 426 { .compatible = "kinetic,ktd2692", }, 427 427 { /* sentinel */ }, 428 428 }; 429 + MODULE_DEVICE_TABLE(of, ktd2692_match); 429 430 430 431 static struct platform_driver ktd2692_driver = { 431 432 .driver = {
+1
drivers/leds/leds-max77693.c
··· 1080 1080 { .compatible = "maxim,max77693-led" }, 1081 1081 {}, 1082 1082 }; 1083 + MODULE_DEVICE_TABLE(of, max77693_led_dt_match); 1083 1084 1084 1085 static struct platform_driver max77693_led_driver = { 1085 1086 .probe = max77693_led_probe,
+1
drivers/leds/leds-ns2.c
··· 337 337 { .compatible = "lacie,ns2-leds", }, 338 338 {}, 339 339 }; 340 + MODULE_DEVICE_TABLE(of, of_ns2_leds_match); 340 341 #endif /* CONFIG_OF_GPIO */ 341 342 342 343 struct ns2_led_priv {
+1 -1
drivers/mfd/asic3.c
··· 138 138 spin_unlock_irqrestore(&asic->lock, flags); 139 139 } 140 140 141 - static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc) 141 + static void asic3_irq_demux(struct irq_desc *desc) 142 142 { 143 143 struct asic3 *asic = irq_desc_get_handler_data(desc); 144 144 struct irq_data *data = irq_desc_get_irq_data(desc);
+1 -1
drivers/mfd/ezx-pcap.c
··· 205 205 } while (gpio_get_value(pdata->gpio)); 206 206 } 207 207 208 - static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc) 208 + static void pcap_irq_handler(struct irq_desc *desc) 209 209 { 210 210 struct pcap_chip *pcap = irq_desc_get_handler_data(desc); 211 211
+1 -1
drivers/mfd/htc-egpio.c
··· 98 98 .irq_unmask = egpio_unmask, 99 99 }; 100 100 101 - static void egpio_handler(unsigned int irq, struct irq_desc *desc) 101 + static void egpio_handler(struct irq_desc *desc) 102 102 { 103 103 struct egpio_info *ei = irq_desc_get_handler_data(desc); 104 104 int irqpin;
+1 -1
drivers/mfd/jz4740-adc.c
··· 65 65 spinlock_t lock; 66 66 }; 67 67 68 - static void jz4740_adc_irq_demux(unsigned int irq, struct irq_desc *desc) 68 + static void jz4740_adc_irq_demux(struct irq_desc *desc) 69 69 { 70 70 struct irq_chip_generic *gc = irq_desc_get_handler_data(desc); 71 71 uint8_t status;
+1 -1
drivers/mfd/pm8921-core.c
··· 156 156 return ret; 157 157 } 158 158 159 - static void pm8xxx_irq_handler(unsigned int irq, struct irq_desc *desc) 159 + static void pm8xxx_irq_handler(struct irq_desc *desc) 160 160 { 161 161 struct pm_irq_chip *chip = irq_desc_get_handler_data(desc); 162 162 struct irq_chip *irq_chip = irq_desc_get_chip(desc);
+1 -1
drivers/mfd/t7l66xb.c
··· 185 185 /*--------------------------------------------------------------------------*/ 186 186 187 187 /* Handle the T7L66XB interrupt mux */ 188 - static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc) 188 + static void t7l66xb_irq(struct irq_desc *desc) 189 189 { 190 190 struct t7l66xb *t7l66xb = irq_desc_get_handler_data(desc); 191 191 unsigned int isr;
+1 -2
drivers/mfd/tc6393xb.c
··· 522 522 523 523 /*--------------------------------------------------------------------------*/ 524 524 525 - static void 526 - tc6393xb_irq(unsigned int irq, struct irq_desc *desc) 525 + static void tc6393xb_irq(struct irq_desc *desc) 527 526 { 528 527 struct tc6393xb *tc6393xb = irq_desc_get_handler_data(desc); 529 528 unsigned int isr;
+1 -1
drivers/mfd/ucb1x00-core.c
··· 282 282 * SIBCLK to talk to the chip. We leave the clock running until 283 283 * we have finished processing all interrupts from the chip. 284 284 */ 285 - static void ucb1x00_irq(unsigned int __irq, struct irq_desc *desc) 285 + static void ucb1x00_irq(struct irq_desc *desc) 286 286 { 287 287 struct ucb1x00 *ucb = irq_desc_get_handler_data(desc); 288 288 unsigned int isr, i;
+1 -1
drivers/misc/cxl/Makefile
··· 1 - ccflags-y := -Werror 1 + ccflags-y := -Werror -Wno-unused-const-variable 2 2 3 3 cxl-y += main.o file.o irq.o fault.o native.o 4 4 cxl-y += context.o sysfs.o debugfs.o pci.o trace.o
-2
drivers/misc/cxl/pci.c
··· 1249 1249 int slice; 1250 1250 int rc; 1251 1251 1252 - pci_dev_get(dev); 1253 - 1254 1252 if (cxl_verbose) 1255 1253 dump_cxl_config_space(dev); 1256 1254
+6
drivers/misc/cxl/vphb.c
··· 48 48 49 49 phb = pci_bus_to_host(dev->bus); 50 50 afu = (struct cxl_afu *)phb->private_data; 51 + 52 + if (!cxl_adapter_link_ok(afu->adapter)) { 53 + dev_warn(&dev->dev, "%s: Device link is down, refusing to enable AFU\n", __func__); 54 + return false; 55 + } 56 + 51 57 set_dma_ops(&dev->dev, &dma_direct_ops); 52 58 set_dma_offset(&dev->dev, PAGE_OFFSET); 53 59
+4 -2
drivers/net/ethernet/mellanox/mlx4/en_rx.c
··· 1047 1047 1048 1048 /* If we used up all the quota - we're probably not done yet... */ 1049 1049 if (done == budget) { 1050 - int cpu_curr; 1051 1050 const struct cpumask *aff; 1051 + struct irq_data *idata; 1052 + int cpu_curr; 1052 1053 1053 1054 INC_PERF_COUNTER(priv->pstats.napi_quota); 1054 1055 1055 1056 cpu_curr = smp_processor_id(); 1056 - aff = irq_desc_get_irq_data(cq->irq_desc)->affinity; 1057 + idata = irq_desc_get_irq_data(cq->irq_desc); 1058 + aff = irq_data_get_affinity_mask(idata); 1057 1059 1058 1060 if (likely(cpumask_test_cpu(cpu_curr, aff))) 1059 1061 return budget;
+2 -2
drivers/nvdimm/btt_devs.c
··· 128 128 struct nd_btt *nd_btt = to_nd_btt(dev); 129 129 ssize_t rc; 130 130 131 - nvdimm_bus_lock(dev); 132 131 device_lock(dev); 132 + nvdimm_bus_lock(dev); 133 133 rc = nd_namespace_store(dev, &nd_btt->ndns, buf, len); 134 134 dev_dbg(dev, "%s: result: %zd wrote: %s%s", __func__, 135 135 rc, buf, buf[len - 1] == '\n' ? "" : "\n"); 136 - device_unlock(dev); 137 136 nvdimm_bus_unlock(dev); 137 + device_unlock(dev); 138 138 139 139 return rc; 140 140 }
+2 -2
drivers/nvdimm/pfn_devs.c
··· 148 148 struct nd_pfn *nd_pfn = to_nd_pfn(dev); 149 149 ssize_t rc; 150 150 151 - nvdimm_bus_lock(dev); 152 151 device_lock(dev); 152 + nvdimm_bus_lock(dev); 153 153 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); 154 154 dev_dbg(dev, "%s: result: %zd wrote: %s%s", __func__, 155 155 rc, buf, buf[len - 1] == '\n' ? "" : "\n"); 156 - device_unlock(dev); 157 156 nvdimm_bus_unlock(dev); 157 + device_unlock(dev); 158 158 159 159 return rc; 160 160 }
+2
drivers/nvdimm/pmem.c
··· 92 92 struct pmem_device *pmem = bdev->bd_disk->private_data; 93 93 94 94 pmem_do_bvec(pmem, page, PAGE_CACHE_SIZE, 0, rw, sector); 95 + if (rw & WRITE) 96 + wmb_pmem(); 95 97 page_endio(page, rw & WRITE, 0); 96 98 97 99 return 0;
+2 -3
drivers/pci/host/pci-keystone.c
··· 110 110 return -EINVAL; 111 111 } 112 112 113 - static void ks_pcie_msi_irq_handler(unsigned int __irq, struct irq_desc *desc) 113 + static void ks_pcie_msi_irq_handler(struct irq_desc *desc) 114 114 { 115 115 unsigned int irq = irq_desc_get_irq(desc); 116 116 struct keystone_pcie *ks_pcie = irq_desc_get_handler_data(desc); ··· 138 138 * Traverse through pending legacy interrupts and invoke handler for each. Also 139 139 * takes care of interrupt controller level mask/ack operation. 140 140 */ 141 - static void ks_pcie_legacy_irq_handler(unsigned int __irq, 142 - struct irq_desc *desc) 141 + static void ks_pcie_legacy_irq_handler(struct irq_desc *desc) 143 142 { 144 143 unsigned int irq = irq_desc_get_irq(desc); 145 144 struct keystone_pcie *ks_pcie = irq_desc_get_handler_data(desc);
+1 -1
drivers/pci/host/pci-xgene-msi.c
··· 295 295 return 0; 296 296 } 297 297 298 - static void xgene_msi_isr(unsigned int irq, struct irq_desc *desc) 298 + static void xgene_msi_isr(struct irq_desc *desc) 299 299 { 300 300 struct irq_chip *chip = irq_desc_get_chip(desc); 301 301 struct xgene_msi_group *msi_groups;
+1 -1
drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
··· 143 143 return !!(readl(chip->base + offset) & BIT(shift)); 144 144 } 145 145 146 - static void cygnus_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 146 + static void cygnus_gpio_irq_handler(struct irq_desc *desc) 147 147 { 148 148 struct gpio_chip *gc = irq_desc_get_handler_data(desc); 149 149 struct cygnus_gpio *chip = to_cygnus_gpio(gc);
+1 -1
drivers/pinctrl/intel/pinctrl-baytrail.c
··· 425 425 } 426 426 } 427 427 428 - static void byt_gpio_irq_handler(unsigned irq, struct irq_desc *desc) 428 + static void byt_gpio_irq_handler(struct irq_desc *desc) 429 429 { 430 430 struct irq_data *data = irq_desc_get_irq_data(desc); 431 431 struct byt_gpio *vg = to_byt_gpio(irq_desc_get_handler_data(desc));
+1 -1
drivers/pinctrl/intel/pinctrl-cherryview.c
··· 1414 1414 .flags = IRQCHIP_SKIP_SET_WAKE, 1415 1415 }; 1416 1416 1417 - static void chv_gpio_irq_handler(unsigned irq, struct irq_desc *desc) 1417 + static void chv_gpio_irq_handler(struct irq_desc *desc) 1418 1418 { 1419 1419 struct gpio_chip *gc = irq_desc_get_handler_data(desc); 1420 1420 struct chv_pinctrl *pctrl = gpiochip_to_pinctrl(gc);
+1 -1
drivers/pinctrl/intel/pinctrl-intel.c
··· 836 836 } 837 837 } 838 838 839 - static void intel_gpio_irq_handler(unsigned irq, struct irq_desc *desc) 839 + static void intel_gpio_irq_handler(struct irq_desc *desc) 840 840 { 841 841 struct gpio_chip *gc = irq_desc_get_handler_data(desc); 842 842 struct intel_pinctrl *pctrl = gpiochip_to_pinctrl(gc);
+1 -1
drivers/pinctrl/mediatek/pinctrl-mtk-common.c
··· 1190 1190 } 1191 1191 } 1192 1192 1193 - static void mtk_eint_irq_handler(unsigned irq, struct irq_desc *desc) 1193 + static void mtk_eint_irq_handler(struct irq_desc *desc) 1194 1194 { 1195 1195 struct irq_chip *chip = irq_desc_get_chip(desc); 1196 1196 struct mtk_pinctrl *pctl = irq_desc_get_handler_data(desc);
+2 -2
drivers/pinctrl/nomadik/pinctrl-nomadik.c
··· 860 860 chained_irq_exit(host_chip, desc); 861 861 } 862 862 863 - static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) 863 + static void nmk_gpio_irq_handler(struct irq_desc *desc) 864 864 { 865 865 struct gpio_chip *chip = irq_desc_get_handler_data(desc); 866 866 struct nmk_gpio_chip *nmk_chip = container_of(chip, struct nmk_gpio_chip, chip); ··· 873 873 __nmk_gpio_irq_handler(desc, status); 874 874 } 875 875 876 - static void nmk_gpio_latent_irq_handler(unsigned int irq, struct irq_desc *desc) 876 + static void nmk_gpio_latent_irq_handler(struct irq_desc *desc) 877 877 { 878 878 struct gpio_chip *chip = irq_desc_get_handler_data(desc); 879 879 struct nmk_gpio_chip *nmk_chip = container_of(chip, struct nmk_gpio_chip, chip);
+1 -2
drivers/pinctrl/pinctrl-adi2.c
··· 530 530 static inline void preflow_handler(struct irq_desc *desc) { } 531 531 #endif 532 532 533 - static void adi_gpio_handle_pint_irq(unsigned int inta_irq, 534 - struct irq_desc *desc) 533 + static void adi_gpio_handle_pint_irq(struct irq_desc *desc) 535 534 { 536 535 u32 request; 537 536 u32 level_mask, hwirq;
+3 -3
drivers/pinctrl/pinctrl-amd.c
··· 492 492 .irq_set_type = amd_gpio_irq_set_type, 493 493 }; 494 494 495 - static void amd_gpio_irq_handler(unsigned int __irq, struct irq_desc *desc) 495 + static void amd_gpio_irq_handler(struct irq_desc *desc) 496 496 { 497 - unsigned int irq = irq_desc_get_irq(desc); 498 497 u32 i; 499 498 u32 off; 500 499 u32 reg; 501 500 u32 pin_reg; 502 501 u64 reg64; 503 502 int handled = 0; 503 + unsigned int irq; 504 504 unsigned long flags; 505 505 struct irq_chip *chip = irq_desc_get_chip(desc); 506 506 struct gpio_chip *gc = irq_desc_get_handler_data(desc); ··· 541 541 } 542 542 543 543 if (handled == 0) 544 - handle_bad_irq(irq, desc); 544 + handle_bad_irq(desc); 545 545 546 546 spin_lock_irqsave(&gpio_dev->lock, flags); 547 547 reg = readl(gpio_dev->base + WAKE_INT_MASTER_REG);
+1 -1
drivers/pinctrl/pinctrl-at91.c
··· 1585 1585 .irq_set_wake = gpio_irq_set_wake, 1586 1586 }; 1587 1587 1588 - static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) 1588 + static void gpio_irq_handler(struct irq_desc *desc) 1589 1589 { 1590 1590 struct irq_chip *chip = irq_desc_get_chip(desc); 1591 1591 struct gpio_chip *gpio_chip = irq_desc_get_handler_data(desc);
+1 -1
drivers/pinctrl/pinctrl-coh901.c
··· 519 519 .irq_set_type = u300_gpio_irq_type, 520 520 }; 521 521 522 - static void u300_gpio_irq_handler(unsigned __irq, struct irq_desc *desc) 522 + static void u300_gpio_irq_handler(struct irq_desc *desc) 523 523 { 524 524 unsigned int irq = irq_desc_get_irq(desc); 525 525 struct irq_chip *parent_chip = irq_desc_get_chip(desc);
+4 -6
drivers/pinctrl/pinctrl-pistachio.c
··· 1303 1303 } 1304 1304 1305 1305 if (type & IRQ_TYPE_LEVEL_MASK) 1306 - __irq_set_handler_locked(data->irq, handle_level_irq); 1306 + irq_set_handler_locked(data, handle_level_irq); 1307 1307 else 1308 - __irq_set_handler_locked(data->irq, handle_edge_irq); 1308 + irq_set_handler_locked(data, handle_edge_irq); 1309 1309 1310 1310 return 0; 1311 1311 } 1312 1312 1313 - static void pistachio_gpio_irq_handler(unsigned int __irq, 1314 - struct irq_desc *desc) 1313 + static void pistachio_gpio_irq_handler(struct irq_desc *desc) 1315 1314 { 1316 - unsigned int irq = irq_desc_get_irq(desc); 1317 1315 struct gpio_chip *gc = irq_desc_get_handler_data(desc); 1318 1316 struct pistachio_gpio_bank *bank = gc_to_bank(gc); 1319 - struct irq_chip *chip = irq_get_chip(irq); 1317 + struct irq_chip *chip = irq_desc_get_chip(desc); 1320 1318 unsigned long pending; 1321 1319 unsigned int pin; 1322 1320
+1 -1
drivers/pinctrl/pinctrl-rockchip.c
··· 1475 1475 * Interrupt handling 1476 1476 */ 1477 1477 1478 - static void rockchip_irq_demux(unsigned int __irq, struct irq_desc *desc) 1478 + static void rockchip_irq_demux(struct irq_desc *desc) 1479 1479 { 1480 1480 struct irq_chip *chip = irq_desc_get_chip(desc); 1481 1481 struct rockchip_pin_bank *bank = irq_desc_get_handler_data(desc);
+1 -1
drivers/pinctrl/pinctrl-single.c
··· 1679 1679 * Use this if you have a separate interrupt for each 1680 1680 * pinctrl-single instance. 1681 1681 */ 1682 - static void pcs_irq_chain_handler(unsigned int irq, struct irq_desc *desc) 1682 + static void pcs_irq_chain_handler(struct irq_desc *desc) 1683 1683 { 1684 1684 struct pcs_soc_data *pcs_soc = irq_desc_get_handler_data(desc); 1685 1685 struct irq_chip *chip;
+2 -2
drivers/pinctrl/pinctrl-st.c
··· 1460 1460 } 1461 1461 } 1462 1462 1463 - static void st_gpio_irq_handler(unsigned irq, struct irq_desc *desc) 1463 + static void st_gpio_irq_handler(struct irq_desc *desc) 1464 1464 { 1465 1465 /* interrupt dedicated per bank */ 1466 1466 struct irq_chip *chip = irq_desc_get_chip(desc); ··· 1472 1472 chained_irq_exit(chip, desc); 1473 1473 } 1474 1474 1475 - static void st_gpio_irqmux_handler(unsigned irq, struct irq_desc *desc) 1475 + static void st_gpio_irqmux_handler(struct irq_desc *desc) 1476 1476 { 1477 1477 struct irq_chip *chip = irq_desc_get_chip(desc); 1478 1478 struct st_pinctrl *info = irq_desc_get_handler_data(desc);
+2 -3
drivers/pinctrl/qcom/pinctrl-msm.c
··· 765 765 .irq_set_wake = msm_gpio_irq_set_wake, 766 766 }; 767 767 768 - static void msm_gpio_irq_handler(unsigned int __irq, struct irq_desc *desc) 768 + static void msm_gpio_irq_handler(struct irq_desc *desc) 769 769 { 770 - unsigned int irq = irq_desc_get_irq(desc); 771 770 struct gpio_chip *gc = irq_desc_get_handler_data(desc); 772 771 const struct msm_pingroup *g; 773 772 struct msm_pinctrl *pctrl = to_msm_pinctrl(gc); ··· 794 795 795 796 /* No interrupts were flagged */ 796 797 if (handled == 0) 797 - handle_bad_irq(irq, desc); 798 + handle_bad_irq(desc); 798 799 799 800 chained_irq_exit(chip, desc); 800 801 }
+2 -2
drivers/pinctrl/samsung/pinctrl-exynos.c
··· 419 419 }; 420 420 421 421 /* interrupt handler for wakeup interrupts 0..15 */ 422 - static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc) 422 + static void exynos_irq_eint0_15(struct irq_desc *desc) 423 423 { 424 424 struct exynos_weint_data *eintd = irq_desc_get_handler_data(desc); 425 425 struct samsung_pin_bank *bank = eintd->bank; ··· 451 451 } 452 452 453 453 /* interrupt handler for wakeup interrupt 16 */ 454 - static void exynos_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) 454 + static void exynos_irq_demux_eint16_31(struct irq_desc *desc) 455 455 { 456 456 struct irq_chip *chip = irq_desc_get_chip(desc); 457 457 struct exynos_muxed_weint_data *eintd = irq_desc_get_handler_data(desc);
+4 -4
drivers/pinctrl/samsung/pinctrl-s3c24xx.c
··· 240 240 .irq_set_type = s3c24xx_eint_type, 241 241 }; 242 242 243 - static void s3c2410_demux_eint0_3(unsigned int irq, struct irq_desc *desc) 243 + static void s3c2410_demux_eint0_3(struct irq_desc *desc) 244 244 { 245 245 struct irq_data *data = irq_desc_get_irq_data(desc); 246 246 struct s3c24xx_eint_data *eint_data = irq_desc_get_handler_data(desc); ··· 295 295 .irq_set_type = s3c24xx_eint_type, 296 296 }; 297 297 298 - static void s3c2412_demux_eint0_3(unsigned int irq, struct irq_desc *desc) 298 + static void s3c2412_demux_eint0_3(struct irq_desc *desc) 299 299 { 300 300 struct s3c24xx_eint_data *eint_data = irq_desc_get_handler_data(desc); 301 301 struct irq_data *data = irq_desc_get_irq_data(desc); ··· 388 388 chained_irq_exit(chip, desc); 389 389 } 390 390 391 - static void s3c24xx_demux_eint4_7(unsigned int irq, struct irq_desc *desc) 391 + static void s3c24xx_demux_eint4_7(struct irq_desc *desc) 392 392 { 393 393 s3c24xx_demux_eint(desc, 0, 0xf0); 394 394 } 395 395 396 - static void s3c24xx_demux_eint8_23(unsigned int irq, struct irq_desc *desc) 396 + static void s3c24xx_demux_eint8_23(struct irq_desc *desc) 397 397 { 398 398 s3c24xx_demux_eint(desc, 8, 0xffff00); 399 399 }
+5 -5
drivers/pinctrl/samsung/pinctrl-s3c64xx.c
··· 407 407 .xlate = irq_domain_xlate_twocell, 408 408 }; 409 409 410 - static void s3c64xx_eint_gpio_irq(unsigned int irq, struct irq_desc *desc) 410 + static void s3c64xx_eint_gpio_irq(struct irq_desc *desc) 411 411 { 412 412 struct irq_chip *chip = irq_desc_get_chip(desc); 413 413 struct s3c64xx_eint_gpio_data *data = irq_desc_get_handler_data(desc); ··· 631 631 chained_irq_exit(chip, desc); 632 632 } 633 633 634 - static void s3c64xx_demux_eint0_3(unsigned int irq, struct irq_desc *desc) 634 + static void s3c64xx_demux_eint0_3(struct irq_desc *desc) 635 635 { 636 636 s3c64xx_irq_demux_eint(desc, 0xf); 637 637 } 638 638 639 - static void s3c64xx_demux_eint4_11(unsigned int irq, struct irq_desc *desc) 639 + static void s3c64xx_demux_eint4_11(struct irq_desc *desc) 640 640 { 641 641 s3c64xx_irq_demux_eint(desc, 0xff0); 642 642 } 643 643 644 - static void s3c64xx_demux_eint12_19(unsigned int irq, struct irq_desc *desc) 644 + static void s3c64xx_demux_eint12_19(struct irq_desc *desc) 645 645 { 646 646 s3c64xx_irq_demux_eint(desc, 0xff000); 647 647 } 648 648 649 - static void s3c64xx_demux_eint20_27(unsigned int irq, struct irq_desc *desc) 649 + static void s3c64xx_demux_eint20_27(struct irq_desc *desc) 650 650 { 651 651 s3c64xx_irq_demux_eint(desc, 0xff00000); 652 652 }
+2 -2
drivers/pinctrl/sirf/pinctrl-atlas7.c
··· 4489 4489 .irq_set_type = atlas7_gpio_irq_type, 4490 4490 }; 4491 4491 4492 - static void atlas7_gpio_handle_irq(unsigned int __irq, struct irq_desc *desc) 4492 + static void atlas7_gpio_handle_irq(struct irq_desc *desc) 4493 4493 { 4494 4494 struct gpio_chip *gc = irq_desc_get_handler_data(desc); 4495 4495 struct atlas7_gpio_chip *a7gc = to_atlas7_gpio(gc); ··· 4512 4512 if (!status) { 4513 4513 pr_warn("%s: gpio [%s] status %#x no interrupt is flaged\n", 4514 4514 __func__, gc->label, status); 4515 - handle_bad_irq(irq, desc); 4515 + handle_bad_irq(desc); 4516 4516 return; 4517 4517 } 4518 4518
+2 -2
drivers/pinctrl/sirf/pinctrl-sirf.c
··· 545 545 .irq_set_type = sirfsoc_gpio_irq_type, 546 546 }; 547 547 548 - static void sirfsoc_gpio_handle_irq(unsigned int __irq, struct irq_desc *desc) 548 + static void sirfsoc_gpio_handle_irq(struct irq_desc *desc) 549 549 { 550 550 unsigned int irq = irq_desc_get_irq(desc); 551 551 struct gpio_chip *gc = irq_desc_get_handler_data(desc); ··· 570 570 printk(KERN_WARNING 571 571 "%s: gpio id %d status %#x no interrupt is flagged\n", 572 572 __func__, bank->id, status); 573 - handle_bad_irq(irq, desc); 573 + handle_bad_irq(desc); 574 574 return; 575 575 } 576 576
+1 -1
drivers/pinctrl/spear/pinctrl-plgpio.c
··· 356 356 .irq_set_type = plgpio_irq_set_type, 357 357 }; 358 358 359 - static void plgpio_irq_handler(unsigned irq, struct irq_desc *desc) 359 + static void plgpio_irq_handler(struct irq_desc *desc) 360 360 { 361 361 struct gpio_chip *gc = irq_desc_get_handler_data(desc); 362 362 struct plgpio *plgpio = container_of(gc, struct plgpio, chip);
+5 -7
drivers/pinctrl/sunxi/pinctrl-sunxi.c
··· 617 617 spin_lock_irqsave(&pctl->lock, flags); 618 618 619 619 if (type & IRQ_TYPE_LEVEL_MASK) 620 - __irq_set_chip_handler_name_locked(d->irq, 621 - &sunxi_pinctrl_level_irq_chip, 622 - handle_fasteoi_irq, NULL); 620 + irq_set_chip_handler_name_locked(d, &sunxi_pinctrl_level_irq_chip, 621 + handle_fasteoi_irq, NULL); 623 622 else 624 - __irq_set_chip_handler_name_locked(d->irq, 625 - &sunxi_pinctrl_edge_irq_chip, 626 - handle_edge_irq, NULL); 623 + irq_set_chip_handler_name_locked(d, &sunxi_pinctrl_edge_irq_chip, 624 + handle_edge_irq, NULL); 627 625 628 626 regval = readl(pctl->membase + reg); 629 627 regval &= ~(IRQ_CFG_IRQ_MASK << index); ··· 740 742 .xlate = sunxi_pinctrl_irq_of_xlate, 741 743 }; 742 744 743 - static void sunxi_pinctrl_irq_handler(unsigned __irq, struct irq_desc *desc) 745 + static void sunxi_pinctrl_irq_handler(struct irq_desc *desc) 744 746 { 745 747 unsigned int irq = irq_desc_get_irq(desc); 746 748 struct irq_chip *chip = irq_desc_get_chip(desc);
+9 -1
drivers/s390/virtio/virtio_ccw.c
··· 400 400 static int virtio_ccw_read_vq_conf(struct virtio_ccw_device *vcdev, 401 401 struct ccw1 *ccw, int index) 402 402 { 403 + int ret; 404 + 403 405 vcdev->config_block->index = index; 404 406 ccw->cmd_code = CCW_CMD_READ_VQ_CONF; 405 407 ccw->flags = 0; 406 408 ccw->count = sizeof(struct vq_config_block); 407 409 ccw->cda = (__u32)(unsigned long)(vcdev->config_block); 408 - ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_VQ_CONF); 410 + ret = ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_READ_VQ_CONF); 411 + if (ret) 412 + return ret; 409 413 return vcdev->config_block->num; 410 414 } 411 415 ··· 507 503 goto out_err; 508 504 } 509 505 info->num = virtio_ccw_read_vq_conf(vcdev, ccw, i); 506 + if (info->num < 0) { 507 + err = info->num; 508 + goto out_err; 509 + } 510 510 size = PAGE_ALIGN(vring_size(info->num, KVM_VIRTIO_CCW_RING_ALIGN)); 511 511 info->queue = alloc_pages_exact(size, GFP_KERNEL | __GFP_ZERO); 512 512 if (info->queue == NULL) {
+1 -1
drivers/sh/intc/core.c
··· 65 65 raw_spin_unlock_irqrestore(&intc_big_lock, flags); 66 66 } 67 67 68 - static void intc_redirect_irq(unsigned int irq, struct irq_desc *desc) 68 + static void intc_redirect_irq(struct irq_desc *desc) 69 69 { 70 70 generic_handle_irq((unsigned int)irq_desc_get_handler_data(desc)); 71 71 }
+1 -9
drivers/sh/intc/internals.h
··· 99 99 */ 100 100 static inline void activate_irq(int irq) 101 101 { 102 - #ifdef CONFIG_ARM 103 - /* ARM requires an extra step to clear IRQ_NOREQUEST, which it 104 - * sets on behalf of every irq_chip. Also sets IRQ_NOPROBE. 105 - */ 106 - set_irq_flags(irq, IRQF_VALID); 107 - #else 108 - /* same effect on other architectures */ 109 - irq_set_noprobe(irq); 110 - #endif 102 + irq_modify_status(irq, IRQ_NOREQUEST, IRQ_NOPROBE); 111 103 } 112 104 113 105 static inline int intc_handle_int_cmp(const void *a, const void *b)
+2 -2
drivers/sh/intc/virq.c
··· 109 109 return 0; 110 110 } 111 111 112 - static void intc_virq_handler(unsigned int __irq, struct irq_desc *desc) 112 + static void intc_virq_handler(struct irq_desc *desc) 113 113 { 114 114 unsigned int irq = irq_desc_get_irq(desc); 115 115 struct irq_data *data = irq_desc_get_irq_data(desc); ··· 127 127 handle = (unsigned long)irq_desc_get_handler_data(vdesc); 128 128 addr = INTC_REG(d, _INTC_ADDR_E(handle), 0); 129 129 if (intc_reg_fns[_INTC_FN(handle)](addr, handle, 0)) 130 - generic_handle_irq_desc(entry->irq, vdesc); 130 + generic_handle_irq_desc(vdesc); 131 131 } 132 132 } 133 133
+5 -14
drivers/sh/pm_runtime.c
··· 35 35 static int __init sh_pm_runtime_init(void) 36 36 { 37 37 if (IS_ENABLED(CONFIG_ARCH_SHMOBILE_MULTI)) { 38 - if (!of_machine_is_compatible("renesas,emev2") && 39 - !of_machine_is_compatible("renesas,r7s72100") && 40 - #ifndef CONFIG_PM_GENERIC_DOMAINS_OF 41 - !of_machine_is_compatible("renesas,r8a73a4") && 42 - !of_machine_is_compatible("renesas,r8a7740") && 43 - !of_machine_is_compatible("renesas,sh73a0") && 44 - #endif 45 - !of_machine_is_compatible("renesas,r8a7778") && 46 - !of_machine_is_compatible("renesas,r8a7779") && 47 - !of_machine_is_compatible("renesas,r8a7790") && 48 - !of_machine_is_compatible("renesas,r8a7791") && 49 - !of_machine_is_compatible("renesas,r8a7792") && 50 - !of_machine_is_compatible("renesas,r8a7793") && 51 - !of_machine_is_compatible("renesas,r8a7794")) 38 + if (!of_find_compatible_node(NULL, NULL, 39 + "renesas,cpg-mstp-clocks")) 40 + return 0; 41 + if (IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS_OF) && 42 + of_find_node_with_property(NULL, "#power-domain-cells")) 52 43 return 0; 53 44 } 54 45
+3 -3
drivers/soc/dove/pmu.c
··· 222 222 } 223 223 224 224 /* PMU IRQ controller */ 225 - static void pmu_irq_handler(unsigned int irq, struct irq_desc *desc) 225 + static void pmu_irq_handler(struct irq_desc *desc) 226 226 { 227 - struct pmu_data *pmu = irq_get_handler_data(irq); 227 + struct pmu_data *pmu = irq_desc_get_handler_data(desc); 228 228 struct irq_chip_generic *gc = pmu->irq_gc; 229 229 struct irq_domain *domain = pmu->irq_domain; 230 230 void __iomem *base = gc->reg_base; ··· 232 232 u32 done = ~0; 233 233 234 234 if (stat == 0) { 235 - handle_bad_irq(irq, desc); 235 + handle_bad_irq(desc); 236 236 return; 237 237 } 238 238
+1 -1
drivers/spmi/spmi-pmic-arb.c
··· 451 451 } 452 452 } 453 453 454 - static void pmic_arb_chained_irq(unsigned int irq, struct irq_desc *desc) 454 + static void pmic_arb_chained_irq(struct irq_desc *desc) 455 455 { 456 456 struct spmi_pmic_arb_dev *pa = irq_desc_get_handler_data(desc); 457 457 struct irq_chip *chip = irq_desc_get_chip(desc);
+2 -2
drivers/staging/rdma/hfi1/chip.c
··· 2710 2710 if (sleep_ok) { 2711 2711 mutex_lock(&ppd->hls_lock); 2712 2712 } else { 2713 - while (mutex_trylock(&ppd->hls_lock) == EBUSY) 2713 + while (!mutex_trylock(&ppd->hls_lock)) 2714 2714 udelay(1); 2715 2715 } 2716 2716 ··· 2758 2758 if (sleep_ok) { 2759 2759 mutex_lock(&dd->pport->hls_lock); 2760 2760 } else { 2761 - while (mutex_trylock(&dd->pport->hls_lock) == EBUSY) 2761 + while (!mutex_trylock(&dd->pport->hls_lock)) 2762 2762 udelay(1); 2763 2763 } 2764 2764
+48 -6
drivers/staging/rdma/hfi1/device.c
··· 57 57 #include "device.h" 58 58 59 59 static struct class *class; 60 + static struct class *user_class; 60 61 static dev_t hfi1_dev; 61 62 62 63 int hfi1_cdev_init(int minor, const char *name, 63 64 const struct file_operations *fops, 64 - struct cdev *cdev, struct device **devp) 65 + struct cdev *cdev, struct device **devp, 66 + bool user_accessible) 65 67 { 66 68 const dev_t dev = MKDEV(MAJOR(hfi1_dev), minor); 67 69 struct device *device = NULL; ··· 80 78 goto done; 81 79 } 82 80 83 - device = device_create(class, NULL, dev, NULL, "%s", name); 81 + if (user_accessible) 82 + device = device_create(user_class, NULL, dev, NULL, "%s", name); 83 + else 84 + device = device_create(class, NULL, dev, NULL, "%s", name); 85 + 84 86 if (!IS_ERR(device)) 85 87 goto done; 86 88 ret = PTR_ERR(device); ··· 116 110 return hfi1_class_name; 117 111 } 118 112 113 + static char *hfi1_devnode(struct device *dev, umode_t *mode) 114 + { 115 + if (mode) 116 + *mode = 0600; 117 + return kasprintf(GFP_KERNEL, "%s", dev_name(dev)); 118 + } 119 + 120 + static const char *hfi1_class_name_user = "hfi1_user"; 121 + const char *class_name_user(void) 122 + { 123 + return hfi1_class_name_user; 124 + } 125 + 126 + static char *hfi1_user_devnode(struct device *dev, umode_t *mode) 127 + { 128 + if (mode) 129 + *mode = 0666; 130 + return kasprintf(GFP_KERNEL, "%s", dev_name(dev)); 131 + } 132 + 119 133 int __init dev_init(void) 120 134 { 121 135 int ret; ··· 151 125 ret = PTR_ERR(class); 152 126 pr_err("Could not create device class (err %d)\n", -ret); 153 127 unregister_chrdev_region(hfi1_dev, HFI1_NMINORS); 128 + goto done; 154 129 } 130 + class->devnode = hfi1_devnode; 131 + 132 + user_class = class_create(THIS_MODULE, class_name_user()); 133 + if (IS_ERR(user_class)) { 134 + ret = PTR_ERR(user_class); 135 + pr_err("Could not create device class for user accessible files (err %d)\n", 136 + -ret); 137 + class_destroy(class); 138 + class = NULL; 139 + user_class = NULL; 140 + unregister_chrdev_region(hfi1_dev, HFI1_NMINORS); 141 + goto done; 142 + } 143 + user_class->devnode = hfi1_user_devnode; 155 144 156 145 done: 157 146 return ret; ··· 174 133 175 134 void dev_cleanup(void) 176 135 { 177 - if (class) { 178 - class_destroy(class); 179 - class = NULL; 180 - } 136 + class_destroy(class); 137 + class = NULL; 138 + 139 + class_destroy(user_class); 140 + user_class = NULL; 181 141 182 142 unregister_chrdev_region(hfi1_dev, HFI1_NMINORS); 183 143 }
+2 -1
drivers/staging/rdma/hfi1/device.h
··· 52 52 53 53 int hfi1_cdev_init(int minor, const char *name, 54 54 const struct file_operations *fops, 55 - struct cdev *cdev, struct device **devp); 55 + struct cdev *cdev, struct device **devp, 56 + bool user_accessible); 56 57 void hfi1_cdev_cleanup(struct cdev *cdev, struct device **devp); 57 58 const char *class_name(void); 58 59 int __init dev_init(void);
+18 -18
drivers/staging/rdma/hfi1/diag.c
··· 292 292 if (atomic_inc_return(&diagpkt_count) == 1) { 293 293 ret = hfi1_cdev_init(HFI1_DIAGPKT_MINOR, name, 294 294 &diagpkt_file_ops, &diagpkt_cdev, 295 - &diagpkt_device); 295 + &diagpkt_device, false); 296 296 } 297 297 298 298 return ret; ··· 592 592 593 593 ret = hfi1_cdev_init(HFI1_SNOOP_CAPTURE_BASE + dd->unit, name, 594 594 &snoop_file_ops, 595 - &dd->hfi1_snoop.cdev, &dd->hfi1_snoop.class_dev); 595 + &dd->hfi1_snoop.cdev, &dd->hfi1_snoop.class_dev, 596 + false); 596 597 597 598 if (ret) { 598 599 dd_dev_err(dd, "Couldn't create %s device: %d", name, ret); ··· 1013 1012 case HFI1_SNOOP_IOCSETLINKSTATE_EXTRA: 1014 1013 memset(&link_info, 0, sizeof(link_info)); 1015 1014 1016 - ret = copy_from_user(&link_info, 1015 + if (copy_from_user(&link_info, 1017 1016 (struct hfi1_link_info __user *)arg, 1018 - sizeof(link_info)); 1019 - if (ret) 1020 - break; 1017 + sizeof(link_info))) 1018 + ret = -EFAULT; 1021 1019 1022 1020 value = link_info.port_state; 1023 1021 index = link_info.port_number; ··· 1080 1080 case HFI1_SNOOP_IOCGETLINKSTATE_EXTRA: 1081 1081 if (cmd == HFI1_SNOOP_IOCGETLINKSTATE_EXTRA) { 1082 1082 memset(&link_info, 0, sizeof(link_info)); 1083 - ret = copy_from_user(&link_info, 1083 + if (copy_from_user(&link_info, 1084 1084 (struct hfi1_link_info __user *)arg, 1085 - sizeof(link_info)); 1085 + sizeof(link_info))) 1086 + ret = -EFAULT; 1086 1087 index = link_info.port_number; 1087 1088 } else { 1088 1089 ret = __get_user(index, (int __user *) arg); ··· 1115 1114 ppd->link_speed_active; 1116 1115 link_info.link_width_active = 1117 1116 ppd->link_width_active; 1118 - ret = copy_to_user( 1117 + if (copy_to_user( 1119 1118 (struct hfi1_link_info __user *)arg, 1120 - &link_info, sizeof(link_info)); 1119 + &link_info, sizeof(link_info))) 1120 + ret = -EFAULT; 1121 1121 } else { 1122 1122 ret = __put_user(value, (int __user *)arg); 1123 1123 } ··· 1144 1142 snoop_dbg("Setting filter"); 1145 1143 /* just copy command structure */ 1146 1144 argp = (unsigned long *)arg; 1147 - ret = copy_from_user(&filter_cmd, (void __user *)argp, 1148 - sizeof(filter_cmd)); 1149 - if (ret < 0) { 1150 - pr_alert("Error copying filter command\n"); 1145 + if (copy_from_user(&filter_cmd, (void __user *)argp, 1146 + sizeof(filter_cmd))) { 1147 + ret = -EFAULT; 1151 1148 break; 1152 1149 } 1153 1150 if (filter_cmd.opcode >= HFI1_MAX_FILTERS) { ··· 1168 1167 break; 1169 1168 } 1170 1169 /* copy remaining data from userspace */ 1171 - ret = copy_from_user((u8 *)filter_value, 1170 + if (copy_from_user((u8 *)filter_value, 1172 1171 (void __user *)filter_cmd.value_ptr, 1173 - filter_cmd.length); 1174 - if (ret < 0) { 1172 + filter_cmd.length)) { 1175 1173 kfree(filter_value); 1176 - pr_alert("Error copying filter data\n"); 1174 + ret = -EFAULT; 1177 1175 break; 1178 1176 } 1179 1177 /* Drain packets first */
+7 -3
drivers/staging/rdma/hfi1/file_ops.c
··· 1181 1181 struct hfi1_filedata *fd = fp->private_data; 1182 1182 int ret = 0; 1183 1183 1184 + memset(&cinfo, 0, sizeof(cinfo)); 1184 1185 ret = hfi1_get_base_kinfo(uctxt, &cinfo); 1185 1186 if (ret < 0) 1186 1187 goto done; ··· 2090 2089 2091 2090 if (atomic_inc_return(&user_count) == 1) { 2092 2091 ret = hfi1_cdev_init(0, class_name(), &hfi1_file_ops, 2093 - &wildcard_cdev, &wildcard_device); 2092 + &wildcard_cdev, &wildcard_device, 2093 + true); 2094 2094 if (ret) 2095 2095 goto done; 2096 2096 } 2097 2097 2098 2098 snprintf(name, sizeof(name), "%s_%d", class_name(), dd->unit); 2099 2099 ret = hfi1_cdev_init(dd->unit + 1, name, &hfi1_file_ops, 2100 - &dd->user_cdev, &dd->user_device); 2100 + &dd->user_cdev, &dd->user_device, 2101 + true); 2101 2102 if (ret) 2102 2103 goto done; 2103 2104 ··· 2107 2104 snprintf(name, sizeof(name), 2108 2105 "%s_ui%d", class_name(), dd->unit); 2109 2106 ret = hfi1_cdev_init(dd->unit + UI_OFFSET, name, &ui_file_ops, 2110 - &dd->ui_cdev, &dd->ui_device); 2107 + &dd->ui_cdev, &dd->ui_device, 2108 + false); 2111 2109 if (ret) 2112 2110 goto done; 2113 2111 }
+2 -2
drivers/staging/rdma/hfi1/mad.c
··· 1717 1717 psi->port_states.portphysstate_portstate = 1718 1718 (hfi1_ibphys_portstate(ppd) << 4) | (lstate & 0xf); 1719 1719 psi->link_width_downgrade_tx_active = 1720 - ppd->link_width_downgrade_tx_active; 1720 + cpu_to_be16(ppd->link_width_downgrade_tx_active); 1721 1721 psi->link_width_downgrade_rx_active = 1722 - ppd->link_width_downgrade_rx_active; 1722 + cpu_to_be16(ppd->link_width_downgrade_rx_active); 1723 1723 if (resp_len) 1724 1724 *resp_len += sizeof(struct opa_port_state_info); 1725 1725
+3 -3
drivers/staging/rdma/hfi1/sdma.c
··· 737 737 */ 738 738 if (!is_power_of_2(count)) 739 739 return SDMA_DESCQ_CNT; 740 - if (count < 64 && count > 32768) 740 + if (count < 64 || count > 32768) 741 741 return SDMA_DESCQ_CNT; 742 742 return count; 743 743 } ··· 1848 1848 dd_dev_err(sde->dd, 1849 1849 "\taidx: %u amode: %u alen: %u\n", 1850 1850 (u8)((desc[1] & SDMA_DESC1_HEADER_INDEX_SMASK) 1851 - >> SDMA_DESC1_HEADER_INDEX_MASK), 1851 + >> SDMA_DESC1_HEADER_INDEX_SHIFT), 1852 1852 (u8)((desc[1] & SDMA_DESC1_HEADER_MODE_SMASK) 1853 1853 >> SDMA_DESC1_HEADER_MODE_SHIFT), 1854 1854 (u8)((desc[1] & SDMA_DESC1_HEADER_DWS_SMASK) ··· 1926 1926 if (desc[0] & SDMA_DESC0_FIRST_DESC_FLAG) 1927 1927 seq_printf(s, "\t\tahgidx: %u ahgmode: %u\n", 1928 1928 (u8)((desc[1] & SDMA_DESC1_HEADER_INDEX_SMASK) 1929 - >> SDMA_DESC1_HEADER_INDEX_MASK), 1929 + >> SDMA_DESC1_HEADER_INDEX_SHIFT), 1930 1930 (u8)((desc[1] & SDMA_DESC1_HEADER_MODE_SMASK) 1931 1931 >> SDMA_DESC1_HEADER_MODE_SHIFT)); 1932 1932 head = (head + 1) & sde->sdma_mask;
+18 -18
drivers/staging/rdma/hfi1/sdma.h
··· 109 109 /* 110 110 * Bits defined in the send DMA descriptor. 111 111 */ 112 - #define SDMA_DESC0_FIRST_DESC_FLAG (1ULL<<63) 113 - #define SDMA_DESC0_LAST_DESC_FLAG (1ULL<<62) 112 + #define SDMA_DESC0_FIRST_DESC_FLAG (1ULL << 63) 113 + #define SDMA_DESC0_LAST_DESC_FLAG (1ULL << 62) 114 114 #define SDMA_DESC0_BYTE_COUNT_SHIFT 48 115 115 #define SDMA_DESC0_BYTE_COUNT_WIDTH 14 116 116 #define SDMA_DESC0_BYTE_COUNT_MASK \ 117 - ((1ULL<<SDMA_DESC0_BYTE_COUNT_WIDTH)-1ULL) 117 + ((1ULL << SDMA_DESC0_BYTE_COUNT_WIDTH) - 1) 118 118 #define SDMA_DESC0_BYTE_COUNT_SMASK \ 119 - (SDMA_DESC0_BYTE_COUNT_MASK<<SDMA_DESC0_BYTE_COUNT_SHIFT) 119 + (SDMA_DESC0_BYTE_COUNT_MASK << SDMA_DESC0_BYTE_COUNT_SHIFT) 120 120 #define SDMA_DESC0_PHY_ADDR_SHIFT 0 121 121 #define SDMA_DESC0_PHY_ADDR_WIDTH 48 122 122 #define SDMA_DESC0_PHY_ADDR_MASK \ 123 - ((1ULL<<SDMA_DESC0_PHY_ADDR_WIDTH)-1ULL) 123 + ((1ULL << SDMA_DESC0_PHY_ADDR_WIDTH) - 1) 124 124 #define SDMA_DESC0_PHY_ADDR_SMASK \ 125 - (SDMA_DESC0_PHY_ADDR_MASK<<SDMA_DESC0_PHY_ADDR_SHIFT) 125 + (SDMA_DESC0_PHY_ADDR_MASK << SDMA_DESC0_PHY_ADDR_SHIFT) 126 126 127 127 #define SDMA_DESC1_HEADER_UPDATE1_SHIFT 32 128 128 #define SDMA_DESC1_HEADER_UPDATE1_WIDTH 32 129 129 #define SDMA_DESC1_HEADER_UPDATE1_MASK \ 130 - ((1ULL<<SDMA_DESC1_HEADER_UPDATE1_WIDTH)-1ULL) 130 + ((1ULL << SDMA_DESC1_HEADER_UPDATE1_WIDTH) - 1) 131 131 #define SDMA_DESC1_HEADER_UPDATE1_SMASK \ 132 - (SDMA_DESC1_HEADER_UPDATE1_MASK<<SDMA_DESC1_HEADER_UPDATE1_SHIFT) 132 + (SDMA_DESC1_HEADER_UPDATE1_MASK << SDMA_DESC1_HEADER_UPDATE1_SHIFT) 133 133 #define SDMA_DESC1_HEADER_MODE_SHIFT 13 134 134 #define SDMA_DESC1_HEADER_MODE_WIDTH 3 135 135 #define SDMA_DESC1_HEADER_MODE_MASK \ 136 - ((1ULL<<SDMA_DESC1_HEADER_MODE_WIDTH)-1ULL) 136 + ((1ULL << SDMA_DESC1_HEADER_MODE_WIDTH) - 1) 137 137 #define SDMA_DESC1_HEADER_MODE_SMASK \ 138 - (SDMA_DESC1_HEADER_MODE_MASK<<SDMA_DESC1_HEADER_MODE_SHIFT) 138 + (SDMA_DESC1_HEADER_MODE_MASK << SDMA_DESC1_HEADER_MODE_SHIFT) 139 139 #define SDMA_DESC1_HEADER_INDEX_SHIFT 8 140 140 #define SDMA_DESC1_HEADER_INDEX_WIDTH 5 141 141 #define SDMA_DESC1_HEADER_INDEX_MASK \ 142 - ((1ULL<<SDMA_DESC1_HEADER_INDEX_WIDTH)-1ULL) 142 + ((1ULL << SDMA_DESC1_HEADER_INDEX_WIDTH) - 1) 143 143 #define SDMA_DESC1_HEADER_INDEX_SMASK \ 144 - (SDMA_DESC1_HEADER_INDEX_MASK<<SDMA_DESC1_HEADER_INDEX_SHIFT) 144 + (SDMA_DESC1_HEADER_INDEX_MASK << SDMA_DESC1_HEADER_INDEX_SHIFT) 145 145 #define SDMA_DESC1_HEADER_DWS_SHIFT 4 146 146 #define SDMA_DESC1_HEADER_DWS_WIDTH 4 147 147 #define SDMA_DESC1_HEADER_DWS_MASK \ 148 - ((1ULL<<SDMA_DESC1_HEADER_DWS_WIDTH)-1ULL) 148 + ((1ULL << SDMA_DESC1_HEADER_DWS_WIDTH) - 1) 149 149 #define SDMA_DESC1_HEADER_DWS_SMASK \ 150 - (SDMA_DESC1_HEADER_DWS_MASK<<SDMA_DESC1_HEADER_DWS_SHIFT) 150 + (SDMA_DESC1_HEADER_DWS_MASK << SDMA_DESC1_HEADER_DWS_SHIFT) 151 151 #define SDMA_DESC1_GENERATION_SHIFT 2 152 152 #define SDMA_DESC1_GENERATION_WIDTH 2 153 153 #define SDMA_DESC1_GENERATION_MASK \ 154 - ((1ULL<<SDMA_DESC1_GENERATION_WIDTH)-1ULL) 154 + ((1ULL << SDMA_DESC1_GENERATION_WIDTH) - 1) 155 155 #define SDMA_DESC1_GENERATION_SMASK \ 156 - (SDMA_DESC1_GENERATION_MASK<<SDMA_DESC1_GENERATION_SHIFT) 157 - #define SDMA_DESC1_INT_REQ_FLAG (1ULL<<1) 158 - #define SDMA_DESC1_HEAD_TO_HOST_FLAG (1ULL<<0) 156 + (SDMA_DESC1_GENERATION_MASK << SDMA_DESC1_GENERATION_SHIFT) 157 + #define SDMA_DESC1_INT_REQ_FLAG (1ULL << 1) 158 + #define SDMA_DESC1_HEAD_TO_HOST_FLAG (1ULL << 0) 159 159 160 160 enum sdma_states { 161 161 sdma_state_s00_hw_down,
+5 -3
drivers/staging/rdma/hfi1/verbs.c
··· 749 749 struct verbs_txreq *tx; 750 750 751 751 tx = kmem_cache_alloc(dev->verbs_txreq_cache, GFP_ATOMIC); 752 - if (!tx) 752 + if (!tx) { 753 753 /* call slow path to get the lock */ 754 754 tx = __get_txreq(dev, qp); 755 - if (tx) 756 - tx->qp = qp; 755 + if (IS_ERR(tx)) 756 + return tx; 757 + } 758 + tx->qp = qp; 757 759 return tx; 758 760 } 759 761
+1 -2
drivers/vhost/net.c
··· 61 61 enum { 62 62 VHOST_NET_FEATURES = VHOST_FEATURES | 63 63 (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) | 64 - (1ULL << VIRTIO_NET_F_MRG_RXBUF) | 65 - (1ULL << VIRTIO_F_VERSION_1), 64 + (1ULL << VIRTIO_NET_F_MRG_RXBUF) 66 65 }; 67 66 68 67 enum {
+1 -3
drivers/vhost/scsi.c
··· 166 166 /* Note: can't set VIRTIO_F_VERSION_1 yet, since that implies ANY_LAYOUT. */ 167 167 enum { 168 168 VHOST_SCSI_FEATURES = VHOST_FEATURES | (1ULL << VIRTIO_SCSI_F_HOTPLUG) | 169 - (1ULL << VIRTIO_SCSI_F_T10_PI) | 170 - (1ULL << VIRTIO_F_ANY_LAYOUT) | 171 - (1ULL << VIRTIO_F_VERSION_1) 169 + (1ULL << VIRTIO_SCSI_F_T10_PI) 172 170 }; 173 171 174 172 #define VHOST_SCSI_MAX_TARGET 256
+3
drivers/vhost/test.c
··· 277 277 return -EFAULT; 278 278 return 0; 279 279 case VHOST_SET_FEATURES: 280 + printk(KERN_ERR "1\n"); 280 281 if (copy_from_user(&features, featurep, sizeof features)) 281 282 return -EFAULT; 283 + printk(KERN_ERR "2\n"); 282 284 if (features & ~VHOST_FEATURES) 283 285 return -EOPNOTSUPP; 286 + printk(KERN_ERR "3\n"); 284 287 return vhost_test_set_features(n, features); 285 288 case VHOST_RESET_OWNER: 286 289 return vhost_test_reset_owner(n);
+3 -1
drivers/vhost/vhost.h
··· 173 173 VHOST_FEATURES = (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | 174 174 (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | 175 175 (1ULL << VIRTIO_RING_F_EVENT_IDX) | 176 - (1ULL << VHOST_F_LOG_ALL), 176 + (1ULL << VHOST_F_LOG_ALL) | 177 + (1ULL << VIRTIO_F_ANY_LAYOUT) | 178 + (1ULL << VIRTIO_F_VERSION_1) 177 179 }; 178 180 179 181 static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit)
+7
fs/block_dev.c
··· 1242 1242 goto out_clear; 1243 1243 } 1244 1244 bd_set_size(bdev, (loff_t)bdev->bd_part->nr_sects << 9); 1245 + /* 1246 + * If the partition is not aligned on a page 1247 + * boundary, we can't do dax I/O to it. 1248 + */ 1249 + if ((bdev->bd_part->start_sect % (PAGE_SIZE / 512)) || 1250 + (bdev->bd_part->nr_sects % (PAGE_SIZE / 512))) 1251 + bdev->bd_inode->i_flags &= ~S_DAX; 1245 1252 } 1246 1253 } else { 1247 1254 if (bdev->bd_contains == bdev) {
+2 -1
fs/dax.c
··· 119 119 size_t len; 120 120 if (pos == max) { 121 121 unsigned blkbits = inode->i_blkbits; 122 - sector_t block = pos >> blkbits; 122 + long page = pos >> PAGE_SHIFT; 123 + sector_t block = page << (PAGE_SHIFT - blkbits); 123 124 unsigned first = pos - (block << blkbits); 124 125 long size; 125 126
+16 -1
fs/fs-writeback.c
··· 1481 1481 wbc_detach_inode(&wbc); 1482 1482 work->nr_pages -= write_chunk - wbc.nr_to_write; 1483 1483 wrote += write_chunk - wbc.nr_to_write; 1484 + 1485 + if (need_resched()) { 1486 + /* 1487 + * We're trying to balance between building up a nice 1488 + * long list of IOs to improve our merge rate, and 1489 + * getting those IOs out quickly for anyone throttling 1490 + * in balance_dirty_pages(). cond_resched() doesn't 1491 + * unplug, so get our IOs out the door before we 1492 + * give up the CPU. 1493 + */ 1494 + blk_flush_plug(current); 1495 + cond_resched(); 1496 + } 1497 + 1498 + 1484 1499 spin_lock(&wb->list_lock); 1485 1500 spin_lock(&inode->i_lock); 1486 1501 if (!(inode->i_state & I_DIRTY_ALL)) ··· 1503 1488 requeue_inode(inode, wb, &wbc); 1504 1489 inode_sync_complete(inode); 1505 1490 spin_unlock(&inode->i_lock); 1506 - cond_resched_lock(&wb->list_lock); 1491 + 1507 1492 /* 1508 1493 * bail out to wb_writeback() often enough to check 1509 1494 * background threshold and other termination conditions.
+2 -2
include/acpi/button.h
··· 3 3 4 4 #include <linux/notifier.h> 5 5 6 - #if defined(CONFIG_ACPI_BUTTON) || defined(CONFIG_ACPI_BUTTON_MODULE) 6 + #if IS_ENABLED(CONFIG_ACPI_BUTTON) 7 7 extern int acpi_lid_notifier_register(struct notifier_block *nb); 8 8 extern int acpi_lid_notifier_unregister(struct notifier_block *nb); 9 9 extern int acpi_lid_open(void); ··· 20 20 { 21 21 return 1; 22 22 } 23 - #endif /* defined(CONFIG_ACPI_BUTTON) || defined(CONFIG_ACPI_BUTTON_MODULE) */ 23 + #endif /* IS_ENABLED(CONFIG_ACPI_BUTTON) */ 24 24 25 25 #endif /* ACPI_BUTTON_H */
+1 -1
include/acpi/video.h
··· 24 24 acpi_backlight_native, 25 25 }; 26 26 27 - #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) 27 + #if IS_ENABLED(CONFIG_ACPI_VIDEO) 28 28 extern int acpi_video_register(void); 29 29 extern void acpi_video_unregister(void); 30 30 extern int acpi_video_get_edid(struct acpi_device *device, int type,
+1 -1
include/asm-generic/memory_model.h
··· 73 73 * Convert a physical address to a Page Frame Number and back 74 74 */ 75 75 #define __phys_to_pfn(paddr) ((unsigned long)((paddr) >> PAGE_SHIFT)) 76 - #define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) 76 + #define __pfn_to_phys(pfn) PFN_PHYS(pfn) 77 77 78 78 #define page_to_pfn __page_to_pfn 79 79 #define pfn_to_page __pfn_to_page
+1 -5
include/kvm/arm_vgic.h
··· 35 35 #define VGIC_V3_MAX_LRS 16 36 36 #define VGIC_MAX_IRQS 1024 37 37 #define VGIC_V2_MAX_CPUS 8 38 - 39 - /* Sanity checks... */ 40 - #if (KVM_MAX_VCPUS > 255) 41 - #error Too many KVM VCPUs, the VGIC only supports up to 255 VCPUs for now 42 - #endif 38 + #define VGIC_V3_MAX_CPUS 255 43 39 44 40 #if (VGIC_NR_IRQS_LEGACY & 31) 45 41 #error "VGIC_NR_IRQS must be a multiple of 32"
+50
include/linux/blkdev.h
··· 1368 1368 ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q)); 1369 1369 } 1370 1370 1371 + static inline bool bio_will_gap(struct request_queue *q, struct bio *prev, 1372 + struct bio *next) 1373 + { 1374 + if (!bio_has_data(prev)) 1375 + return false; 1376 + 1377 + return bvec_gap_to_prev(q, &prev->bi_io_vec[prev->bi_vcnt - 1], 1378 + next->bi_io_vec[0].bv_offset); 1379 + } 1380 + 1381 + static inline bool req_gap_back_merge(struct request *req, struct bio *bio) 1382 + { 1383 + return bio_will_gap(req->q, req->biotail, bio); 1384 + } 1385 + 1386 + static inline bool req_gap_front_merge(struct request *req, struct bio *bio) 1387 + { 1388 + return bio_will_gap(req->q, bio, req->bio); 1389 + } 1390 + 1371 1391 struct work_struct; 1372 1392 int kblockd_schedule_work(struct work_struct *work); 1373 1393 int kblockd_schedule_delayed_work(struct delayed_work *dwork, unsigned long delay); ··· 1514 1494 return q->limits.max_integrity_segments; 1515 1495 } 1516 1496 1497 + static inline bool integrity_req_gap_back_merge(struct request *req, 1498 + struct bio *next) 1499 + { 1500 + struct bio_integrity_payload *bip = bio_integrity(req->bio); 1501 + struct bio_integrity_payload *bip_next = bio_integrity(next); 1502 + 1503 + return bvec_gap_to_prev(req->q, &bip->bip_vec[bip->bip_vcnt - 1], 1504 + bip_next->bip_vec[0].bv_offset); 1505 + } 1506 + 1507 + static inline bool integrity_req_gap_front_merge(struct request *req, 1508 + struct bio *bio) 1509 + { 1510 + struct bio_integrity_payload *bip = bio_integrity(bio); 1511 + struct bio_integrity_payload *bip_next = bio_integrity(req->bio); 1512 + 1513 + return bvec_gap_to_prev(req->q, &bip->bip_vec[bip->bip_vcnt - 1], 1514 + bip_next->bip_vec[0].bv_offset); 1515 + } 1516 + 1517 1517 #else /* CONFIG_BLK_DEV_INTEGRITY */ 1518 1518 1519 1519 struct bio; ··· 1599 1559 static inline bool blk_integrity_is_initialized(struct gendisk *g) 1600 1560 { 1601 1561 return 0; 1562 + } 1563 + static inline bool integrity_req_gap_back_merge(struct request *req, 1564 + struct bio *next) 1565 + { 1566 + return false; 1567 + } 1568 + static inline bool integrity_req_gap_front_merge(struct request *req, 1569 + struct bio *bio) 1570 + { 1571 + return false; 1602 1572 } 1603 1573 1604 1574 #endif /* CONFIG_BLK_DEV_INTEGRITY */
+2 -25
include/linux/cgroup-defs.h
··· 473 473 unsigned int depends_on; 474 474 }; 475 475 476 - extern struct percpu_rw_semaphore cgroup_threadgroup_rwsem; 477 - 478 - /** 479 - * cgroup_threadgroup_change_begin - threadgroup exclusion for cgroups 480 - * @tsk: target task 481 - * 482 - * Called from threadgroup_change_begin() and allows cgroup operations to 483 - * synchronize against threadgroup changes using a percpu_rw_semaphore. 484 - */ 485 - static inline void cgroup_threadgroup_change_begin(struct task_struct *tsk) 486 - { 487 - percpu_down_read(&cgroup_threadgroup_rwsem); 488 - } 489 - 490 - /** 491 - * cgroup_threadgroup_change_end - threadgroup exclusion for cgroups 492 - * @tsk: target task 493 - * 494 - * Called from threadgroup_change_end(). Counterpart of 495 - * cgroup_threadcgroup_change_begin(). 496 - */ 497 - static inline void cgroup_threadgroup_change_end(struct task_struct *tsk) 498 - { 499 - percpu_up_read(&cgroup_threadgroup_rwsem); 500 - } 476 + void cgroup_threadgroup_change_begin(struct task_struct *tsk); 477 + void cgroup_threadgroup_change_end(struct task_struct *tsk); 501 478 502 479 #else /* CONFIG_CGROUPS */ 503 480
+5
include/linux/cpufreq.h
··· 127 127 #define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/ 128 128 129 129 #ifdef CONFIG_CPU_FREQ 130 + struct cpufreq_policy *cpufreq_cpu_get_raw(unsigned int cpu); 130 131 struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); 131 132 void cpufreq_cpu_put(struct cpufreq_policy *policy); 132 133 #else 134 + static inline struct cpufreq_policy *cpufreq_cpu_get_raw(unsigned int cpu) 135 + { 136 + return NULL; 137 + } 133 138 static inline struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) 134 139 { 135 140 return NULL;
+23 -1
include/linux/devfreq.h
··· 65 65 * The "flags" parameter's possible values are 66 66 * explained above with "DEVFREQ_FLAG_*" macros. 67 67 * @get_dev_status: The device should provide the current performance 68 - * status to devfreq, which is used by governors. 68 + * status to devfreq. Governors are recommended not to 69 + * use this directly. Instead, governors are recommended 70 + * to use devfreq_update_stats() along with 71 + * devfreq.last_status. 69 72 * @get_cur_freq: The device should provide the current frequency 70 73 * at which it is operating. 71 74 * @exit: An optional callback that is called when devfreq ··· 164 161 struct delayed_work work; 165 162 166 163 unsigned long previous_freq; 164 + struct devfreq_dev_status last_status; 167 165 168 166 void *data; /* private data for governors */ 169 167 ··· 207 203 struct devfreq *devfreq); 208 204 extern void devm_devfreq_unregister_opp_notifier(struct device *dev, 209 205 struct devfreq *devfreq); 206 + 207 + /** 208 + * devfreq_update_stats() - update the last_status pointer in struct devfreq 209 + * @df: the devfreq instance whose status needs updating 210 + * 211 + * Governors are recommended to use this function along with last_status, 212 + * which allows other entities to reuse the last_status without affecting 213 + * the values fetched later by governors. 214 + */ 215 + static inline int devfreq_update_stats(struct devfreq *df) 216 + { 217 + return df->profile->get_dev_status(df->dev.parent, &df->last_status); 218 + } 210 219 211 220 #if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND) 212 221 /** ··· 305 288 static inline void devm_devfreq_unregister_opp_notifier(struct device *dev, 306 289 struct devfreq *devfreq) 307 290 { 291 + } 292 + 293 + static inline int devfreq_update_stats(struct devfreq *df) 294 + { 295 + return -EINVAL; 308 296 } 309 297 #endif /* CONFIG_PM_DEVFREQ */ 310 298
+8
include/linux/init_task.h
··· 25 25 extern struct files_struct init_files; 26 26 extern struct fs_struct init_fs; 27 27 28 + #ifdef CONFIG_CGROUPS 29 + #define INIT_GROUP_RWSEM(sig) \ 30 + .group_rwsem = __RWSEM_INITIALIZER(sig.group_rwsem), 31 + #else 32 + #define INIT_GROUP_RWSEM(sig) 33 + #endif 34 + 28 35 #ifdef CONFIG_CPUSETS 29 36 #define INIT_CPUSET_SEQ(tsk) \ 30 37 .mems_allowed_seq = SEQCNT_ZERO(tsk.mems_allowed_seq), ··· 64 57 INIT_PREV_CPUTIME(sig) \ 65 58 .cred_guard_mutex = \ 66 59 __MUTEX_INITIALIZER(sig.cred_guard_mutex), \ 60 + INIT_GROUP_RWSEM(sig) \ 67 61 } 68 62 69 63 extern struct nsproxy init_nsproxy;
+52 -29
include/linux/irq.h
··· 110 110 /* 111 111 * Return value for chip->irq_set_affinity() 112 112 * 113 - * IRQ_SET_MASK_OK - OK, core updates irq_data.affinity 114 - * IRQ_SET_MASK_NOCPY - OK, chip did update irq_data.affinity 113 + * IRQ_SET_MASK_OK - OK, core updates irq_common_data.affinity 114 + * IRQ_SET_MASK_NOCPY - OK, chip did update irq_common_data.affinity 115 115 * IRQ_SET_MASK_OK_DONE - Same as IRQ_SET_MASK_OK for core. Special code to 116 116 * support stacked irqchips, which indicates skipping 117 117 * all descendent irqchips. ··· 129 129 * struct irq_common_data - per irq data shared by all irqchips 130 130 * @state_use_accessors: status information for irq chip functions. 131 131 * Use accessor functions to deal with it 132 + * @node: node index useful for balancing 133 + * @handler_data: per-IRQ data for the irq_chip methods 134 + * @affinity: IRQ affinity on SMP 135 + * @msi_desc: MSI descriptor 132 136 */ 133 137 struct irq_common_data { 134 138 unsigned int state_use_accessors; 139 + #ifdef CONFIG_NUMA 140 + unsigned int node; 141 + #endif 142 + void *handler_data; 143 + struct msi_desc *msi_desc; 144 + cpumask_var_t affinity; 135 145 }; 136 146 137 147 /** ··· 149 139 * @mask: precomputed bitmask for accessing the chip registers 150 140 * @irq: interrupt number 151 141 * @hwirq: hardware interrupt number, local to the interrupt domain 152 - * @node: node index useful for balancing 153 142 * @common: point to data shared by all irqchips 154 143 * @chip: low level interrupt hardware access 155 144 * @domain: Interrupt translation domain; responsible for mapping 156 145 * between hwirq number and linux irq number. 157 146 * @parent_data: pointer to parent struct irq_data to support hierarchy 158 147 * irq_domain 159 - * @handler_data: per-IRQ data for the irq_chip methods 160 148 * @chip_data: platform-specific per-chip private data for the chip 161 149 * methods, to allow shared chip implementations 162 - * @msi_desc: MSI descriptor 163 - * @affinity: IRQ affinity on SMP 164 - * 165 - * The fields here need to overlay the ones in irq_desc until we 166 - * cleaned up the direct references and switched everything over to 167 - * irq_data. 168 150 */ 169 151 struct irq_data { 170 152 u32 mask; 171 153 unsigned int irq; 172 154 unsigned long hwirq; 173 - unsigned int node; 174 155 struct irq_common_data *common; 175 156 struct irq_chip *chip; 176 157 struct irq_domain *domain; 177 158 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY 178 159 struct irq_data *parent_data; 179 160 #endif 180 - void *handler_data; 181 161 void *chip_data; 182 - struct msi_desc *msi_desc; 183 - cpumask_var_t affinity; 184 162 }; 185 163 186 164 /* ··· 188 190 * IRQD_IRQ_MASKED - Masked state of the interrupt 189 191 * IRQD_IRQ_INPROGRESS - In progress state of the interrupt 190 192 * IRQD_WAKEUP_ARMED - Wakeup mode armed 193 + * IRQD_FORWARDED_TO_VCPU - The interrupt is forwarded to a VCPU 191 194 */ 192 195 enum { 193 196 IRQD_TRIGGER_MASK = 0xf, ··· 203 204 IRQD_IRQ_MASKED = (1 << 17), 204 205 IRQD_IRQ_INPROGRESS = (1 << 18), 205 206 IRQD_WAKEUP_ARMED = (1 << 19), 207 + IRQD_FORWARDED_TO_VCPU = (1 << 20), 206 208 }; 207 209 208 210 #define __irqd_to_state(d) ((d)->common->state_use_accessors) ··· 282 282 return __irqd_to_state(d) & IRQD_WAKEUP_ARMED; 283 283 } 284 284 285 + static inline bool irqd_is_forwarded_to_vcpu(struct irq_data *d) 286 + { 287 + return __irqd_to_state(d) & IRQD_FORWARDED_TO_VCPU; 288 + } 289 + 290 + static inline void irqd_set_forwarded_to_vcpu(struct irq_data *d) 291 + { 292 + __irqd_to_state(d) |= IRQD_FORWARDED_TO_VCPU; 293 + } 294 + 295 + static inline void irqd_clr_forwarded_to_vcpu(struct irq_data *d) 296 + { 297 + __irqd_to_state(d) &= ~IRQD_FORWARDED_TO_VCPU; 298 + } 285 299 286 300 /* 287 301 * Functions for chained handlers which can be enabled/disabled by the ··· 475 461 * Built-in IRQ handlers for various IRQ types, 476 462 * callable via desc->handle_irq() 477 463 */ 478 - extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); 479 - extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); 480 - extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc); 481 - extern void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc); 482 - extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); 483 - extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); 484 - extern void handle_percpu_devid_irq(unsigned int irq, struct irq_desc *desc); 485 - extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); 464 + extern void handle_level_irq(struct irq_desc *desc); 465 + extern void handle_fasteoi_irq(struct irq_desc *desc); 466 + extern void handle_edge_irq(struct irq_desc *desc); 467 + extern void handle_edge_eoi_irq(struct irq_desc *desc); 468 + extern void handle_simple_irq(struct irq_desc *desc); 469 + extern void handle_percpu_irq(struct irq_desc *desc); 470 + extern void handle_percpu_devid_irq(struct irq_desc *desc); 471 + extern void handle_bad_irq(struct irq_desc *desc); 486 472 extern void handle_nested_irq(unsigned int irq); 487 473 488 474 extern int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg); ··· 641 627 static inline void *irq_get_handler_data(unsigned int irq) 642 628 { 643 629 struct irq_data *d = irq_get_irq_data(irq); 644 - return d ? d->handler_data : NULL; 630 + return d ? d->common->handler_data : NULL; 645 631 } 646 632 647 633 static inline void *irq_data_get_irq_handler_data(struct irq_data *d) 648 634 { 649 - return d->handler_data; 635 + return d->common->handler_data; 650 636 } 651 637 652 638 static inline struct msi_desc *irq_get_msi_desc(unsigned int irq) 653 639 { 654 640 struct irq_data *d = irq_get_irq_data(irq); 655 - return d ? d->msi_desc : NULL; 641 + return d ? d->common->msi_desc : NULL; 656 642 } 657 643 658 644 static inline struct msi_desc *irq_data_get_msi_desc(struct irq_data *d) 659 645 { 660 - return d->msi_desc; 646 + return d->common->msi_desc; 661 647 } 662 648 663 649 static inline u32 irq_get_trigger_type(unsigned int irq) ··· 666 652 return d ? irqd_get_trigger_type(d) : 0; 667 653 } 668 654 655 + static inline int irq_common_data_get_node(struct irq_common_data *d) 656 + { 657 + #ifdef CONFIG_NUMA 658 + return d->node; 659 + #else 660 + return 0; 661 + #endif 662 + } 663 + 669 664 static inline int irq_data_get_node(struct irq_data *d) 670 665 { 671 - return d->node; 666 + return irq_common_data_get_node(d->common); 672 667 } 673 668 674 669 static inline struct cpumask *irq_get_affinity_mask(int irq) 675 670 { 676 671 struct irq_data *d = irq_get_irq_data(irq); 677 672 678 - return d ? d->affinity : NULL; 673 + return d ? d->common->affinity : NULL; 679 674 } 680 675 681 676 static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d) 682 677 { 683 - return d->affinity; 678 + return d->common->affinity; 684 679 } 685 680 686 681 unsigned int arch_dynirq_lower_bound(unsigned int from);
+6 -35
include/linux/irqdesc.h
··· 98 98 99 99 static inline struct irq_desc *irq_data_to_desc(struct irq_data *data) 100 100 { 101 - #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY 102 - return irq_to_desc(data->irq); 103 - #else 104 - return container_of(data, struct irq_desc, irq_data); 105 - #endif 101 + return container_of(data->common, struct irq_desc, irq_common_data); 106 102 } 107 103 108 104 static inline unsigned int irq_desc_get_irq(struct irq_desc *desc) ··· 123 127 124 128 static inline void *irq_desc_get_handler_data(struct irq_desc *desc) 125 129 { 126 - return desc->irq_data.handler_data; 130 + return desc->irq_common_data.handler_data; 127 131 } 128 132 129 133 static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc) 130 134 { 131 - return desc->irq_data.msi_desc; 135 + return desc->irq_common_data.msi_desc; 132 136 } 133 137 134 138 /* 135 139 * Architectures call this to let the generic IRQ layer 136 - * handle an interrupt. If the descriptor is attached to an 137 - * irqchip-style controller then we call the ->handle_irq() handler, 138 - * and it calls __do_IRQ() if it's attached to an irqtype-style controller. 140 + * handle an interrupt. 139 141 */ 140 - static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc) 142 + static inline void generic_handle_irq_desc(struct irq_desc *desc) 141 143 { 142 - desc->handle_irq(irq, desc); 144 + desc->handle_irq(desc); 143 145 } 144 146 145 147 int generic_handle_irq(unsigned int irq); ··· 168 174 static inline int irq_has_action(unsigned int irq) 169 175 { 170 176 return irq_desc_has_action(irq_to_desc(irq)); 171 - } 172 - 173 - /* caller has locked the irq_desc and both params are valid */ 174 - static inline void __irq_set_handler_locked(unsigned int irq, 175 - irq_flow_handler_t handler) 176 - { 177 - struct irq_desc *desc; 178 - 179 - desc = irq_to_desc(irq); 180 - desc->handle_irq = handler; 181 - } 182 - 183 - /* caller has locked the irq_desc and both params are valid */ 184 - static inline void 185 - __irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip, 186 - irq_flow_handler_t handler, const char *name) 187 - { 188 - struct irq_desc *desc; 189 - 190 - desc = irq_to_desc(irq); 191 - irq_desc_get_irq_data(desc)->chip = chip; 192 - desc->handle_irq = handler; 193 - desc->name = name; 194 177 } 195 178 196 179 /**
+1 -1
include/linux/irqhandler.h
··· 8 8 9 9 struct irq_desc; 10 10 struct irq_data; 11 - typedef void (*irq_flow_handler_t)(unsigned int irq, struct irq_desc *desc); 11 + typedef void (*irq_flow_handler_t)(struct irq_desc *desc); 12 12 typedef void (*irq_preflow_handler_t)(struct irq_data *data); 13 13 14 14 #endif
+12
include/linux/sched.h
··· 762 762 unsigned audit_tty_log_passwd; 763 763 struct tty_audit_buf *tty_audit_buf; 764 764 #endif 765 + #ifdef CONFIG_CGROUPS 766 + /* 767 + * group_rwsem prevents new tasks from entering the threadgroup and 768 + * member tasks from exiting,a more specifically, setting of 769 + * PF_EXITING. fork and exit paths are protected with this rwsem 770 + * using threadgroup_change_begin/end(). Users which require 771 + * threadgroup to remain stable should use threadgroup_[un]lock() 772 + * which also takes care of exec path. Currently, cgroup is the 773 + * only user. 774 + */ 775 + struct rw_semaphore group_rwsem; 776 + #endif 765 777 766 778 oom_flags_t oom_flags; 767 779 short oom_score_adj; /* OOM kill score adjustment */
+1 -1
include/linux/security.h
··· 946 946 unsigned long arg4, 947 947 unsigned long arg5) 948 948 { 949 - return cap_task_prctl(option, arg2, arg3, arg3, arg5); 949 + return cap_task_prctl(option, arg2, arg3, arg4, arg5); 950 950 } 951 951 952 952 static inline void security_task_to_inode(struct task_struct *p, struct inode *inode)
+2 -2
include/rdma/opa_port_info.h
··· 294 294 295 295 struct opa_port_state_info { 296 296 struct opa_port_states port_states; 297 - u16 link_width_downgrade_tx_active; 298 - u16 link_width_downgrade_rx_active; 297 + __be16 link_width_downgrade_tx_active; 298 + __be16 link_width_downgrade_rx_active; 299 299 }; 300 300 301 301 struct opa_port_info {
+84 -26
kernel/cgroup.c
··· 46 46 #include <linux/slab.h> 47 47 #include <linux/spinlock.h> 48 48 #include <linux/rwsem.h> 49 - #include <linux/percpu-rwsem.h> 50 49 #include <linux/string.h> 51 50 #include <linux/sort.h> 52 51 #include <linux/kmod.h> ··· 102 103 * cgroup_mutex. Reading requires either cgroup_mutex or this spinlock. 103 104 */ 104 105 static DEFINE_SPINLOCK(release_agent_path_lock); 105 - 106 - struct percpu_rw_semaphore cgroup_threadgroup_rwsem; 107 106 108 107 #define cgroup_assert_mutex_or_rcu_locked() \ 109 108 RCU_LOCKDEP_WARN(!rcu_read_lock_held() && \ ··· 869 872 up_write(&css_set_rwsem); 870 873 871 874 return cset; 875 + } 876 + 877 + void cgroup_threadgroup_change_begin(struct task_struct *tsk) 878 + { 879 + down_read(&tsk->signal->group_rwsem); 880 + } 881 + 882 + void cgroup_threadgroup_change_end(struct task_struct *tsk) 883 + { 884 + up_read(&tsk->signal->group_rwsem); 885 + } 886 + 887 + /** 888 + * threadgroup_lock - lock threadgroup 889 + * @tsk: member task of the threadgroup to lock 890 + * 891 + * Lock the threadgroup @tsk belongs to. No new task is allowed to enter 892 + * and member tasks aren't allowed to exit (as indicated by PF_EXITING) or 893 + * change ->group_leader/pid. This is useful for cases where the threadgroup 894 + * needs to stay stable across blockable operations. 895 + * 896 + * fork and exit explicitly call threadgroup_change_{begin|end}() for 897 + * synchronization. While held, no new task will be added to threadgroup 898 + * and no existing live task will have its PF_EXITING set. 899 + * 900 + * de_thread() does threadgroup_change_{begin|end}() when a non-leader 901 + * sub-thread becomes a new leader. 902 + */ 903 + static void threadgroup_lock(struct task_struct *tsk) 904 + { 905 + down_write(&tsk->signal->group_rwsem); 906 + } 907 + 908 + /** 909 + * threadgroup_unlock - unlock threadgroup 910 + * @tsk: member task of the threadgroup to unlock 911 + * 912 + * Reverse threadgroup_lock(). 913 + */ 914 + static inline void threadgroup_unlock(struct task_struct *tsk) 915 + { 916 + up_write(&tsk->signal->group_rwsem); 872 917 } 873 918 874 919 static struct cgroup_root *cgroup_root_from_kf(struct kernfs_root *kf_root) ··· 2113 2074 lockdep_assert_held(&css_set_rwsem); 2114 2075 2115 2076 /* 2116 - * We are synchronized through cgroup_threadgroup_rwsem against 2117 - * PF_EXITING setting such that we can't race against cgroup_exit() 2118 - * changing the css_set to init_css_set and dropping the old one. 2077 + * We are synchronized through threadgroup_lock() against PF_EXITING 2078 + * setting such that we can't race against cgroup_exit() changing the 2079 + * css_set to init_css_set and dropping the old one. 2119 2080 */ 2120 2081 WARN_ON_ONCE(tsk->flags & PF_EXITING); 2121 2082 old_cset = task_css_set(tsk); ··· 2172 2133 * @src_cset and add it to @preloaded_csets, which should later be cleaned 2173 2134 * up by cgroup_migrate_finish(). 2174 2135 * 2175 - * This function may be called without holding cgroup_threadgroup_rwsem 2176 - * even if the target is a process. Threads may be created and destroyed 2177 - * but as long as cgroup_mutex is not dropped, no new css_set can be put 2178 - * into play and the preloaded css_sets are guaranteed to cover all 2179 - * migrations. 2136 + * This function may be called without holding threadgroup_lock even if the 2137 + * target is a process. Threads may be created and destroyed but as long 2138 + * as cgroup_mutex is not dropped, no new css_set can be put into play and 2139 + * the preloaded css_sets are guaranteed to cover all migrations. 2180 2140 */ 2181 2141 static void cgroup_migrate_add_src(struct css_set *src_cset, 2182 2142 struct cgroup *dst_cgrp, ··· 2278 2240 * @threadgroup: whether @leader points to the whole process or a single task 2279 2241 * 2280 2242 * Migrate a process or task denoted by @leader to @cgrp. If migrating a 2281 - * process, the caller must be holding cgroup_threadgroup_rwsem. The 2243 + * process, the caller must be holding threadgroup_lock of @leader. The 2282 2244 * caller is also responsible for invoking cgroup_migrate_add_src() and 2283 2245 * cgroup_migrate_prepare_dst() on the targets before invoking this 2284 2246 * function and following up with cgroup_migrate_finish(). ··· 2406 2368 * @leader: the task or the leader of the threadgroup to be attached 2407 2369 * @threadgroup: attach the whole threadgroup? 2408 2370 * 2409 - * Call holding cgroup_mutex and cgroup_threadgroup_rwsem. 2371 + * Call holding cgroup_mutex and threadgroup_lock of @leader. 2410 2372 */ 2411 2373 static int cgroup_attach_task(struct cgroup *dst_cgrp, 2412 2374 struct task_struct *leader, bool threadgroup) ··· 2498 2460 if (!cgrp) 2499 2461 return -ENODEV; 2500 2462 2501 - percpu_down_write(&cgroup_threadgroup_rwsem); 2463 + retry_find_task: 2502 2464 rcu_read_lock(); 2503 2465 if (pid) { 2504 2466 tsk = find_task_by_vpid(pid); 2505 2467 if (!tsk) { 2468 + rcu_read_unlock(); 2506 2469 ret = -ESRCH; 2507 - goto out_unlock_rcu; 2470 + goto out_unlock_cgroup; 2508 2471 } 2509 2472 } else { 2510 2473 tsk = current; ··· 2521 2482 */ 2522 2483 if (tsk == kthreadd_task || (tsk->flags & PF_NO_SETAFFINITY)) { 2523 2484 ret = -EINVAL; 2524 - goto out_unlock_rcu; 2485 + rcu_read_unlock(); 2486 + goto out_unlock_cgroup; 2525 2487 } 2526 2488 2527 2489 get_task_struct(tsk); 2528 2490 rcu_read_unlock(); 2529 2491 2492 + threadgroup_lock(tsk); 2493 + if (threadgroup) { 2494 + if (!thread_group_leader(tsk)) { 2495 + /* 2496 + * a race with de_thread from another thread's exec() 2497 + * may strip us of our leadership, if this happens, 2498 + * there is no choice but to throw this task away and 2499 + * try again; this is 2500 + * "double-double-toil-and-trouble-check locking". 2501 + */ 2502 + threadgroup_unlock(tsk); 2503 + put_task_struct(tsk); 2504 + goto retry_find_task; 2505 + } 2506 + } 2507 + 2530 2508 ret = cgroup_procs_write_permission(tsk, cgrp, of); 2531 2509 if (!ret) 2532 2510 ret = cgroup_attach_task(cgrp, tsk, threadgroup); 2533 2511 2534 - put_task_struct(tsk); 2535 - goto out_unlock_threadgroup; 2512 + threadgroup_unlock(tsk); 2536 2513 2537 - out_unlock_rcu: 2538 - rcu_read_unlock(); 2539 - out_unlock_threadgroup: 2540 - percpu_up_write(&cgroup_threadgroup_rwsem); 2514 + put_task_struct(tsk); 2515 + out_unlock_cgroup: 2541 2516 cgroup_kn_unlock(of->kn); 2542 2517 return ret ?: nbytes; 2543 2518 } ··· 2696 2643 2697 2644 lockdep_assert_held(&cgroup_mutex); 2698 2645 2699 - percpu_down_write(&cgroup_threadgroup_rwsem); 2700 - 2701 2646 /* look up all csses currently attached to @cgrp's subtree */ 2702 2647 down_read(&css_set_rwsem); 2703 2648 css_for_each_descendant_pre(css, cgroup_css(cgrp, NULL)) { ··· 2751 2700 goto out_finish; 2752 2701 last_task = task; 2753 2702 2703 + threadgroup_lock(task); 2704 + /* raced against de_thread() from another thread? */ 2705 + if (!thread_group_leader(task)) { 2706 + threadgroup_unlock(task); 2707 + put_task_struct(task); 2708 + continue; 2709 + } 2710 + 2754 2711 ret = cgroup_migrate(src_cset->dfl_cgrp, task, true); 2755 2712 2713 + threadgroup_unlock(task); 2756 2714 put_task_struct(task); 2757 2715 2758 2716 if (WARN(ret, "cgroup: failed to update controllers for the default hierarchy (%d), further operations may crash or hang\n", ret)) ··· 2771 2711 2772 2712 out_finish: 2773 2713 cgroup_migrate_finish(&preloaded_csets); 2774 - percpu_up_write(&cgroup_threadgroup_rwsem); 2775 2714 return ret; 2776 2715 } 2777 2716 ··· 5083 5024 unsigned long key; 5084 5025 int ssid, err; 5085 5026 5086 - BUG_ON(percpu_init_rwsem(&cgroup_threadgroup_rwsem)); 5087 5027 BUG_ON(cgroup_init_cftypes(NULL, cgroup_dfl_base_files)); 5088 5028 BUG_ON(cgroup_init_cftypes(NULL, cgroup_legacy_base_files)); 5089 5029
+4
kernel/fork.c
··· 1149 1149 tty_audit_fork(sig); 1150 1150 sched_autogroup_fork(sig); 1151 1151 1152 + #ifdef CONFIG_CGROUPS 1153 + init_rwsem(&sig->group_rwsem); 1154 + #endif 1155 + 1152 1156 sig->oom_score_adj = current->signal->oom_score_adj; 1153 1157 sig->oom_score_adj_min = current->signal->oom_score_adj_min; 1154 1158
+11 -22
kernel/irq/chip.c
··· 83 83 84 84 if (!desc) 85 85 return -EINVAL; 86 - desc->irq_data.handler_data = data; 86 + desc->irq_common_data.handler_data = data; 87 87 irq_put_desc_unlock(desc, flags); 88 88 return 0; 89 89 } ··· 105 105 106 106 if (!desc) 107 107 return -EINVAL; 108 - desc->irq_data.msi_desc = entry; 108 + desc->irq_common_data.msi_desc = entry; 109 109 if (entry && !irq_offset) 110 110 entry->irq = irq_base; 111 111 irq_put_desc_unlock(desc, flags); ··· 372 372 373 373 /** 374 374 * handle_simple_irq - Simple and software-decoded IRQs. 375 - * @irq: the interrupt number 376 375 * @desc: the interrupt description structure for this irq 377 376 * 378 377 * Simple interrupts are either sent from a demultiplexing interrupt ··· 381 382 * Note: The caller is expected to handle the ack, clear, mask and 382 383 * unmask issues if necessary. 383 384 */ 384 - void 385 - handle_simple_irq(unsigned int irq, struct irq_desc *desc) 385 + void handle_simple_irq(struct irq_desc *desc) 386 386 { 387 387 raw_spin_lock(&desc->lock); 388 388 ··· 423 425 424 426 /** 425 427 * handle_level_irq - Level type irq handler 426 - * @irq: the interrupt number 427 428 * @desc: the interrupt description structure for this irq 428 429 * 429 430 * Level type interrupts are active as long as the hardware line has ··· 430 433 * it after the associated handler has acknowledged the device, so the 431 434 * interrupt line is back to inactive. 432 435 */ 433 - void 434 - handle_level_irq(unsigned int irq, struct irq_desc *desc) 436 + void handle_level_irq(struct irq_desc *desc) 435 437 { 436 438 raw_spin_lock(&desc->lock); 437 439 mask_ack_irq(desc); ··· 492 496 493 497 /** 494 498 * handle_fasteoi_irq - irq handler for transparent controllers 495 - * @irq: the interrupt number 496 499 * @desc: the interrupt description structure for this irq 497 500 * 498 501 * Only a single callback will be issued to the chip: an ->eoi() ··· 499 504 * for modern forms of interrupt handlers, which handle the flow 500 505 * details in hardware, transparently. 501 506 */ 502 - void 503 - handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) 507 + void handle_fasteoi_irq(struct irq_desc *desc) 504 508 { 505 509 struct irq_chip *chip = desc->irq_data.chip; 506 510 ··· 540 546 541 547 /** 542 548 * handle_edge_irq - edge type IRQ handler 543 - * @irq: the interrupt number 544 549 * @desc: the interrupt description structure for this irq 545 550 * 546 551 * Interrupt occures on the falling and/or rising edge of a hardware ··· 553 560 * the handler was running. If all pending interrupts are handled, the 554 561 * loop is left. 555 562 */ 556 - void 557 - handle_edge_irq(unsigned int irq, struct irq_desc *desc) 563 + void handle_edge_irq(struct irq_desc *desc) 558 564 { 559 565 raw_spin_lock(&desc->lock); 560 566 ··· 610 618 #ifdef CONFIG_IRQ_EDGE_EOI_HANDLER 611 619 /** 612 620 * handle_edge_eoi_irq - edge eoi type IRQ handler 613 - * @irq: the interrupt number 614 621 * @desc: the interrupt description structure for this irq 615 622 * 616 623 * Similar as the above handle_edge_irq, but using eoi and w/o the 617 624 * mask/unmask logic. 618 625 */ 619 - void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc) 626 + void handle_edge_eoi_irq(struct irq_desc *desc) 620 627 { 621 628 struct irq_chip *chip = irq_desc_get_chip(desc); 622 629 ··· 656 665 657 666 /** 658 667 * handle_percpu_irq - Per CPU local irq handler 659 - * @irq: the interrupt number 660 668 * @desc: the interrupt description structure for this irq 661 669 * 662 670 * Per CPU interrupts on SMP machines without locking requirements 663 671 */ 664 - void 665 - handle_percpu_irq(unsigned int irq, struct irq_desc *desc) 672 + void handle_percpu_irq(struct irq_desc *desc) 666 673 { 667 674 struct irq_chip *chip = irq_desc_get_chip(desc); 668 675 ··· 677 688 678 689 /** 679 690 * handle_percpu_devid_irq - Per CPU local irq handler with per cpu dev ids 680 - * @irq: the interrupt number 681 691 * @desc: the interrupt description structure for this irq 682 692 * 683 693 * Per CPU interrupts on SMP machines without locking requirements. Same as ··· 686 698 * contain the real device id for the cpu on which this handler is 687 699 * called 688 700 */ 689 - void handle_percpu_devid_irq(unsigned int irq, struct irq_desc *desc) 701 + void handle_percpu_devid_irq(struct irq_desc *desc) 690 702 { 691 703 struct irq_chip *chip = irq_desc_get_chip(desc); 692 704 struct irqaction *action = desc->action; 693 705 void *dev_id = raw_cpu_ptr(action->percpu_dev_id); 706 + unsigned int irq = irq_desc_get_irq(desc); 694 707 irqreturn_t res; 695 708 696 709 kstat_incr_irqs_this_cpu(desc); ··· 785 796 return; 786 797 787 798 __irq_do_set_handler(desc, handle, 1, NULL); 788 - desc->irq_data.handler_data = data; 799 + desc->irq_common_data.handler_data = data; 789 800 790 801 irq_put_desc_busunlock(desc, flags); 791 802 }
+3 -1
kernel/irq/handle.c
··· 27 27 * 28 28 * Handles spurious and unhandled IRQ's. It also prints a debugmessage. 29 29 */ 30 - void handle_bad_irq(unsigned int irq, struct irq_desc *desc) 30 + void handle_bad_irq(struct irq_desc *desc) 31 31 { 32 + unsigned int irq = irq_desc_get_irq(desc); 33 + 32 34 print_irq_desc(irq, desc); 33 35 kstat_incr_irqs_this_cpu(desc); 34 36 ack_bad_irq(irq);
+1 -1
kernel/irq/internals.h
··· 194 194 195 195 static inline int irq_desc_get_node(struct irq_desc *desc) 196 196 { 197 - return irq_data_get_node(&desc->irq_data); 197 + return irq_common_data_get_node(&desc->irq_common_data); 198 198 } 199 199 200 200 #ifdef CONFIG_PM_SLEEP
+12 -8
kernel/irq/irqdesc.c
··· 38 38 #ifdef CONFIG_SMP 39 39 static int alloc_masks(struct irq_desc *desc, gfp_t gfp, int node) 40 40 { 41 - if (!zalloc_cpumask_var_node(&desc->irq_data.affinity, gfp, node)) 41 + if (!zalloc_cpumask_var_node(&desc->irq_common_data.affinity, 42 + gfp, node)) 42 43 return -ENOMEM; 43 44 44 45 #ifdef CONFIG_GENERIC_PENDING_IRQ 45 46 if (!zalloc_cpumask_var_node(&desc->pending_mask, gfp, node)) { 46 - free_cpumask_var(desc->irq_data.affinity); 47 + free_cpumask_var(desc->irq_common_data.affinity); 47 48 return -ENOMEM; 48 49 } 49 50 #endif ··· 53 52 54 53 static void desc_smp_init(struct irq_desc *desc, int node) 55 54 { 56 - desc->irq_data.node = node; 57 - cpumask_copy(desc->irq_data.affinity, irq_default_affinity); 55 + cpumask_copy(desc->irq_common_data.affinity, irq_default_affinity); 58 56 #ifdef CONFIG_GENERIC_PENDING_IRQ 59 57 cpumask_clear(desc->pending_mask); 58 + #endif 59 + #ifdef CONFIG_NUMA 60 + desc->irq_common_data.node = node; 60 61 #endif 61 62 } 62 63 ··· 73 70 { 74 71 int cpu; 75 72 73 + desc->irq_common_data.handler_data = NULL; 74 + desc->irq_common_data.msi_desc = NULL; 75 + 76 76 desc->irq_data.common = &desc->irq_common_data; 77 77 desc->irq_data.irq = irq; 78 78 desc->irq_data.chip = &no_irq_chip; 79 79 desc->irq_data.chip_data = NULL; 80 - desc->irq_data.handler_data = NULL; 81 - desc->irq_data.msi_desc = NULL; 82 80 irq_settings_clr_and_set(desc, ~0, _IRQ_DEFAULT_INIT_FLAGS); 83 81 irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED); 84 82 desc->handle_irq = handle_bad_irq; ··· 125 121 #ifdef CONFIG_GENERIC_PENDING_IRQ 126 122 free_cpumask_var(desc->pending_mask); 127 123 #endif 128 - free_cpumask_var(desc->irq_data.affinity); 124 + free_cpumask_var(desc->irq_common_data.affinity); 129 125 } 130 126 #else 131 127 static inline void free_masks(struct irq_desc *desc) { } ··· 347 343 348 344 if (!desc) 349 345 return -EINVAL; 350 - generic_handle_irq_desc(irq, desc); 346 + generic_handle_irq_desc(desc); 351 347 return 0; 352 348 } 353 349 EXPORT_SYMBOL_GPL(generic_handle_irq);
-1
kernel/irq/irqdomain.c
··· 844 844 child->parent_data = irq_data; 845 845 irq_data->irq = child->irq; 846 846 irq_data->common = child->common; 847 - irq_data->node = child->node; 848 847 irq_data->domain = domain; 849 848 } 850 849
+6 -6
kernel/irq/manage.c
··· 192 192 switch (ret) { 193 193 case IRQ_SET_MASK_OK: 194 194 case IRQ_SET_MASK_OK_DONE: 195 - cpumask_copy(data->affinity, mask); 195 + cpumask_copy(desc->irq_common_data.affinity, mask); 196 196 case IRQ_SET_MASK_OK_NOCOPY: 197 197 irq_set_thread_affinity(desc); 198 198 ret = 0; ··· 304 304 if (irq_move_pending(&desc->irq_data)) 305 305 irq_get_pending(cpumask, desc); 306 306 else 307 - cpumask_copy(cpumask, desc->irq_data.affinity); 307 + cpumask_copy(cpumask, desc->irq_common_data.affinity); 308 308 raw_spin_unlock_irqrestore(&desc->lock, flags); 309 309 310 310 notify->notify(notify, cpumask); ··· 375 375 * one of the targets is online. 376 376 */ 377 377 if (irqd_has_set(&desc->irq_data, IRQD_AFFINITY_SET)) { 378 - if (cpumask_intersects(desc->irq_data.affinity, 378 + if (cpumask_intersects(desc->irq_common_data.affinity, 379 379 cpu_online_mask)) 380 - set = desc->irq_data.affinity; 380 + set = desc->irq_common_data.affinity; 381 381 else 382 382 irqd_clear(&desc->irq_data, IRQD_AFFINITY_SET); 383 383 } ··· 829 829 * This code is triggered unconditionally. Check the affinity 830 830 * mask pointer. For CPU_MASK_OFFSTACK=n this is optimized out. 831 831 */ 832 - if (desc->irq_data.affinity) 833 - cpumask_copy(mask, desc->irq_data.affinity); 832 + if (desc->irq_common_data.affinity) 833 + cpumask_copy(mask, desc->irq_common_data.affinity); 834 834 else 835 835 valid = false; 836 836 raw_spin_unlock_irq(&desc->lock);
+1 -1
kernel/irq/proc.c
··· 39 39 static int show_irq_affinity(int type, struct seq_file *m, void *v) 40 40 { 41 41 struct irq_desc *desc = irq_to_desc((long)m->private); 42 - const struct cpumask *mask = desc->irq_data.affinity; 42 + const struct cpumask *mask = desc->irq_common_data.affinity; 43 43 44 44 #ifdef CONFIG_GENERIC_PENDING_IRQ 45 45 if (irqd_is_setaffinity_pending(&desc->irq_data))
+1 -1
kernel/irq/resend.c
··· 38 38 clear_bit(irq, irqs_resend); 39 39 desc = irq_to_desc(irq); 40 40 local_irq_disable(); 41 - desc->handle_irq(irq, desc); 41 + desc->handle_irq(desc); 42 42 local_irq_enable(); 43 43 } 44 44 }
+5 -5
kernel/locking/lockdep.c
··· 3068 3068 static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, 3069 3069 int trylock, int read, int check, int hardirqs_off, 3070 3070 struct lockdep_map *nest_lock, unsigned long ip, 3071 - int references) 3071 + int references, int pin_count) 3072 3072 { 3073 3073 struct task_struct *curr = current; 3074 3074 struct lock_class *class = NULL; ··· 3157 3157 hlock->waittime_stamp = 0; 3158 3158 hlock->holdtime_stamp = lockstat_clock(); 3159 3159 #endif 3160 - hlock->pin_count = 0; 3160 + hlock->pin_count = pin_count; 3161 3161 3162 3162 if (check && !mark_irqflags(curr, hlock)) 3163 3163 return 0; ··· 3343 3343 hlock_class(hlock)->subclass, hlock->trylock, 3344 3344 hlock->read, hlock->check, hlock->hardirqs_off, 3345 3345 hlock->nest_lock, hlock->acquire_ip, 3346 - hlock->references)) 3346 + hlock->references, hlock->pin_count)) 3347 3347 return 0; 3348 3348 } 3349 3349 ··· 3433 3433 hlock_class(hlock)->subclass, hlock->trylock, 3434 3434 hlock->read, hlock->check, hlock->hardirqs_off, 3435 3435 hlock->nest_lock, hlock->acquire_ip, 3436 - hlock->references)) 3436 + hlock->references, hlock->pin_count)) 3437 3437 return 0; 3438 3438 } 3439 3439 ··· 3583 3583 current->lockdep_recursion = 1; 3584 3584 trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip); 3585 3585 __lock_acquire(lock, subclass, trylock, read, check, 3586 - irqs_disabled_flags(flags), nest_lock, ip, 0); 3586 + irqs_disabled_flags(flags), nest_lock, ip, 0, 0); 3587 3587 current->lockdep_recursion = 0; 3588 3588 raw_local_irq_restore(flags); 3589 3589 }
+11 -4
kernel/sched/core.c
··· 2669 2669 2670 2670 /* 2671 2671 * Check if only the current task is running on the cpu. 2672 + * 2673 + * Caution: this function does not check that the caller has disabled 2674 + * preemption, thus the result might have a time-of-check-to-time-of-use 2675 + * race. The caller is responsible to use it correctly, for example: 2676 + * 2677 + * - from a non-preemptable section (of course) 2678 + * 2679 + * - from a thread that is bound to a single CPU 2680 + * 2681 + * - in a loop with very short iterations (e.g. a polling loop) 2672 2682 */ 2673 2683 bool single_task_running(void) 2674 2684 { 2675 - if (cpu_rq(smp_processor_id())->nr_running == 1) 2676 - return true; 2677 - else 2678 - return false; 2685 + return raw_rq()->nr_running == 1; 2679 2686 } 2680 2687 EXPORT_SYMBOL(single_task_running); 2681 2688
+1 -1
tools/testing/selftests/Makefile
··· 16 16 TARGETS += ptrace 17 17 TARGETS += seccomp 18 18 TARGETS += size 19 + TARGETS += static_keys 19 20 TARGETS += sysctl 20 21 ifneq (1, $(quicktest)) 21 22 TARGETS += timers 22 23 endif 23 24 TARGETS += user 24 - TARGETS += jumplabel 25 25 TARGETS += vm 26 26 TARGETS += x86 27 27 TARGETS += zram
+1 -3
tools/testing/selftests/exec/Makefile
··· 1 1 CFLAGS = -Wall 2 2 BINARIES = execveat 3 - DEPS = execveat.symlink execveat.denatured script 3 + DEPS = execveat.symlink execveat.denatured script subdir 4 4 all: $(BINARIES) $(DEPS) 5 5 6 6 subdir: ··· 21 21 TEST_FILES := $(DEPS) 22 22 23 23 include ../lib.mk 24 - 25 - override EMIT_TESTS := echo "mkdir -p subdir; (./execveat && echo \"selftests: execveat [PASS]\") || echo \"selftests: execveat [FAIL]\"" 26 24 27 25 clean: 28 26 rm -rf $(BINARIES) $(DEPS) subdir.moved execveat.moved xxxxx*
+1 -1
tools/testing/selftests/ftrace/Makefile
··· 1 1 all: 2 2 3 3 TEST_PROGS := ftracetest 4 - TEST_DIRS := test.d/ 4 + TEST_DIRS := test.d 5 5 6 6 include ../lib.mk 7 7
+4 -7
tools/testing/selftests/lib.mk
··· 12 12 $(RUN_TESTS) 13 13 14 14 define INSTALL_RULE 15 - @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \ 16 - mkdir -p $(INSTALL_PATH); \ 17 - for TEST_DIR in $(TEST_DIRS); do \ 18 - cp -r $$TEST_DIR $(INSTALL_PATH); \ 19 - done; \ 20 - echo "install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)"; \ 21 - install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES); \ 15 + @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \ 16 + mkdir -p ${INSTALL_PATH}; \ 17 + echo "rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/"; \ 18 + rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/; \ 22 19 fi 23 20 endef 24 21
+4 -6
tools/testing/selftests/mqueue/Makefile
··· 1 - CFLAGS = -O2 1 + CFLAGS += -O2 2 + LDLIBS = -lrt -lpthread -lpopt 3 + TEST_PROGS := mq_open_tests mq_perf_tests 2 4 3 - all: 4 - $(CC) $(CFLAGS) mq_open_tests.c -o mq_open_tests -lrt 5 - $(CC) $(CFLAGS) -o mq_perf_tests mq_perf_tests.c -lrt -lpthread -lpopt 5 + all: $(TEST_PROGS) 6 6 7 7 include ../lib.mk 8 8 ··· 10 10 @./mq_open_tests /test1 || echo "selftests: mq_open_tests [FAIL]" 11 11 @./mq_perf_tests || echo "selftests: mq_perf_tests [FAIL]" 12 12 endef 13 - 14 - TEST_PROGS := mq_open_tests mq_perf_tests 15 13 16 14 override define EMIT_TESTS 17 15 echo "./mq_open_tests /test1 || echo \"selftests: mq_open_tests [FAIL]\""
+36 -1
tools/testing/selftests/seccomp/seccomp_bpf.c
··· 1210 1210 # define ARCH_REGS struct pt_regs 1211 1211 # define SYSCALL_NUM gpr[0] 1212 1212 # define SYSCALL_RET gpr[3] 1213 + #elif defined(__s390__) 1214 + # define ARCH_REGS s390_regs 1215 + # define SYSCALL_NUM gprs[2] 1216 + # define SYSCALL_RET gprs[2] 1213 1217 #else 1214 1218 # error "Do not know how to find your architecture's registers and syscalls" 1215 1219 #endif ··· 1247 1243 ret = ptrace(PTRACE_GETREGSET, tracee, NT_PRSTATUS, &iov); 1248 1244 EXPECT_EQ(0, ret); 1249 1245 1250 - #if defined(__x86_64__) || defined(__i386__) || defined(__aarch64__) || defined(__powerpc__) 1246 + #if defined(__x86_64__) || defined(__i386__) || defined(__aarch64__) || \ 1247 + defined(__powerpc__) || defined(__s390__) 1251 1248 { 1252 1249 regs.SYSCALL_NUM = syscall; 1253 1250 } ··· 1286 1281 ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg); 1287 1282 EXPECT_EQ(0, ret); 1288 1283 1284 + /* Validate and take action on expected syscalls. */ 1289 1285 switch (msg) { 1290 1286 case 0x1002: 1291 1287 /* change getpid to getppid. */ 1288 + EXPECT_EQ(__NR_getpid, get_syscall(_metadata, tracee)); 1292 1289 change_syscall(_metadata, tracee, __NR_getppid); 1293 1290 break; 1294 1291 case 0x1003: 1295 1292 /* skip gettid. */ 1293 + EXPECT_EQ(__NR_gettid, get_syscall(_metadata, tracee)); 1296 1294 change_syscall(_metadata, tracee, -1); 1297 1295 break; 1298 1296 case 0x1004: 1299 1297 /* do nothing (allow getppid) */ 1298 + EXPECT_EQ(__NR_getppid, get_syscall(_metadata, tracee)); 1300 1299 break; 1301 1300 default: 1302 1301 EXPECT_EQ(0, msg) { ··· 1418 1409 # define __NR_seccomp 277 1419 1410 # elif defined(__powerpc__) 1420 1411 # define __NR_seccomp 358 1412 + # elif defined(__s390__) 1413 + # define __NR_seccomp 348 1421 1414 # else 1422 1415 # warning "seccomp syscall number unknown for this architecture" 1423 1416 # define __NR_seccomp 0xffff ··· 1464 1453 1465 1454 /* Reject insane operation. */ 1466 1455 ret = seccomp(-1, 0, &prog); 1456 + ASSERT_NE(ENOSYS, errno) { 1457 + TH_LOG("Kernel does not support seccomp syscall!"); 1458 + } 1467 1459 EXPECT_EQ(EINVAL, errno) { 1468 1460 TH_LOG("Did not reject crazy op value!"); 1469 1461 } ··· 1515 1501 } 1516 1502 1517 1503 ret = seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog); 1504 + ASSERT_NE(ENOSYS, errno) { 1505 + TH_LOG("Kernel does not support seccomp syscall!"); 1506 + } 1518 1507 EXPECT_EQ(0, ret) { 1519 1508 TH_LOG("Could not install filter!"); 1520 1509 } ··· 1552 1535 1553 1536 ret = seccomp(SECCOMP_SET_MODE_FILTER, SECCOMP_FLAG_FILTER_TSYNC, 1554 1537 &prog); 1538 + ASSERT_NE(ENOSYS, errno) { 1539 + TH_LOG("Kernel does not support seccomp syscall!"); 1540 + } 1555 1541 EXPECT_EQ(0, ret) { 1556 1542 TH_LOG("Could not install initial filter with TSYNC!"); 1557 1543 } ··· 1714 1694 1715 1695 /* Check prctl failure detection by requesting sib 0 diverge. */ 1716 1696 ret = seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog); 1697 + ASSERT_NE(ENOSYS, errno) { 1698 + TH_LOG("Kernel does not support seccomp syscall!"); 1699 + } 1717 1700 ASSERT_EQ(0, ret) { 1718 1701 TH_LOG("setting filter failed"); 1719 1702 } ··· 1754 1731 } 1755 1732 1756 1733 ret = seccomp(SECCOMP_SET_MODE_FILTER, 0, &self->root_prog); 1734 + ASSERT_NE(ENOSYS, errno) { 1735 + TH_LOG("Kernel does not support seccomp syscall!"); 1736 + } 1757 1737 ASSERT_EQ(0, ret) { 1758 1738 TH_LOG("Kernel does not support SECCOMP_SET_MODE_FILTER!"); 1759 1739 } ··· 1831 1805 1832 1806 ret = seccomp(SECCOMP_SET_MODE_FILTER, SECCOMP_FLAG_FILTER_TSYNC, 1833 1807 &self->apply_prog); 1808 + ASSERT_NE(ENOSYS, errno) { 1809 + TH_LOG("Kernel does not support seccomp syscall!"); 1810 + } 1834 1811 ASSERT_EQ(0, ret) { 1835 1812 TH_LOG("Could install filter on all threads!"); 1836 1813 } ··· 1862 1833 } 1863 1834 1864 1835 ret = seccomp(SECCOMP_SET_MODE_FILTER, 0, &self->root_prog); 1836 + ASSERT_NE(ENOSYS, errno) { 1837 + TH_LOG("Kernel does not support seccomp syscall!"); 1838 + } 1865 1839 ASSERT_EQ(0, ret) { 1866 1840 TH_LOG("Kernel does not support SECCOMP_SET_MODE_FILTER!"); 1867 1841 } ··· 1922 1890 } 1923 1891 1924 1892 ret = seccomp(SECCOMP_SET_MODE_FILTER, 0, &self->root_prog); 1893 + ASSERT_NE(ENOSYS, errno) { 1894 + TH_LOG("Kernel does not support seccomp syscall!"); 1895 + } 1925 1896 ASSERT_EQ(0, ret) { 1926 1897 TH_LOG("Kernel does not support SECCOMP_SET_MODE_FILTER!"); 1927 1898 }
+2 -5
tools/testing/selftests/seccomp/test_harness.h
··· 370 370 __typeof__(_expected) __exp = (_expected); \ 371 371 __typeof__(_seen) __seen = (_seen); \ 372 372 if (!(__exp _t __seen)) { \ 373 - unsigned long long __exp_print = 0; \ 374 - unsigned long long __seen_print = 0; \ 375 - /* Avoid casting complaints the scariest way we can. */ \ 376 - memcpy(&__exp_print, &__exp, sizeof(__exp)); \ 377 - memcpy(&__seen_print, &__seen, sizeof(__seen)); \ 373 + unsigned long long __exp_print = (unsigned long long)__exp; \ 374 + unsigned long long __seen_print = (unsigned long long)__seen; \ 378 375 __TH_LOG("Expected %s (%llu) %s %s (%llu)", \ 379 376 #_expected, __exp_print, #_t, \ 380 377 #_seen, __seen_print); \
+2
tools/testing/selftests/vm/userfaultfd.c
··· 72 72 #define __NR_userfaultfd 374 73 73 #elif defined(__powewrpc__) 74 74 #define __NR_userfaultfd 364 75 + #elif defined(__s390__) 76 + #define __NR_userfaultfd 355 75 77 #else 76 78 #error "missing __NR_userfaultfd definition" 77 79 #endif
+1 -9
tools/testing/selftests/zram/zram.sh
··· 1 1 #!/bin/bash 2 2 TCID="zram.sh" 3 3 4 - check_prereqs() 5 - { 6 - local msg="skip all tests:" 7 - 8 - if [ $UID != 0 ]; then 9 - echo $msg must be run as root >&2 10 - exit 0 11 - fi 12 - } 4 + . ./zram_lib.sh 13 5 14 6 run_zram () { 15 7 echo "--------------------"
+2 -1
tools/testing/selftests/zram/zram_lib.sh
··· 23 23 check_prereqs() 24 24 { 25 25 local msg="skip all tests:" 26 + local uid=$(id -u) 26 27 27 - if [ $UID != 0 ]; then 28 + if [ $uid -ne 0 ]; then 28 29 echo $msg must be run as root >&2 29 30 exit 0 30 31 fi
+1 -1
tools/virtio/Makefile
··· 6 6 CFLAGS += -g -O2 -Werror -Wall -I. -I../include/ -I ../../usr/include/ -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE 7 7 vpath %.c ../../drivers/virtio ../../drivers/vhost 8 8 mod: 9 - ${MAKE} -C `pwd`/../.. M=`pwd`/vhost_test 9 + ${MAKE} -C `pwd`/../.. M=`pwd`/vhost_test V=${V} 10 10 .PHONY: all test mod clean 11 11 clean: 12 12 ${RM} *.o vringh_test virtio_test vhost_test/*.o vhost_test/.*.cmd \
+2
tools/virtio/asm/barrier.h
··· 3 3 #define mb() __sync_synchronize() 4 4 5 5 #define smp_mb() mb() 6 + # define dma_rmb() barrier() 7 + # define dma_wmb() barrier() 6 8 # define smp_rmb() barrier() 7 9 # define smp_wmb() barrier() 8 10 /* Weak barriers should be used. If not - it's a bug */
+3
tools/virtio/linux/export.h
··· 1 + #define EXPORT_SYMBOL_GPL(sym) extern typeof(sym) sym 2 + #define EXPORT_SYMBOL(sym) extern typeof(sym) sym 3 +
+8
tools/virtio/linux/kernel.h
··· 22 22 23 23 typedef unsigned long long dma_addr_t; 24 24 typedef size_t __kernel_size_t; 25 + typedef unsigned int __wsum; 25 26 26 27 struct page { 27 28 unsigned long long dummy; ··· 47 46 if (__kmalloc_fake) 48 47 return __kmalloc_fake; 49 48 return malloc(s); 49 + } 50 + static inline void *kzalloc(size_t s, gfp_t gfp) 51 + { 52 + void *p = kmalloc(s, gfp); 53 + 54 + memset(p, 0, s); 55 + return p; 50 56 } 51 57 52 58 static inline void kfree(void *p)
+8
virt/kvm/arm/arch_timer.c
··· 200 200 timer->irq = irq; 201 201 202 202 /* 203 + * The bits in CNTV_CTL are architecturally reset to UNKNOWN for ARMv8 204 + * and to 0 for ARMv7. We provide an implementation that always 205 + * resets the timer to be disabled and unmasked and is compliant with 206 + * the ARMv7 architecture. 207 + */ 208 + timer->cntv_ctl = 0; 209 + 210 + /* 203 211 * Tell the VGIC that the virtual interrupt is tied to a 204 212 * physical interrupt. We do that once per VCPU. 205 213 */
+1 -1
virt/kvm/arm/vgic-v3.c
··· 288 288 289 289 vgic->vctrl_base = NULL; 290 290 vgic->type = VGIC_V3; 291 - vgic->max_gic_vcpus = KVM_MAX_VCPUS; 291 + vgic->max_gic_vcpus = VGIC_V3_MAX_CPUS; 292 292 293 293 kvm_info("%s@%llx IRQ%d\n", vgic_node->name, 294 294 vcpu_res.start, vgic->maint_irq);
+26 -16
virt/kvm/arm/vgic.c
··· 1144 1144 struct irq_phys_map *map; 1145 1145 map = vgic_irq_map_search(vcpu, irq); 1146 1146 1147 - /* 1148 - * If we have a mapping, and the virtual interrupt is 1149 - * being injected, then we must set the state to 1150 - * active in the physical world. Otherwise the 1151 - * physical interrupt will fire and the guest will 1152 - * exit before processing the virtual interrupt. 1153 - */ 1154 1147 if (map) { 1155 - int ret; 1156 - 1157 - BUG_ON(!map->active); 1158 1148 vlr.hwirq = map->phys_irq; 1159 1149 vlr.state |= LR_HW; 1160 1150 vlr.state &= ~LR_EOI_INT; 1161 - 1162 - ret = irq_set_irqchip_state(map->irq, 1163 - IRQCHIP_STATE_ACTIVE, 1164 - true); 1165 - WARN_ON(ret); 1166 1151 1167 1152 /* 1168 1153 * Make sure we're not going to sample this ··· 1240 1255 struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu; 1241 1256 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; 1242 1257 unsigned long *pa_percpu, *pa_shared; 1243 - int i, vcpu_id; 1258 + int i, vcpu_id, lr, ret; 1244 1259 int overflow = 0; 1245 1260 int nr_shared = vgic_nr_shared_irqs(dist); 1246 1261 ··· 1294 1309 * adjust that if needed while exiting. 1295 1310 */ 1296 1311 clear_bit(vcpu_id, dist->irq_pending_on_cpu); 1312 + } 1313 + 1314 + for (lr = 0; lr < vgic->nr_lr; lr++) { 1315 + struct vgic_lr vlr; 1316 + 1317 + if (!test_bit(lr, vgic_cpu->lr_used)) 1318 + continue; 1319 + 1320 + vlr = vgic_get_lr(vcpu, lr); 1321 + 1322 + /* 1323 + * If we have a mapping, and the virtual interrupt is 1324 + * presented to the guest (as pending or active), then we must 1325 + * set the state to active in the physical world. See 1326 + * Documentation/virtual/kvm/arm/vgic-mapped-irqs.txt. 1327 + */ 1328 + if (vlr.state & LR_HW) { 1329 + struct irq_phys_map *map; 1330 + map = vgic_irq_map_search(vcpu, vlr.irq); 1331 + 1332 + ret = irq_set_irqchip_state(map->irq, 1333 + IRQCHIP_STATE_ACTIVE, 1334 + true); 1335 + WARN_ON(ret); 1336 + } 1297 1337 } 1298 1338 } 1299 1339
+2 -2
virt/kvm/coalesced_mmio.h
··· 24 24 int kvm_coalesced_mmio_init(struct kvm *kvm); 25 25 void kvm_coalesced_mmio_free(struct kvm *kvm); 26 26 int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm, 27 - struct kvm_coalesced_mmio_zone *zone); 27 + struct kvm_coalesced_mmio_zone *zone); 28 28 int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, 29 - struct kvm_coalesced_mmio_zone *zone); 29 + struct kvm_coalesced_mmio_zone *zone); 30 30 31 31 #else 32 32
+73 -51
virt/kvm/eventfd.c
··· 771 771 return KVM_MMIO_BUS; 772 772 } 773 773 774 - static int 775 - kvm_assign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) 774 + static int kvm_assign_ioeventfd_idx(struct kvm *kvm, 775 + enum kvm_bus bus_idx, 776 + struct kvm_ioeventfd *args) 776 777 { 777 - enum kvm_bus bus_idx; 778 - struct _ioeventfd *p; 779 - struct eventfd_ctx *eventfd; 780 - int ret; 781 778 782 - bus_idx = ioeventfd_bus_from_flags(args->flags); 783 - /* must be natural-word sized, or 0 to ignore length */ 784 - switch (args->len) { 785 - case 0: 786 - case 1: 787 - case 2: 788 - case 4: 789 - case 8: 790 - break; 791 - default: 792 - return -EINVAL; 793 - } 794 - 795 - /* check for range overflow */ 796 - if (args->addr + args->len < args->addr) 797 - return -EINVAL; 798 - 799 - /* check for extra flags that we don't understand */ 800 - if (args->flags & ~KVM_IOEVENTFD_VALID_FLAG_MASK) 801 - return -EINVAL; 802 - 803 - /* ioeventfd with no length can't be combined with DATAMATCH */ 804 - if (!args->len && 805 - args->flags & (KVM_IOEVENTFD_FLAG_PIO | 806 - KVM_IOEVENTFD_FLAG_DATAMATCH)) 807 - return -EINVAL; 779 + struct eventfd_ctx *eventfd; 780 + struct _ioeventfd *p; 781 + int ret; 808 782 809 783 eventfd = eventfd_ctx_fdget(args->fd); 810 784 if (IS_ERR(eventfd)) ··· 817 843 if (ret < 0) 818 844 goto unlock_fail; 819 845 820 - /* When length is ignored, MMIO is also put on a separate bus, for 821 - * faster lookups. 822 - */ 823 - if (!args->len && !(args->flags & KVM_IOEVENTFD_FLAG_PIO)) { 824 - ret = kvm_io_bus_register_dev(kvm, KVM_FAST_MMIO_BUS, 825 - p->addr, 0, &p->dev); 826 - if (ret < 0) 827 - goto register_fail; 828 - } 829 - 830 846 kvm->buses[bus_idx]->ioeventfd_count++; 831 847 list_add_tail(&p->list, &kvm->ioeventfds); 832 848 ··· 824 860 825 861 return 0; 826 862 827 - register_fail: 828 - kvm_io_bus_unregister_dev(kvm, bus_idx, &p->dev); 829 863 unlock_fail: 830 864 mutex_unlock(&kvm->slots_lock); 831 865 ··· 835 873 } 836 874 837 875 static int 838 - kvm_deassign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) 876 + kvm_deassign_ioeventfd_idx(struct kvm *kvm, enum kvm_bus bus_idx, 877 + struct kvm_ioeventfd *args) 839 878 { 840 - enum kvm_bus bus_idx; 841 879 struct _ioeventfd *p, *tmp; 842 880 struct eventfd_ctx *eventfd; 843 881 int ret = -ENOENT; 844 882 845 - bus_idx = ioeventfd_bus_from_flags(args->flags); 846 883 eventfd = eventfd_ctx_fdget(args->fd); 847 884 if (IS_ERR(eventfd)) 848 885 return PTR_ERR(eventfd); ··· 862 901 continue; 863 902 864 903 kvm_io_bus_unregister_dev(kvm, bus_idx, &p->dev); 865 - if (!p->length) { 866 - kvm_io_bus_unregister_dev(kvm, KVM_FAST_MMIO_BUS, 867 - &p->dev); 868 - } 869 904 kvm->buses[bus_idx]->ioeventfd_count--; 870 905 ioeventfd_release(p); 871 906 ret = 0; ··· 872 915 873 916 eventfd_ctx_put(eventfd); 874 917 918 + return ret; 919 + } 920 + 921 + static int kvm_deassign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) 922 + { 923 + enum kvm_bus bus_idx = ioeventfd_bus_from_flags(args->flags); 924 + int ret = kvm_deassign_ioeventfd_idx(kvm, bus_idx, args); 925 + 926 + if (!args->len && bus_idx == KVM_MMIO_BUS) 927 + kvm_deassign_ioeventfd_idx(kvm, KVM_FAST_MMIO_BUS, args); 928 + 929 + return ret; 930 + } 931 + 932 + static int 933 + kvm_assign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) 934 + { 935 + enum kvm_bus bus_idx; 936 + int ret; 937 + 938 + bus_idx = ioeventfd_bus_from_flags(args->flags); 939 + /* must be natural-word sized, or 0 to ignore length */ 940 + switch (args->len) { 941 + case 0: 942 + case 1: 943 + case 2: 944 + case 4: 945 + case 8: 946 + break; 947 + default: 948 + return -EINVAL; 949 + } 950 + 951 + /* check for range overflow */ 952 + if (args->addr + args->len < args->addr) 953 + return -EINVAL; 954 + 955 + /* check for extra flags that we don't understand */ 956 + if (args->flags & ~KVM_IOEVENTFD_VALID_FLAG_MASK) 957 + return -EINVAL; 958 + 959 + /* ioeventfd with no length can't be combined with DATAMATCH */ 960 + if (!args->len && 961 + args->flags & (KVM_IOEVENTFD_FLAG_PIO | 962 + KVM_IOEVENTFD_FLAG_DATAMATCH)) 963 + return -EINVAL; 964 + 965 + ret = kvm_assign_ioeventfd_idx(kvm, bus_idx, args); 966 + if (ret) 967 + goto fail; 968 + 969 + /* When length is ignored, MMIO is also put on a separate bus, for 970 + * faster lookups. 971 + */ 972 + if (!args->len && bus_idx == KVM_MMIO_BUS) { 973 + ret = kvm_assign_ioeventfd_idx(kvm, KVM_FAST_MMIO_BUS, args); 974 + if (ret < 0) 975 + goto fast_fail; 976 + } 977 + 978 + return 0; 979 + 980 + fast_fail: 981 + kvm_deassign_ioeventfd_idx(kvm, bus_idx, args); 982 + fail: 875 983 return ret; 876 984 } 877 985
+20 -3
virt/kvm/kvm_main.c
··· 2004 2004 if (vcpu->halt_poll_ns) { 2005 2005 ktime_t stop = ktime_add_ns(ktime_get(), vcpu->halt_poll_ns); 2006 2006 2007 + ++vcpu->stat.halt_attempted_poll; 2007 2008 do { 2008 2009 /* 2009 2010 * This sets KVM_REQ_UNHALT if an interrupt ··· 2044 2043 else if (vcpu->halt_poll_ns < halt_poll_ns && 2045 2044 block_ns < halt_poll_ns) 2046 2045 grow_halt_poll_ns(vcpu); 2047 - } 2046 + } else 2047 + vcpu->halt_poll_ns = 0; 2048 2048 2049 2049 trace_kvm_vcpu_wakeup(block_ns, waited); 2050 2050 } ··· 3158 3156 static inline int kvm_io_bus_cmp(const struct kvm_io_range *r1, 3159 3157 const struct kvm_io_range *r2) 3160 3158 { 3161 - if (r1->addr < r2->addr) 3159 + gpa_t addr1 = r1->addr; 3160 + gpa_t addr2 = r2->addr; 3161 + 3162 + if (addr1 < addr2) 3162 3163 return -1; 3163 - if (r1->addr + r1->len > r2->addr + r2->len) 3164 + 3165 + /* If r2->len == 0, match the exact address. If r2->len != 0, 3166 + * accept any overlapping write. Any order is acceptable for 3167 + * overlapping ranges, because kvm_io_bus_get_first_dev ensures 3168 + * we process all of them. 3169 + */ 3170 + if (r2->len) { 3171 + addr1 += r1->len; 3172 + addr2 += r2->len; 3173 + } 3174 + 3175 + if (addr1 > addr2) 3164 3176 return 1; 3177 + 3165 3178 return 0; 3166 3179 } 3167 3180