···417417This does all the RCU magic inside of it. The caller must call put_cred() on418418the credentials so obtained when they're finished with.419419420420+ [*] Note: The result of __task_cred() should not be passed directly to421421+ get_cred() as this may race with commit_cred().422422+420423There are a couple of convenience functions to access bits of another task's421424credentials, hiding the RCU magic from the caller:422425
+7
Documentation/feature-removal-schedule.txt
···647647648648----------------------------649649650650+What: The acpi_sleep=s4_nonvs command line option651651+When: 2.6.37652652+Files: arch/x86/kernel/acpi/sleep.c653653+Why: superseded by acpi_sleep=nonvs654654+Who: Rafael J. Wysocki <rjw@sisk.pl>655655+656656+----------------------------
+2-2
Documentation/kernel-parameters.txt
···254254 control method, with respect to putting devices into255255 low power states, to be enforced (the ACPI 2.0 ordering256256 of _PTS is used by default).257257- s4_nonvs prevents the kernel from saving/restoring the258258- ACPI NVS memory during hibernation.257257+ nonvs prevents the kernel from saving/restoring the258258+ ACPI NVS memory during suspend/hibernation and resume.259259 sci_force_enable causes the kernel to set SCI_EN directly260260 on resume from S1/S3 (which is against the ACPI spec,261261 but some broken systems don't work without it).
···3030static void putc(const char c)3131{3232 /* Do nothing if the UART is not enabled. */3333- if (!(readb(U8500_UART_CR) & 0x1))3333+ if (!(__raw_readb(U8500_UART_CR) & 0x1))3434 return;35353636 if (c == '\n')3737 putc('\r');38383939- while (readb(U8500_UART_FR) & (1 << 5))3939+ while (__raw_readb(U8500_UART_FR) & (1 << 5))4040 barrier();4141- writeb(c, U8500_UART_DR);4141+ __raw_writeb(c, U8500_UART_DR);4242}43434444static void flush(void)4545{4646- if (!(readb(U8500_UART_CR) & 0x1))4646+ if (!(__raw_readb(U8500_UART_CR) & 0x1))4747 return;4848- while (readb(U8500_UART_FR) & (1 << 3))4848+ while (__raw_readb(U8500_UART_FR) & (1 << 3))4949 barrier();5050}5151
···55#define __ASM_ARCH_BOARD_H6677#include <linux/types.h>88+#include <linux/serial.h>89910#define GPIO_PIN_NONE (-1)1011···3635 short use_dma_tx; /* use transmit DMA? */3736 short use_dma_rx; /* use receive DMA? */3837 void __iomem *regs; /* virtual base address, if any */3838+ struct serial_rs485 rs485; /* rs485 settings */3939};4040void at32_map_usart(unsigned int hw_id, unsigned int line, int flags);4141struct platform_device *at32_add_device_usart(unsigned int id);
+5-4
arch/mips/alchemy/common/platform.c
···435435static int __init au1xxx_platform_init(void)436436{437437 unsigned int uartclk = get_au1x00_uart_baud_base() * 16;438438- int i;438438+ int err, i;439439440440 /* Fill up uartclk. */441441 for (i = 0; au1x00_uart_data[i].flags; i++)442442 au1x00_uart_data[i].uartclk = uartclk;443443444444+ err = platform_add_devices(au1xxx_platform_devices,445445+ ARRAY_SIZE(au1xxx_platform_devices));444446#ifndef CONFIG_SOC_AU1100445447 /* Register second MAC if enabled in pinfunc */446446- if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))448448+ if (!err && !(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))447449 platform_device_register(&au1xxx_eth1_device);448450#endif449451450450- return platform_add_devices(au1xxx_platform_devices,451451- ARRAY_SIZE(au1xxx_platform_devices));452452+ return err;452453}453454454455arch_initcall(au1xxx_platform_init);
+3-5
arch/mips/alchemy/mtx-1/board_setup.c
···67676868void __init board_setup(void)6969{7070- alchemy_gpio2_enable();7171-7270#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)7371 /* Enable USB power switch */7472 alchemy_gpio_direction_output(204, 0);···115117116118 if (assert && devsel != 0)117119 /* Suppress signal to Cardbus */118118- gpio_set_value(1, 0); /* set EXT_IO3 OFF */120120+ alchemy_gpio_set_value(1, 0); /* set EXT_IO3 OFF */119121 else120120- gpio_set_value(1, 1); /* set EXT_IO3 ON */122122+ alchemy_gpio_set_value(1, 1); /* set EXT_IO3 ON */121123122122- au_sync_udelay(1);124124+ udelay(1);123125 return 1;124126}125127
+3
arch/mips/bcm63xx/dev-enet.c
···104104 if (unit > 1)105105 return -ENODEV;106106107107+ if (unit == 1 && BCMCPU_IS_6338())108108+ return -ENODEV;109109+107110 if (!shared_device_registered) {108111 shared_res[0].start = bcm63xx_regset_address(RSET_ENETDMA);109112 shared_res[0].end = shared_res[0].start;
···472472 * it*/473473 platform_features = FFS_CAPABLE | DISPLAY_CAPABLE;474474475475+ /* Cronus and Cronus Lite have the same register map */476476+ set_register_map(CRONUS_IO_BASE, &cronus_register_map);477477+475478 /* ASIC version will determine if this is a real CronusLite or476479 * Castrati(Cronus) */477480 chipversion = asic_read(chipver3) << 24;···487484 else488485 asic = ASIC_CRONUSLITE;489486490490- /* Cronus and Cronus Lite have the same register map */491491- set_register_map(CRONUS_IO_BASE, &cronus_register_map);492487 gp_resources = non_dvr_cronuslite_resources;493488 pr_info("Platform: 4600 - %s, NON_DVR_CAPABLE, "494489 "chipversion=0x%08X\n",
+3-3
arch/powerpc/include/asm/kexec.h
···88 * On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory99 * and therefore we can only deal with memory within this range1010 */1111-#define KEXEC_SOURCE_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL)1212-#define KEXEC_DESTINATION_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL)1313-#define KEXEC_CONTROL_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL)1111+#define KEXEC_SOURCE_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1)1212+#define KEXEC_DESTINATION_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1)1313+#define KEXEC_CONTROL_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1)14141515#else1616
+3-1
arch/powerpc/include/asm/mmu-hash64.h
···250250int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,251251 pte_t *ptep, unsigned long trap, int local, int ssize,252252 unsigned int shift, unsigned int mmu_psize);253253-253253+extern void hash_failure_debug(unsigned long ea, unsigned long access,254254+ unsigned long vsid, unsigned long trap,255255+ int ssize, int psize, unsigned long pte);254256extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,255257 unsigned long pstart, unsigned long prot,256258 int psize, int ssize);
+3-3
arch/powerpc/kernel/perf_event_fsl_emb.c
···566566 * Finally record data if requested.567567 */568568 if (record) {569569- struct perf_sample_data data = {570570- .period = event->hw.last_period,571571- };569569+ struct perf_sample_data data;570570+571571+ perf_sample_data_init(&data, 0);572572573573 if (perf_event_overflow(event, nmi, &data, regs)) {574574 /*
+1-1
arch/powerpc/kernel/prom.c
···414414 u64 base, size, memblock_size;415415 unsigned int is_kexec_kdump = 0, rngs;416416417417- ls = of_get_flat_dt_prop(node, "ibm,memblock-size", &l);417417+ ls = of_get_flat_dt_prop(node, "ibm,lmb-size", &l);418418 if (ls == NULL || l < dt_root_size_cells * sizeof(__be32))419419 return 0;420420 memblock_size = dt_mem_next_cell(dt_root_size_cells, &ls);
-9
arch/powerpc/mm/hash_low_64.S
···6868 std r8,STK_PARM(r8)(r1)6969 std r9,STK_PARM(r9)(r1)70707171- /* Add _PAGE_PRESENT to access */7272- ori r4,r4,_PAGE_PRESENT7373-7471 /* Save non-volatile registers.7572 * r31 will hold "old PTE"7673 * r30 is "new PTE"···343346 std r6,STK_PARM(r6)(r1)344347 std r8,STK_PARM(r8)(r1)345348 std r9,STK_PARM(r9)(r1)346346-347347- /* Add _PAGE_PRESENT to access */348348- ori r4,r4,_PAGE_PRESENT349349350350 /* Save non-volatile registers.351351 * r31 will hold "old PTE"···680686 std r6,STK_PARM(r6)(r1)681687 std r8,STK_PARM(r8)(r1)682688 std r9,STK_PARM(r9)(r1)683683-684684- /* Add _PAGE_PRESENT to access */685685- ori r4,r4,_PAGE_PRESENT686689687690 /* Save non-volatile registers.688691 * r31 will hold "old PTE"
+40-13
arch/powerpc/mm/hash_utils_64.c
···871871}872872#endif873873874874+void hash_failure_debug(unsigned long ea, unsigned long access,875875+ unsigned long vsid, unsigned long trap,876876+ int ssize, int psize, unsigned long pte)877877+{878878+ if (!printk_ratelimit())879879+ return;880880+ pr_info("mm: Hashing failure ! EA=0x%lx access=0x%lx current=%s\n",881881+ ea, access, current->comm);882882+ pr_info(" trap=0x%lx vsid=0x%lx ssize=%d psize=%d pte=0x%lx\n",883883+ trap, vsid, ssize, psize, pte);884884+}885885+874886/* Result code is:875887 * 0 - handled876888 * 1 - normal page fault···967955 return 1;968956 }969957958958+ /* Add _PAGE_PRESENT to the required access perm */959959+ access |= _PAGE_PRESENT;960960+961961+ /* Pre-check access permissions (will be re-checked atomically962962+ * in __hash_page_XX but this pre-check is a fast path963963+ */964964+ if (access & ~pte_val(*ptep)) {965965+ DBG_LOW(" no access !\n");966966+ return 1;967967+ }968968+970969#ifdef CONFIG_HUGETLB_PAGE971970 if (hugeshift)972971 return __hash_page_huge(ea, access, vsid, ptep, trap, local,···990967 DBG_LOW(" i-pte: %016lx %016lx\n", pte_val(*ptep),991968 pte_val(*(ptep + PTRS_PER_PTE)));992969#endif993993- /* Pre-check access permissions (will be re-checked atomically994994- * in __hash_page_XX but this pre-check is a fast path995995- */996996- if (access & ~pte_val(*ptep)) {997997- DBG_LOW(" no access !\n");998998- return 1;999999- }10001000-1001970 /* Do actual hashing */1002971#ifdef CONFIG_PPC_64K_PAGES1003972 /* If _PAGE_4K_PFN is set, make sure this is a 4k segment */···10481033 local, ssize, spp);10491034 }1050103510361036+ /* Dump some info in case of hash insertion failure, they should10371037+ * never happen so it is really useful to know if/when they do10381038+ */10391039+ if (rc == -1)10401040+ hash_failure_debug(ea, access, vsid, trap, ssize, psize,10411041+ pte_val(*ptep));10511042#ifndef CONFIG_PPC_64K_PAGES10521043 DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep));10531044#else···10721051 void *pgdir;10731052 pte_t *ptep;10741053 unsigned long flags;10751075- int local = 0;10761076- int ssize;10541054+ int rc, ssize, local = 0;1077105510781056 BUG_ON(REGION_ID(ea) != USER_REGION_ID);10791057···11181098 /* Hash it in */11191099#ifdef CONFIG_PPC_HAS_HASH_64K11201100 if (mm->context.user_psize == MMU_PAGE_64K)11211121- __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize);11011101+ rc = __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize);11221102 else11231103#endif /* CONFIG_PPC_HAS_HASH_64K */11241124- __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize,11251125- subpage_protection(pgdir, ea));11041104+ rc = __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize,11051105+ subpage_protection(pgdir, ea));11061106+11071107+ /* Dump some info in case of hash insertion failure, they should11081108+ * never happen so it is really useful to know if/when they do11091109+ */11101110+ if (rc == -1)11111111+ hash_failure_debug(ea, access, vsid, trap, ssize,11121112+ mm->context.user_psize, pte_val(*ptep));1126111311271114 local_irq_restore(flags);11281115}
+22-18
arch/powerpc/mm/hugetlbpage-hash64.c
···2121 unsigned long old_pte, new_pte;2222 unsigned long va, rflags, pa, sz;2323 long slot;2424- int err = 1;25242625 BUG_ON(shift != mmu_psize_defs[mmu_psize].shift);27262827 /* Search the Linux page table for a match with va */2928 va = hpt_va(ea, vsid, ssize);30293131- /*3232- * Check the user's access rights to the page. If access should be3333- * prevented then send the problem up to do_page_fault.3434- */3535- if (unlikely(access & ~pte_val(*ptep)))3636- goto out;3737- /*3838- * At this point, we have a pte (old_pte) which can be used to build3030+ /* At this point, we have a pte (old_pte) which can be used to build3931 * or update an HPTE. There are 2 cases:4032 *4133 * 1. There is a valid (present) pte with no associated HPTE (this is···41494250 do {4351 old_pte = pte_val(*ptep);4444- if (old_pte & _PAGE_BUSY)4545- goto out;5252+ /* If PTE busy, retry the access */5353+ if (unlikely(old_pte & _PAGE_BUSY))5454+ return 0;5555+ /* If PTE permissions don't match, take page fault */5656+ if (unlikely(access & ~old_pte))5757+ return 1;5858+ /* Try to lock the PTE, add ACCESSED and DIRTY if it was5959+ * a write access */4660 new_pte = old_pte | _PAGE_BUSY | _PAGE_ACCESSED;6161+ if (access & _PAGE_RW)6262+ new_pte |= _PAGE_DIRTY;4763 } while(old_pte != __cmpxchg_u64((unsigned long *)ptep,4864 old_pte, new_pte));4965···121121 }122122 }123123124124- if (unlikely(slot == -2))125125- panic("hash_huge_page: pte_insert failed\n");124124+ /*125125+ * Hypervisor failure. Restore old pte and return -1126126+ * similar to __hash_page_*127127+ */128128+ if (unlikely(slot == -2)) {129129+ *ptep = __pte(old_pte);130130+ hash_failure_debug(ea, access, vsid, trap, ssize,131131+ mmu_psize, old_pte);132132+ return -1;133133+ }126134127135 new_pte |= (slot << 12) & (_PAGE_F_SECOND | _PAGE_F_GIX);128136 }···139131 * No need to use ldarx/stdcx here140132 */141133 *ptep = __pte(new_pte & ~_PAGE_BUSY);142142-143143- err = 0;144144-145145- out:146146- return err;134134+ return 0;147135}
+12-12
arch/powerpc/mm/numa.c
···398398}399399400400/*401401- * Retreive and validate the ibm,memblock-size property for drconf memory401401+ * Retreive and validate the ibm,lmb-size property for drconf memory402402 * from the device tree.403403 */404404-static u64 of_get_memblock_size(struct device_node *memory)404404+static u64 of_get_lmb_size(struct device_node *memory)405405{406406 const u32 *prop;407407 u32 len;408408409409- prop = of_get_property(memory, "ibm,memblock-size", &len);409409+ prop = of_get_property(memory, "ibm,lmb-size", &len);410410 if (!prop || len < sizeof(unsigned int))411411 return 0;412412···562562static inline int __init read_usm_ranges(const u32 **usm)563563{564564 /*565565- * For each memblock in ibm,dynamic-memory a corresponding565565+ * For each lmb in ibm,dynamic-memory a corresponding566566 * entry in linux,drconf-usable-memory property contains567567 * a counter followed by that many (base, size) duple.568568 * read the counter from linux,drconf-usable-memory···578578{579579 const u32 *dm, *usm;580580 unsigned int n, rc, ranges, is_kexec_kdump = 0;581581- unsigned long memblock_size, base, size, sz;581581+ unsigned long lmb_size, base, size, sz;582582 int nid;583583 struct assoc_arrays aa;584584···586586 if (!n)587587 return;588588589589- memblock_size = of_get_memblock_size(memory);590590- if (!memblock_size)589589+ lmb_size = of_get_lmb_size(memory);590590+ if (!lmb_size)591591 return;592592593593 rc = of_get_assoc_arrays(memory, &aa);···611611 continue;612612613613 base = drmem.base_addr;614614- size = memblock_size;614614+ size = lmb_size;615615 ranges = 1;616616617617 if (is_kexec_kdump) {···10721072{10731073 const u32 *dm;10741074 unsigned int drconf_cell_cnt, rc;10751075- unsigned long memblock_size;10751075+ unsigned long lmb_size;10761076 struct assoc_arrays aa;10771077 int nid = -1;10781078···10801080 if (!drconf_cell_cnt)10811081 return -1;1082108210831083- memblock_size = of_get_memblock_size(memory);10841084- if (!memblock_size)10831083+ lmb_size = of_get_lmb_size(memory);10841084+ if (!lmb_size)10851085 return -1;1086108610871087 rc = of_get_assoc_arrays(memory, &aa);···11001100 continue;1101110111021102 if ((scn_addr < drmem.base_addr)11031103- || (scn_addr >= (drmem.base_addr + memblock_size)))11031103+ || (scn_addr >= (drmem.base_addr + lmb_size)))11041104 continue;1105110511061106 nid = of_drconf_to_nid_single(&drmem, &aa);
+11-11
arch/powerpc/platforms/pseries/hotplug-memory.c
···6969 const char *type;7070 const unsigned int *regs;7171 unsigned long base;7272- unsigned int memblock_size;7272+ unsigned int lmb_size;7373 int ret = -EINVAL;74747575 /*···8787 return ret;88888989 base = *(unsigned long *)regs;9090- memblock_size = regs[3];9090+ lmb_size = regs[3];91919292- ret = pseries_remove_memblock(base, memblock_size);9292+ ret = pseries_remove_memblock(base, lmb_size);9393 return ret;9494}9595···9898 const char *type;9999 const unsigned int *regs;100100 unsigned long base;101101- unsigned int memblock_size;101101+ unsigned int lmb_size;102102 int ret = -EINVAL;103103104104 /*···116116 return ret;117117118118 base = *(unsigned long *)regs;119119- memblock_size = regs[3];119119+ lmb_size = regs[3];120120121121 /*122122 * Update memory region to represent the memory add123123 */124124- ret = memblock_add(base, memblock_size);124124+ ret = memblock_add(base, lmb_size);125125 return (ret < 0) ? -EINVAL : 0;126126}127127128128static int pseries_drconf_memory(unsigned long *base, unsigned int action)129129{130130 struct device_node *np;131131- const unsigned long *memblock_size;131131+ const unsigned long *lmb_size;132132 int rc;133133134134 np = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");135135 if (!np)136136 return -EINVAL;137137138138- memblock_size = of_get_property(np, "ibm,memblock-size", NULL);139139- if (!memblock_size) {138138+ lmb_size = of_get_property(np, "ibm,lmb-size", NULL);139139+ if (!lmb_size) {140140 of_node_put(np);141141 return -EINVAL;142142 }143143144144 if (action == PSERIES_DRCONF_MEM_ADD) {145145- rc = memblock_add(*base, *memblock_size);145145+ rc = memblock_add(*base, *lmb_size);146146 rc = (rc < 0) ? -EINVAL : 0;147147 } else if (action == PSERIES_DRCONF_MEM_REMOVE) {148148- rc = pseries_remove_memblock(*base, *memblock_size);148148+ rc = pseries_remove_memblock(*base, *lmb_size);149149 } else {150150 rc = -EINVAL;151151 }
+10-2
arch/s390/kernel/entry.S
···535535 l %r3,__LC_PGM_ILC # load program interruption code536536 la %r8,0x7f537537 nr %r8,%r3 # clear per-event-bit and ilc538538- be BASED(pgm_exit) # only per or per+check ?539539- b BASED(pgm_do_call)538538+ be BASED(pgm_exit2) # only per or per+check ?539539+ l %r7,BASED(.Ljump_table)540540+ sll %r8,2541541+ l %r7,0(%r8,%r7) # load address of handler routine542542+ la %r2,SP_PTREGS(%r15) # address of register-save area543543+ basr %r14,%r7 # branch to interrupt-handler544544+pgm_exit2:545545+ TRACE_IRQS_ON546546+ stosm __SF_EMPTY(%r15),0x03 # reenable interrupts547547+ b BASED(sysc_return)540548541549#542550# it was a single stepped SVC that is causing all the trouble
+10-2
arch/s390/kernel/entry64.S
···544544 lgf %r3,__LC_PGM_ILC # load program interruption code545545 lghi %r8,0x7f546546 ngr %r8,%r3 # clear per-event-bit and ilc547547- je pgm_exit548548- j pgm_do_call547547+ je pgm_exit2548548+ sll %r8,3549549+ larl %r1,pgm_check_table550550+ lg %r1,0(%r8,%r1) # load address of handler routine551551+ la %r2,SP_PTREGS(%r15) # address of register-save area552552+ basr %r14,%r1 # branch to interrupt-handler553553+pgm_exit2:554554+ TRACE_IRQS_ON555555+ stosm __SF_EMPTY(%r15),0x03 # reenable interrupts556556+ j sysc_return549557550558#551559# it was a single stepped SVC that is causing all the trouble
+12-6
arch/s390/kernel/time.c
···524524 if (!etr_eacr.sl)525525 return;526526 disable_sync_clock(NULL);527527- set_bit(ETR_EVENT_SWITCH_LOCAL, &etr_events);528528- queue_work(time_sync_wq, &etr_work);527527+ if (!test_and_set_bit(ETR_EVENT_SWITCH_LOCAL, &etr_events)) {528528+ etr_eacr.es = etr_eacr.sl = 0;529529+ etr_setr(&etr_eacr);530530+ queue_work(time_sync_wq, &etr_work);531531+ }529532}530533531534/*···542539 if (!etr_eacr.es)543540 return;544541 disable_sync_clock(NULL);545545- set_bit(ETR_EVENT_SYNC_CHECK, &etr_events);546546- queue_work(time_sync_wq, &etr_work);542542+ if (!test_and_set_bit(ETR_EVENT_SYNC_CHECK, &etr_events)) {543543+ etr_eacr.es = 0;544544+ etr_setr(&etr_eacr);545545+ queue_work(time_sync_wq, &etr_work);546546+ }547547}548548549549/*···908902 * Do not try to get the alternate port aib if the clock909903 * is not in sync yet.910904 */911911- if (!check_sync_clock())905905+ if (!eacr.es || !check_sync_clock())912906 return eacr;913907914908 /*···10701064 * If the clock is in sync just update the eacr and return.10711065 * If there is no valid sync port wait for a port update.10721066 */10731073- if (check_sync_clock() || sync_port < 0) {10671067+ if ((eacr.es && check_sync_clock()) || sync_port < 0) {10741068 etr_update_eacr(eacr);10751069 etr_set_tolec_timeout(now);10761070 goto out_unlock;
+9
arch/x86/kernel/acpi/cstate.c
···145145 percpu_entry->states[cx->index].eax = cx->address;146146 percpu_entry->states[cx->index].ecx = MWAIT_ECX_INTERRUPT_BREAK;147147 }148148+149149+ /*150150+ * For _CST FFH on Intel, if GAS.access_size bit 1 is cleared,151151+ * then we should skip checking BM_STS for this C-state.152152+ * ref: "Intel Processor Vendor-Specific ACPI Interface Specification"153153+ */154154+ if ((c->x86_vendor == X86_VENDOR_INTEL) && !(reg->access_size & 0x2))155155+ cx->bm_sts_skip = 1;156156+148157 return retval;149158}150159EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe);
+7-2
arch/x86/kernel/acpi/sleep.c
···157157#ifdef CONFIG_HIBERNATION158158 if (strncmp(str, "s4_nohwsig", 10) == 0)159159 acpi_no_s4_hw_signature();160160- if (strncmp(str, "s4_nonvs", 8) == 0)161161- acpi_s4_no_nvs();160160+ if (strncmp(str, "s4_nonvs", 8) == 0) {161161+ pr_warning("ACPI: acpi_sleep=s4_nonvs is deprecated, "162162+ "please use acpi_sleep=nonvs instead");163163+ acpi_nvs_nosave();164164+ }162165#endif166166+ if (strncmp(str, "nonvs", 5) == 0)167167+ acpi_nvs_nosave();163168 if (strncmp(str, "old_ordering", 12) == 0)164169 acpi_old_suspend_ordering();165170 str = strchr(str, ',');
+20-21
arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
···368368 return -ENODEV;369369370370 out_obj = output.pointer;371371- if (out_obj->type != ACPI_TYPE_BUFFER) {372372- ret = -ENODEV;373373- goto out_free;374374- }371371+ if (out_obj->type != ACPI_TYPE_BUFFER)372372+ return -ENODEV;375373376374 errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0);377377- if (errors) {378378- ret = -ENODEV;379379- goto out_free;380380- }375375+ if (errors)376376+ return -ENODEV;381377382378 supported = *((u32 *)(out_obj->buffer.pointer + 4));383383- if (!(supported & 0x1)) {384384- ret = -ENODEV;385385- goto out_free;386386- }379379+ if (!(supported & 0x1))380380+ return -ENODEV;387381388382out_free:389383 kfree(output.pointer);···391397 struct pcc_memory_resource *mem_resource;392398 struct pcc_register_resource *reg_resource;393399 union acpi_object *out_obj, *member;394394- acpi_handle handle, osc_handle;400400+ acpi_handle handle, osc_handle, pcch_handle;395401 int ret = 0;396402397403 status = acpi_get_handle(NULL, "\\_SB", &handle);404404+ if (ACPI_FAILURE(status))405405+ return -ENODEV;406406+407407+ status = acpi_get_handle(handle, "PCCH", &pcch_handle);398408 if (ACPI_FAILURE(status))399409 return -ENODEV;400410···541543542544 if (!pcch_virt_addr) {543545 result = -1;544544- goto pcch_null;546546+ goto out;545547 }546548547549 result = pcc_get_offset(cpu);548550 if (result) {549551 dprintk("init: PCCP evaluation failed\n");550550- goto free;552552+ goto out;551553 }552554553555 policy->max = policy->cpuinfo.max_freq =···556558 ioread32(&pcch_hdr->minimum_frequency) * 1000;557559 policy->cur = pcc_get_freq(cpu);558560561561+ if (!policy->cur) {562562+ dprintk("init: Unable to get current CPU frequency\n");563563+ result = -EINVAL;564564+ goto out;565565+ }566566+559567 dprintk("init: policy->max is %d, policy->min is %d\n",560568 policy->max, policy->min);561561-562562- return 0;563563-free:564564- pcc_clear_mapping();565565- free_percpu(pcc_cpu_info);566566-pcch_null:569569+out:567570 return result;568571}569572
+5-6
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
···10231023 }10241024 if (max_latency == 0) {10251025 /*10261026- * Fam 11h always returns 0 as transition latency.10271027- * This is intended and means "very fast". While cpufreq core10281028- * and governors currently can handle that gracefully, better10291029- * set it to 1 to avoid problems in the future.10301030- * For all others it's a BIOS bug.10261026+ * Fam 11h and later may return 0 as transition latency. This10271027+ * is intended and means "very fast". While cpufreq core and10281028+ * governors currently can handle that gracefully, better set it10291029+ * to 1 to avoid problems in the future.10311030 */10321032- if (boot_cpu_data.x86 != 0x11)10311031+ if (boot_cpu_data.x86 < 0x11)10331032 printk(KERN_ERR FW_WARN PFX "Invalid zero transition "10341033 "latency\n");10351034 max_latency = 1;
+2-2
arch/x86/kernel/entry_64.S
···571571 * masked off.572572 */573573sysret_audit:574574- movq %rax,%rsi /* second arg, syscall return value */575575- cmpq $0,%rax /* is it < 0? */574574+ movq RAX-ARGOFFSET(%rsp),%rsi /* second arg, syscall return value */575575+ cmpq $0,%rsi /* is it < 0? */576576 setl %al /* 1 if so, 0 if not */577577 movzbl %al,%edi /* zero-extend that into %edi */578578 inc %edi /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */
+1-1
arch/x86/kernel/hpet.c
···964964965965void hpet_disable(void)966966{967967- if (is_hpet_capable()) {967967+ if (is_hpet_capable() && hpet_virt_address) {968968 unsigned int cfg = hpet_readl(HPET_CFG);969969970970 if (hpet_legacy_int_enabled) {
+15-10
arch/x86/kernel/i8259.c
···276276 .cls = &i8259_sysdev_class,277277};278278279279-static int __init i8259A_init_sysfs(void)280280-{281281- int error = sysdev_class_register(&i8259_sysdev_class);282282- if (!error)283283- error = sysdev_register(&device_i8259A);284284- return error;285285-}286286-287287-device_initcall(i8259A_init_sysfs);288288-289279static void mask_8259A(void)290280{291281 unsigned long flags;···397407};398408399409struct legacy_pic *legacy_pic = &default_legacy_pic;410410+411411+static int __init i8259A_init_sysfs(void)412412+{413413+ int error;414414+415415+ if (legacy_pic != &default_legacy_pic)416416+ return 0;417417+418418+ error = sysdev_class_register(&i8259_sysdev_class);419419+ if (!error)420420+ error = sysdev_register(&device_i8259A);421421+ return error;422422+}423423+424424+device_initcall(i8259A_init_sysfs);
+7-2
arch/x86/kernel/kgdb.c
···572572 return NOTIFY_STOP;573573}574574575575-#ifdef CONFIG_KGDB_LOW_LEVEL_TRAP576575int kgdb_ll_trap(int cmd, const char *str,577576 struct pt_regs *regs, long err, int trap, int sig)578577{···589590590591 return __kgdb_notify(&args, cmd);591592}592592-#endif /* CONFIG_KGDB_LOW_LEVEL_TRAP */593593594594static int595595kgdb_notify(struct notifier_block *self, unsigned long cmd, void *ptr)···623625 return register_die_notifier(&kgdb_notifier);624626}625627628628+static void kgdb_hw_overflow_handler(struct perf_event *event, int nmi,629629+ struct perf_sample_data *data, struct pt_regs *regs)630630+{631631+ kgdb_ll_trap(DIE_DEBUG, "debug", regs, 0, 0, SIGTRAP);632632+}633633+626634void kgdb_arch_late(void)627635{628636 int i, cpu;···659655 for_each_online_cpu(cpu) {660656 pevent = per_cpu_ptr(breakinfo[i].pev, cpu);661657 pevent[0]->hw.sample_period = 1;658658+ pevent[0]->overflow_handler = kgdb_hw_overflow_handler;662659 if (pevent[0]->destroy != NULL) {663660 pevent[0]->destroy = NULL;664661 release_bp_slot(*pevent);
+1
arch/x86/kvm/paging_tmpl.h
···342342 /* advance table_gfn when emulating 1gb pages with 4k */343343 if (delta == 0)344344 table_gfn += PT_INDEX(addr, level);345345+ access &= gw->pte_access;345346 } else {346347 direct = 0;347348 table_gfn = gw->table_gfn[level - 2];
···7070acpi_status acpi_enable(void)7171{7272 acpi_status status;7373+ int retry;73747475 ACPI_FUNCTION_TRACE(acpi_enable);7576···999810099 /* Sanity check that transition succeeded */101100102102- if (acpi_hw_get_mode() != ACPI_SYS_MODE_ACPI) {103103- ACPI_ERROR((AE_INFO,104104- "Hardware did not enter ACPI mode"));105105- return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);101101+ for (retry = 0; retry < 30000; ++retry) {102102+ if (acpi_hw_get_mode() == ACPI_SYS_MODE_ACPI) {103103+ if (retry != 0)104104+ ACPI_WARNING((AE_INFO,105105+ "Platform took > %d00 usec to enter ACPI mode", retry));106106+ return_ACPI_STATUS(AE_OK);107107+ }108108+ acpi_os_stall(100); /* 100 usec */106109 }107110108108- ACPI_DEBUG_PRINT((ACPI_DB_INIT,109109- "Transition to ACPI mode successful\n"));110110-111111- return_ACPI_STATUS(AE_OK);111111+ ACPI_ERROR((AE_INFO, "Hardware did not enter ACPI mode"));112112+ return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);112113}113114114115ACPI_EXPORT_SYMBOL(acpi_enable)
+7-1
drivers/acpi/battery.c
···868868static void acpi_battery_notify(struct acpi_device *device, u32 event)869869{870870 struct acpi_battery *battery = acpi_driver_data(device);871871+#ifdef CONFIG_ACPI_SYSFS_POWER872872+ struct device *old;873873+#endif871874872875 if (!battery)873876 return;877877+#ifdef CONFIG_ACPI_SYSFS_POWER878878+ old = battery->bat.dev;879879+#endif874880 acpi_battery_update(battery);875881 acpi_bus_generate_proc_event(device, event,876882 acpi_battery_present(battery));···885879 acpi_battery_present(battery));886880#ifdef CONFIG_ACPI_SYSFS_POWER887881 /* acpi_battery_update could remove power_supply object */888888- if (battery->bat.dev)882882+ if (old && battery->bat.dev)889883 power_supply_changed(&battery->bat);890884#endif891885}
···7676module_param(max_cstate, uint, 0000);7777static unsigned int nocst __read_mostly;7878module_param(nocst, uint, 0000);7979+static int bm_check_disable __read_mostly;8080+module_param(bm_check_disable, uint, 0000);79818082static unsigned int latency_factor __read_mostly = 2;8183module_param(latency_factor, uint, 0644);82848585+#ifdef CONFIG_ACPI_PROCFS8386static u64 us_to_pm_timer_ticks(s64 t)8487{8588 return div64_u64(t * PM_TIMER_FREQUENCY, 1000000);8689}9090+#endif9191+8792/*8893 * IBM ThinkPad R40e crashes mysteriously when going into C2 or C3.8994 * For now disable this. Probably a bug somewhere else.···768763{769764 u32 bm_status = 0;770765766766+ if (bm_check_disable)767767+ return 0;768768+771769 acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status);772770 if (bm_status)773771 acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, 1);···955947 if (acpi_idle_suspend)956948 return(acpi_idle_enter_c1(dev, state));957949958958- if (acpi_idle_bm_check()) {950950+ if (!cx->bm_sts_skip && acpi_idle_bm_check()) {959951 if (dev->safe_state) {960952 dev->last_state = dev->safe_state;961953 return dev->safe_state->enter(dev, dev->safe_state);
+17-18
drivers/acpi/sleep.c
···8282static u32 acpi_target_sleep_state = ACPI_STATE_S0;83838484/*8585+ * The ACPI specification wants us to save NVS memory regions during hibernation8686+ * and to restore them during the subsequent resume. Windows does that also for8787+ * suspend to RAM. However, it is known that this mechanism does not work on8888+ * all machines, so we allow the user to disable it with the help of the8989+ * 'acpi_sleep=nonvs' kernel command line option.9090+ */9191+static bool nvs_nosave;9292+9393+void __init acpi_nvs_nosave(void)9494+{9595+ nvs_nosave = true;9696+}9797+9898+/*8599 * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the86100 * user to request that behavior by using the 'acpi_old_suspend_ordering'87101 * kernel command line option that causes the following variable to be set.···211197 u32 acpi_state = acpi_suspend_states[pm_state];212198 int error = 0;213199214214- error = suspend_nvs_alloc();215215-200200+ error = nvs_nosave ? 0 : suspend_nvs_alloc();216201 if (error)217202 return error;218203···401388#endif /* CONFIG_SUSPEND */402389403390#ifdef CONFIG_HIBERNATION404404-/*405405- * The ACPI specification wants us to save NVS memory regions during hibernation406406- * and to restore them during the subsequent resume. However, it is not certain407407- * if this mechanism is going to work on all machines, so we allow the user to408408- * disable this mechanism using the 'acpi_sleep=s4_nonvs' kernel command line409409- * option.410410- */411411-static bool s4_no_nvs;412412-413413-void __init acpi_s4_no_nvs(void)414414-{415415- s4_no_nvs = true;416416-}417417-418391static unsigned long s4_hardware_signature;419392static struct acpi_table_facs *facs;420393static bool nosigcheck;···414415{415416 int error;416417417417- error = s4_no_nvs ? 0 : suspend_nvs_alloc();418418+ error = nvs_nosave ? 0 : suspend_nvs_alloc();418419 if (!error) {419420 acpi_target_sleep_state = ACPI_STATE_S4;420421 acpi_sleep_tts_switch(acpi_target_sleep_state);···509510 error = acpi_sleep_prepare(ACPI_STATE_S4);510511511512 if (!error) {512512- if (!s4_no_nvs)513513+ if (!nvs_nosave)513514 error = suspend_nvs_alloc();514515 if (!error)515516 acpi_target_sleep_state = ACPI_STATE_S4;
+1-1
drivers/base/core.c
···673673 */674674 if (parent == NULL)675675 parent_kobj = virtual_device_parent(dev);676676- else if (parent->class)676676+ else if (parent->class && !dev->class->ns_type)677677 return &parent->kobj;678678 else679679 parent_kobj = &parent->kobj;
+8-5
drivers/char/agp/intel-gtt.c
···1216121612171217 /* G33's GTT size defined in gmch_ctrl */12181218 pci_read_config_word(agp_bridge->dev, I830_GMCH_CTRL, &gmch_ctrl);12191219- switch (gmch_ctrl & G33_PGETBL_SIZE_MASK) {12201220- case G33_PGETBL_SIZE_1M:12191219+ switch (gmch_ctrl & I830_GMCH_GMS_MASK) {12201220+ case I830_GMCH_GMS_STOLEN_512:12211221+ size = 512;12221222+ break;12231223+ case I830_GMCH_GMS_STOLEN_1024:12211224 size = 1024;12221225 break;12231223- case G33_PGETBL_SIZE_2M:12241224- size = 2048;12261226+ case I830_GMCH_GMS_STOLEN_8192:12271227+ size = 8*1024;12251228 break;12261229 default:12271230 dev_info(&agp_bridge->dev->dev,12281231 "unknown page table size 0x%x, assuming 512KB\n",12291229- (gmch_ctrl & G33_PGETBL_SIZE_MASK));12321232+ (gmch_ctrl & I830_GMCH_GMS_MASK));12301233 size = 512;12311234 }12321235 } else {
+1-1
drivers/char/sysrq.c
···493493 sysrq_key_table[i] = op_p;494494}495495496496-static void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)496496+void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)497497{498498 struct sysrq_key_op *op_p;499499 int orig_log_level;
+8-1
drivers/char/tpm/tpm_tis.c
···623623624624static int tpm_tis_pnp_resume(struct pnp_dev *dev)625625{626626- return tpm_pm_resume(&dev->dev);626626+ struct tpm_chip *chip = pnp_get_drvdata(dev);627627+ int ret;628628+629629+ ret = tpm_pm_resume(&dev->dev);630630+ if (!ret)631631+ tpm_continue_selftest(chip);632632+633633+ return ret;627634}628635629636static struct pnp_device_id tpm_pnp_tbl[] __devinitdata = {
+2-10
drivers/cpufreq/cpufreq.c
···1080108010811081err_unlock_policy:10821082 unlock_policy_rwsem_write(cpu);10831083+ free_cpumask_var(policy->related_cpus);10831084err_free_cpumask:10841085 free_cpumask_var(policy->cpus);10851086err_free_policy:···17661765 dprintk("governor switch\n");1767176617681767 /* end old governor */17691769- if (data->governor) {17701770- /*17711771- * Need to release the rwsem around governor17721772- * stop due to lock dependency between17731773- * cancel_delayed_work_sync and the read lock17741774- * taken in the delayed work handler.17751775- */17761776- unlock_policy_rwsem_write(data->cpu);17681768+ if (data->governor)17771769 __cpufreq_governor(data, CPUFREQ_GOV_STOP);17781778- lock_policy_rwsem_write(data->cpu);17791779- }1780177017811771 /* start new governor */17821772 data->governor = policy->governor;
+5-1
drivers/crypto/talitos.c
···11831183 /* Copy part of this segment */11841184 ignore = skip - offset;11851185 len = miter.length - ignore;11861186+ if (boffset + len > buflen)11871187+ len = buflen - boffset;11861188 memcpy(buf + boffset, miter.addr + ignore, len);11871189 } else {11881188- /* Copy all of this segment */11901190+ /* Copy all of this segment (up to buflen) */11891191 len = miter.length;11921192+ if (boffset + len > buflen)11931193+ len = buflen - boffset;11901194 memcpy(buf + boffset, miter.addr, len);11911195 }11921196 boffset += len;
+1-1
drivers/edac/i7core_edac.c
···13001300 if (devno == 0)13011301 return -ENODEV;1302130213031303- i7core_printk(KERN_ERR,13031303+ i7core_printk(KERN_INFO,13041304 "Device not found: dev %02x.%d PCI ID %04x:%04x\n",13051305 dev_descr->dev, dev_descr->func,13061306 PCI_VENDOR_ID_INTEL, dev_descr->dev_id);
···893893void gpio_unexport(unsigned gpio)894894{895895 struct gpio_desc *desc;896896- int status = -EINVAL;896896+ int status = 0;897897898898- if (!gpio_is_valid(gpio))898898+ if (!gpio_is_valid(gpio)) {899899+ status = -EINVAL;899900 goto done;901901+ }900902901903 mutex_lock(&sysfs_lock);902904···913911 clear_bit(FLAG_EXPORT, &desc->flags);914912 put_device(dev);915913 device_unregister(dev);916916- status = 0;917914 } else918915 status = -ENODEV;919916 }
···605605 case FBC_NOT_TILED:606606 seq_printf(m, "scanout buffer not tiled");607607 break;608608+ case FBC_MULTIPLE_PIPES:609609+ seq_printf(m, "multiple pipes are enabled");610610+ break;608611 default:609612 seq_printf(m, "unknown reason");610613 }
+1-1
drivers/gpu/drm/i915/i915_dma.c
···13001300 struct drm_i915_private *dev_priv = dev->dev_private;1301130113021302 drm_mm_put_block(dev_priv->compressed_fb);13031303- if (!IS_GM45(dev))13031303+ if (dev_priv->compressed_llb)13041304 drm_mm_put_block(dev_priv->compressed_llb);13051305}13061306
+5
drivers/gpu/drm/i915/i915_drv.h
···215215 FBC_MODE_TOO_LARGE, /* mode too large for compression */216216 FBC_BAD_PLANE, /* fbc not supported on plane */217217 FBC_NOT_TILED, /* buffer not tiled */218218+ FBC_MULTIPLE_PIPES, /* more than one pipe active */218219};219220220221enum intel_pch {221222 PCH_IBX, /* Ibexpeak PCH */222223 PCH_CPT, /* Cougarpoint PCH */223224};225225+226226+#define QUIRK_PIPEA_FORCE (1<<0)224227225228struct intel_fbdev;226229···339336340337 /* PCH chipset type */341338 enum intel_pch pch_type;339339+340340+ unsigned long quirks;342341343342 /* Register state */344343 bool modeset_on_lid;
+2-1
drivers/gpu/drm/i915/i915_gem.c
···36473647 return ret;36483648}3649364936503650+36503651int36513652i915_gem_do_execbuffer(struct drm_device *dev, void *data,36523653 struct drm_file *file_priv,···37953794 unsigned long long total_size = 0;37963795 int num_fences = 0;37973796 for (i = 0; i < args->buffer_count; i++) {37983798- obj_priv = object_list[i]->driver_private;37973797+ obj_priv = to_intel_bo(object_list[i]);3799379838003799 total_size += object_list[i]->size;38013800 num_fences +=
···98989999 mutex_lock(&dev->struct_mutex);100100101101- ret = i915_gem_object_pin(fbo, 64*1024);101101+ ret = intel_pin_and_fence_fb_obj(dev, fbo);102102 if (ret) {103103 DRM_ERROR("failed to pin fb: %d\n", ret);104104 goto out_unref;···236236237237 drm_framebuffer_cleanup(&ifb->base);238238 if (ifb->obj)239239- drm_gem_object_unreference_unlocked(ifb->obj);239239+ drm_gem_object_unreference(ifb->obj);240240241241 return 0;242242}
+23
drivers/gpu/drm/i915/intel_lvds.c
···599599 return 0;600600}601601602602+static int intel_no_modeset_on_lid_dmi_callback(const struct dmi_system_id *id)603603+{604604+ DRM_DEBUG_KMS("Skipping forced modeset for %s\n", id->ident);605605+ return 1;606606+}607607+608608+/* The GPU hangs up on these systems if modeset is performed on LID open */609609+static const struct dmi_system_id intel_no_modeset_on_lid[] = {610610+ {611611+ .callback = intel_no_modeset_on_lid_dmi_callback,612612+ .ident = "Toshiba Tecra A11",613613+ .matches = {614614+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),615615+ DMI_MATCH(DMI_PRODUCT_NAME, "TECRA A11"),616616+ },617617+ },618618+619619+ { } /* terminating entry */620620+};621621+602622/*603623 * Lid events. Note the use of 'modeset_on_lid':604624 * - we set it on lid close, and reset it on open···642622 */643623 if (connector)644624 connector->status = connector->funcs->detect(connector);625625+ /* Don't force modeset on machines where it causes a GPU lockup */626626+ if (dmi_check_system(intel_no_modeset_on_lid))627627+ return NOTIFY_OK;645628 if (!acpi_lid_open()) {646629 dev_priv->modeset_on_lid = 1;647630 return NOTIFY_OK;
···8989struct gc {9090 struct pardevice *pd;9191 struct gc_pad pads[GC_MAX_DEVICES];9292- struct input_dev *dev[GC_MAX_DEVICES];9392 struct timer_list timer;9493 int pad_count[GC_MAX];9594 int used;···386387 for (i = 0; i < GC_MAX_DEVICES; i++) {387388388389 pad = &gc->pads[i];389389- dev = gc->dev[i];390390+ dev = pad->dev;390391 s = gc_status_bit[i];391392392393 switch (pad->type) {···578579 read = parport_read_status(port) ^ 0x80;579580580581 for (j = 0; j < GC_MAX_DEVICES; j++) {581581- struct gc_pad *pad = &gc->pads[i];582582+ struct gc_pad *pad = &gc->pads[j];582583583584 if (pad->type == GC_PSX || pad->type == GC_DDR)584585 data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0;
+1-1
drivers/input/keyboard/Kconfig
···124124 right-hand column will be interpreted as the key shown in the125125 left-hand column.126126127127-config QT2160127127+config KEYBOARD_QT2160128128 tristate "Atmel AT42QT2160 Touch Sensor Chip"129129 depends on I2C && EXPERIMENTAL130130 help
+11-6
drivers/input/keyboard/twl4030_keypad.c
···5151 */5252#define TWL4030_MAX_ROWS 8 /* TWL4030 hard limit */5353#define TWL4030_MAX_COLS 85454-#define TWL4030_ROW_SHIFT 35555-#define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS * TWL4030_MAX_COLS)5454+/*5555+ * Note that we add space for an extra column so that we can handle5656+ * row lines connected to the gnd (see twl4030_col_xlate()).5757+ */5858+#define TWL4030_ROW_SHIFT 45959+#define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS << TWL4030_ROW_SHIFT)56605761struct twl4030_keypad {5862 unsigned short keymap[TWL4030_KEYMAP_SIZE];···186182 return ret;187183}188184189189-static int twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state)185185+static bool twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state)190186{191187 int i;192188 u16 check = 0;···195191 u16 col = key_state[i];196192197193 if ((col & check) && hweight16(col) > 1)198198- return 1;194194+ return true;199195200196 check |= col;201197 }202198203203- return 0;199199+ return false;204200}205201206202static void twl4030_kp_scan(struct twl4030_keypad *kp, bool release_all)···229225 if (!changed)230226 continue;231227232232- for (col = 0; col < kp->n_cols; col++) {228228+ /* Extra column handles "all gnd" rows */229229+ for (col = 0; col < kp->n_cols + 1; col++) {233230 int code;234231235232 if (!(changed & (1 << col)))
···141141 priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2];142142 priv->ext_cap = priv->ext_cap_0c = 0;143143144144- if (!SYN_CAP_VALID(priv->capabilities))144144+ /*145145+ * Older firmwares had submodel ID fixed to 0x47146146+ */147147+ if (SYN_ID_FULL(priv->identity) < 0x705 &&148148+ SYN_CAP_SUBMODEL_ID(priv->capabilities) != 0x47) {145149 return -1;150150+ }146151147152 /*148153 * Unless capExtended is set the rest of the flags should be ignored
···539539 if (host->gpio_cd == -ENOSYS)540540 status = host->plat->status(mmc_dev(host->mmc));541541 else542542- status = gpio_get_value(host->gpio_cd);542542+ status = !gpio_get_value(host->gpio_cd);543543544544- return !status;544544+ /*545545+ * Use positive logic throughout - status is zero for no card,546546+ * non-zero for card inserted.547547+ */548548+ return status;545549}546550547551static const struct mmc_host_ops mmci_ops = {
+4
drivers/net/bnx2x.h
···1062106210631063 /* used to synchronize stats collecting */10641064 int stats_state;10651065+10661066+ /* used for synchronization of concurrent threads statistics handling */10671067+ spinlock_t stats_lock;10681068+10651069 /* used by dmae command loader */10661070 struct dmae_command stats_dmae;10671071 int executer_idx;
+27-15
drivers/net/bnx2x_main.c
···5757#include "bnx2x_init_ops.h"5858#include "bnx2x_dump.h"59596060-#define DRV_MODULE_VERSION "1.52.53-1"6161-#define DRV_MODULE_RELDATE "2010/18/04"6060+#define DRV_MODULE_VERSION "1.52.53-2"6161+#define DRV_MODULE_RELDATE "2010/21/07"6262#define BNX2X_BC_VER 0x04020063636464#include <linux/firmware.h>···37893789 struct eth_query_ramrod_data ramrod_data = {0};37903790 int i, rc;3791379137923792+ spin_lock_bh(&bp->stats_lock);37933793+37923794 ramrod_data.drv_counter = bp->stats_counter++;37933795 ramrod_data.collect_port = bp->port.pmf ? 1 : 0;37943796 for_each_queue(bp, i)···38043802 bp->spq_left++;38053803 bp->stats_pending = 1;38063804 }38053805+38063806+ spin_unlock_bh(&bp->stats_lock);38073807 }38083808}38093809···43714367 struct host_func_stats *fstats = bnx2x_sp(bp, func_stats);43724368 struct bnx2x_eth_stats *estats = &bp->eth_stats;43734369 int i;43704370+ u16 cur_stats_counter;43714371+43724372+ /* Make sure we use the value of the counter43734373+ * used for sending the last stats ramrod.43744374+ */43754375+ spin_lock_bh(&bp->stats_lock);43764376+ cur_stats_counter = bp->stats_counter - 1;43774377+ spin_unlock_bh(&bp->stats_lock);4374437843754379 memcpy(&(fstats->total_bytes_received_hi),43764380 &(bnx2x_sp(bp, func_stats_base)->total_bytes_received_hi),···44064394 u32 diff;4407439544084396 /* are storm stats valid? */44094409- if ((u16)(le16_to_cpu(xclient->stats_counter) + 1) !=44104410- bp->stats_counter) {43974397+ if (le16_to_cpu(xclient->stats_counter) != cur_stats_counter) {44114398 DP(BNX2X_MSG_STATS, "[%d] stats not updated by xstorm"44124399 " xstorm counter (0x%x) != stats_counter (0x%x)\n",44134413- i, xclient->stats_counter, bp->stats_counter);44004400+ i, xclient->stats_counter, cur_stats_counter + 1);44144401 return -1;44154402 }44164416- if ((u16)(le16_to_cpu(tclient->stats_counter) + 1) !=44174417- bp->stats_counter) {44034403+ if (le16_to_cpu(tclient->stats_counter) != cur_stats_counter) {44184404 DP(BNX2X_MSG_STATS, "[%d] stats not updated by tstorm"44194405 " tstorm counter (0x%x) != stats_counter (0x%x)\n",44204420- i, tclient->stats_counter, bp->stats_counter);44064406+ i, tclient->stats_counter, cur_stats_counter + 1);44214407 return -2;44224408 }44234423- if ((u16)(le16_to_cpu(uclient->stats_counter) + 1) !=44244424- bp->stats_counter) {44094409+ if (le16_to_cpu(uclient->stats_counter) != cur_stats_counter) {44254410 DP(BNX2X_MSG_STATS, "[%d] stats not updated by ustorm"44264411 " ustorm counter (0x%x) != stats_counter (0x%x)\n",44274427- i, uclient->stats_counter, bp->stats_counter);44124412+ i, uclient->stats_counter, cur_stats_counter + 1);44284413 return -4;44294414 }44304415···4858484948594850static void bnx2x_stats_handle(struct bnx2x *bp, enum bnx2x_stats_event event)48604851{48614861- enum bnx2x_stats_state state = bp->stats_state;48524852+ enum bnx2x_stats_state state;4862485348634854 if (unlikely(bp->panic))48644855 return;4865485648664866- bnx2x_stats_stm[state][event].action(bp);48574857+ /* Protect a state change flow */48584858+ spin_lock_bh(&bp->stats_lock);48594859+ state = bp->stats_state;48674860 bp->stats_state = bnx2x_stats_stm[state][event].next_state;48614861+ spin_unlock_bh(&bp->stats_lock);4868486248694869- /* Make sure the state has been "changed" */48704870- smp_wmb();48634863+ bnx2x_stats_stm[state][event].action(bp);4871486448724865 if ((event != STATS_EVENT_UPDATE) || netif_msg_timer(bp))48734866 DP(BNX2X_MSG_STATS, "state %d -> event %d -> state %d\n",···9919990899209909 mutex_init(&bp->port.phy_mutex);99219910 mutex_init(&bp->fw_mb_mutex);99119911+ spin_lock_init(&bp->stats_lock);99229912#ifdef BCM_CNIC99239913 mutex_init(&bp->cnic_mutex);99249914#endif
···10221022 .ndo_set_mac_address = eth_mac_addr,10231023};1024102410251025-static int __init dec_lance_probe(struct device *bdev, const int type)10251025+static int __devinit dec_lance_probe(struct device *bdev, const int type)10261026{10271027 static unsigned version_printed;10281028 static const char fmt[] = "declance%d";···13261326}1327132713281328#ifdef CONFIG_TC13291329-static int __init dec_lance_tc_probe(struct device *dev);13291329+static int __devinit dec_lance_tc_probe(struct device *dev);13301330static int __exit dec_lance_tc_remove(struct device *dev);1331133113321332static const struct tc_device_id dec_lance_tc_table[] = {···13451345 },13461346};1347134713481348-static int __init dec_lance_tc_probe(struct device *dev)13481348+static int __devinit dec_lance_tc_probe(struct device *dev)13491349{13501350 int status = dec_lance_probe(dev, PMAD_LANCE);13511351 if (!status)
+9
drivers/net/igb/igb_main.c
···17221722 u16 eeprom_apme_mask = IGB_EEPROM_APME;17231723 u32 part_num;1724172417251725+ /* Catch broken hardware that put the wrong VF device ID in17261726+ * the PCIe SR-IOV capability.17271727+ */17281728+ if (pdev->is_virtfn) {17291729+ WARN(1, KERN_ERR "%s (%hx:%hx) should not be a VF!\n",17301730+ pci_name(pdev), pdev->vendor, pdev->device);17311731+ return -EINVAL;17321732+ }17331733+17251734 err = pci_enable_device_mem(pdev);17261735 if (err)17271736 return err;
+9
drivers/net/ixgbe/ixgbe_main.c
···64926492#endif64936493 u32 part_num, eec;6494649464956495+ /* Catch broken hardware that put the wrong VF device ID in64966496+ * the PCIe SR-IOV capability.64976497+ */64986498+ if (pdev->is_virtfn) {64996499+ WARN(1, KERN_ERR "%s (%hx:%hx) should not be a VF!\n",65006500+ pci_name(pdev), pdev->vendor, pdev->device);65016501+ return -EINVAL;65026502+ }65036503+64956504 err = pci_enable_device_mem(pdev);64966505 if (err)64976506 return err;
···735735 else736736 dev->ep0state = EP0_OUT_DATA_PHASE;737737738738+ if (!dev->driver)739739+ return;740740+741741+ /* deliver the request to the gadget driver */738742 ret = dev->driver->setup(&dev->gadget, crq);739743 if (ret < 0) {740744 if (dev->req_config) {
+1-1
drivers/usb/host/ohci-pxa27x.c
···203203 __raw_writel(uhchr & ~UHCHR_FHR, ohci->mmio_base + UHCHR);204204}205205206206-#ifdef CONFIG_CPU_PXA27x206206+#ifdef CONFIG_PXA27x207207extern void pxa27x_clear_otgph(void);208208#else209209#define pxa27x_clear_otgph() do {} while (0)
+24-2
drivers/usb/host/xhci-mem.c
···835835 return 0;836836}837837838838+void xhci_copy_ep0_dequeue_into_input_ctx(struct xhci_hcd *xhci,839839+ struct usb_device *udev)840840+{841841+ struct xhci_virt_device *virt_dev;842842+ struct xhci_ep_ctx *ep0_ctx;843843+ struct xhci_ring *ep_ring;844844+845845+ virt_dev = xhci->devs[udev->slot_id];846846+ ep0_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, 0);847847+ ep_ring = virt_dev->eps[0].ring;848848+ /*849849+ * FIXME we don't keep track of the dequeue pointer very well after a850850+ * Set TR dequeue pointer, so we're setting the dequeue pointer of the851851+ * host to our enqueue pointer. This should only be called after a852852+ * configured device has reset, so all control transfers should have853853+ * been completed or cancelled before the reset.854854+ */855855+ ep0_ctx->deq = xhci_trb_virt_to_dma(ep_ring->enq_seg, ep_ring->enqueue);856856+ ep0_ctx->deq |= ep_ring->cycle_state;857857+}858858+838859/* Setup an xHCI virtual device for a Set Address command */839860int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev)840861{···10231002 return EP_INTERVAL(interval);10241003}1025100410261026-/* The "Mult" field in the endpoint context is only set for SuperSpeed devices.10051005+/* The "Mult" field in the endpoint context is only set for SuperSpeed isoc eps.10271006 * High speed endpoint descriptors can define "the number of additional10281007 * transaction opportunities per microframe", but that goes in the Max Burst10291008 * endpoint context field.···10311010static inline u32 xhci_get_endpoint_mult(struct usb_device *udev,10321011 struct usb_host_endpoint *ep)10331012{10341034- if (udev->speed != USB_SPEED_SUPER)10131013+ if (udev->speed != USB_SPEED_SUPER ||10141014+ !usb_endpoint_xfer_isoc(&ep->desc))10351015 return 0;10361016 return ep->ss_ep_comp.bmAttributes;10371017}
+7-4
drivers/usb/host/xhci-ring.c
···23802380 u32 field3, u32 field4, bool command_must_succeed)23812381{23822382 int reserved_trbs = xhci->cmd_ring_reserved_trbs;23832383+ int ret;23842384+23832385 if (!command_must_succeed)23842386 reserved_trbs++;2385238723862386- if (!room_on_ring(xhci, xhci->cmd_ring, reserved_trbs)) {23872387- if (!in_interrupt())23882388- xhci_err(xhci, "ERR: No room for command on command ring\n");23882388+ ret = prepare_ring(xhci, xhci->cmd_ring, EP_STATE_RUNNING,23892389+ reserved_trbs, GFP_ATOMIC);23902390+ if (ret < 0) {23912391+ xhci_err(xhci, "ERR: No room for command on command ring\n");23892392 if (command_must_succeed)23902393 xhci_err(xhci, "ERR: Reserved TRB counting for "23912394 "unfailable commands failed.\n");23922392- return -ENOMEM;23952395+ return ret;23932396 }23942397 queue_trb(xhci, xhci->cmd_ring, false, false, field1, field2, field3,23952398 field4 | xhci->cmd_ring->cycle_state);
+2
drivers/usb/host/xhci.c
···21342134 /* If this is a Set Address to an unconfigured device, setup ep 0 */21352135 if (!udev->config)21362136 xhci_setup_addressable_virt_dev(xhci, udev);21372137+ else21382138+ xhci_copy_ep0_dequeue_into_input_ctx(xhci, udev);21372139 /* Otherwise, assume the core has the device configured how it wants */21382140 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id);21392141 xhci_dbg_ctx(xhci, virt_dev->in_ctx, 2);
+2
drivers/usb/host/xhci.h
···12921292void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id);12931293int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, struct usb_device *udev, gfp_t flags);12941294int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev);12951295+void xhci_copy_ep0_dequeue_into_input_ctx(struct xhci_hcd *xhci,12961296+ struct usb_device *udev);12951297unsigned int xhci_get_endpoint_index(struct usb_endpoint_descriptor *desc);12961298unsigned int xhci_get_endpoint_flag(struct usb_endpoint_descriptor *desc);12971299unsigned int xhci_get_endpoint_flag_from_index(unsigned int ep_index);
+3-2
drivers/usb/misc/sisusbvga/sisusb.c
···24362436 }2437243724382438 if (!sisusb->devinit) {24392439- if (sisusb->sisusb_dev->speed == USB_SPEED_HIGH) {24392439+ if (sisusb->sisusb_dev->speed == USB_SPEED_HIGH ||24402440+ sisusb->sisusb_dev->speed == USB_SPEED_SUPER) {24402441 if (sisusb_init_gfxdevice(sisusb, 0)) {24412442 mutex_unlock(&sisusb->lock);24422443 dev_err(&sisusb->sisusb_dev->dev, "Failed to initialize device\n");···3167316631683167 sisusb->present = 1;3169316831703170- if (dev->speed == USB_SPEED_HIGH) {31693169+ if (dev->speed == USB_SPEED_HIGH || dev->speed == USB_SPEED_SUPER) {31713170 int initscreen = 1;31723171#ifdef INCL_SISUSB_CON31733172 if (sisusb_first_vc > 0 &&
-13
drivers/usb/musb/tusb6010.c
···2929#define TUSB_REV_MAJOR(reg_val) ((reg_val >> 4) & 0xf)3030#define TUSB_REV_MINOR(reg_val) (reg_val & 0xf)31313232-#ifdef CONFIG_PM3333-/* REVISIT: These should be only needed if somebody implements off idle */3434-void musb_platform_save_context(struct musb *musb,3535- struct musb_context_registers *musb_context)3636-{3737-}3838-3939-void musb_platform_restore_context(struct musb *musb,4040- struct musb_context_registers *musb_context)4141-{4242-}4343-#endif4444-4532/*4633 * Checks the revision. We need to use the DMA register as 3.0 does not4734 * have correct versions for TUSB_PRCM_REV or TUSB_INT_CTRL_REV.
···245245 { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */246246 { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless AirCard 580 */247247 { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U */248248+ { USB_DEVICE(0x1199, 0x0301) }, /* Sierra Wireless USB Dongle 250U */248249 /* Sierra Wireless C597 */249250 { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x0023, 0xFF, 0xFF, 0xFF) },250251 /* Sierra Wireless T598 */
+1-3
drivers/usb/storage/transport.c
···139139140140 /* fill the common fields in the URB */141141 us->current_urb->context = &urb_done;142142- us->current_urb->actual_length = 0;143143- us->current_urb->error_count = 0;144144- us->current_urb->status = 0;142142+ us->current_urb->transfer_flags = 0;145143146144 /* we assume that if transfer_buffer isn't us->iobuf then it147145 * hasn't been mapped for DMA. Yes, this is clunky, but it's
···164164 gfp_t gfp)165165{166166 struct vring_virtqueue *vq = to_vvq(_vq);167167- unsigned int i, avail, head, uninitialized_var(prev);167167+ unsigned int i, avail, uninitialized_var(prev);168168+ int head;168169169170 START_USE(vq);170171···175174 * buffers, then go indirect. FIXME: tune this threshold */176175 if (vq->indirect && (out + in) > 1 && vq->num_free) {177176 head = vring_add_indirect(vq, sg, out, in, gfp);178178- if (head != vq->vring.num)177177+ if (likely(head >= 0))179178 goto add_head;180179 }181180
···22 tristate "Ceph distributed file system (EXPERIMENTAL)"33 depends on INET && EXPERIMENTAL44 select LIBCRC32C55- select CONFIG_CRYPTO_AES55+ select CRYPTO_AES66 help77 Choose Y or M here to include support for mounting the88 experimental Ceph distributed file system. Ceph is an extremely
+8-7
fs/ceph/caps.c
···627627 if (fmode >= 0)628628 __ceph_get_fmode(ci, fmode);629629 spin_unlock(&inode->i_lock);630630- wake_up(&ci->i_cap_wq);630630+ wake_up_all(&ci->i_cap_wq);631631 return 0;632632}633633···11811181 }1182118211831183 if (wake)11841184- wake_up(&ci->i_cap_wq);11841184+ wake_up_all(&ci->i_cap_wq);1185118511861186 return delayed;11871187}···21532153 else if (flushsnaps)21542154 ceph_flush_snaps(ci);21552155 if (wake)21562156- wake_up(&ci->i_cap_wq);21562156+ wake_up_all(&ci->i_cap_wq);21572157 if (put)21582158 iput(inode);21592159}···22292229 iput(inode);22302230 } else if (complete_capsnap) {22312231 ceph_flush_snaps(ci);22322232- wake_up(&ci->i_cap_wq);22322232+ wake_up_all(&ci->i_cap_wq);22332233 }22342234 if (drop_capsnap)22352235 iput(inode);···24052405 if (queue_invalidate)24062406 ceph_queue_invalidate(inode);24072407 if (wake)24082408- wake_up(&ci->i_cap_wq);24082408+ wake_up_all(&ci->i_cap_wq);2409240924102410 if (check_caps == 1)24112411 ceph_check_caps(ci, CHECK_CAPS_NODELAY|CHECK_CAPS_AUTHONLY,···24602460 struct ceph_inode_info,24612461 i_flushing_item)->vfs_inode);24622462 mdsc->num_cap_flushing--;24632463- wake_up(&mdsc->cap_flushing_wq);24632463+ wake_up_all(&mdsc->cap_flushing_wq);24642464 dout(" inode %p now !flushing\n", inode);2465246524662466 if (ci->i_dirty_caps == 0) {···24722472 }24732473 }24742474 spin_unlock(&mdsc->cap_dirty_lock);24752475- wake_up(&ci->i_cap_wq);24752475+ wake_up_all(&ci->i_cap_wq);2476247624772477out:24782478 spin_unlock(&inode->i_lock);···29842984 memcpy(*p, dentry->d_name.name, dentry->d_name.len);29852985 *p += dentry->d_name.len;29862986 rel->dname_seq = cpu_to_le32(di->lease_seq);29872987+ __ceph_mdsc_drop_dentry_lease(dentry);29872988 }29882989 spin_unlock(&dentry->d_lock);29892990 return ret;
+10-3
fs/ceph/dir.c
···266266 spin_lock(&inode->i_lock);267267 if ((filp->f_pos == 2 || fi->dentry) &&268268 !ceph_test_opt(client, NOASYNCREADDIR) &&269269+ ceph_snap(inode) != CEPH_SNAPDIR &&269270 (ci->i_ceph_flags & CEPH_I_COMPLETE) &&270271 __ceph_caps_issued_mask(ci, CEPH_CAP_FILE_SHARED, 1)) {271272 err = __dcache_readdir(filp, dirent, filldir);···1014101310151014/*10161015 * When a dentry is released, clear the dir I_COMPLETE if it was part10171017- * of the current dir gen.10161016+ * of the current dir gen or if this is in the snapshot namespace.10181017 */10191018static void ceph_dentry_release(struct dentry *dentry)10201019{10211020 struct ceph_dentry_info *di = ceph_dentry(dentry);10221021 struct inode *parent_inode = dentry->d_parent->d_inode;10221022+ u64 snapid = ceph_snap(parent_inode);1023102310241024- if (parent_inode) {10241024+ dout("dentry_release %p parent %p\n", dentry, parent_inode);10251025+10261026+ if (parent_inode && snapid != CEPH_SNAPDIR) {10251027 struct ceph_inode_info *ci = ceph_inode(parent_inode);1026102810271029 spin_lock(&parent_inode->i_lock);10281028- if (ci->i_shared_gen == di->lease_shared_gen) {10301030+ if (ci->i_shared_gen == di->lease_shared_gen ||10311031+ snapid <= CEPH_MAXSNAP) {10291032 dout(" clearing %p complete (d_release)\n",10301033 parent_inode);10311034 ci->i_ceph_flags &= ~CEPH_I_COMPLETE;···1246124112471242struct dentry_operations ceph_snapdir_dentry_ops = {12481243 .d_revalidate = ceph_snapdir_d_revalidate,12441244+ .d_release = ceph_dentry_release,12491245};1250124612511247struct dentry_operations ceph_snap_dentry_ops = {12481248+ .d_release = ceph_dentry_release,12521249};
+1-1
fs/ceph/file.c
···265265 kmem_cache_free(ceph_file_cachep, cf);266266267267 /* wake up anyone waiting for caps on this inode */268268- wake_up(&ci->i_cap_wq);268268+ wake_up_all(&ci->i_cap_wq);269269 return 0;270270}271271
···31313232static struct hlist_head *ecryptfs_daemon_hash;3333struct mutex ecryptfs_daemon_hash_mux;3434-static int ecryptfs_hash_buckets;3434+static int ecryptfs_hash_bits;3535#define ecryptfs_uid_hash(uid) \3636- hash_long((unsigned long)uid, ecryptfs_hash_buckets)3636+ hash_long((unsigned long)uid, ecryptfs_hash_bits)37373838static u32 ecryptfs_msg_counter;3939static struct ecryptfs_msg_ctx *ecryptfs_msg_ctx_arr;···486486 }487487 mutex_init(&ecryptfs_daemon_hash_mux);488488 mutex_lock(&ecryptfs_daemon_hash_mux);489489- ecryptfs_hash_buckets = 1;490490- while (ecryptfs_number_of_users >> ecryptfs_hash_buckets)491491- ecryptfs_hash_buckets++;489489+ ecryptfs_hash_bits = 1;490490+ while (ecryptfs_number_of_users >> ecryptfs_hash_bits)491491+ ecryptfs_hash_bits++;492492 ecryptfs_daemon_hash = kmalloc((sizeof(struct hlist_head)493493- * ecryptfs_hash_buckets), GFP_KERNEL);493493+ * (1 << ecryptfs_hash_bits)),494494+ GFP_KERNEL);494495 if (!ecryptfs_daemon_hash) {495496 rc = -ENOMEM;496497 printk(KERN_ERR "%s: Failed to allocate memory\n", __func__);497498 mutex_unlock(&ecryptfs_daemon_hash_mux);498499 goto out;499500 }500500- for (i = 0; i < ecryptfs_hash_buckets; i++)501501+ for (i = 0; i < (1 << ecryptfs_hash_bits); i++)501502 INIT_HLIST_HEAD(&ecryptfs_daemon_hash[i]);502503 mutex_unlock(&ecryptfs_daemon_hash_mux);503504 ecryptfs_msg_ctx_arr = kmalloc((sizeof(struct ecryptfs_msg_ctx)···555554 int i;556555557556 mutex_lock(&ecryptfs_daemon_hash_mux);558558- for (i = 0; i < ecryptfs_hash_buckets; i++) {557557+ for (i = 0; i < (1 << ecryptfs_hash_bits); i++) {559558 int rc;560559561560 hlist_for_each_entry(daemon, elem,
+25-6
fs/gfs2/dir.c
···12311231 return 0;12321232}1233123312341234+static void *gfs2_alloc_sort_buffer(unsigned size)12351235+{12361236+ void *ptr = NULL;12371237+12381238+ if (size < KMALLOC_MAX_SIZE)12391239+ ptr = kmalloc(size, GFP_NOFS | __GFP_NOWARN);12401240+ if (!ptr)12411241+ ptr = __vmalloc(size, GFP_NOFS, PAGE_KERNEL);12421242+ return ptr;12431243+}12441244+12451245+static void gfs2_free_sort_buffer(void *ptr)12461246+{12471247+ if (is_vmalloc_addr(ptr))12481248+ vfree(ptr);12491249+ else12501250+ kfree(ptr);12511251+}12521252+12341253static int gfs2_dir_read_leaf(struct inode *inode, u64 *offset, void *opaque,12351254 filldir_t filldir, int *copied, unsigned *depth,12361255 u64 leaf_no)···12901271 * 99 is the maximum number of entries that can fit in a single12911272 * leaf block.12921273 */12931293- larr = vmalloc((leaves + entries + 99) * sizeof(void *));12741274+ larr = gfs2_alloc_sort_buffer((leaves + entries + 99) * sizeof(void *));12941275 if (!larr)12951276 goto out;12961277 darr = (const struct gfs2_dirent **)(larr + leaves);···13011282 do {13021283 error = get_leaf(ip, lfn, &bh);13031284 if (error)13041304- goto out_kfree;12851285+ goto out_free;13051286 lf = (struct gfs2_leaf *)bh->b_data;13061287 lfn = be64_to_cpu(lf->lf_next);13071288 if (lf->lf_entries) {···13101291 gfs2_dirent_gather, NULL, &g);13111292 error = PTR_ERR(dent);13121293 if (IS_ERR(dent))13131313- goto out_kfree;12941294+ goto out_free;13141295 if (entries2 != g.offset) {13151296 fs_warn(sdp, "Number of entries corrupt in dir "13161297 "leaf %llu, entries2 (%u) != "···13191300 entries2, g.offset);1320130113211302 error = -EIO;13221322- goto out_kfree;13031303+ goto out_free;13231304 }13241305 error = 0;13251306 larr[leaf++] = bh;···13311312 BUG_ON(entries2 != entries);13321313 error = do_filldir_main(ip, offset, opaque, filldir, darr,13331314 entries, copied);13341334-out_kfree:13151315+out_free:13351316 for(i = 0; i < leaf; i++)13361317 brelse(larr[i]);13371337- vfree(larr);13181318+ gfs2_free_sort_buffer(larr);13381319out:13391320 return error;13401321}
+11-2
fs/nfs/file.c
···2727#include <linux/pagemap.h>2828#include <linux/aio.h>2929#include <linux/gfp.h>3030+#include <linux/swap.h>30313132#include <asm/uaccess.h>3233#include <asm/system.h>···494493 */495494static int nfs_release_page(struct page *page, gfp_t gfp)496495{496496+ struct address_space *mapping = page->mapping;497497+497498 dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page);498499499500 /* Only do I/O if gfp is a superset of GFP_KERNEL */500500- if ((gfp & GFP_KERNEL) == GFP_KERNEL)501501- nfs_wb_page(page->mapping->host, page);501501+ if (mapping && (gfp & GFP_KERNEL) == GFP_KERNEL) {502502+ int how = FLUSH_SYNC;503503+504504+ /* Don't let kswapd deadlock waiting for OOM RPC calls */505505+ if (current_is_kswapd())506506+ how = 0;507507+ nfs_commit_inode(mapping->host, how);508508+ }502509 /* If PagePrivate() is set, then the page is not freeable */503510 if (PagePrivate(page))504511 return 0;
+1-1
fs/nfs/nfsroot.c
···105105static __be32 servaddr __initdata = 0;106106107107/* Name of directory to mount */108108-static char nfs_export_path[NFS_MAXPATHLEN] __initdata = { 0, };108108+static char nfs_export_path[NFS_MAXPATHLEN + 1] __initdata = { 0, };109109110110/* NFS-related data */111111static struct nfs_mount_data nfs_data __initdata = { 0, };/* NFS mount info */
+18-12
fs/nfs/write.c
···222222 clear_bdi_congested(&nfss->backing_dev_info, BLK_RW_ASYNC);223223}224224225225-static struct nfs_page *nfs_find_and_lock_request(struct page *page)225225+static struct nfs_page *nfs_find_and_lock_request(struct page *page, bool nonblock)226226{227227 struct inode *inode = page->mapping->host;228228 struct nfs_page *req;···241241 * request as dirty (in which case we don't care).242242 */243243 spin_unlock(&inode->i_lock);244244- ret = nfs_wait_on_request(req);244244+ if (!nonblock)245245+ ret = nfs_wait_on_request(req);246246+ else247247+ ret = -EAGAIN;245248 nfs_release_request(req);246249 if (ret != 0)247250 return ERR_PTR(ret);···259256 * May return an error if the user signalled nfs_wait_on_request().260257 */261258static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,262262- struct page *page)259259+ struct page *page, bool nonblock)263260{264261 struct nfs_page *req;265262 int ret = 0;266263267267- req = nfs_find_and_lock_request(page);264264+ req = nfs_find_and_lock_request(page, nonblock);268265 if (!req)269266 goto out;270267 ret = PTR_ERR(req);···286283static int nfs_do_writepage(struct page *page, struct writeback_control *wbc, struct nfs_pageio_descriptor *pgio)287284{288285 struct inode *inode = page->mapping->host;286286+ int ret;289287290288 nfs_inc_stats(inode, NFSIOS_VFSWRITEPAGE);291289 nfs_add_stats(inode, NFSIOS_WRITEPAGES, 1);292290293291 nfs_pageio_cond_complete(pgio, page->index);294294- return nfs_page_async_flush(pgio, page);292292+ ret = nfs_page_async_flush(pgio, page,293293+ wbc->sync_mode == WB_SYNC_NONE ||294294+ wbc->nonblocking != 0);295295+ if (ret == -EAGAIN) {296296+ redirty_page_for_writepage(wbc, page);297297+ ret = 0;298298+ }299299+ return ret;295300}296301297302/*···13901379 .rpc_release = nfs_commit_release,13911380};1392138113931393-static int nfs_commit_inode(struct inode *inode, int how)13821382+int nfs_commit_inode(struct inode *inode, int how)13941383{13951384 LIST_HEAD(head);13961385 int may_wait = how & FLUSH_SYNC;···14541443 return ret;14551444}14561445#else14571457-static int nfs_commit_inode(struct inode *inode, int how)14581458-{14591459- return 0;14601460-}14611461-14621446static int nfs_commit_unstable_pages(struct inode *inode, struct writeback_control *wbc)14631447{14641448 return 0;···1552154615531547 nfs_fscache_release_page(page, GFP_KERNEL);1554154815551555- req = nfs_find_and_lock_request(page);15491549+ req = nfs_find_and_lock_request(page, false);15561550 ret = PTR_ERR(req);15571551 if (IS_ERR(req))15581552 goto out;
···6363/* Align . to a 8 byte boundary equals to maximum function alignment. */6464#define ALIGN_FUNCTION() . = ALIGN(8)65656666+/*6767+ * Align to a 32 byte boundary equal to the6868+ * alignment gcc 4.5 uses for a struct6969+ */7070+#define STRUCT_ALIGN() . = ALIGN(32)7171+6672/* The actual configuration determine if the init/exit sections6773 * are handled as text/data or they can be discarded (which6874 * often happens at runtime)···168162 LIKELY_PROFILE() \169163 BRANCH_PROFILE() \170164 TRACE_PRINTKS() \165165+ \166166+ STRUCT_ALIGN(); \171167 FTRACE_EVENTS() \168168+ \169169+ STRUCT_ALIGN(); \172170 TRACE_SYSCALLS()173171174172/*···441431 */442432#define INIT_TASK_DATA_SECTION(align) \443433 . = ALIGN(align); \444444- .data..init_task : { \434434+ .data..init_task : AT(ADDR(.data..init_task) - LOAD_OFFSET) { \445435 INIT_TASK_DATA(align) \446436 }447437
···153153extern void __put_cred(struct cred *);154154extern void exit_creds(struct task_struct *);155155extern int copy_creds(struct task_struct *, unsigned long);156156+extern const struct cred *get_task_cred(struct task_struct *);156157extern struct cred *cred_alloc_blank(void);157158extern struct cred *prepare_creds(void);158159extern struct cred *prepare_exec_creds(void);···274273 * @task: The task to query275274 *276275 * Access the objective credentials of a task. The caller must hold the RCU277277- * readlock.276276+ * readlock or the task must be dead and unable to change its own credentials.278277 *279279- * The caller must make sure task doesn't go away, either by holding a ref on280280- * task or by holding tasklist_lock to prevent it from being unlinked.278278+ * The result of this function should not be passed directly to get_cred();279279+ * rather get_task_cred() should be used instead.281280 */282282-#define __task_cred(task) \283283- ((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_tasklist_lock_is_held())))284284-285285-/**286286- * get_task_cred - Get another task's objective credentials287287- * @task: The task to query288288- *289289- * Get the objective credentials of a task, pinning them so that they can't go290290- * away. Accessing a task's credentials directly is not permitted.291291- *292292- * The caller must make sure task doesn't go away, either by holding a ref on293293- * task or by holding tasklist_lock to prevent it from being unlinked.294294- */295295-#define get_task_cred(task) \296296-({ \297297- struct cred *__cred; \298298- rcu_read_lock(); \299299- __cred = (struct cred *) __task_cred((task)); \300300- get_cred(__cred); \301301- rcu_read_unlock(); \302302- __cred; \303303-})281281+#define __task_cred(task) \282282+ ({ \283283+ const struct task_struct *__t = (task); \284284+ rcu_dereference_check(__t->real_cred, \285285+ rcu_read_lock_held() || \286286+ task_is_dead(__t)); \287287+ })304288305289/**306290 * get_current_cred - Get the current task's subjective credentials
+2
include/linux/if_macvlan.h
···6767 }6868}69697070+extern void macvlan_common_setup(struct net_device *dev);7171+7072extern int macvlan_common_newlink(struct net *src_net, struct net_device *dev,7173 struct nlattr *tb[], struct nlattr *data[],7274 int (*receive)(struct sk_buff *skb),
+7
include/linux/nfs_fs.h
···493493extern int nfs_wb_page(struct inode *inode, struct page* page);494494extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);495495#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)496496+extern int nfs_commit_inode(struct inode *, int);496497extern struct nfs_write_data *nfs_commitdata_alloc(void);497498extern void nfs_commit_free(struct nfs_write_data *wdata);499499+#else500500+static inline int501501+nfs_commit_inode(struct inode *inode, int how)502502+{503503+ return 0;504504+}498505#endif499506500507static inline int
+32
include/linux/regulator/tps6507x.h
···11+/*22+ * tps6507x.h -- Voltage regulation for the Texas Instruments TPS6507X33+ *44+ * Copyright (C) 2010 Texas Instruments, Inc.55+ *66+ * This program is free software; you can redistribute it and/or modify77+ * it under the terms of the GNU General Public License version 2 as88+ * published by the Free Software Foundation99+ *1010+ * This program is distributed in the hope that it will be useful,1111+ * but WITHOUT ANY WARRANTY; without even the implied warranty of1212+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1313+ * GNU General Public License for more details.1414+ *1515+ * You should have received a copy of the GNU General Public License1616+ * along with this program; if not, write to the Free Software1717+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA1818+ */1919+2020+#ifndef REGULATOR_TPS6507X2121+#define REGULATOR_TPS6507X2222+2323+/**2424+ * tps6507x_reg_platform_data - platform data for tps6507x2525+ * @defdcdc_default: Defines whether DCDC high or the low register controls2626+ * output voltage by default. Valid for DCDC2 and DCDC3 outputs only.2727+ */2828+struct tps6507x_reg_platform_data {2929+ bool defdcdc_default;3030+};3131+3232+#endif
···99 int tcfm_ifindex;1010 int tcfm_ok_push;1111 struct net_device *tcfm_dev;1212+ struct list_head tcfm_list;1213};1314#define to_mirred(pc) \1415 container_of(pc, struct tcf_mirred, common)
+25
kernel/cred.c
···209209 }210210}211211212212+/**213213+ * get_task_cred - Get another task's objective credentials214214+ * @task: The task to query215215+ *216216+ * Get the objective credentials of a task, pinning them so that they can't go217217+ * away. Accessing a task's credentials directly is not permitted.218218+ *219219+ * The caller must also make sure task doesn't get deleted, either by holding a220220+ * ref on task or by holding tasklist_lock to prevent it from being unlinked.221221+ */222222+const struct cred *get_task_cred(struct task_struct *task)223223+{224224+ const struct cred *cred;225225+226226+ rcu_read_lock();227227+228228+ do {229229+ cred = __task_cred((task));230230+ BUG_ON(!cred);231231+ } while (!atomic_inc_not_zero(&((struct cred *)cred)->usage));232232+233233+ rcu_read_unlock();234234+ return cred;235235+}236236+212237/*213238 * Allocate blank credentials, such that the credentials can be filled in at a214239 * later date without risk of ENOMEM.
···787787788788 /* Store the name of the last unloaded module for diagnostic purposes */789789 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));790790- ddebug_remove_module(mod->name);791790792791 free_module(mod);793792 return 0;···15481549 remove_notes_attrs(mod);15491550 remove_sect_attrs(mod);15501551 mod_kobject_remove(mod);15521552+15531553+ /* Remove dynamic debug info */15541554+ ddebug_remove_module(mod->name);1551155515521556 /* Arch-specific cleanup. */15531557 module_arch_cleanup(mod);
+13-3
mm/memory.c
···13941394 return i ? : -EFAULT;13951395 }13961396 if (pages) {13971397- struct page *page = vm_normal_page(gate_vma, start, *pte);13971397+ struct page *page;13981398+13991399+ page = vm_normal_page(gate_vma, start, *pte);14001400+ if (!page) {14011401+ if (!(gup_flags & FOLL_DUMP) &&14021402+ is_zero_pfn(pte_pfn(*pte)))14031403+ page = pte_page(*pte);14041404+ else {14051405+ pte_unmap(pte);14061406+ return i ? : -EFAULT;14071407+ }14081408+ }13981409 pages[i] = page;13991399- if (page)14001400- get_page(page);14101410+ get_page(page);14011411 }14021412 pte_unmap(pte);14031413 if (vmas)