···6666entering atomic context, using:67676868 int flex_array_prealloc(struct flex_array *array, unsigned int start,6969- unsigned int end, gfp_t flags);6969+ unsigned int nr_elements, gfp_t flags);70707171This function will ensure that memory for the elements indexed in the range7272-defined by start and end has been allocated. Thereafter, a7272+defined by start and nr_elements has been allocated. Thereafter, a7373flex_array_put() call on an element in that range is guaranteed not to7474block.7575
···11+CONFIG_EXPERIMENTAL=y22+CONFIG_LOG_BUF_SHIFT=1433+CONFIG_EMBEDDED=y44+# CONFIG_HOTPLUG is not set55+# CONFIG_ELF_CORE is not set66+# CONFIG_FUTEX is not set77+# CONFIG_TIMERFD is not set88+# CONFIG_VM_EVENT_COUNTERS is not set99+# CONFIG_COMPAT_BRK is not set1010+CONFIG_SLAB=y1111+# CONFIG_LBDAF is not set1212+# CONFIG_BLK_DEV_BSG is not set1313+# CONFIG_IOSCHED_DEADLINE is not set1414+# CONFIG_IOSCHED_CFQ is not set1515+# CONFIG_MMU is not set1616+CONFIG_ARCH_AT91=y1717+CONFIG_ARCH_AT91X40=y1818+CONFIG_MACH_AT91EB01=y1919+CONFIG_AT91_EARLY_USART0=y2020+CONFIG_CPU_ARM7TDMI=y2121+CONFIG_SET_MEM_PARAM=y2222+CONFIG_DRAM_BASE=0x010000002323+CONFIG_DRAM_SIZE=0x004000002424+CONFIG_FLASH_MEM_BASE=0x014000002525+CONFIG_PROCESSOR_ID=0x140000402626+CONFIG_ZBOOT_ROM_TEXT=0x02727+CONFIG_ZBOOT_ROM_BSS=0x02828+CONFIG_BINFMT_FLAT=y2929+# CONFIG_SUSPEND is not set3030+# CONFIG_FW_LOADER is not set3131+CONFIG_MTD=y3232+CONFIG_MTD_PARTITIONS=y3333+CONFIG_MTD_CHAR=y3434+CONFIG_MTD_BLOCK=y3535+CONFIG_MTD_RAM=y3636+CONFIG_MTD_ROM=y3737+CONFIG_BLK_DEV_RAM=y3838+# CONFIG_INPUT is not set3939+# CONFIG_SERIO is not set4040+# CONFIG_VT is not set4141+# CONFIG_DEVKMEM is not set4242+# CONFIG_HW_RANDOM is not set4343+# CONFIG_HWMON is not set4444+# CONFIG_USB_SUPPORT is not set4545+CONFIG_EXT2_FS=y4646+# CONFIG_DNOTIFY is not set4747+CONFIG_ROMFS_FS=y4848+# CONFIG_ENABLE_MUST_CHECK is not set
···2121 /* Get our own relocated address */2222 call 1f23231: popl %ebx2424- subl $1b, %ebx2424+ subl $(1b - r_base), %ebx25252626 /* Compute the equivalent real-mode segment */2727 movl %ebx, %ecx2828 shrl $4, %ecx29293030 /* Patch post-real-mode segment jump */3131- movw dispatch_table(%ebx,%eax,2),%ax3232- movw %ax, 101f(%ebx)3333- movw %cx, 102f(%ebx)3131+ movw (dispatch_table - r_base)(%ebx,%eax,2),%ax3232+ movw %ax, (101f - r_base)(%ebx)3333+ movw %cx, (102f - r_base)(%ebx)34343535 /* Set up the IDT for real mode. */3636- lidtl machine_real_restart_idt(%ebx)3636+ lidtl (machine_real_restart_idt - r_base)(%ebx)37373838 /*3939 * Set up a GDT from which we can load segment descriptors for real4040 * mode. The GDT is not used in real mode; it is just needed here to4141 * prepare the descriptors.4242 */4343- lgdtl machine_real_restart_gdt(%ebx)4343+ lgdtl (machine_real_restart_gdt - r_base)(%ebx)44444545 /*4646 * Load the data segment registers with 16-bit compatible values
+1-1
arch/x86/mm/numa_64.c
···306306 bi->end = min(bi->end, high);307307308308 /* and there's no empty block */309309- if (bi->start == bi->end) {309309+ if (bi->start >= bi->end) {310310 numa_remove_memblk_from(i--, mi);311311 continue;312312 }
+124-1
arch/x86/xen/mmu.c
···14631463 return ret;14641464}1465146514661466+#ifdef CONFIG_X86_6414671467+static __initdata u64 __last_pgt_set_rw = 0;14681468+static __initdata u64 __pgt_buf_start = 0;14691469+static __initdata u64 __pgt_buf_end = 0;14701470+static __initdata u64 __pgt_buf_top = 0;14711471+/*14721472+ * As a consequence of the commit:14731473+ * 14741474+ * commit 4b239f458c229de044d6905c2b0f9fe16ed9e01e14751475+ * Author: Yinghai Lu <yinghai@kernel.org>14761476+ * Date: Fri Dec 17 16:58:28 2010 -080014771477+ * 14781478+ * x86-64, mm: Put early page table high14791479+ * 14801480+ * at some point init_memory_mapping is going to reach the pagetable pages14811481+ * area and map those pages too (mapping them as normal memory that falls14821482+ * in the range of addresses passed to init_memory_mapping as argument).14831483+ * Some of those pages are already pagetable pages (they are in the range14841484+ * pgt_buf_start-pgt_buf_end) therefore they are going to be mapped RO and14851485+ * everything is fine.14861486+ * Some of these pages are not pagetable pages yet (they fall in the range14871487+ * pgt_buf_end-pgt_buf_top; for example the page at pgt_buf_end) so they14881488+ * are going to be mapped RW. When these pages become pagetable pages and14891489+ * are hooked into the pagetable, xen will find that the guest has already14901490+ * a RW mapping of them somewhere and fail the operation.14911491+ * The reason Xen requires pagetables to be RO is that the hypervisor needs14921492+ * to verify that the pagetables are valid before using them. The validation14931493+ * operations are called "pinning".14941494+ * 14951495+ * In order to fix the issue we mark all the pages in the entire range14961496+ * pgt_buf_start-pgt_buf_top as RO, however when the pagetable allocation14971497+ * is completed only the range pgt_buf_start-pgt_buf_end is reserved by14981498+ * init_memory_mapping. Hence the kernel is going to crash as soon as one14991499+ * of the pages in the range pgt_buf_end-pgt_buf_top is reused (b/c those15001500+ * ranges are RO).15011501+ * 15021502+ * For this reason, 'mark_rw_past_pgt' is introduced which is called _after_15031503+ * the init_memory_mapping has completed (in a perfect world we would15041504+ * call this function from init_memory_mapping, but lets ignore that).15051505+ * 15061506+ * Because we are called _after_ init_memory_mapping the pgt_buf_[start,15071507+ * end,top] have all changed to new values (b/c init_memory_mapping15081508+ * is called and setting up another new page-table). Hence, the first time15091509+ * we enter this function, we save away the pgt_buf_start value and update15101510+ * the pgt_buf_[end,top].15111511+ * 15121512+ * When we detect that the "old" pgt_buf_start through pgt_buf_end15131513+ * PFNs have been reserved (so memblock_x86_reserve_range has been called),15141514+ * we immediately set out to RW the "old" pgt_buf_end through pgt_buf_top.15151515+ * 15161516+ * And then we update those "old" pgt_buf_[end|top] with the new ones15171517+ * so that we can redo this on the next pagetable.15181518+ */15191519+static __init void mark_rw_past_pgt(void) {15201520+15211521+ if (pgt_buf_end > pgt_buf_start) {15221522+ u64 addr, size;15231523+15241524+ /* Save it away. */15251525+ if (!__pgt_buf_start) {15261526+ __pgt_buf_start = pgt_buf_start;15271527+ __pgt_buf_end = pgt_buf_end;15281528+ __pgt_buf_top = pgt_buf_top;15291529+ return;15301530+ }15311531+ /* If we get the range that starts at __pgt_buf_end that means15321532+ * the range is reserved, and that in 'init_memory_mapping'15331533+ * the 'memblock_x86_reserve_range' has been called with the15341534+ * outdated __pgt_buf_start, __pgt_buf_end (the "new"15351535+ * pgt_buf_[start|end|top] refer now to a new pagetable.15361536+ * Note: we are called _after_ the pgt_buf_[..] have been15371537+ * updated.*/15381538+15391539+ addr = memblock_x86_find_in_range_size(PFN_PHYS(__pgt_buf_start),15401540+ &size, PAGE_SIZE);15411541+15421542+ /* Still not reserved, meaning 'memblock_x86_reserve_range'15431543+ * hasn't been called yet. Update the _end and _top.*/15441544+ if (addr == PFN_PHYS(__pgt_buf_start)) {15451545+ __pgt_buf_end = pgt_buf_end;15461546+ __pgt_buf_top = pgt_buf_top;15471547+ return;15481548+ }15491549+15501550+ /* OK, the area is reserved, meaning it is time for us to15511551+ * set RW for the old end->top PFNs. */15521552+15531553+ /* ..unless we had already done this. */15541554+ if (__pgt_buf_end == __last_pgt_set_rw)15551555+ return;15561556+15571557+ addr = PFN_PHYS(__pgt_buf_end);15581558+15591559+ /* set as RW the rest */15601560+ printk(KERN_DEBUG "xen: setting RW the range %llx - %llx\n",15611561+ PFN_PHYS(__pgt_buf_end), PFN_PHYS(__pgt_buf_top));15621562+15631563+ while (addr < PFN_PHYS(__pgt_buf_top)) {15641564+ make_lowmem_page_readwrite(__va(addr));15651565+ addr += PAGE_SIZE;15661566+ }15671567+ /* And update everything so that we are ready for the next15681568+ * pagetable (the one created for regions past 4GB) */15691569+ __last_pgt_set_rw = __pgt_buf_end;15701570+ __pgt_buf_start = pgt_buf_start;15711571+ __pgt_buf_end = pgt_buf_end;15721572+ __pgt_buf_top = pgt_buf_top;15731573+ }15741574+ return;15751575+}15761576+#else15771577+static __init void mark_rw_past_pgt(void) { }15781578+#endif14661579static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd)14671580{14681581#ifdef CONFIG_X86_64···16021489 unsigned long pfn = pte_pfn(pte);1603149016041491 /*14921492+ * A bit of optimization. We do not need to call the workaround14931493+ * when xen_set_pte_init is called with a PTE with 0 as PFN.14941494+ * That is b/c the pagetable at that point are just being populated14951495+ * with empty values and we can save some cycles by not calling14961496+ * the 'memblock' code.*/14971497+ if (pfn)14981498+ mark_rw_past_pgt();14991499+ /*16051500 * If the new pfn is within the range of the newly allocated16061501 * kernel pagetable, and it isn't being mapped into an16071502 * early_ioremap fixmap slot as a freshly allocated page, make sure16081503 * it is RO.16091504 */16101505 if (((!is_early_ioremap_ptep(ptep) &&16111611- pfn >= pgt_buf_start && pfn < pgt_buf_end)) ||15061506+ pfn >= pgt_buf_start && pfn < pgt_buf_top)) ||16121507 (is_early_ioremap_ptep(ptep) && pfn != (pgt_buf_end - 1)))16131508 pte = pte_wrprotect(pte);16141509···2118199721191998static __init void xen_post_allocator_init(void)21201999{20002000+ mark_rw_past_pgt();20012001+21212002#ifdef CONFIG_XEN_DEBUG21222003 pv_mmu_ops.make_pte = PV_CALLEE_SAVE(xen_make_pte_debug);21232004#endif
+2-2
drivers/block/rbd.c
···777777 ops,778778 false,779779 GFP_NOIO, pages, bio);780780- if (IS_ERR(req)) {780780+ if (!req) {781781 up_read(&header->snap_rwsem);782782- ret = PTR_ERR(req);782782+ ret = -ENOMEM;783783 goto done_pages;784784 }785785
+27-16
drivers/firewire/ohci.c
···21992199{22002200 struct fw_ohci *ohci;22012201 unsigned long flags;22022202- int ret = -EBUSY;22032202 __be32 *next_config_rom;22042203 dma_addr_t uninitialized_var(next_config_rom_bus);22052204···2239224022402241 spin_lock_irqsave(&ohci->lock, flags);2241224222432243+ /*22442244+ * If there is not an already pending config_rom update,22452245+ * push our new allocation into the ohci->next_config_rom22462246+ * and then mark the local variable as null so that we22472247+ * won't deallocate the new buffer.22482248+ *22492249+ * OTOH, if there is a pending config_rom update, just22502250+ * use that buffer with the new config_rom data, and22512251+ * let this routine free the unused DMA allocation.22522252+ */22532253+22422254 if (ohci->next_config_rom == NULL) {22432255 ohci->next_config_rom = next_config_rom;22442256 ohci->next_config_rom_bus = next_config_rom_bus;22452245-22462246- copy_config_rom(ohci->next_config_rom, config_rom, length);22472247-22482248- ohci->next_header = config_rom[0];22492249- ohci->next_config_rom[0] = 0;22502250-22512251- reg_write(ohci, OHCI1394_ConfigROMmap,22522252- ohci->next_config_rom_bus);22532253- ret = 0;22572257+ next_config_rom = NULL;22542258 }2255225922602260+ copy_config_rom(ohci->next_config_rom, config_rom, length);22612261+22622262+ ohci->next_header = config_rom[0];22632263+ ohci->next_config_rom[0] = 0;22642264+22652265+ reg_write(ohci, OHCI1394_ConfigROMmap, ohci->next_config_rom_bus);22662266+22562267 spin_unlock_irqrestore(&ohci->lock, flags);22682268+22692269+ /* If we didn't use the DMA allocation, delete it. */22702270+ if (next_config_rom != NULL)22712271+ dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,22722272+ next_config_rom, next_config_rom_bus);2257227322582274 /*22592275 * Now initiate a bus reset to have the changes take···22772263 * controller could need to access it before the bus reset22782264 * takes effect.22792265 */22802280- if (ret == 0)22812281- fw_schedule_bus_reset(&ohci->card, true, true);22822282- else22832283- dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,22842284- next_config_rom, next_config_rom_bus);2285226622862286- return ret;22672267+ fw_schedule_bus_reset(&ohci->card, true, true);22682268+22692269+ return 0;22872270}2288227122892272static void ohci_send_request(struct fw_card *card, struct fw_packet *packet)
···234234 return -EINVAL;235235 }236236 break;237237+ case RADEON_INFO_FUSION_GART_WORKING:238238+ value = 1;239239+ break;237240 default:238241 DRM_DEBUG_KMS("Invalid request %d\n", info->request);239242 return -EINVAL;
+64-11
drivers/input/touchscreen/wm831x-ts.c
···6868 unsigned int pd_irq;6969 bool pressure;7070 bool pen_down;7171+ struct work_struct pd_data_work;7172};7373+7474+static void wm831x_pd_data_work(struct work_struct *work)7575+{7676+ struct wm831x_ts *wm831x_ts =7777+ container_of(work, struct wm831x_ts, pd_data_work);7878+7979+ if (wm831x_ts->pen_down) {8080+ enable_irq(wm831x_ts->data_irq);8181+ dev_dbg(wm831x_ts->wm831x->dev, "IRQ PD->DATA done\n");8282+ } else {8383+ enable_irq(wm831x_ts->pd_irq);8484+ dev_dbg(wm831x_ts->wm831x->dev, "IRQ DATA->PD done\n");8585+ }8686+}72877388static irqreturn_t wm831x_ts_data_irq(int irq, void *irq_data)7489{···125110 }126111127112 if (!wm831x_ts->pen_down) {113113+ /* Switch from data to pen down */114114+ dev_dbg(wm831x->dev, "IRQ DATA->PD\n");115115+128116 disable_irq_nosync(wm831x_ts->data_irq);129117130118 /* Don't need data any more */···146128 ABS_PRESSURE, 0);147129148130 input_report_key(wm831x_ts->input_dev, BTN_TOUCH, 0);131131+132132+ schedule_work(&wm831x_ts->pd_data_work);133133+ } else {134134+ input_report_key(wm831x_ts->input_dev, BTN_TOUCH, 1);149135 }150136151137 input_sync(wm831x_ts->input_dev);···163141 struct wm831x *wm831x = wm831x_ts->wm831x;164142 int ena = 0;165143144144+ if (wm831x_ts->pen_down)145145+ return IRQ_HANDLED;146146+147147+ disable_irq_nosync(wm831x_ts->pd_irq);148148+166149 /* Start collecting data */167150 if (wm831x_ts->pressure)168151 ena |= WM831X_TCH_Z_ENA;···176149 WM831X_TCH_X_ENA | WM831X_TCH_Y_ENA | WM831X_TCH_Z_ENA,177150 WM831X_TCH_X_ENA | WM831X_TCH_Y_ENA | ena);178151179179- input_report_key(wm831x_ts->input_dev, BTN_TOUCH, 1);180180- input_sync(wm831x_ts->input_dev);181181-182152 wm831x_set_bits(wm831x, WM831X_INTERRUPT_STATUS_1,183153 WM831X_TCHPD_EINT, WM831X_TCHPD_EINT);184154185155 wm831x_ts->pen_down = true;186186- enable_irq(wm831x_ts->data_irq);156156+157157+ /* Switch from pen down to data */158158+ dev_dbg(wm831x->dev, "IRQ PD->DATA\n");159159+ schedule_work(&wm831x_ts->pd_data_work);187160188161 return IRQ_HANDLED;189162}···209182 struct wm831x_ts *wm831x_ts = input_get_drvdata(idev);210183 struct wm831x *wm831x = wm831x_ts->wm831x;211184185185+ /* Shut the controller down, disabling all other functionality too */212186 wm831x_set_bits(wm831x, WM831X_TOUCH_CONTROL_1,213213- WM831X_TCH_ENA | WM831X_TCH_CVT_ENA |214214- WM831X_TCH_X_ENA | WM831X_TCH_Y_ENA |215215- WM831X_TCH_Z_ENA, 0);187187+ WM831X_TCH_ENA | WM831X_TCH_X_ENA |188188+ WM831X_TCH_Y_ENA | WM831X_TCH_Z_ENA, 0);216189217217- if (wm831x_ts->pen_down)190190+ /* Make sure any pending IRQs are done, the above will prevent191191+ * new ones firing.192192+ */193193+ synchronize_irq(wm831x_ts->data_irq);194194+ synchronize_irq(wm831x_ts->pd_irq);195195+196196+ /* Make sure the IRQ completion work is quiesced */197197+ flush_work_sync(&wm831x_ts->pd_data_work);198198+199199+ /* If we ended up with the pen down then make sure we revert back200200+ * to pen detection state for the next time we start up.201201+ */202202+ if (wm831x_ts->pen_down) {218203 disable_irq(wm831x_ts->data_irq);204204+ enable_irq(wm831x_ts->pd_irq);205205+ wm831x_ts->pen_down = false;206206+ }219207}220208221209static __devinit int wm831x_ts_probe(struct platform_device *pdev)···240198 struct wm831x_pdata *core_pdata = dev_get_platdata(pdev->dev.parent);241199 struct wm831x_touch_pdata *pdata = NULL;242200 struct input_dev *input_dev;243243- int error;201201+ int error, irqf;244202245203 if (core_pdata)246204 pdata = core_pdata->touch;···254212255213 wm831x_ts->wm831x = wm831x;256214 wm831x_ts->input_dev = input_dev;215215+ INIT_WORK(&wm831x_ts->pd_data_work, wm831x_pd_data_work);257216258217 /*259218 * If we have a direct IRQ use it, otherwise use the interrupt···313270 wm831x_set_bits(wm831x, WM831X_TOUCH_CONTROL_1,314271 WM831X_TCH_RATE_MASK, 6);315272273273+ if (pdata && pdata->data_irqf)274274+ irqf = pdata->data_irqf;275275+ else276276+ irqf = IRQF_TRIGGER_HIGH;277277+316278 error = request_threaded_irq(wm831x_ts->data_irq,317279 NULL, wm831x_ts_data_irq,318318- IRQF_ONESHOT,280280+ irqf | IRQF_ONESHOT,319281 "Touchscreen data", wm831x_ts);320282 if (error) {321283 dev_err(&pdev->dev, "Failed to request data IRQ %d: %d\n",···329281 }330282 disable_irq(wm831x_ts->data_irq);331283284284+ if (pdata && pdata->pd_irqf)285285+ irqf = pdata->pd_irqf;286286+ else287287+ irqf = IRQF_TRIGGER_HIGH;288288+332289 error = request_threaded_irq(wm831x_ts->pd_irq,333290 NULL, wm831x_ts_pen_down_irq,334334- IRQF_ONESHOT,291291+ irqf | IRQF_ONESHOT,335292 "Touchscreen pen down", wm831x_ts);336293 if (error) {337294 dev_err(&pdev->dev, "Failed to request pen down IRQ %d: %d\n",
+2
drivers/media/dvb/dvb-usb/Kconfig
···356356 select DVB_TDA826X if !DVB_FE_CUSTOMISE357357 select DVB_STV0288 if !DVB_FE_CUSTOMISE358358 select DVB_IX2505V if !DVB_FE_CUSTOMISE359359+ select DVB_STV0299 if !DVB_FE_CUSTOMISE360360+ select DVB_PLL if !DVB_FE_CUSTOMISE359361 help360362 Say Y here to support the LME DM04/QQBOX DVB-S USB2.0 .361363
···376376 v4l_info(client, "chip found @ 0x%02x (%s)\n",377377 client->addr << 1, client->adapter->name);378378379379- state = kmalloc(sizeof(struct saa7706h_state), GFP_KERNEL);379379+ state = kzalloc(sizeof(struct saa7706h_state), GFP_KERNEL);380380 if (state == NULL)381381 return -ENOMEM;382382 sd = &state->sd;
+1-1
drivers/media/radio/tef6862.c
···176176 v4l_info(client, "chip found @ 0x%02x (%s)\n",177177 client->addr << 1, client->adapter->name);178178179179- state = kmalloc(sizeof(struct tef6862_state), GFP_KERNEL);179179+ state = kzalloc(sizeof(struct tef6862_state), GFP_KERNEL);180180 if (state == NULL)181181 return -ENOMEM;182182 state->freq = TEF6862_LO_FREQ;
+27-4
drivers/media/rc/imon.c
···4646#define MOD_AUTHOR "Jarod Wilson <jarod@wilsonet.com>"4747#define MOD_DESC "Driver for SoundGraph iMON MultiMedia IR/Display"4848#define MOD_NAME "imon"4949-#define MOD_VERSION "0.9.2"4949+#define MOD_VERSION "0.9.3"50505151#define DISPLAY_MINOR_BASE 1445252#define DEVICE_NAME "lcd%d"···460460}461461462462/**463463- * Sends a packet to the device -- this function must be called464464- * with ictx->lock held.463463+ * Sends a packet to the device -- this function must be called with464464+ * ictx->lock held, or its unlock/lock sequence while waiting for tx465465+ * to complete can/will lead to a deadlock.465466 */466467static int send_packet(struct imon_context *ictx)467468{···992991 * the iMON remotes, and those used by the Windows MCE remotes (which is993992 * really just RC-6), but only one or the other at a time, as the signals994993 * are decoded onboard the receiver.994994+ *995995+ * This function gets called two different ways, one way is from996996+ * rc_register_device, for initial protocol selection/setup, and the other is997997+ * via a userspace-initiated protocol change request, either by direct sysfs998998+ * prodding or by something like ir-keytable. In the rc_register_device case,999999+ * the imon context lock is already held, but when initiated from userspace,10001000+ * it is not, so we must acquire it prior to calling send_packet, which10011001+ * requires that the lock is held.9951002 */9961003static int imon_ir_change_protocol(struct rc_dev *rc, u64 rc_type)9971004{9981005 int retval;9991006 struct imon_context *ictx = rc->priv;10001007 struct device *dev = ictx->dev;10081008+ bool unlock = false;10011009 unsigned char ir_proto_packet[] = {10021010 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 };10031011···1039102910401030 memcpy(ictx->usb_tx_buf, &ir_proto_packet, sizeof(ir_proto_packet));1041103110321032+ if (!mutex_is_locked(&ictx->lock)) {10331033+ unlock = true;10341034+ mutex_lock(&ictx->lock);10351035+ }10361036+10421037 retval = send_packet(ictx);10431038 if (retval)10441039 goto out;···10521037 ictx->pad_mouse = false;1053103810541039out:10401040+ if (unlock)10411041+ mutex_unlock(&ictx->lock);10421042+10551043 return retval;10561044}10571045···21522134 goto rdev_setup_failed;21532135 }2154213621372137+ mutex_unlock(&ictx->lock);21552138 return ictx;2156213921572140rdev_setup_failed:···22242205 goto urb_submit_failed;22252206 }2226220722082208+ mutex_unlock(&ictx->lock);22272209 return ictx;2228221022292211urb_submit_failed:···23192299 usb_set_intfdata(interface, ictx);2320230023212301 if (ifnum == 0) {23022302+ mutex_lock(&ictx->lock);23032303+23222304 if (product == 0xffdc && ictx->rf_device) {23232305 sysfs_err = sysfs_create_group(&interface->dev.kobj,23242306 &imon_rf_attr_group);···2331230923322310 if (ictx->display_supported)23332311 imon_init_display(ictx, interface);23122312+23132313+ mutex_unlock(&ictx->lock);23342314 }2335231523362316 dev_info(dev, "iMON device (%04x:%04x, intf%d) on "23372317 "usb<%d:%d> initialized\n", vendor, product, ifnum,23382318 usbdev->bus->busnum, usbdev->devnum);2339231923402340- mutex_unlock(&ictx->lock);23412320 mutex_unlock(&driver_lock);2342232123432322 return 0;
···832832 return IRQ_HANDLED;833833 }834834835835- if (end_command)835835+ if (end_command && host->cmd)836836 mmc_omap_cmd_done(host, host->cmd);837837 if (host->data != NULL) {838838 if (transfer_error)
+1
drivers/mmc/host/sdhci-pci.c
···957957 host->ioaddr = pci_ioremap_bar(pdev, bar);958958 if (!host->ioaddr) {959959 dev_err(&pdev->dev, "failed to remap registers\n");960960+ ret = -ENOMEM;960961 goto release;961962 }962963
+8-1
drivers/mmc/host/sdhci.c
···1334133413351335 host = (struct sdhci_host*)param;1336133613371337+ /*13381338+ * If this tasklet gets rescheduled while running, it will13391339+ * be run again afterwards but without any active request.13401340+ */13411341+ if (!host->mrq)13421342+ return;13431343+13371344 spin_lock_irqsave(&host->lock, flags);1338134513391346 del_timer(&host->timer);···13521345 * upon error conditions.13531346 */13541347 if (!(host->flags & SDHCI_DEVICE_DEAD) &&13551355- (mrq->cmd->error ||13481348+ ((mrq->cmd && mrq->cmd->error) ||13561349 (mrq->data && (mrq->data->error ||13571350 (mrq->data->stop && mrq->data->stop->error))) ||13581351 (host->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST))) {
+5-5
drivers/mmc/host/tmio_mmc_pio.c
···728728 tmio_mmc_set_clock(host, ios->clock);729729730730 /* Power sequence - OFF -> UP -> ON */731731- if (ios->power_mode == MMC_POWER_OFF || !ios->clock) {731731+ if (ios->power_mode == MMC_POWER_UP) {732732+ /* power up SD bus */733733+ if (host->set_pwr)734734+ host->set_pwr(host->pdev, 1);735735+ } else if (ios->power_mode == MMC_POWER_OFF || !ios->clock) {732736 /* power down SD bus */733737 if (ios->power_mode == MMC_POWER_OFF && host->set_pwr)734738 host->set_pwr(host->pdev, 0);735739 tmio_mmc_clk_stop(host);736736- } else if (ios->power_mode == MMC_POWER_UP) {737737- /* power up SD bus */738738- if (host->set_pwr)739739- host->set_pwr(host->pdev, 1);740740 } else {741741 /* start bus clock */742742 tmio_mmc_clk_start(host);
···777777 if (t1 != t2)778778 xhci_writel(xhci, t2, port_array[port_index]);779779780780- if (DEV_HIGHSPEED(t1)) {780780+ if (hcd->speed != HCD_USB3) {781781 /* enable remote wake up for USB 2.0 */782782 u32 __iomem *addr;783783 u32 tmp;···866866 temp |= PORT_LINK_STROBE | XDEV_U0;867867 xhci_writel(xhci, temp, port_array[port_index]);868868 }869869+ /* wait for the port to enter U0 and report port link870870+ * state change.871871+ */872872+ spin_unlock_irqrestore(&xhci->lock, flags);873873+ msleep(20);874874+ spin_lock_irqsave(&xhci->lock, flags);875875+876876+ /* Clear PLC */877877+ temp = xhci_readl(xhci, port_array[port_index]);878878+ if (temp & PORT_PLC) {879879+ temp = xhci_port_state_to_neutral(temp);880880+ temp |= PORT_PLC;881881+ xhci_writel(xhci, temp, port_array[port_index]);882882+ }883883+869884 slot_id = xhci_find_slot_id_by_port(hcd,870885 xhci, port_index + 1);871886 if (slot_id)···888873 } else889874 xhci_writel(xhci, temp, port_array[port_index]);890875891891- if (DEV_HIGHSPEED(temp)) {876876+ if (hcd->speed != HCD_USB3) {892877 /* disable remote wake up for USB 2.0 */893878 u32 __iomem *addr;894879 u32 tmp;
+2-4
drivers/usb/musb/musb_gadget.c
···18871887 otg_set_vbus(musb->xceiv, 1);1888188818891889 hcd->self.uses_pio_for_control = 1;18901890-18911891- if (musb->xceiv->last_event == USB_EVENT_NONE)18921892- pm_runtime_put(musb->controller);18931893-18941890 }18911891+ if (musb->xceiv->last_event == USB_EVENT_NONE)18921892+ pm_runtime_put(musb->controller);1895189318961894 return 0;18971895
+1-1
drivers/usb/musb/omap2430.c
···270270 DBG(4, "VBUS Disconnect\n");271271272272#ifdef CONFIG_USB_GADGET_MUSB_HDRC273273- if (is_otg_enabled(musb))273273+ if (is_otg_enabled(musb) || is_peripheral_enabled(musb))274274 if (musb->gadget_driver)275275#endif276276 {
···13311331}1332133213331333/*13341334- * Mark caps dirty. If inode is newly dirty, add to the global dirty13351335- * list.13341334+ * Mark caps dirty. If inode is newly dirty, return the dirty flags.13351335+ * Caller is then responsible for calling __mark_inode_dirty with the13361336+ * returned flags value.13361337 */13371337-void __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask)13381338+int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask)13381339{13391340 struct ceph_mds_client *mdsc =13401341 ceph_sb_to_client(ci->vfs_inode.i_sb)->mdsc;···13581357 list_add(&ci->i_dirty_item, &mdsc->cap_dirty);13591358 spin_unlock(&mdsc->cap_dirty_lock);13601359 if (ci->i_flushing_caps == 0) {13611361- igrab(inode);13601360+ ihold(inode);13621361 dirty |= I_DIRTY_SYNC;13631362 }13641363 }···13661365 if (((was | ci->i_flushing_caps) & CEPH_CAP_FILE_BUFFER) &&13671366 (mask & CEPH_CAP_FILE_BUFFER))13681367 dirty |= I_DIRTY_DATASYNC;13691369- if (dirty)13701370- __mark_inode_dirty(inode, dirty);13711368 __cap_delay_requeue(mdsc, ci);13691369+ return dirty;13721370}1373137113741372/*···19911991 ci->i_wr_ref++;19921992 if (got & CEPH_CAP_FILE_BUFFER) {19931993 if (ci->i_wrbuffer_ref == 0)19941994- igrab(&ci->vfs_inode);19941994+ ihold(&ci->vfs_inode);19951995 ci->i_wrbuffer_ref++;19961996 dout("__take_cap_refs %p wrbuffer %d -> %d (?)\n",19971997 &ci->vfs_inode, ci->i_wrbuffer_ref-1, ci->i_wrbuffer_ref);
+4-1
fs/ceph/file.c
···734734 }735735 }736736 if (ret >= 0) {737737+ int dirty;737738 spin_lock(&inode->i_lock);738738- __ceph_mark_dirty_caps(ci, CEPH_CAP_FILE_WR);739739+ dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_FILE_WR);739740 spin_unlock(&inode->i_lock);741741+ if (dirty)742742+ __mark_inode_dirty(inode, dirty);740743 }741744742745out:
+5-1
fs/ceph/inode.c
···15671567 int release = 0, dirtied = 0;15681568 int mask = 0;15691569 int err = 0;15701570+ int inode_dirty_flags = 0;1570157115711572 if (ceph_snap(inode) != CEPH_NOSNAP)15721573 return -EROFS;···17261725 dout("setattr %p ATTR_FILE ... hrm!\n", inode);1727172617281727 if (dirtied) {17291729- __ceph_mark_dirty_caps(ci, dirtied);17281728+ inode_dirty_flags = __ceph_mark_dirty_caps(ci, dirtied);17301729 inode->i_ctime = CURRENT_TIME;17311730 }1732173117331732 release &= issued;17341733 spin_unlock(&inode->i_lock);17341734+17351735+ if (inode_dirty_flags)17361736+ __mark_inode_dirty(inode, inode_dirty_flags);1735173717361738 if (mask) {17371739 req->r_inode = igrab(inode);
+1-1
fs/ceph/super.h
···506506{507507 return ci->i_dirty_caps | ci->i_flushing_caps;508508}509509-extern void __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask);509509+extern int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask);510510511511extern int ceph_caps_revoking(struct ceph_inode_info *ci, int mask);512512extern int __ceph_caps_used(struct ceph_inode_info *ci);
+8-4
fs/ceph/xattr.c
···703703 struct ceph_inode_xattr *xattr = NULL;704704 int issued;705705 int required_blob_size;706706+ int dirty;706707707708 if (ceph_snap(inode) != CEPH_NOSNAP)708709 return -EROFS;···764763 dout("setxattr %p issued %s\n", inode, ceph_cap_string(issued));765764 err = __set_xattr(ci, newname, name_len, newval,766765 val_len, 1, 1, 1, &xattr);767767- __ceph_mark_dirty_caps(ci, CEPH_CAP_XATTR_EXCL);766766+ dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_XATTR_EXCL);768767 ci->i_xattrs.dirty = true;769768 inode->i_ctime = CURRENT_TIME;770769 spin_unlock(&inode->i_lock);771771-770770+ if (dirty)771771+ __mark_inode_dirty(inode, dirty);772772 return err;773773774774do_sync:···812810 struct ceph_vxattr_cb *vxattrs = ceph_inode_vxattrs(inode);813811 int issued;814812 int err;813813+ int dirty;815814816815 if (ceph_snap(inode) != CEPH_NOSNAP)817816 return -EROFS;···836833 goto do_sync;837834838835 err = __remove_xattr_by_name(ceph_inode(inode), name);839839- __ceph_mark_dirty_caps(ci, CEPH_CAP_XATTR_EXCL);836836+ dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_XATTR_EXCL);840837 ci->i_xattrs.dirty = true;841838 inode->i_ctime = CURRENT_TIME;842839843840 spin_unlock(&inode->i_lock);844844-841841+ if (dirty)842842+ __mark_inode_dirty(inode, dirty);845843 return err;846844do_sync:847845 spin_unlock(&inode->i_lock);
+4-4
fs/logfs/super.c
···480480 !read_only)481481 return -EIO;482482483483- mutex_init(&super->s_dirop_mutex);484484- mutex_init(&super->s_object_alias_mutex);485485- INIT_LIST_HEAD(&super->s_freeing_list);486486-487483 ret = logfs_init_rw(sb);488484 if (ret)489485 return ret;···596600 super = kzalloc(sizeof(*super), GFP_KERNEL);597601 if (!super)598602 return ERR_PTR(-ENOMEM);603603+604604+ mutex_init(&super->s_dirop_mutex);605605+ mutex_init(&super->s_object_alias_mutex);606606+ INIT_LIST_HEAD(&super->s_freeing_list);599607600608 if (!devname)601609 err = logfs_get_sb_bdev(super, type, devname);
···910910#define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */911911#define RADEON_INFO_NUM_BACKENDS 0x0a /* DB/backends for r600+ - need for OQ */912912#define RADEON_INFO_NUM_TILE_PIPES 0x0b /* tile pipes for r600+ */913913+#define RADEON_INFO_FUSION_GART_WORKING 0x0c /* fusion writes to GTT were broken before this */913914914915struct drm_radeon_info {915916 uint32_t request;
+1-1
include/linux/flex_array.h
···6161struct flex_array *flex_array_alloc(int element_size, unsigned int total,6262 gfp_t flags);6363int flex_array_prealloc(struct flex_array *fa, unsigned int start,6464- unsigned int end, gfp_t flags);6464+ unsigned int nr_elements, gfp_t flags);6565void flex_array_free(struct flex_array *fa);6666void flex_array_free_parts(struct flex_array *fa);6767int flex_array_put(struct flex_array *fa, unsigned int element_nr, void *src,
+2
include/linux/mfd/wm831x/pdata.h
···8181 int rpu; /** Pen down sensitivity resistor divider */8282 int pressure; /** Report pressure (boolean) */8383 unsigned int data_irq; /** Touch data ready IRQ */8484+ int data_irqf; /** IRQ flags for data ready IRQ */8485 unsigned int pd_irq; /** Touch pendown detect IRQ */8686+ int pd_irqf; /** IRQ flags for pen down IRQ */8587};86888789enum wm831x_watchdog_action {
-1
include/linux/mmc/host.h
···183183 struct work_struct clk_gate_work; /* delayed clock gate */184184 unsigned int clk_old; /* old clock value cache */185185 spinlock_t clk_lock; /* lock for clk fields */186186- struct mutex clk_gate_mutex; /* mutex for clock gating */187186#endif188187189188 /* host specific block data */
···232232233233/**234234 * flex_array_prealloc - guarantee that array space exists235235- * @fa: the flex array for which to preallocate parts236236- * @start: index of first array element for which space is allocated237237- * @end: index of last (inclusive) element for which space is allocated238238- * @flags: page allocation flags235235+ * @fa: the flex array for which to preallocate parts236236+ * @start: index of first array element for which space is allocated237237+ * @nr_elements: number of elements for which space is allocated238238+ * @flags: page allocation flags239239 *240240 * This will guarantee that no future calls to flex_array_put()241241 * will allocate memory. It can be used if you are expecting to···245245 * Locking must be provided by the caller.246246 */247247int flex_array_prealloc(struct flex_array *fa, unsigned int start,248248- unsigned int end, gfp_t flags)248248+ unsigned int nr_elements, gfp_t flags)249249{250250 int start_part;251251 int end_part;252252 int part_nr;253253+ unsigned int end;253254 struct flex_array_part *part;254255255255- if (start >= fa->total_nr_elements || end >= fa->total_nr_elements)256256+ if (!start && !nr_elements)257257+ return 0;258258+ if (start >= fa->total_nr_elements)259259+ return -ENOSPC;260260+ if (!nr_elements)261261+ return 0;262262+263263+ end = start + nr_elements - 1;264264+265265+ if (end >= fa->total_nr_elements)256266 return -ENOSPC;257267 if (elements_fit_in_base(fa))258268 return 0;···353343 int part_nr;354344 int ret = 0;355345346346+ if (!fa->total_nr_elements)347347+ return 0;356348 if (elements_fit_in_base(fa))357349 return ret;358350 for (part_nr = 0; part_nr < FLEX_ARRAY_NR_BASE_PTRS; part_nr++) {
+3-4
mm/memory.c
···13591359 */13601360 mark_page_accessed(page);13611361 }13621362- if (flags & FOLL_MLOCK) {13621362+ if ((flags & FOLL_MLOCK) && (vma->vm_flags & VM_LOCKED)) {13631363 /*13641364 * The preliminary mapping check is mainly to avoid the13651365 * pointless overhead of lock_page on the ZERO_PAGE···15521552 }1553155315541554 /*15551555- * If we don't actually want the page itself,15561556- * and it's the stack guard page, just skip it.15551555+ * For mlock, just skip the stack guard page.15571556 */15581558- if (!pages && stack_guard_page(vma, start))15571557+ if ((gup_flags & FOLL_MLOCK) && stack_guard_page(vma, start))15591558 goto next_page;1560155915611560 do {
+1-4
mm/mlock.c
···162162 VM_BUG_ON(end > vma->vm_end);163163 VM_BUG_ON(!rwsem_is_locked(&mm->mmap_sem));164164165165- gup_flags = FOLL_TOUCH;165165+ gup_flags = FOLL_TOUCH | FOLL_MLOCK;166166 /*167167 * We want to touch writable mappings with a write fault in order168168 * to break COW, except for shared mappings because these don't COW···177177 */178178 if (vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC))179179 gup_flags |= FOLL_FORCE;180180-181181- if (vma->vm_flags & VM_LOCKED)182182- gup_flags |= FOLL_MLOCK;183180184181 return __get_user_pages(current, mm, addr, nr_pages, gup_flags,185182 NULL, NULL, nonblocking);
+2-2
mm/slub.c
···19401940 * Since this is without lock semantics the protection is only against19411941 * code executing on this cpu *not* from access by other cpus.19421942 */19431943- if (unlikely(!this_cpu_cmpxchg_double(19431943+ if (unlikely(!irqsafe_cpu_cmpxchg_double(19441944 s->cpu_slab->freelist, s->cpu_slab->tid,19451945 object, tid,19461946 get_freepointer(s, object), next_tid(tid)))) {···21452145 set_freepointer(s, object, c->freelist);2146214621472147#ifdef CONFIG_CMPXCHG_LOCAL21482148- if (unlikely(!this_cpu_cmpxchg_double(21482148+ if (unlikely(!irqsafe_cpu_cmpxchg_double(21492149 s->cpu_slab->freelist, s->cpu_slab->tid,21502150 c->freelist, tid,21512151 object, next_tid(tid)))) {