···4545 MPX-instrumented.46463) The kernel detects that the CPU has MPX, allows the new prctl() to4747 succeed, and notes the location of the bounds directory. Userspace is4848- expected to keep the bounds directory at that locationWe note it4848+ expected to keep the bounds directory at that location. We note it4949 instead of reading it each time because the 'xsave' operation needed5050 to access the bounds directory register is an expensive operation.51514) If the application needs to spill bounds out of the 4 registers, it···167167We need to decode MPX instructions to get violation address and168168set this address into extended struct siginfo.169169170170-The _sigfault feild of struct siginfo is extended as follow:170170+The _sigfault field of struct siginfo is extended as follow:17117117217287 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */17317388 struct {···240240This is allowed architecturally. See more information "Intel(R) Architecture241241Instruction Set Extensions Programming Reference" (9.3.4).242242243243-However, if users did this, the kernel might be fooled in to unmaping an243243+However, if users did this, the kernel might be fooled in to unmapping an244244in-use bounds table since it does not recognize sharing.
+2-2
Documentation/x86/tlb.txt
···55 from areas other than the one we are trying to flush will be66 destroyed and must be refilled later, at some cost.77 2. Use the invlpg instruction to invalidate a single page at a88- time. This could potentialy cost many more instructions, but88+ time. This could potentially cost many more instructions, but99 it is a much more precise operation, causing no collateral1010 damage to other TLB entries.1111···1919 work.2020 3. The size of the TLB. The larger the TLB, the more collateral2121 damage we do with a full flush. So, the larger the TLB, the2222- more attrative an individual flush looks. Data and2222+ more attractive an individual flush looks. Data and2323 instructions have separate TLBs, as do different page sizes.2424 4. The microarchitecture. The TLB has become a multi-level2525 cache on modern CPUs, and the global flushes have become more
+1-1
Documentation/x86/x86_64/machinecheck
···36363737check_interval3838 How often to poll for corrected machine check errors, in seconds3939- (Note output is hexademical). Default 5 minutes. When the poller3939+ (Note output is hexadecimal). Default 5 minutes. When the poller4040 finds MCEs it triggers an exponential speedup (poll more often) on4141 the polling interval. When the poller stops finding MCEs, it4242 triggers an exponential backoff (poll less often) on the polling
···2828#include <asm/errno.h>2929#include <asm/esr.h>3030#include <asm/irq.h>3131+#include <asm/memory.h>3132#include <asm/thread_info.h>3233#include <asm/unistd.h>3334···9897 mov x29, xzr // fp pointed to user-space9998 .else10099 add x21, sp, #S_FRAME_SIZE101101- .endif100100+ get_thread_info tsk101101+ /* Save the task's original addr_limit and set USER_DS (TASK_SIZE_64) */102102+ ldr x20, [tsk, #TI_ADDR_LIMIT]103103+ str x20, [sp, #S_ORIG_ADDR_LIMIT]104104+ mov x20, #TASK_SIZE_64105105+ str x20, [tsk, #TI_ADDR_LIMIT]106106+ ALTERNATIVE(nop, SET_PSTATE_UAO(0), ARM64_HAS_UAO, CONFIG_ARM64_UAO)107107+ .endif /* \el == 0 */102108 mrs x22, elr_el1103109 mrs x23, spsr_el1104110 stp lr, x21, [sp, #S_LR]···136128 .endm137129138130 .macro kernel_exit, el131131+ .if \el != 0132132+ /* Restore the task's original addr_limit. */133133+ ldr x20, [sp, #S_ORIG_ADDR_LIMIT]134134+ str x20, [tsk, #TI_ADDR_LIMIT]135135+136136+ /* No need to restore UAO, it will be restored from SPSR_EL1 */137137+ .endif138138+139139 ldp x21, x22, [sp, #S_PC] // load ELR, SPSR140140 .if \el == 0141141 ct_user_enter···422406 bl trace_hardirqs_off423407#endif424408425425- get_thread_info tsk426409 irq_handler427410428411#ifdef CONFIG_PREEMPT
+2-1
arch/arm64/mm/fault.c
···280280 }281281282282 if (permission_fault(esr) && (addr < USER_DS)) {283283- if (get_fs() == KERNEL_DS)283283+ /* regs->orig_addr_limit may be 0 if we entered from EL0 */284284+ if (regs->orig_addr_limit == KERNEL_DS)284285 die("Accessing user space memory with fs=KERNEL_DS", regs, esr);285286286287 if (!search_exception_tables(regs->pc))
+1-1
arch/mips/cavium-octeon/octeon-irq.c
···1260126012611261 line = (hw + gpiod->base_hwirq) >> 6;12621262 bit = (hw + gpiod->base_hwirq) & 63;12631263- if (line > ARRAY_SIZE(octeon_irq_ciu_to_irq) ||12631263+ if (line >= ARRAY_SIZE(octeon_irq_ciu_to_irq) ||12641264 octeon_irq_ciu_to_irq[line][bit] != 0)12651265 return -EINVAL;12661266
···115115 INTEL_UEVENT_CONSTRAINT(0x04a3, 0xf), /* CYCLE_ACTIVITY.CYCLES_NO_DISPATCH */116116 INTEL_UEVENT_CONSTRAINT(0x02a3, 0x4), /* CYCLE_ACTIVITY.CYCLES_L1D_PENDING */117117118118+ /*119119+ * When HT is off these events can only run on the bottom 4 counters120120+ * When HT is on, they are impacted by the HT bug and require EXCL access121121+ */118122 INTEL_EXCLEVT_CONSTRAINT(0xd0, 0xf), /* MEM_UOPS_RETIRED.* */119123 INTEL_EXCLEVT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_UOPS_RETIRED.* */120124 INTEL_EXCLEVT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_UOPS_LLC_HIT_RETIRED.* */···143139 INTEL_UEVENT_CONSTRAINT(0x0ca3, 0x4), /* CYCLE_ACTIVITY.STALLS_L1D_PENDING */144140 INTEL_UEVENT_CONSTRAINT(0x01c0, 0x2), /* INST_RETIRED.PREC_DIST */145141142142+ /*143143+ * When HT is off these events can only run on the bottom 4 counters144144+ * When HT is on, they are impacted by the HT bug and require EXCL access145145+ */146146 INTEL_EXCLEVT_CONSTRAINT(0xd0, 0xf), /* MEM_UOPS_RETIRED.* */147147 INTEL_EXCLEVT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_UOPS_RETIRED.* */148148 INTEL_EXCLEVT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_UOPS_LLC_HIT_RETIRED.* */···190182 FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */191183 FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */192184 INTEL_UEVENT_CONSTRAINT(0x1c0, 0x2), /* INST_RETIRED.PREC_DIST */185185+186186+ /*187187+ * when HT is off, these can only run on the bottom 4 counters188188+ */189189+ INTEL_EVENT_CONSTRAINT(0xd0, 0xf), /* MEM_INST_RETIRED.* */190190+ INTEL_EVENT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_RETIRED.* */191191+ INTEL_EVENT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_L3_HIT_RETIRED.* */192192+ INTEL_EVENT_CONSTRAINT(0xcd, 0xf), /* MEM_TRANS_RETIRED.* */193193+ INTEL_EVENT_CONSTRAINT(0xc6, 0xf), /* FRONTEND_RETIRED.* */194194+193195 EVENT_CONSTRAINT_END194196};195197···268250 /* CYCLE_ACTIVITY.CYCLES_NO_EXECUTE */269251 INTEL_UEVENT_CONSTRAINT(0x04a3, 0xf),270252253253+ /*254254+ * When HT is off these events can only run on the bottom 4 counters255255+ * When HT is on, they are impacted by the HT bug and require EXCL access256256+ */271257 INTEL_EXCLEVT_CONSTRAINT(0xd0, 0xf), /* MEM_UOPS_RETIRED.* */272258 INTEL_EXCLEVT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_UOPS_RETIRED.* */273259 INTEL_EXCLEVT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_UOPS_LLC_HIT_RETIRED.* */···286264 FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */287265 INTEL_UEVENT_CONSTRAINT(0x148, 0x4), /* L1D_PEND_MISS.PENDING */288266 INTEL_UBIT_EVENT_CONSTRAINT(0x8a3, 0x4), /* CYCLE_ACTIVITY.CYCLES_L1D_MISS */267267+ /*268268+ * when HT is off, these can only run on the bottom 4 counters269269+ */270270+ INTEL_EVENT_CONSTRAINT(0xd0, 0xf), /* MEM_INST_RETIRED.* */271271+ INTEL_EVENT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_RETIRED.* */272272+ INTEL_EVENT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_L3_HIT_RETIRED.* */273273+ INTEL_EVENT_CONSTRAINT(0xcd, 0xf), /* MEM_TRANS_RETIRED.* */289274 EVENT_CONSTRAINT_END290275};291276
+2-2
arch/x86/kernel/amd_nb.c
···7171 while ((misc = next_northbridge(misc, amd_nb_misc_ids)) != NULL)7272 i++;73737474- if (i == 0)7575- return 0;7474+ if (!i)7575+ return -ENODEV;76767777 nb = kzalloc(i * sizeof(struct amd_northbridge), GFP_KERNEL);7878 if (!nb)
+1
arch/x86/pci/acpi.c
···396396 return -ENODEV;397397398398 printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");399399+ acpi_irq_penalty_init();399400 pcibios_enable_irq = acpi_pci_irq_enable;400401 pcibios_disable_irq = acpi_pci_irq_disable;401402 x86_init.pci.init_irq = x86_init_noop;
+85-12
arch/x86/power/hibernate_64.c
···1919#include <asm/mtrr.h>2020#include <asm/sections.h>2121#include <asm/suspend.h>2222+#include <asm/tlbflush.h>22232324/* Defined in hibernate_asm_64.S */2425extern asmlinkage __visible int restore_image(void);···2928 * kernel's text (this value is passed in the image header).3029 */3130unsigned long restore_jump_address __visible;3131+unsigned long jump_address_phys;32323333/*3434 * Value of the cr3 register from before the hibernation (this value is passed···39374038pgd_t *temp_level4_pgt __visible;41394242-void *relocated_restore_code __visible;4040+unsigned long relocated_restore_code __visible;4141+4242+static int set_up_temporary_text_mapping(void)4343+{4444+ pmd_t *pmd;4545+ pud_t *pud;4646+4747+ /*4848+ * The new mapping only has to cover the page containing the image4949+ * kernel's entry point (jump_address_phys), because the switch over to5050+ * it is carried out by relocated code running from a page allocated5151+ * specifically for this purpose and covered by the identity mapping, so5252+ * the temporary kernel text mapping is only needed for the final jump.5353+ * Moreover, in that mapping the virtual address of the image kernel's5454+ * entry point must be the same as its virtual address in the image5555+ * kernel (restore_jump_address), so the image kernel's5656+ * restore_registers() code doesn't find itself in a different area of5757+ * the virtual address space after switching over to the original page5858+ * tables used by the image kernel.5959+ */6060+ pud = (pud_t *)get_safe_page(GFP_ATOMIC);6161+ if (!pud)6262+ return -ENOMEM;6363+6464+ pmd = (pmd_t *)get_safe_page(GFP_ATOMIC);6565+ if (!pmd)6666+ return -ENOMEM;6767+6868+ set_pmd(pmd + pmd_index(restore_jump_address),6969+ __pmd((jump_address_phys & PMD_MASK) | __PAGE_KERNEL_LARGE_EXEC));7070+ set_pud(pud + pud_index(restore_jump_address),7171+ __pud(__pa(pmd) | _KERNPG_TABLE));7272+ set_pgd(temp_level4_pgt + pgd_index(restore_jump_address),7373+ __pgd(__pa(pud) | _KERNPG_TABLE));7474+7575+ return 0;7676+}43774478static void *alloc_pgt_page(void *context)4579{···9759 if (!temp_level4_pgt)9860 return -ENOMEM;9961100100- /* It is safe to reuse the original kernel mapping */101101- set_pgd(temp_level4_pgt + pgd_index(__START_KERNEL_map),102102- init_level4_pgt[pgd_index(__START_KERNEL_map)]);6262+ /* Prepare a temporary mapping for the kernel text */6363+ result = set_up_temporary_text_mapping();6464+ if (result)6565+ return result;1036610467 /* Set up the direct mapping from scratch */10568 for (i = 0; i < nr_pfn_mapped; i++) {···11778 return 0;11879}119808181+static int relocate_restore_code(void)8282+{8383+ pgd_t *pgd;8484+ pud_t *pud;8585+8686+ relocated_restore_code = get_safe_page(GFP_ATOMIC);8787+ if (!relocated_restore_code)8888+ return -ENOMEM;8989+9090+ memcpy((void *)relocated_restore_code, &core_restore_code, PAGE_SIZE);9191+9292+ /* Make the page containing the relocated code executable */9393+ pgd = (pgd_t *)__va(read_cr3()) + pgd_index(relocated_restore_code);9494+ pud = pud_offset(pgd, relocated_restore_code);9595+ if (pud_large(*pud)) {9696+ set_pud(pud, __pud(pud_val(*pud) & ~_PAGE_NX));9797+ } else {9898+ pmd_t *pmd = pmd_offset(pud, relocated_restore_code);9999+100100+ if (pmd_large(*pmd)) {101101+ set_pmd(pmd, __pmd(pmd_val(*pmd) & ~_PAGE_NX));102102+ } else {103103+ pte_t *pte = pte_offset_kernel(pmd, relocated_restore_code);104104+105105+ set_pte(pte, __pte(pte_val(*pte) & ~_PAGE_NX));106106+ }107107+ }108108+ __flush_tlb_all();109109+110110+ return 0;111111+}112112+120113int swsusp_arch_resume(void)121114{122115 int error;123116124117 /* We have got enough memory and from now on we cannot recover */125125- if ((error = set_up_temporary_mappings()))118118+ error = set_up_temporary_mappings();119119+ if (error)126120 return error;127121128128- relocated_restore_code = (void *)get_safe_page(GFP_ATOMIC);129129- if (!relocated_restore_code)130130- return -ENOMEM;131131- memcpy(relocated_restore_code, &core_restore_code,132132- &restore_registers - &core_restore_code);122122+ error = relocate_restore_code();123123+ if (error)124124+ return error;133125134126 restore_image();135127 return 0;···179109180110struct restore_data_record {181111 unsigned long jump_address;112112+ unsigned long jump_address_phys;182113 unsigned long cr3;183114 unsigned long magic;184115};185116186186-#define RESTORE_MAGIC 0x0123456789ABCDEFUL117117+#define RESTORE_MAGIC 0x123456789ABCDEF0UL187118188119/**189120 * arch_hibernation_header_save - populate the architecture specific part···197126198127 if (max_size < sizeof(struct restore_data_record))199128 return -EOVERFLOW;200200- rdr->jump_address = restore_jump_address;129129+ rdr->jump_address = (unsigned long)&restore_registers;130130+ rdr->jump_address_phys = __pa_symbol(&restore_registers);201131 rdr->cr3 = restore_cr3;202132 rdr->magic = RESTORE_MAGIC;203133 return 0;···214142 struct restore_data_record *rdr = addr;215143216144 restore_jump_address = rdr->jump_address;145145+ jump_address_phys = rdr->jump_address_phys;217146 restore_cr3 = rdr->cr3;218147 return (rdr->magic == RESTORE_MAGIC) ? 0 : -EINVAL;219148}
+24-31
arch/x86/power/hibernate_asm_64.S
···4444 pushfq4545 popq pt_regs_flags(%rax)46464747- /* save the address of restore_registers */4848- movq $restore_registers, %rax4949- movq %rax, restore_jump_address(%rip)5047 /* save cr3 */5148 movq %cr3, %rax5249 movq %rax, restore_cr3(%rip)···5457ENDPROC(swsusp_arch_suspend)55585659ENTRY(restore_image)5757- /* switch to temporary page tables */5858- movq $__PAGE_OFFSET, %rdx5959- movq temp_level4_pgt(%rip), %rax6060- subq %rdx, %rax6161- movq %rax, %cr36262- /* Flush TLB */6363- movq mmu_cr4_features(%rip), %rax6464- movq %rax, %rdx6565- andq $~(X86_CR4_PGE), %rdx6666- movq %rdx, %cr4; # turn off PGE6767- movq %cr3, %rcx; # flush TLB6868- movq %rcx, %cr3;6969- movq %rax, %cr4; # turn PGE back on7070-7160 /* prepare to jump to the image kernel */7272- movq restore_jump_address(%rip), %rax7373- movq restore_cr3(%rip), %rbx6161+ movq restore_jump_address(%rip), %r86262+ movq restore_cr3(%rip), %r96363+6464+ /* prepare to switch to temporary page tables */6565+ movq temp_level4_pgt(%rip), %rax6666+ movq mmu_cr4_features(%rip), %rbx74677568 /* prepare to copy image data to their original locations */7669 movq restore_pblist(%rip), %rdx7070+7171+ /* jump to relocated restore code */7772 movq relocated_restore_code(%rip), %rcx7873 jmpq *%rcx79748075 /* code below has been relocated to a safe page */8176ENTRY(core_restore_code)7777+ /* switch to temporary page tables */7878+ movq $__PAGE_OFFSET, %rcx7979+ subq %rcx, %rax8080+ movq %rax, %cr38181+ /* flush TLB */8282+ movq %rbx, %rcx8383+ andq $~(X86_CR4_PGE), %rcx8484+ movq %rcx, %cr4; # turn off PGE8585+ movq %cr3, %rcx; # flush TLB8686+ movq %rcx, %cr3;8787+ movq %rbx, %cr4; # turn PGE back on8288.Lloop:8389 testq %rdx, %rdx8490 jz .Ldone···9696 /* progress to the next pbe */9797 movq pbe_next(%rdx), %rdx9898 jmp .Lloop9999+99100.Ldone:100101 /* jump to the restore_registers address from the image header */101101- jmpq *%rax102102- /*103103- * NOTE: This assumes that the boot kernel's text mapping covers the104104- * image kernel's page containing restore_registers and the address of105105- * this page is the same as in the image kernel's text mapping (it106106- * should always be true, because the text mapping is linear, starting107107- * from 0, and is supposed to cover the entire kernel text for every108108- * kernel).109109- *110110- * code below belongs to the image kernel111111- */102102+ jmpq *%r8112103104104+ /* code below belongs to the image kernel */105105+ .align PAGE_SIZE113106ENTRY(restore_registers)114107 FRAME_BEGIN115108 /* go back to the original page tables */116116- movq %rbx, %cr3109109+ movq %r9, %cr3117110118111 /* Flush TLB, including "global" things (vmalloc) */119112 movq mmu_cr4_features(%rip), %rax
+2
block/ioprio.c
···150150 if (ret)151151 goto out;152152 ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);153153+ task_lock(p);153154 if (p->io_context)154155 ret = p->io_context->ioprio;156156+ task_unlock(p);155157out:156158 return ret;157159}
···4646#include "acnamesp.h"4747#include "acdispat.h"4848#include "actables.h"4949+#include "acinterp.h"49505051#define _COMPONENT ACPI_NAMESPACE5152ACPI_MODULE_NAME("nsload")···79788079 ACPI_FUNCTION_TRACE(ns_load_table);81808181+ acpi_ex_enter_interpreter();8282+8283 /*8384 * Parse the table and load the namespace with all named8485 * objects found within. Control methods are NOT parsed···9289 */9390 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);9491 if (ACPI_FAILURE(status)) {9595- return_ACPI_STATUS(status);9292+ goto unlock_interp;9693 }97949895 /* If table already loaded into namespace, just return */···133130134131unlock:135132 (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);133133+unlock_interp:134134+ (void)acpi_ex_exit_interpreter();136135137136 if (ACPI_FAILURE(status)) {138137 return_ACPI_STATUS(status);
+2-7
drivers/acpi/acpica/nsparse.c
···4747#include "acparser.h"4848#include "acdispat.h"4949#include "actables.h"5050-#include "acinterp.h"51505251#define _COMPONENT ACPI_NAMESPACE5352ACPI_MODULE_NAME("nsparse")···170171171172 ACPI_FUNCTION_TRACE(ns_parse_table);172173173173- acpi_ex_enter_interpreter();174174-175174 /*176175 * AML Parse, pass 1177176 *···185188 status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1,186189 table_index, start_node);187190 if (ACPI_FAILURE(status)) {188188- goto error_exit;191191+ return_ACPI_STATUS(status);189192 }190193191194 /*···201204 status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2,202205 table_index, start_node);203206 if (ACPI_FAILURE(status)) {204204- goto error_exit;207207+ return_ACPI_STATUS(status);205208 }206209207207-error_exit:208208- acpi_ex_exit_interpreter();209210 return_ACPI_STATUS(status);210211}
+47-14
drivers/acpi/pci_link.c
···470470{471471 struct acpi_pci_link *link;472472 int penalty = 0;473473+ int i;473474474475 list_for_each_entry(link, &acpi_link_list, list) {475476 /*···479478 */480479 if (link->irq.active && link->irq.active == irq)481480 penalty += PIRQ_PENALTY_PCI_USING;482482- else {483483- int i;484481485485- /*486486- * If a link is inactive, penalize the IRQs it487487- * might use, but not as severely.488488- */489489- for (i = 0; i < link->irq.possible_count; i++)490490- if (link->irq.possible[i] == irq)491491- penalty += PIRQ_PENALTY_PCI_POSSIBLE /492492- link->irq.possible_count;493493- }482482+ /*483483+ * penalize the IRQs PCI might use, but not as severely.484484+ */485485+ for (i = 0; i < link->irq.possible_count; i++)486486+ if (link->irq.possible[i] == irq)487487+ penalty += PIRQ_PENALTY_PCI_POSSIBLE /488488+ link->irq.possible_count;494489 }495490496491 return penalty;···495498static int acpi_irq_get_penalty(int irq)496499{497500 int penalty = 0;498498-499499- if (irq < ACPI_MAX_ISA_IRQS)500500- penalty += acpi_isa_irq_penalty[irq];501501502502 /*503503 * Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict···510516 penalty += PIRQ_PENALTY_PCI_USING;511517 }512518519519+ if (irq < ACPI_MAX_ISA_IRQS)520520+ return penalty + acpi_isa_irq_penalty[irq];521521+513522 penalty += acpi_irq_pci_sharing_penalty(irq);514523 return penalty;524524+}525525+526526+int __init acpi_irq_penalty_init(void)527527+{528528+ struct acpi_pci_link *link;529529+ int i;530530+531531+ /*532532+ * Update penalties to facilitate IRQ balancing.533533+ */534534+ list_for_each_entry(link, &acpi_link_list, list) {535535+536536+ /*537537+ * reflect the possible and active irqs in the penalty table --538538+ * useful for breaking ties.539539+ */540540+ if (link->irq.possible_count) {541541+ int penalty =542542+ PIRQ_PENALTY_PCI_POSSIBLE /543543+ link->irq.possible_count;544544+545545+ for (i = 0; i < link->irq.possible_count; i++) {546546+ if (link->irq.possible[i] < ACPI_MAX_ISA_IRQS)547547+ acpi_isa_irq_penalty[link->irq.548548+ possible[i]] +=549549+ penalty;550550+ }551551+552552+ } else if (link->irq.active &&553553+ (link->irq.active < ACPI_MAX_ISA_IRQS)) {554554+ acpi_isa_irq_penalty[link->irq.active] +=555555+ PIRQ_PENALTY_PCI_POSSIBLE;556556+ }557557+ }558558+559559+ return 0;515560}516561517562static int acpi_irq_balance = -1; /* 0: static, 1: balance */
···2828 if (!desc && gpio_is_valid(gpio))2929 return -EPROBE_DEFER;30303131+ err = gpiod_request(desc, label);3232+ if (err)3333+ return err;3434+3135 if (flags & GPIOF_OPEN_DRAIN)3236 set_bit(FLAG_OPEN_DRAIN, &desc->flags);3337···40364137 if (flags & GPIOF_ACTIVE_LOW)4238 set_bit(FLAG_ACTIVE_LOW, &desc->flags);4343-4444- err = gpiod_request(desc, label);4545- if (err)4646- return err;47394840 if (flags & GPIOF_DIR_IN)4941 err = gpiod_direction_input(desc);
+16-36
drivers/gpio/gpiolib.c
···13521352 spin_lock_irqsave(&gpio_lock, flags);13531353 }13541354done:13551355- if (status < 0) {13561356- /* Clear flags that might have been set by the caller before13571357- * requesting the GPIO.13581358- */13591359- clear_bit(FLAG_ACTIVE_LOW, &desc->flags);13601360- clear_bit(FLAG_OPEN_DRAIN, &desc->flags);13611361- clear_bit(FLAG_OPEN_SOURCE, &desc->flags);13621362- }13631355 spin_unlock_irqrestore(&gpio_lock, flags);13641356 return status;13651357}···25792587}25802588EXPORT_SYMBOL_GPL(gpiod_get_optional);2581258925822582-/**25832583- * gpiod_parse_flags - helper function to parse GPIO lookup flags25842584- * @desc: gpio to be setup25852585- * @lflags: gpio_lookup_flags - returned from of_find_gpio() or25862586- * of_get_gpio_hog()25872587- *25882588- * Set the GPIO descriptor flags based on the given GPIO lookup flags.25892589- */25902590-static void gpiod_parse_flags(struct gpio_desc *desc, unsigned long lflags)25912591-{25922592- if (lflags & GPIO_ACTIVE_LOW)25932593- set_bit(FLAG_ACTIVE_LOW, &desc->flags);25942594- if (lflags & GPIO_OPEN_DRAIN)25952595- set_bit(FLAG_OPEN_DRAIN, &desc->flags);25962596- if (lflags & GPIO_OPEN_SOURCE)25972597- set_bit(FLAG_OPEN_SOURCE, &desc->flags);25982598-}2599259026002591/**26012592 * gpiod_configure_flags - helper function to configure a given GPIO26022593 * @desc: gpio whose value will be assigned26032594 * @con_id: function within the GPIO consumer25952595+ * @lflags: gpio_lookup_flags - returned from of_find_gpio() or25962596+ * of_get_gpio_hog()26042597 * @dflags: gpiod_flags - optional GPIO initialization flags26052598 *26062599 * Return 0 on success, -ENOENT if no GPIO has been assigned to the···25932616 * occurred while trying to acquire the GPIO.25942617 */25952618static int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,25962596- enum gpiod_flags dflags)26192619+ unsigned long lflags, enum gpiod_flags dflags)25972620{25982621 int status;26222622+26232623+ if (lflags & GPIO_ACTIVE_LOW)26242624+ set_bit(FLAG_ACTIVE_LOW, &desc->flags);26252625+ if (lflags & GPIO_OPEN_DRAIN)26262626+ set_bit(FLAG_OPEN_DRAIN, &desc->flags);26272627+ if (lflags & GPIO_OPEN_SOURCE)26282628+ set_bit(FLAG_OPEN_SOURCE, &desc->flags);2599262926002630 /* No particular flag request, return here... */26012631 if (!(dflags & GPIOD_FLAGS_BIT_DIR_SET)) {···26702686 return desc;26712687 }2672268826732673- gpiod_parse_flags(desc, lookupflags);26742674-26752689 status = gpiod_request(desc, con_id);26762690 if (status < 0)26772691 return ERR_PTR(status);2678269226792679- status = gpiod_configure_flags(desc, con_id, flags);26932693+ status = gpiod_configure_flags(desc, con_id, lookupflags, flags);26802694 if (status < 0) {26812695 dev_dbg(dev, "setup of GPIO %s failed\n", con_id);26822696 gpiod_put(desc);···27302748 if (IS_ERR(desc))27312749 return desc;2732275027512751+ ret = gpiod_request(desc, NULL);27522752+ if (ret)27532753+ return ERR_PTR(ret);27542754+27332755 if (active_low)27342756 set_bit(FLAG_ACTIVE_LOW, &desc->flags);27352757···27432757 else27442758 set_bit(FLAG_OPEN_SOURCE, &desc->flags);27452759 }27462746-27472747- ret = gpiod_request(desc, NULL);27482748- if (ret)27492749- return ERR_PTR(ret);2750276027512761 return desc;27522762}···27962814 chip = gpiod_to_chip(desc);27972815 hwnum = gpio_chip_hwgpio(desc);2798281627992799- gpiod_parse_flags(desc, lflags);28002800-28012817 local_desc = gpiochip_request_own_desc(chip, hwnum, name);28022818 if (IS_ERR(local_desc)) {28032819 status = PTR_ERR(local_desc);···28042824 return status;28052825 }2806282628072807- status = gpiod_configure_flags(desc, name, dflags);28272827+ status = gpiod_configure_flags(desc, name, lflags, dflags);28082828 if (status < 0) {28092829 pr_err("setup of hog GPIO %s (chip %s, offset %d) failed, %d\n",28102830 name, chip->label, hwnum, status);
···15681568 break;15691569 }1570157015711571+ /*15721572+ * Order is important here to make sure any unity map requirements are15731573+ * fulfilled. The unity mappings are created and written to the device15741574+ * table during the amd_iommu_init_api() call.15751575+ *15761576+ * After that we call init_device_table_dma() to make sure any15771577+ * uninitialized DTE will block DMA, and in the end we flush the caches15781578+ * of all IOMMUs to make sure the changes to the device table are15791579+ * active.15801580+ */15811581+ ret = amd_iommu_init_api();15821582+15711583 init_device_table_dma();1572158415731585 for_each_iommu(iommu)15741586 iommu_flush_all_caches(iommu);15751575-15761576- ret = amd_iommu_init_api();1577158715781588 if (!ret)15791589 print_iommu_info();
+2-2
drivers/iommu/intel-iommu.c
···46024602 for (i = 0; i < g_num_of_iommus; i++) {46034603 struct intel_iommu *iommu = g_iommus[i];46044604 struct dmar_domain *domain;46054605- u16 did;46054605+ int did;4606460646074607 if (!iommu)46084608 continue;4609460946104610 for (did = 0; did < cap_ndoms(iommu->cap); did++) {46114611- domain = get_iommu_domain(iommu, did);46114611+ domain = get_iommu_domain(iommu, (u16)did);4612461246134613 if (!domain)46144614 continue;
···15841584 }1585158515861586 /* check for initial state */15871587+ new_slave->link = BOND_LINK_NOCHANGE;15871588 if (bond->params.miimon) {15881589 if (bond_check_dev_link(bond, slave_dev, 0) == BMSR_LSTATUS) {15891590 if (bond->params.updelay) {
···154154 writel(val, hw->hw_addr + reg);155155}156156157157-static bool e1000e_vlan_used(struct e1000_adapter *adapter)158158-{159159- u16 vid;160160-161161- for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID)162162- return true;163163-164164- return false;165165-}166166-167157/**168158 * e1000_regdump - register printout routine169159 * @hw: pointer to the HW structure···3443345334443454 ew32(RCTL, rctl);3445345534463446- if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX ||34473447- e1000e_vlan_used(adapter))34563456+ if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX)34483457 e1000e_vlan_strip_enable(adapter);34493458 else34503459 e1000e_vlan_strip_disable(adapter);···69146925 /* Jumbo frame workaround on 82579 and newer requires CRC be stripped */69156926 if ((hw->mac.type >= e1000_pch2lan) && (netdev->mtu > ETH_DATA_LEN))69166927 features &= ~NETIF_F_RXFCS;69286928+69296929+ /* Since there is no support for separate Rx/Tx vlan accel69306930+ * enable/disable make sure Tx flag is always in same state as Rx.69316931+ */69326932+ if (features & NETIF_F_HW_VLAN_CTAG_RX)69336933+ features |= NETIF_F_HW_VLAN_CTAG_TX;69346934+ else69356935+ features &= ~NETIF_F_HW_VLAN_CTAG_TX;6917693669186937 return features;69196938}
+2-2
drivers/net/ethernet/intel/ixgbevf/mbx.c
···8585static s32 ixgbevf_read_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)8686{8787 struct ixgbe_mbx_info *mbx = &hw->mbx;8888- s32 ret_val = -IXGBE_ERR_MBX;8888+ s32 ret_val = IXGBE_ERR_MBX;89899090 if (!mbx->ops.read)9191 goto out;···111111static s32 ixgbevf_write_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)112112{113113 struct ixgbe_mbx_info *mbx = &hw->mbx;114114- s32 ret_val = -IXGBE_ERR_MBX;114114+ s32 ret_val = IXGBE_ERR_MBX;115115116116 /* exit if either we can't write or there isn't a defined timeout */117117 if (!mbx->ops.write || !mbx->timeout)
···14221422 mlx5_pci_err_detected(dev->pdev, 0);14231423}1424142414251425-/* wait for the device to show vital signs. For now we check14261426- * that we can read the device ID and that the health buffer14271427- * shows a non zero value which is different than 0xffffffff14251425+/* wait for the device to show vital signs by waiting14261426+ * for the health counter to start counting.14281427 */14291429-static void wait_vital(struct pci_dev *pdev)14281428+static int wait_vital(struct pci_dev *pdev)14301429{14311430 struct mlx5_core_dev *dev = pci_get_drvdata(pdev);14321431 struct mlx5_core_health *health = &dev->priv.health;14331432 const int niter = 100;14331433+ u32 last_count = 0;14341434 u32 count;14351435- u16 did;14361435 int i;14371437-14381438- /* Wait for firmware to be ready after reset */14391439- msleep(1000);14401440- for (i = 0; i < niter; i++) {14411441- if (pci_read_config_word(pdev, 2, &did)) {14421442- dev_warn(&pdev->dev, "failed reading config word\n");14431443- break;14441444- }14451445- if (did == pdev->device) {14461446- dev_info(&pdev->dev, "device ID correctly read after %d iterations\n", i);14471447- break;14481448- }14491449- msleep(50);14501450- }14511451- if (i == niter)14521452- dev_warn(&pdev->dev, "%s-%d: could not read device ID\n", __func__, __LINE__);1453143614541437 for (i = 0; i < niter; i++) {14551438 count = ioread32be(health->health_counter);14561439 if (count && count != 0xffffffff) {14571457- dev_info(&pdev->dev, "Counter value 0x%x after %d iterations\n", count, i);14581458- break;14401440+ if (last_count && last_count != count) {14411441+ dev_info(&pdev->dev, "Counter value 0x%x after %d iterations\n", count, i);14421442+ return 0;14431443+ }14441444+ last_count = count;14591445 }14601446 msleep(50);14611447 }1462144814631463- if (i == niter)14641464- dev_warn(&pdev->dev, "%s-%d: could not read device ID\n", __func__, __LINE__);14491449+ return -ETIMEDOUT;14651450}1466145114671452static void mlx5_pci_resume(struct pci_dev *pdev)···14581473 dev_info(&pdev->dev, "%s was called\n", __func__);1459147414601475 pci_save_state(pdev);14611461- wait_vital(pdev);14761476+ err = wait_vital(pdev);14771477+ if (err) {14781478+ dev_err(&pdev->dev, "%s: wait_vital timed out\n", __func__);14791479+ return;14801480+ }1462148114631482 err = mlx5_load_one(dev, priv);14641483 if (err)
···772772 tx_ring->tx_stats.tx_bytes += skb->len;773773 tx_ring->tx_stats.xmit_called++;774774775775+ /* Ensure writes are complete before HW fetches Tx descriptors */776776+ wmb();775777 qlcnic_update_cmd_producer(tx_ring);776778777779 return NETDEV_TX_OK;
+1-1
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
···28042804 priv->tx_path_in_lpi_mode = true;28052805 if (status & CORE_IRQ_TX_PATH_EXIT_LPI_MODE)28062806 priv->tx_path_in_lpi_mode = false;28072807- if (status & CORE_IRQ_MTL_RX_OVERFLOW)28072807+ if (status & CORE_IRQ_MTL_RX_OVERFLOW && priv->hw->dma->set_rx_tail_ptr)28082808 priv->hw->dma->set_rx_tail_ptr(priv->ioaddr,28092809 priv->rx_tail_addr,28102810 STMMAC_CHAN0);
+7-2
drivers/net/geneve.c
···1072107210731073static int __geneve_change_mtu(struct net_device *dev, int new_mtu, bool strict)10741074{10751075+ struct geneve_dev *geneve = netdev_priv(dev);10751076 /* The max_mtu calculation does not take account of GENEVE10761077 * options, to avoid excluding potentially valid10771078 * configurations.10781079 */10791079- int max_mtu = IP_MAX_MTU - GENEVE_BASE_HLEN - sizeof(struct iphdr)10801080- - dev->hard_header_len;10801080+ int max_mtu = IP_MAX_MTU - GENEVE_BASE_HLEN - dev->hard_header_len;10811081+10821082+ if (geneve->remote.sa.sa_family == AF_INET6)10831083+ max_mtu -= sizeof(struct ipv6hdr);10841084+ else10851085+ max_mtu -= sizeof(struct iphdr);1081108610821087 if (new_mtu < 68)10831088 return -EINVAL;
+1
drivers/net/macsec.c
···26402640 u64_stats_update_begin(&secy_stats->syncp);26412641 secy_stats->stats.OutPktsUntagged++;26422642 u64_stats_update_end(&secy_stats->syncp);26432643+ skb->dev = macsec->real_dev;26432644 len = skb->len;26442645 ret = dev_queue_xmit(skb);26452646 count_tx(dev, ret, len);
+9-4
drivers/net/phy/dp83867.c
···57575858/* PHY CTRL bits */5959#define DP83867_PHYCR_FIFO_DEPTH_SHIFT 146060+#define DP83867_PHYCR_FIFO_DEPTH_MASK (3 << 14)60616162/* RGMIIDCTL bits */6263#define DP83867_RGMII_TX_CLK_DELAY_SHIFT 4···134133static int dp83867_config_init(struct phy_device *phydev)135134{136135 struct dp83867_private *dp83867;137137- int ret;138138- u16 val, delay;136136+ int ret, val;137137+ u16 delay;139138140139 if (!phydev->priv) {141140 dp83867 = devm_kzalloc(&phydev->mdio.dev, sizeof(*dp83867),···152151 }153152154153 if (phy_interface_is_rgmii(phydev)) {155155- ret = phy_write(phydev, MII_DP83867_PHYCTRL,156156- (dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT));154154+ val = phy_read(phydev, MII_DP83867_PHYCTRL);155155+ if (val < 0)156156+ return val;157157+ val &= ~DP83867_PHYCR_FIFO_DEPTH_MASK;158158+ val |= (dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT);159159+ ret = phy_write(phydev, MII_DP83867_PHYCTRL, val);157160 if (ret)158161 return ret;159162 }
+7
drivers/net/usb/cdc_ncm.c
···854854 if (cdc_ncm_init(dev))855855 goto error2;856856857857+ /* Some firmwares need a pause here or they will silently fail858858+ * to set up the interface properly. This value was decided859859+ * empirically on a Sierra Wireless MC7455 running 02.08.02.00860860+ * firmware.861861+ */862862+ usleep_range(10000, 20000);863863+857864 /* configure data interface */858865 temp = usb_set_interface(dev->udev, iface_no, data_altsetting);859866 if (temp) {
···395395 dev->hard_mtu = net->mtu + net->hard_header_len;396396 if (dev->rx_urb_size == old_hard_mtu) {397397 dev->rx_urb_size = dev->hard_mtu;398398- if (dev->rx_urb_size > old_rx_urb_size)398398+ if (dev->rx_urb_size > old_rx_urb_size) {399399+ usbnet_pause_rx(dev);399400 usbnet_unlink_rx_urbs(dev);401401+ usbnet_resume_rx(dev);402402+ }400403 }401404402405 /* max qlen depend on hard_mtu and rx_urb_size */···15111508 } else if (netif_running (dev->net) &&15121509 netif_device_present (dev->net) &&15131510 netif_carrier_ok(dev->net) &&15141514- !timer_pending (&dev->delay) &&15151515- !test_bit (EVENT_RX_HALT, &dev->flags)) {15111511+ !timer_pending(&dev->delay) &&15121512+ !test_bit(EVENT_RX_PAUSED, &dev->flags) &&15131513+ !test_bit(EVENT_RX_HALT, &dev->flags)) {15161514 int temp = dev->rxq.qlen;1517151515181516 if (temp < RX_QLEN(dev)) {
+7-1
drivers/platform/chrome/cros_ec_dev.c
···151151 goto exit;152152 }153153154154+ if (u_cmd.outsize != s_cmd->outsize ||155155+ u_cmd.insize != s_cmd->insize) {156156+ ret = -EINVAL;157157+ goto exit;158158+ }159159+154160 s_cmd->command += ec->cmd_offset;155161 ret = cros_ec_cmd_xfer(ec->ec_dev, s_cmd);156162 /* Only copy data to userland if data was received. */157163 if (ret < 0)158164 goto exit;159165160160- if (copy_to_user(arg, s_cmd, sizeof(*s_cmd) + u_cmd.insize))166166+ if (copy_to_user(arg, s_cmd, sizeof(*s_cmd) + s_cmd->insize))161167 ret = -EFAULT;162168exit:163169 kfree(s_cmd);
···25482548 if (!vha->flags.online)25492549 return;2550255025512551- if (rsp->msix->cpuid != smp_processor_id()) {25512551+ if (rsp->msix && rsp->msix->cpuid != smp_processor_id()) {25522552 /* if kernel does not notify qla of IRQ's CPU change,25532553 * then set it here.25542554 */
+6-4
drivers/scsi/scsi_devinfo.c
···429429 * here, and we don't know what device it is430430 * trying to work with, leave it as-is.431431 */432432- vmax = 8; /* max length of vendor */432432+ vmax = sizeof(devinfo->vendor);433433 vskip = vendor;434434 while (vmax > 0 && *vskip == ' ') {435435 vmax--;···439439 while (vmax > 0 && vskip[vmax - 1] == ' ')440440 --vmax;441441442442- mmax = 16; /* max length of model */442442+ mmax = sizeof(devinfo->model);443443 mskip = model;444444 while (mmax > 0 && *mskip == ' ') {445445 mmax--;···455455 * Behave like the older version of get_device_flags.456456 */457457 if (memcmp(devinfo->vendor, vskip, vmax) ||458458- devinfo->vendor[vmax])458458+ (vmax < sizeof(devinfo->vendor) &&459459+ devinfo->vendor[vmax]))459460 continue;460461 if (memcmp(devinfo->model, mskip, mmax) ||461461- devinfo->model[mmax])462462+ (mmax < sizeof(devinfo->model) &&463463+ devinfo->model[mmax]))462464 continue;463465 return devinfo;464466 } else {
+3-32
drivers/xen/xen-acpi-processor.c
···423423424424 return 0;425425}426426-static int __init check_prereq(void)427427-{428428- struct cpuinfo_x86 *c = &cpu_data(0);429426430430- if (!xen_initial_domain())431431- return -ENODEV;432432-433433- if (!acpi_gbl_FADT.smi_command)434434- return -ENODEV;435435-436436- if (c->x86_vendor == X86_VENDOR_INTEL) {437437- if (!cpu_has(c, X86_FEATURE_EST))438438- return -ENODEV;439439-440440- return 0;441441- }442442- if (c->x86_vendor == X86_VENDOR_AMD) {443443- /* Copied from powernow-k8.h, can't include ../cpufreq/powernow444444- * as we get compile warnings for the static functions.445445- */446446-#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007447447-#define USE_HW_PSTATE 0x00000080448448- u32 eax, ebx, ecx, edx;449449- cpuid(CPUID_FREQ_VOLT_CAPABILITIES, &eax, &ebx, &ecx, &edx);450450- if ((edx & USE_HW_PSTATE) != USE_HW_PSTATE)451451- return -ENODEV;452452- return 0;453453- }454454- return -ENODEV;455455-}456427/* acpi_perf_data is a pointer to percpu data. */457428static struct acpi_processor_performance __percpu *acpi_perf_data;458429···480509static int __init xen_acpi_processor_init(void)481510{482511 unsigned int i;483483- int rc = check_prereq();512512+ int rc;484513485485- if (rc)486486- return rc;514514+ if (!xen_initial_domain())515515+ return -ENODEV;487516488517 nr_acpi_bits = get_max_acpi_id() + 1;489518 acpi_ids_done = kcalloc(BITS_TO_LONGS(nr_acpi_bits), sizeof(unsigned long), GFP_KERNEL);
···232232void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)233233{234234 void *ret;235235- struct xsd_sockmsg req_msg = *msg;235235+ enum xsd_sockmsg_type type = msg->type;236236 int err;237237238238- if (req_msg.type == XS_TRANSACTION_START)238238+ if (type == XS_TRANSACTION_START)239239 transaction_start();240240241241 mutex_lock(&xs_state.request_mutex);···249249250250 mutex_unlock(&xs_state.request_mutex);251251252252- if (IS_ERR(ret))253253- return ret;254254-255252 if ((msg->type == XS_TRANSACTION_END) ||256256- ((req_msg.type == XS_TRANSACTION_START) &&257257- (msg->type == XS_ERROR)))253253+ ((type == XS_TRANSACTION_START) && (msg->type == XS_ERROR)))258254 transaction_end();259255260256 return ret;
-2
fs/configfs/file.c
···357357358358 len = simple_write_to_buffer(buffer->bin_buffer,359359 buffer->bin_buffer_size, ppos, buf, count);360360- if (len > 0)361361- *ppos += len;362360out:363361 mutex_unlock(&buffer->mutex);364362 return len;
+4-4
fs/ecryptfs/crypto.c
···4545 * ecryptfs_to_hex4646 * @dst: Buffer to take hex character representation of contents of4747 * src; must be at least of size (src_size * 2)4848- * @src: Buffer to be converted to a hex string respresentation4848+ * @src: Buffer to be converted to a hex string representation4949 * @src_size: number of bytes to convert5050 */5151void ecryptfs_to_hex(char *dst, char *src, size_t src_size)···6060 * ecryptfs_from_hex6161 * @dst: Buffer to take the bytes from src hex; must be at least of6262 * size (src_size / 2)6363- * @src: Buffer to be converted from a hex string respresentation to raw value6363+ * @src: Buffer to be converted from a hex string representation to raw value6464 * @dst_size: size of dst buffer, or number of hex characters pairs to convert6565 */6666void ecryptfs_from_hex(char *dst, char *src, int dst_size)···953953};954954955955/* Add support for additional ciphers by adding elements here. The956956- * cipher_code is whatever OpenPGP applicatoins use to identify the956956+ * cipher_code is whatever OpenPGP applications use to identify the957957 * ciphers. List in order of probability. */958958static struct ecryptfs_cipher_code_str_map_elem959959ecryptfs_cipher_code_str_map[] = {···14101410 *14111411 * Common entry point for reading file metadata. From here, we could14121412 * retrieve the header information from the header region of the file,14131413- * the xattr region of the file, or some other repostory that is14131413+ * the xattr region of the file, or some other repository that is14141414 * stored separately from the file itself. The current implementation14151415 * supports retrieving the metadata information from the file contents14161416 * and from the xattr region.
+16-3
fs/ecryptfs/file.c
···169169 return rc;170170}171171172172+static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma)173173+{174174+ struct file *lower_file = ecryptfs_file_to_lower(file);175175+ /*176176+ * Don't allow mmap on top of file systems that don't support it177177+ * natively. If FILESYSTEM_MAX_STACK_DEPTH > 2 or ecryptfs178178+ * allows recursive mounting, this will need to be extended.179179+ */180180+ if (!lower_file->f_op->mmap)181181+ return -ENODEV;182182+ return generic_file_mmap(file, vma);183183+}184184+172185/**173186 * ecryptfs_open174174- * @inode: inode speciying file to open187187+ * @inode: inode specifying file to open175188 * @file: Structure to return filled in176189 *177190 * Opens the file specified by inode.···253240254241/**255242 * ecryptfs_dir_open256256- * @inode: inode speciying file to open243243+ * @inode: inode specifying file to open257244 * @file: Structure to return filled in258245 *259246 * Opens the file specified by inode.···416403#ifdef CONFIG_COMPAT417404 .compat_ioctl = ecryptfs_compat_ioctl,418405#endif419419- .mmap = generic_file_mmap,406406+ .mmap = ecryptfs_mmap,420407 .open = ecryptfs_open,421408 .flush = ecryptfs_flush,422409 .release = ecryptfs_release,
···78787979/* ACPI PCI Interrupt Link (pci_link.c) */80808181+int acpi_irq_penalty_init(void);8182int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,8283 int *polarity, char **name);8384int acpi_pci_link_free_irq(acpi_handle handle);
+1
include/linux/mlx5/driver.h
···629629 void *uout;630630 int uout_size;631631 mlx5_cmd_cbk_t callback;632632+ struct delayed_work cb_timeout_work;632633 void *context;633634 int idx;634635 struct completion done;
+20
include/linux/skbuff.h
···10621062}1063106310641064void __skb_get_hash(struct sk_buff *skb);10651065+u32 __skb_get_hash_symmetric(struct sk_buff *skb);10651066u32 skb_get_poff(const struct sk_buff *skb);10661067u32 __skb_get_poff(const struct sk_buff *skb, void *data,10671068 const struct flow_keys *keys, int hlen);···28682867 */28692868 if (skb->ip_summed == CHECKSUM_COMPLETE)28702869 skb->csum = csum_partial(start, len, skb->csum);28702870+}28712871+28722872+/**28732873+ * skb_push_rcsum - push skb and update receive checksum28742874+ * @skb: buffer to update28752875+ * @len: length of data pulled28762876+ *28772877+ * This function performs an skb_push on the packet and updates28782878+ * the CHECKSUM_COMPLETE checksum. It should be used on28792879+ * receive path processing instead of skb_push unless you know28802880+ * that the checksum difference is zero (e.g., a valid IP header)28812881+ * or you are setting ip_summed to CHECKSUM_NONE.28822882+ */28832883+static inline unsigned char *skb_push_rcsum(struct sk_buff *skb,28842884+ unsigned int len)28852885+{28862886+ skb_push(skb, len);28872887+ skb_postpush_rcsum(skb, skb->data, len);28882888+ return skb->data;28712889}2872289028732891/**
+6-1
include/net/bonding.h
···34343535#define BOND_DEFAULT_MIIMON 10036363737+#ifndef __long_aligned3838+#define __long_aligned __attribute__((aligned((sizeof(long)))))3939+#endif3740/*3841 * Less bad way to call ioctl from within the kernel; this needs to be3942 * done some other way to get the call out of interrupt context.···141138 struct reciprocal_value reciprocal_packets_per_slave;142139 u16 ad_actor_sys_prio;143140 u16 ad_user_port_key;144144- u8 ad_actor_system[ETH_ALEN];141141+142142+ /* 2 bytes of padding : see ether_addr_equal_64bits() */143143+ u8 ad_actor_system[ETH_ALEN + 2];145144};146145147146struct bond_parm_tbl {
···16781678 return event->state == PERF_EVENT_STATE_DEAD;16791679}1680168016811681-static inline int pmu_filter_match(struct perf_event *event)16811681+static inline int __pmu_filter_match(struct perf_event *event)16821682{16831683 struct pmu *pmu = event->pmu;16841684 return pmu->filter_match ? pmu->filter_match(event) : 1;16851685+}16861686+16871687+/*16881688+ * Check whether we should attempt to schedule an event group based on16891689+ * PMU-specific filtering. An event group can consist of HW and SW events,16901690+ * potentially with a SW leader, so we must check all the filters, to16911691+ * determine whether a group is schedulable:16921692+ */16931693+static inline int pmu_filter_match(struct perf_event *event)16941694+{16951695+ struct perf_event *child;16961696+16971697+ if (!__pmu_filter_match(event))16981698+ return 0;16991699+17001700+ list_for_each_entry(child, &event->sibling_list, group_entry) {17011701+ if (!__pmu_filter_match(child))17021702+ return 0;17031703+ }17041704+17051705+ return 1;16851706}1686170716871708static inline int
+22-24
kernel/sched/fair.c
···735735 }736736}737737738738-static inline unsigned long cfs_rq_runnable_load_avg(struct cfs_rq *cfs_rq);739739-static inline unsigned long cfs_rq_load_avg(struct cfs_rq *cfs_rq);740738#else741739void init_entity_runnable_average(struct sched_entity *se)742740{···2497249924982500#ifdef CONFIG_FAIR_GROUP_SCHED24992501# ifdef CONFIG_SMP25002500-static inline long calc_tg_weight(struct task_group *tg, struct cfs_rq *cfs_rq)25012501-{25022502- long tg_weight;25032503-25042504- /*25052505- * Use this CPU's real-time load instead of the last load contribution25062506- * as the updating of the contribution is delayed, and we will use the25072507- * the real-time load to calc the share. See update_tg_load_avg().25082508- */25092509- tg_weight = atomic_long_read(&tg->load_avg);25102510- tg_weight -= cfs_rq->tg_load_avg_contrib;25112511- tg_weight += cfs_rq->load.weight;25122512-25132513- return tg_weight;25142514-}25152515-25162502static long calc_cfs_shares(struct cfs_rq *cfs_rq, struct task_group *tg)25172503{25182504 long tg_weight, load, shares;2519250525202520- tg_weight = calc_tg_weight(tg, cfs_rq);25212521- load = cfs_rq->load.weight;25062506+ /*25072507+ * This really should be: cfs_rq->avg.load_avg, but instead we use25082508+ * cfs_rq->load.weight, which is its upper bound. This helps ramp up25092509+ * the shares for small weight interactive tasks.25102510+ */25112511+ load = scale_load_down(cfs_rq->load.weight);25122512+25132513+ tg_weight = atomic_long_read(&tg->load_avg);25142514+25152515+ /* Ensure tg_weight >= load */25162516+ tg_weight -= cfs_rq->tg_load_avg_contrib;25172517+ tg_weight += load;2522251825232519 shares = (tg->shares * load);25242520 if (tg_weight)···25312539 return tg->shares;25322540}25332541# endif /* CONFIG_SMP */25422542+25342543static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,25352544 unsigned long weight)25362545{···49394946 return wl;4940494749414948 for_each_sched_entity(se) {49424942- long w, W;49494949+ struct cfs_rq *cfs_rq = se->my_q;49504950+ long W, w = cfs_rq_load_avg(cfs_rq);4943495149444944- tg = se->my_q->tg;49524952+ tg = cfs_rq->tg;4945495349464954 /*49474955 * W = @wg + \Sum rw_j49484956 */49494949- W = wg + calc_tg_weight(tg, se->my_q);49574957+ W = wg + atomic_long_read(&tg->load_avg);49584958+49594959+ /* Ensure \Sum rw_j >= rw_i */49604960+ W -= cfs_rq->tg_load_avg_contrib;49614961+ W += w;4950496249514963 /*49524964 * w = rw_i + @wl49534965 */49544954- w = cfs_rq_load_avg(se->my_q) + wl;49664966+ w += wl;4955496749564968 /*49574969 * wl = S * s'_i; see (2)
···30163016EXPORT_SYMBOL_GPL(skb_append_pagefrags);3017301730183018/**30193019- * skb_push_rcsum - push skb and update receive checksum30203020- * @skb: buffer to update30213021- * @len: length of data pulled30223022- *30233023- * This function performs an skb_push on the packet and updates30243024- * the CHECKSUM_COMPLETE checksum. It should be used on30253025- * receive path processing instead of skb_push unless you know30263026- * that the checksum difference is zero (e.g., a valid IP header)30273027- * or you are setting ip_summed to CHECKSUM_NONE.30283028- */30293029-static unsigned char *skb_push_rcsum(struct sk_buff *skb, unsigned len)30303030-{30313031- skb_push(skb, len);30323032- skb_postpush_rcsum(skb, skb->data, len);30333033- return skb->data;30343034-}30353035-30363036-/**30373019 * skb_pull_rcsum - pull skb and update receive checksum30383020 * @skb: buffer to update30393021 * @len: length of data pulled
···13411341 struct sk_buff *skb,13421342 unsigned int num)13431343{13441344- return reciprocal_scale(skb_get_hash(skb), num);13441344+ return reciprocal_scale(__skb_get_hash_symmetric(skb), num);13451345}1346134613471347static unsigned int fanout_demux_lb(struct packet_fanout *f,
+3-2
net/rds/tcp.c
···616616617617 ret = rds_tcp_recv_init();618618 if (ret)619619- goto out_slab;619619+ goto out_pernet;620620621621 ret = rds_trans_register(&rds_tcp_transport);622622 if (ret)···628628629629out_recv:630630 rds_tcp_recv_exit();631631-out_slab:631631+out_pernet:632632 unregister_pernet_subsys(&rds_tcp_net_ops);633633+out_slab:633634 kmem_cache_destroy(rds_tcp_conn_slab);634635out:635636 return ret;
+1-1
net/sched/act_mirred.c
···181181182182 if (!(at & AT_EGRESS)) {183183 if (m->tcfm_ok_push)184184- skb_push(skb2, skb->mac_len);184184+ skb_push_rcsum(skb2, skb->mac_len);185185 }186186187187 /* mirror is always swallowed */
···226226 if (!tty->disc_data)227227 return -ENODEV;228228229229+ tty->receive_room = 16;229230 if (tty->ops->write(tty, v253_init, len) != len) {230231 ret = -EIO;231232 goto err;
+20
sound/soc/codecs/hdac_hdmi.c
···14741474 * exit, we call pm_runtime_suspend() so that will do for us14751475 */14761476 hlink = snd_hdac_ext_bus_get_link(edev->ebus, dev_name(&edev->hdac.dev));14771477+ if (!hlink) {14781478+ dev_err(&edev->hdac.dev, "hdac link not found\n");14791479+ return -EIO;14801480+ }14811481+14771482 snd_hdac_ext_bus_link_get(edev->ebus, hlink);1478148314791484 ret = create_fill_widget_route_map(dapm);···1639163416401635 /* hold the ref while we probe */16411636 hlink = snd_hdac_ext_bus_get_link(edev->ebus, dev_name(&edev->hdac.dev));16371637+ if (!hlink) {16381638+ dev_err(&edev->hdac.dev, "hdac link not found\n");16391639+ return -EIO;16401640+ }16411641+16421642 snd_hdac_ext_bus_link_get(edev->ebus, hlink);1643164316441644 hdmi_priv = devm_kzalloc(&codec->dev, sizeof(*hdmi_priv), GFP_KERNEL);···17541744 }1755174517561746 hlink = snd_hdac_ext_bus_get_link(ebus, dev_name(dev));17471747+ if (!hlink) {17481748+ dev_err(dev, "hdac link not found\n");17491749+ return -EIO;17501750+ }17511751+17571752 snd_hdac_ext_bus_link_put(ebus, hlink);1758175317591754 return 0;···17801765 return 0;1781176617821767 hlink = snd_hdac_ext_bus_get_link(ebus, dev_name(dev));17681768+ if (!hlink) {17691769+ dev_err(dev, "hdac link not found\n");17701770+ return -EIO;17711771+ }17721772+17831773 snd_hdac_ext_bus_link_get(ebus, hlink);1784177417851775 err = snd_hdac_display_power(bus, true);
···182182 case SNDRV_PCM_TRIGGER_START:183183 if (stream->compr_ops->stream_start)184184 return stream->compr_ops->stream_start(sst->dev, stream->id);185185+ break;185186 case SNDRV_PCM_TRIGGER_STOP:186187 if (stream->compr_ops->stream_drop)187188 return stream->compr_ops->stream_drop(sst->dev, stream->id);189189+ break;188190 case SND_COMPR_TRIGGER_DRAIN:189191 if (stream->compr_ops->stream_drain)190192 return stream->compr_ops->stream_drain(sst->dev, stream->id);193193+ break;191194 case SND_COMPR_TRIGGER_PARTIAL_DRAIN:192195 if (stream->compr_ops->stream_partial_drain)193196 return stream->compr_ops->stream_partial_drain(sst->dev, stream->id);197197+ break;194198 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:195199 if (stream->compr_ops->stream_pause)196200 return stream->compr_ops->stream_pause(sst->dev, stream->id);201201+ break;197202 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:198203 if (stream->compr_ops->stream_pause_release)199204 return stream->compr_ops->stream_pause_release(sst->dev, stream->id);200200- default:201201- return -EINVAL;205205+ break;202206 }207207+ return -EINVAL;203208}204209205210static int sst_platform_compr_pointer(struct snd_compr_stream *cstream,
+1
sound/soc/intel/skylake/bxt-sst.c
···291291 sst_dsp_mailbox_init(sst, (BXT_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ),292292 SKL_ADSP_W0_UP_SZ, BXT_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ);293293294294+ INIT_LIST_HEAD(&sst->module_list);294295 ret = skl_ipc_init(dev, skl);295296 if (ret)296297 return ret;