···468468 - set the power.irq_safe flag for the device, causing the runtime-PM469469 callbacks to be invoked with interrupts off470470471471+ bool pm_runtime_is_irq_safe(struct device *dev);472472+ - return true if power.irq_safe flag was set for the device, causing473473+ the runtime-PM callbacks to be invoked with interrupts off474474+471475 void pm_runtime_mark_last_busy(struct device *dev);472476 - set the power.last_busy field to the current time473477
···282282 }283283284284 if (i == 8)285285- printk(KERN_ERR "Danger Will Robinson: failed to "286286- "re-trigger IRQ%d\n", d->irq);285285+ pr_err("Danger Will Robinson: failed to re-trigger IRQ%d\n",286286+ d->irq);287287 return i == 8 ? -1 : 0;288288}289289···384384 }385385386386 if (i == 8)387387- printk(KERN_ERR "Danger Will Robinson: failed to "388388- "re-trigger IRQ%d\n", d->irq);387387+ pr_err("Danger Will Robinson: failed to re-trigger IRQ%d\n",388388+ d->irq);389389 return i == 8 ? -1 : 0;390390}391391···740740 goto err_unmap;741741 }742742743743- printk(KERN_INFO "SA1111 Microprocessor Companion Chip: "744744- "silicon revision %lx, metal revision %lx\n",745745- (id & SKID_SIREV_MASK)>>4, (id & SKID_MTREV_MASK));743743+ pr_info("SA1111 Microprocessor Companion Chip: silicon revision %lx, metal revision %lx\n",744744+ (id & SKID_SIREV_MASK) >> 4, id & SKID_MTREV_MASK);746745747746 /*748747 * We found it. Wake the chip up, and initialise.
+1
arch/arm/include/asm/hw_irq.h
···88{99 extern unsigned long irq_err_count;1010 irq_err_count++;1111+ pr_crit("unexpected IRQ trap at vector %02x\n", irq);1112}12131314void set_irq_flags(unsigned int irq, unsigned int flags);
+17
arch/arm/include/asm/mcpm.h
···219219bool __mcpm_outbound_enter_critical(unsigned int this_cpu, unsigned int cluster);220220int __mcpm_cluster_state(unsigned int cluster);221221222222+/**223223+ * mcpm_sync_init - Initialize the cluster synchronization support224224+ *225225+ * @power_up_setup: platform specific function invoked during very226226+ * early CPU/cluster bringup stage.227227+ *228228+ * This prepares memory used by vlocks and the MCPM state machine used229229+ * across CPUs that may have their caches active or inactive. Must be230230+ * called only after a successful call to mcpm_platform_register().231231+ *232232+ * The power_up_setup argument is a pointer to assembly code called when233233+ * the MMU and caches are still disabled during boot and no stack space is234234+ * available. The affinity level passed to that code corresponds to the235235+ * resource that needs to be initialized (e.g. 1 for cluster level, 0 for236236+ * CPU level). Proper exclusion mechanisms are already activated at that237237+ * point.238238+ */222239int __init mcpm_sync_init(223240 void (*power_up_setup)(unsigned int affinity_level));224241
+2-2
arch/arm/include/asm/percpu.h
···3030static inline unsigned long __my_cpu_offset(void)3131{3232 unsigned long off;3333- register unsigned long *sp asm ("sp");34333534 /*3635 * Read TPIDRPRW.3736 * We want to allow caching the value, so avoid using volatile and3837 * instead use a fake stack read to hazard against barrier().3938 */4040- asm("mrc p15, 0, %0, c13, c0, 4" : "=r" (off) : "Q" (*sp));3939+ asm("mrc p15, 0, %0, c13, c0, 4" : "=r" (off)4040+ : "Q" (*(const unsigned long *)current_stack_pointer));41414242 return off;4343}
···9090#define init_stack (init_thread_union.stack)91919292/*9393+ * how to get the current stack pointer in C9494+ */9595+register unsigned long current_stack_pointer asm ("sp");9696+9797+/*9398 * how to get the thread information struct from C9499 */95100static inline struct thread_info *current_thread_info(void) __attribute_const__;9610197102static inline struct thread_info *current_thread_info(void)98103{9999- register unsigned long sp asm ("sp");100100- return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));104104+ return (struct thread_info *)105105+ (current_stack_pointer & ~(THREAD_SIZE - 1));101106}102107103108#define thread_saved_pc(tsk) \
···9797 struct tag *tag = taglist;98989999 if (params->u1.s.page_size != PAGE_SIZE) {100100- printk(KERN_WARNING "Warning: bad configuration page, "101101- "trying to continue\n");100100+ pr_warn("Warning: bad configuration page, trying to continue\n");102101 return;103102 }104103···108109 params->u1.s.nr_pages != 0x04000 &&109110 params->u1.s.nr_pages != 0x08000 &&110111 params->u1.s.nr_pages != 0x10000) {111111- printk(KERN_WARNING "Warning: bad NeTTrom parameters "112112- "detected, using defaults\n");112112+ pr_warn("Warning: bad NeTTrom parameters detected, using defaults\n");113113114114 params->u1.s.nr_pages = 0x1000; /* 16MB */115115 params->u1.s.ramdisk_size = 0;
+2-3
arch/arm/kernel/atags_parse.c
···167167{168168 for (; t->hdr.size; t = tag_next(t))169169 if (!parse_tag(t))170170- printk(KERN_WARNING171171- "Ignoring unrecognised tag 0x%08x\n",170170+ pr_warn("Ignoring unrecognised tag 0x%08x\n",172171 t->hdr.tag);173172}174173···192193 */193194 for_each_machine_desc(p)194195 if (machine_nr == p->nr) {195195- printk("Machine: %s\n", p->name);196196+ pr_info("Machine: %s\n", p->name);196197 mdesc = p;197198 break;198199 }
+2-2
arch/arm/kernel/atags_proc.c
···4141 size_t size;42424343 if (tag->hdr.tag != ATAG_CORE) {4444- printk(KERN_INFO "No ATAGs?");4444+ pr_info("No ATAGs?");4545 return -EINVAL;4646 }4747···68686969nomem:7070 kfree(b);7171- printk(KERN_ERR "Exporting ATAGs: not enough memory\n");7171+ pr_err("Exporting ATAGs: not enough memory\n");72727373 return -ENOMEM;7474}
+1-1
arch/arm/kernel/bios32.c
···355355 /*356356 * Report what we did for this bus357357 */358358- printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n",358358+ pr_info("PCI: bus%d: Fast back to back transfers %sabled\n",359359 bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis");360360}361361EXPORT_SYMBOL(pcibios_fixup_bus);
+2-2
arch/arm/kernel/dma-isa.c
···213213 for (chan = 0; chan < 8; chan++) {214214 int ret = isa_dma_add(chan, &isa_dma[chan]);215215 if (ret)216216- printk(KERN_ERR "ISADMA%u: unable to register: %d\n",217217- chan, ret);216216+ pr_err("ISADMA%u: unable to register: %d\n",217217+ chan, ret);218218 }219219220220 request_dma(DMA_ISA_CASCADE, "cascade");
+11-15
arch/arm/kernel/dma.c
···7979 return ret;80808181bad_dma:8282- printk(KERN_ERR "dma: trying to allocate DMA%d\n", chan);8282+ pr_err("dma: trying to allocate DMA%d\n", chan);8383 return -EINVAL;84848585busy:···100100 goto bad_dma;101101102102 if (dma->active) {103103- printk(KERN_ERR "dma%d: freeing active DMA\n", chan);103103+ pr_err("dma%d: freeing active DMA\n", chan);104104 dma->d_ops->disable(chan, dma);105105 dma->active = 0;106106 }···111111 return;112112 }113113114114- printk(KERN_ERR "dma%d: trying to free free DMA\n", chan);114114+ pr_err("dma%d: trying to free free DMA\n", chan);115115 return;116116117117bad_dma:118118- printk(KERN_ERR "dma: trying to free DMA%d\n", chan);118118+ pr_err("dma: trying to free DMA%d\n", chan);119119}120120EXPORT_SYMBOL(free_dma);121121···126126 dma_t *dma = dma_channel(chan);127127128128 if (dma->active)129129- printk(KERN_ERR "dma%d: altering DMA SG while "130130- "DMA active\n", chan);129129+ pr_err("dma%d: altering DMA SG while DMA active\n", chan);131130132131 dma->sg = sg;133132 dma->sgcount = nr_sg;···143144 dma_t *dma = dma_channel(chan);144145145146 if (dma->active)146146- printk(KERN_ERR "dma%d: altering DMA address while "147147- "DMA active\n", chan);147147+ pr_err("dma%d: altering DMA address while DMA active\n", chan);148148149149 dma->sg = NULL;150150 dma->addr = addr;···160162 dma_t *dma = dma_channel(chan);161163162164 if (dma->active)163163- printk(KERN_ERR "dma%d: altering DMA count while "164164- "DMA active\n", chan);165165+ pr_err("dma%d: altering DMA count while DMA active\n", chan);165166166167 dma->sg = NULL;167168 dma->count = count;···175178 dma_t *dma = dma_channel(chan);176179177180 if (dma->active)178178- printk(KERN_ERR "dma%d: altering DMA mode while "179179- "DMA active\n", chan);181181+ pr_err("dma%d: altering DMA mode while DMA active\n", chan);180182181183 dma->dma_mode = mode;182184 dma->invalid = 1;···198202 return;199203200204free_dma:201201- printk(KERN_ERR "dma%d: trying to enable free DMA\n", chan);205205+ pr_err("dma%d: trying to enable free DMA\n", chan);202206 BUG();203207}204208EXPORT_SYMBOL(enable_dma);···219223 return;220224221225free_dma:222222- printk(KERN_ERR "dma%d: trying to disable free DMA\n", chan);226226+ pr_err("dma%d: trying to disable free DMA\n", chan);223227 BUG();224228}225229EXPORT_SYMBOL(disable_dma);···236240237241void set_dma_page(unsigned int chan, char pagenr)238242{239239- printk(KERN_ERR "dma%d: trying to set_dma_page\n", chan);243243+ pr_err("dma%d: trying to set_dma_page\n", chan);240244}241245EXPORT_SYMBOL(set_dma_page);242246
-235
arch/arm/kernel/entry-common.S
···109109#undef CALL110110#define CALL(x) .long x111111112112-#ifdef CONFIG_FUNCTION_TRACER113113-/*114114- * When compiling with -pg, gcc inserts a call to the mcount routine at the115115- * start of every function. In mcount, apart from the function's address (in116116- * lr), we need to get hold of the function's caller's address.117117- *118118- * Older GCCs (pre-4.4) inserted a call to a routine called mcount like this:119119- *120120- * bl mcount121121- *122122- * These versions have the limitation that in order for the mcount routine to123123- * be able to determine the function's caller's address, an APCS-style frame124124- * pointer (which is set up with something like the code below) is required.125125- *126126- * mov ip, sp127127- * push {fp, ip, lr, pc}128128- * sub fp, ip, #4129129- *130130- * With EABI, these frame pointers are not available unless -mapcs-frame is131131- * specified, and if building as Thumb-2, not even then.132132- *133133- * Newer GCCs (4.4+) solve this problem by introducing a new version of mcount,134134- * with call sites like:135135- *136136- * push {lr}137137- * bl __gnu_mcount_nc138138- *139139- * With these compilers, frame pointers are not necessary.140140- *141141- * mcount can be thought of as a function called in the middle of a subroutine142142- * call. As such, it needs to be transparent for both the caller and the143143- * callee: the original lr needs to be restored when leaving mcount, and no144144- * registers should be clobbered. (In the __gnu_mcount_nc implementation, we145145- * clobber the ip register. This is OK because the ARM calling convention146146- * allows it to be clobbered in subroutines and doesn't use it to hold147147- * parameters.)148148- *149149- * When using dynamic ftrace, we patch out the mcount call by a "mov r0, r0"150150- * for the mcount case, and a "pop {lr}" for the __gnu_mcount_nc case (see151151- * arch/arm/kernel/ftrace.c).152152- */153153-154154-#ifndef CONFIG_OLD_MCOUNT155155-#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))156156-#error Ftrace requires CONFIG_FRAME_POINTER=y with GCC older than 4.4.0.157157-#endif158158-#endif159159-160160-.macro mcount_adjust_addr rd, rn161161- bic \rd, \rn, #1 @ clear the Thumb bit if present162162- sub \rd, \rd, #MCOUNT_INSN_SIZE163163-.endm164164-165165-.macro __mcount suffix166166- mcount_enter167167- ldr r0, =ftrace_trace_function168168- ldr r2, [r0]169169- adr r0, .Lftrace_stub170170- cmp r0, r2171171- bne 1f172172-173173-#ifdef CONFIG_FUNCTION_GRAPH_TRACER174174- ldr r1, =ftrace_graph_return175175- ldr r2, [r1]176176- cmp r0, r2177177- bne ftrace_graph_caller\suffix178178-179179- ldr r1, =ftrace_graph_entry180180- ldr r2, [r1]181181- ldr r0, =ftrace_graph_entry_stub182182- cmp r0, r2183183- bne ftrace_graph_caller\suffix184184-#endif185185-186186- mcount_exit187187-188188-1: mcount_get_lr r1 @ lr of instrumented func189189- mcount_adjust_addr r0, lr @ instrumented function190190- adr lr, BSYM(2f)191191- mov pc, r2192192-2: mcount_exit193193-.endm194194-195195-.macro __ftrace_caller suffix196196- mcount_enter197197-198198- mcount_get_lr r1 @ lr of instrumented func199199- mcount_adjust_addr r0, lr @ instrumented function200200-201201- .globl ftrace_call\suffix202202-ftrace_call\suffix:203203- bl ftrace_stub204204-205205-#ifdef CONFIG_FUNCTION_GRAPH_TRACER206206- .globl ftrace_graph_call\suffix207207-ftrace_graph_call\suffix:208208- mov r0, r0209209-#endif210210-211211- mcount_exit212212-.endm213213-214214-.macro __ftrace_graph_caller215215- sub r0, fp, #4 @ &lr of instrumented routine (&parent)216216-#ifdef CONFIG_DYNAMIC_FTRACE217217- @ called from __ftrace_caller, saved in mcount_enter218218- ldr r1, [sp, #16] @ instrumented routine (func)219219- mcount_adjust_addr r1, r1220220-#else221221- @ called from __mcount, untouched in lr222222- mcount_adjust_addr r1, lr @ instrumented routine (func)223223-#endif224224- mov r2, fp @ frame pointer225225- bl prepare_ftrace_return226226- mcount_exit227227-.endm228228-229229-#ifdef CONFIG_OLD_MCOUNT230230-/*231231- * mcount232232- */233233-234234-.macro mcount_enter235235- stmdb sp!, {r0-r3, lr}236236-.endm237237-238238-.macro mcount_get_lr reg239239- ldr \reg, [fp, #-4]240240-.endm241241-242242-.macro mcount_exit243243- ldr lr, [fp, #-4]244244- ldmia sp!, {r0-r3, pc}245245-.endm246246-247247-ENTRY(mcount)248248-#ifdef CONFIG_DYNAMIC_FTRACE249249- stmdb sp!, {lr}250250- ldr lr, [fp, #-4]251251- ldmia sp!, {pc}252252-#else253253- __mcount _old254254-#endif255255-ENDPROC(mcount)256256-257257-#ifdef CONFIG_DYNAMIC_FTRACE258258-ENTRY(ftrace_caller_old)259259- __ftrace_caller _old260260-ENDPROC(ftrace_caller_old)261261-#endif262262-263263-#ifdef CONFIG_FUNCTION_GRAPH_TRACER264264-ENTRY(ftrace_graph_caller_old)265265- __ftrace_graph_caller266266-ENDPROC(ftrace_graph_caller_old)267267-#endif268268-269269-.purgem mcount_enter270270-.purgem mcount_get_lr271271-.purgem mcount_exit272272-#endif273273-274274-/*275275- * __gnu_mcount_nc276276- */277277-278278-.macro mcount_enter279279-/*280280- * This pad compensates for the push {lr} at the call site. Note that we are281281- * unable to unwind through a function which does not otherwise save its lr.282282- */283283- UNWIND(.pad #4)284284- stmdb sp!, {r0-r3, lr}285285- UNWIND(.save {r0-r3, lr})286286-.endm287287-288288-.macro mcount_get_lr reg289289- ldr \reg, [sp, #20]290290-.endm291291-292292-.macro mcount_exit293293- ldmia sp!, {r0-r3, ip, lr}294294- ret ip295295-.endm296296-297297-ENTRY(__gnu_mcount_nc)298298-UNWIND(.fnstart)299299-#ifdef CONFIG_DYNAMIC_FTRACE300300- mov ip, lr301301- ldmia sp!, {lr}302302- ret ip303303-#else304304- __mcount305305-#endif306306-UNWIND(.fnend)307307-ENDPROC(__gnu_mcount_nc)308308-309309-#ifdef CONFIG_DYNAMIC_FTRACE310310-ENTRY(ftrace_caller)311311-UNWIND(.fnstart)312312- __ftrace_caller313313-UNWIND(.fnend)314314-ENDPROC(ftrace_caller)315315-#endif316316-317317-#ifdef CONFIG_FUNCTION_GRAPH_TRACER318318-ENTRY(ftrace_graph_caller)319319-UNWIND(.fnstart)320320- __ftrace_graph_caller321321-UNWIND(.fnend)322322-ENDPROC(ftrace_graph_caller)323323-#endif324324-325325-.purgem mcount_enter326326-.purgem mcount_get_lr327327-.purgem mcount_exit328328-329329-#ifdef CONFIG_FUNCTION_GRAPH_TRACER330330- .globl return_to_handler331331-return_to_handler:332332- stmdb sp!, {r0-r3}333333- mov r0, fp @ frame pointer334334- bl ftrace_return_to_handler335335- mov lr, r0 @ r0 has real ret addr336336- ldmia sp!, {r0-r3}337337- ret lr338338-#endif339339-340340-ENTRY(ftrace_stub)341341-.Lftrace_stub:342342- ret lr343343-ENDPROC(ftrace_stub)344344-345345-#endif /* CONFIG_FUNCTION_TRACER */346346-347112/*=============================================================================348113 * SWI handler349114 *-----------------------------------------------------------------------------
+243
arch/arm/kernel/entry-ftrace.S
···11+/*22+ * This program is free software; you can redistribute it and/or modify33+ * it under the terms of the GNU General Public License version 2 as44+ * published by the Free Software Foundation.55+ */66+77+#include <asm/assembler.h>88+#include <asm/ftrace.h>99+#include <asm/unwind.h>1010+1111+#include "entry-header.S"1212+1313+/*1414+ * When compiling with -pg, gcc inserts a call to the mcount routine at the1515+ * start of every function. In mcount, apart from the function's address (in1616+ * lr), we need to get hold of the function's caller's address.1717+ *1818+ * Older GCCs (pre-4.4) inserted a call to a routine called mcount like this:1919+ *2020+ * bl mcount2121+ *2222+ * These versions have the limitation that in order for the mcount routine to2323+ * be able to determine the function's caller's address, an APCS-style frame2424+ * pointer (which is set up with something like the code below) is required.2525+ *2626+ * mov ip, sp2727+ * push {fp, ip, lr, pc}2828+ * sub fp, ip, #42929+ *3030+ * With EABI, these frame pointers are not available unless -mapcs-frame is3131+ * specified, and if building as Thumb-2, not even then.3232+ *3333+ * Newer GCCs (4.4+) solve this problem by introducing a new version of mcount,3434+ * with call sites like:3535+ *3636+ * push {lr}3737+ * bl __gnu_mcount_nc3838+ *3939+ * With these compilers, frame pointers are not necessary.4040+ *4141+ * mcount can be thought of as a function called in the middle of a subroutine4242+ * call. As such, it needs to be transparent for both the caller and the4343+ * callee: the original lr needs to be restored when leaving mcount, and no4444+ * registers should be clobbered. (In the __gnu_mcount_nc implementation, we4545+ * clobber the ip register. This is OK because the ARM calling convention4646+ * allows it to be clobbered in subroutines and doesn't use it to hold4747+ * parameters.)4848+ *4949+ * When using dynamic ftrace, we patch out the mcount call by a "mov r0, r0"5050+ * for the mcount case, and a "pop {lr}" for the __gnu_mcount_nc case (see5151+ * arch/arm/kernel/ftrace.c).5252+ */5353+5454+#ifndef CONFIG_OLD_MCOUNT5555+#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))5656+#error Ftrace requires CONFIG_FRAME_POINTER=y with GCC older than 4.4.0.5757+#endif5858+#endif5959+6060+.macro mcount_adjust_addr rd, rn6161+ bic \rd, \rn, #1 @ clear the Thumb bit if present6262+ sub \rd, \rd, #MCOUNT_INSN_SIZE6363+.endm6464+6565+.macro __mcount suffix6666+ mcount_enter6767+ ldr r0, =ftrace_trace_function6868+ ldr r2, [r0]6969+ adr r0, .Lftrace_stub7070+ cmp r0, r27171+ bne 1f7272+7373+#ifdef CONFIG_FUNCTION_GRAPH_TRACER7474+ ldr r1, =ftrace_graph_return7575+ ldr r2, [r1]7676+ cmp r0, r27777+ bne ftrace_graph_caller\suffix7878+7979+ ldr r1, =ftrace_graph_entry8080+ ldr r2, [r1]8181+ ldr r0, =ftrace_graph_entry_stub8282+ cmp r0, r28383+ bne ftrace_graph_caller\suffix8484+#endif8585+8686+ mcount_exit8787+8888+1: mcount_get_lr r1 @ lr of instrumented func8989+ mcount_adjust_addr r0, lr @ instrumented function9090+ adr lr, BSYM(2f)9191+ mov pc, r29292+2: mcount_exit9393+.endm9494+9595+.macro __ftrace_caller suffix9696+ mcount_enter9797+9898+ mcount_get_lr r1 @ lr of instrumented func9999+ mcount_adjust_addr r0, lr @ instrumented function100100+101101+ .globl ftrace_call\suffix102102+ftrace_call\suffix:103103+ bl ftrace_stub104104+105105+#ifdef CONFIG_FUNCTION_GRAPH_TRACER106106+ .globl ftrace_graph_call\suffix107107+ftrace_graph_call\suffix:108108+ mov r0, r0109109+#endif110110+111111+ mcount_exit112112+.endm113113+114114+.macro __ftrace_graph_caller115115+ sub r0, fp, #4 @ &lr of instrumented routine (&parent)116116+#ifdef CONFIG_DYNAMIC_FTRACE117117+ @ called from __ftrace_caller, saved in mcount_enter118118+ ldr r1, [sp, #16] @ instrumented routine (func)119119+ mcount_adjust_addr r1, r1120120+#else121121+ @ called from __mcount, untouched in lr122122+ mcount_adjust_addr r1, lr @ instrumented routine (func)123123+#endif124124+ mov r2, fp @ frame pointer125125+ bl prepare_ftrace_return126126+ mcount_exit127127+.endm128128+129129+#ifdef CONFIG_OLD_MCOUNT130130+/*131131+ * mcount132132+ */133133+134134+.macro mcount_enter135135+ stmdb sp!, {r0-r3, lr}136136+.endm137137+138138+.macro mcount_get_lr reg139139+ ldr \reg, [fp, #-4]140140+.endm141141+142142+.macro mcount_exit143143+ ldr lr, [fp, #-4]144144+ ldmia sp!, {r0-r3, pc}145145+.endm146146+147147+ENTRY(mcount)148148+#ifdef CONFIG_DYNAMIC_FTRACE149149+ stmdb sp!, {lr}150150+ ldr lr, [fp, #-4]151151+ ldmia sp!, {pc}152152+#else153153+ __mcount _old154154+#endif155155+ENDPROC(mcount)156156+157157+#ifdef CONFIG_DYNAMIC_FTRACE158158+ENTRY(ftrace_caller_old)159159+ __ftrace_caller _old160160+ENDPROC(ftrace_caller_old)161161+#endif162162+163163+#ifdef CONFIG_FUNCTION_GRAPH_TRACER164164+ENTRY(ftrace_graph_caller_old)165165+ __ftrace_graph_caller166166+ENDPROC(ftrace_graph_caller_old)167167+#endif168168+169169+.purgem mcount_enter170170+.purgem mcount_get_lr171171+.purgem mcount_exit172172+#endif173173+174174+/*175175+ * __gnu_mcount_nc176176+ */177177+178178+.macro mcount_enter179179+/*180180+ * This pad compensates for the push {lr} at the call site. Note that we are181181+ * unable to unwind through a function which does not otherwise save its lr.182182+ */183183+ UNWIND(.pad #4)184184+ stmdb sp!, {r0-r3, lr}185185+ UNWIND(.save {r0-r3, lr})186186+.endm187187+188188+.macro mcount_get_lr reg189189+ ldr \reg, [sp, #20]190190+.endm191191+192192+.macro mcount_exit193193+ ldmia sp!, {r0-r3, ip, lr}194194+ ret ip195195+.endm196196+197197+ENTRY(__gnu_mcount_nc)198198+UNWIND(.fnstart)199199+#ifdef CONFIG_DYNAMIC_FTRACE200200+ mov ip, lr201201+ ldmia sp!, {lr}202202+ ret ip203203+#else204204+ __mcount205205+#endif206206+UNWIND(.fnend)207207+ENDPROC(__gnu_mcount_nc)208208+209209+#ifdef CONFIG_DYNAMIC_FTRACE210210+ENTRY(ftrace_caller)211211+UNWIND(.fnstart)212212+ __ftrace_caller213213+UNWIND(.fnend)214214+ENDPROC(ftrace_caller)215215+#endif216216+217217+#ifdef CONFIG_FUNCTION_GRAPH_TRACER218218+ENTRY(ftrace_graph_caller)219219+UNWIND(.fnstart)220220+ __ftrace_graph_caller221221+UNWIND(.fnend)222222+ENDPROC(ftrace_graph_caller)223223+#endif224224+225225+.purgem mcount_enter226226+.purgem mcount_get_lr227227+.purgem mcount_exit228228+229229+#ifdef CONFIG_FUNCTION_GRAPH_TRACER230230+ .globl return_to_handler231231+return_to_handler:232232+ stmdb sp!, {r0-r3}233233+ mov r0, fp @ frame pointer234234+ bl ftrace_return_to_handler235235+ mov lr, r0 @ r0 has real ret addr236236+ ldmia sp!, {r0-r3}237237+ ret lr238238+#endif239239+240240+ENTRY(ftrace_stub)241241+.Lftrace_stub:242242+ ret lr243243+ENDPROC(ftrace_stub)
+6-6
arch/arm/kernel/etm.c
···213213 int length;214214215215 if (!t->etb_regs) {216216- printk(KERN_INFO "No tracing hardware found\n");216216+ pr_info("No tracing hardware found\n");217217 return;218218 }219219···229229230230 etb_writel(t, first, ETBR_READADDR);231231232232- printk(KERN_INFO "Trace buffer contents length: %d\n", length);233233- printk(KERN_INFO "--- ETB buffer begin ---\n");232232+ pr_info("Trace buffer contents length: %d\n", length);233233+ pr_info("--- ETB buffer begin ---\n");234234 for (; length; length--)235235 printk("%08x", cpu_to_be32(etb_readl(t, ETBR_READMEM)));236236- printk(KERN_INFO "\n--- ETB buffer end ---\n");236236+ pr_info("\n--- ETB buffer end ---\n");237237238238 /* deassert the overflow bit */239239 etb_writel(t, 1, ETBR_CTRL);···633633634634 retval = amba_driver_register(&etb_driver);635635 if (retval) {636636- printk(KERN_ERR "Failed to register etb\n");636636+ pr_err("Failed to register etb\n");637637 return retval;638638 }639639640640 retval = amba_driver_register(&etm_driver);641641 if (retval) {642642 amba_driver_unregister(&etb_driver);643643- printk(KERN_ERR "Failed to probe etm\n");643643+ pr_err("Failed to probe etm\n");644644 return retval;645645 }646646
+1-1
arch/arm/kernel/fiq.c
···124124void release_fiq(struct fiq_handler *f)125125{126126 if (current_fiq != f) {127127- printk(KERN_ERR "%s FIQ trying to release %s FIQ\n",127127+ pr_err("%s FIQ trying to release %s FIQ\n",128128 f->name, current_fiq->name);129129 dump_stack();130130 return;
+2-3
arch/arm/kernel/io.c
···5151 from++;5252 }5353}5454+EXPORT_SYMBOL(_memcpy_fromio);54555556/*5657 * Copy data from "real" memory space to IO memory space.···6766 to++;6867 }6968}6969+EXPORT_SYMBOL(_memcpy_toio);70707171/*7272 * "memset" on IO memory space.···8179 dst++;8280 }8381}8484-8585-EXPORT_SYMBOL(_memcpy_fromio);8686-EXPORT_SYMBOL(_memcpy_toio);8782EXPORT_SYMBOL(_memset_io);
+4-4
arch/arm/kernel/irq.c
···3131#include <linux/smp.h>3232#include <linux/init.h>3333#include <linux/seq_file.h>3434+#include <linux/ratelimit.h>3435#include <linux/errno.h>3536#include <linux/list.h>3637#include <linux/kallsyms.h>···8382 unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;84838584 if (irq >= nr_irqs) {8686- printk(KERN_ERR "Trying to set irq flags for IRQ%d\n", irq);8585+ pr_err("Trying to set irq flags for IRQ%d\n", irq);8786 return;8887 }8988···136135#endif137136138137#ifdef CONFIG_HOTPLUG_CPU139139-140138static bool migrate_one_irq(struct irq_desc *desc)141139{142140 struct irq_data *d = irq_desc_get_irq_data(desc);···187187 affinity_broken = migrate_one_irq(desc);188188 raw_spin_unlock(&desc->lock);189189190190- if (affinity_broken && printk_ratelimit())191191- pr_warn("IRQ%u no longer affine to CPU%u\n",190190+ if (affinity_broken)191191+ pr_warn_ratelimited("IRQ%u no longer affine to CPU%u\n",192192 i, smp_processor_id());193193 }194194
+13
arch/arm/kernel/iwmmxt.S
···5858#define MMX_SIZE (0x98)59596060 .text6161+ .arm61626263/*6364 * Lazy switching of Concan coprocessor context···183182 tmcr wCon, r2184183 ret lr185184185185+ENDPROC(iwmmxt_task_enable)186186+186187/*187188 * Back up Concan regs to save area and disable access to them188189 * (mainly for gdb or sleep mode usage)···2352321: msr cpsr_c, ip @ restore interrupt mode236233 ldmfd sp!, {r4, pc}237234235235+ENDPROC(iwmmxt_task_disable)236236+238237/*239238 * Copy Concan state to given memory address240239 *···272267 bl concan_dump273268 msr cpsr_c, ip @ restore interrupt mode274269 ret r3270270+271271+ENDPROC(iwmmxt_task_copy)275272276273/*277274 * Restore Concan state from given memory address···311304 msr cpsr_c, ip @ restore interrupt mode312305 ret r3313306307307+ENDPROC(iwmmxt_task_restore)308308+314309/*315310 * Concan handling on task switch316311 *···344335 mrc p15, 0, r1, c2, c0, 0345336 sub pc, lr, r1, lsr #32 @ cpwait and return346337338338+ENDPROC(iwmmxt_task_switch)339339+347340/*348341 * Remove Concan ownership of given task349342 *···363352 streq r0, [r3] @ then clear ownership364353 msr cpsr_c, r2 @ restore interrupts365354 ret lr355355+356356+ENDPROC(iwmmxt_task_release)366357367358 .data368359concan_owner:
+3-3
arch/arm/kernel/machine_kexec.c
···126126 msecs--;127127 }128128 if (atomic_read(&waiting_for_crash_ipi) > 0)129129- printk(KERN_WARNING "Non-crashing CPUs did not react to IPI\n");129129+ pr_warn("Non-crashing CPUs did not react to IPI\n");130130131131 crash_save_cpu(regs, smp_processor_id());132132 machine_kexec_mask_interrupts();133133134134- printk(KERN_INFO "Loading crashdump kernel...\n");134134+ pr_info("Loading crashdump kernel...\n");135135}136136137137/*···177177 reboot_entry_phys = (unsigned long)reboot_entry +178178 (reboot_code_buffer_phys - (unsigned long)reboot_code_buffer);179179180180- printk(KERN_INFO "Bye!\n");180180+ pr_info("Bye!\n");181181182182 if (kexec_reinit)183183 kexec_reinit();
···113113 new_usermode |= UM_FIXUP;114114115115 if (warn)116116- printk(KERN_WARNING "alignment: ignoring faults is unsafe on this CPU. Defaulting to fixup mode.\n");116116+ pr_warn("alignment: ignoring faults is unsafe on this CPU. Defaulting to fixup mode.\n");117117 }118118119119 return new_usermode;···523523 * processor for us.524524 */525525 if (addr != eaddr) {526526- printk(KERN_ERR "LDMSTM: PC = %08lx, instr = %08lx, "526526+ pr_err("LDMSTM: PC = %08lx, instr = %08lx, "527527 "addr = %08lx, eaddr = %08lx\n",528528 instruction_pointer(regs), instr, addr, eaddr);529529 show_regs(regs);···567567 return TYPE_FAULT;568568569569bad:570570- printk(KERN_ERR "Alignment trap: not handling ldm with s-bit set\n");570570+ pr_err("Alignment trap: not handling ldm with s-bit set\n");571571 return TYPE_ERROR;572572}573573···899899 return 0;900900901901 swp:902902- printk(KERN_ERR "Alignment trap: not handling swp instruction\n");902902+ pr_err("Alignment trap: not handling swp instruction\n");903903904904 bad:905905 /*906906 * Oops, we didn't handle the instruction.907907 */908908- printk(KERN_ERR "Alignment trap: not handling instruction "908908+ pr_err("Alignment trap: not handling instruction "909909 "%0*lx at [<%08lx>]\n",910910 isize << 1,911911 isize == 2 ? tinstr : instr, instrptr);
+3-3
arch/arm/mm/cache-feroceon-l2.c
···313313 */314314 u = read_extra_features();315315 if (!(u & 0x01000000)) {316316- printk(KERN_INFO "Feroceon L2: Disabling L2 prefetch.\n");316316+ pr_info("Feroceon L2: Disabling L2 prefetch.\n");317317 write_extra_features(u | 0x01000000);318318 }319319}···326326 if (!(u & 0x00400000)) {327327 int i, d;328328329329- printk(KERN_INFO "Feroceon L2: Enabling L2\n");329329+ pr_info("Feroceon L2: Enabling L2\n");330330331331 d = flush_and_disable_dcache();332332 i = invalidate_and_disable_icache();···353353354354 enable_l2();355355356356- printk(KERN_INFO "Feroceon L2: Cache support initialised%s.\n",356356+ pr_info("Feroceon L2: Cache support initialised%s.\n",357357 l2_wt_override ? ", in WT override mode" : "");358358}359359#ifdef CONFIG_OF
+6-6
arch/arm/mm/cache-tauros2.c
···185185 u &= ~0x01000000;186186 else187187 u |= 0x01000000;188188- printk(KERN_INFO "Tauros2: %s L2 prefetch.\n",188188+ pr_info("Tauros2: %s L2 prefetch.\n",189189 (features & CACHE_TAUROS2_PREFETCH_ON)190190 ? "Enabling" : "Disabling");191191···193193 u |= 0x00100000;194194 else195195 u &= ~0x00100000;196196- printk(KERN_INFO "Tauros2: %s line fill burt8.\n",196196+ pr_info("Tauros2: %s line fill burt8.\n",197197 (features & CACHE_TAUROS2_LINEFILL_BURST8)198198 ? "Enabling" : "Disabling");199199···216216 */217217 feat = read_extra_features();218218 if (!(feat & 0x00400000)) {219219- printk(KERN_INFO "Tauros2: Enabling L2 cache.\n");219219+ pr_info("Tauros2: Enabling L2 cache.\n");220220 write_extra_features(feat | 0x00400000);221221 }222222···253253 */254254 actlr = read_actlr();255255 if (!(actlr & 0x00000002)) {256256- printk(KERN_INFO "Tauros2: Enabling L2 cache.\n");256256+ pr_info("Tauros2: Enabling L2 cache.\n");257257 write_actlr(actlr | 0x00000002);258258 }259259···262262#endif263263264264 if (mode == NULL) {265265- printk(KERN_CRIT "Tauros2: Unable to detect CPU mode.\n");265265+ pr_crit("Tauros2: Unable to detect CPU mode.\n");266266 return;267267 }268268269269- printk(KERN_INFO "Tauros2: L2 cache support initialised "269269+ pr_info("Tauros2: L2 cache support initialised "270270 "in %s mode.\n", mode);271271}272272
+34-24
arch/arm/mm/context.c
···184184 u64 asid = atomic64_read(&mm->context.id);185185 u64 generation = atomic64_read(&asid_generation);186186187187- if (asid != 0 && is_reserved_asid(asid)) {187187+ if (asid != 0) {188188 /*189189- * Our current ASID was active during a rollover, we can190190- * continue to use it and this was just a false alarm.189189+ * If our current ASID was active during a rollover, we190190+ * can continue to use it and this was just a false alarm.191191 */192192- asid = generation | (asid & ~ASID_MASK);193193- } else {192192+ if (is_reserved_asid(asid))193193+ return generation | (asid & ~ASID_MASK);194194+194195 /*195195- * Allocate a free ASID. If we can't find one, take a196196- * note of the currently active ASIDs and mark the TLBs197197- * as requiring flushes. We always count from ASID #1,198198- * as we reserve ASID #0 to switch via TTBR0 and to199199- * avoid speculative page table walks from hitting in200200- * any partial walk caches, which could be populated201201- * from overlapping level-1 descriptors used to map both202202- * the module area and the userspace stack.196196+ * We had a valid ASID in a previous life, so try to re-use197197+ * it if possible.,203198 */204204- asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, cur_idx);205205- if (asid == NUM_USER_ASIDS) {206206- generation = atomic64_add_return(ASID_FIRST_VERSION,207207- &asid_generation);208208- flush_context(cpu);209209- asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, 1);210210- }211211- __set_bit(asid, asid_map);212212- cur_idx = asid;213213- asid |= generation;214214- cpumask_clear(mm_cpumask(mm));199199+ asid &= ~ASID_MASK;200200+ if (!__test_and_set_bit(asid, asid_map))201201+ goto bump_gen;215202 }216203204204+ /*205205+ * Allocate a free ASID. If we can't find one, take a note of the206206+ * currently active ASIDs and mark the TLBs as requiring flushes.207207+ * We always count from ASID #1, as we reserve ASID #0 to switch208208+ * via TTBR0 and to avoid speculative page table walks from hitting209209+ * in any partial walk caches, which could be populated from210210+ * overlapping level-1 descriptors used to map both the module211211+ * area and the userspace stack.212212+ */213213+ asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, cur_idx);214214+ if (asid == NUM_USER_ASIDS) {215215+ generation = atomic64_add_return(ASID_FIRST_VERSION,216216+ &asid_generation);217217+ flush_context(cpu);218218+ asid = find_next_zero_bit(asid_map, NUM_USER_ASIDS, 1);219219+ }220220+221221+ __set_bit(asid, asid_map);222222+ cur_idx = asid;223223+224224+bump_gen:225225+ asid |= generation;226226+ cpumask_clear(mm_cpumask(mm));217227 return asid;218228}219229
···5252 */5353pmd_t *top_pmd;54545555+pmdval_t user_pmd_table = _PAGE_USER_TABLE;5656+5557#define CPOLICY_UNCACHED 05658#define CPOLICY_BUFFERED 15759#define CPOLICY_WRITETHROUGH 2···194192static int __init early_nocache(char *__unused)195193{196194 char *p = "buffered";197197- printk(KERN_WARNING "nocache is deprecated; use cachepolicy=%s\n", p);195195+ pr_warn("nocache is deprecated; use cachepolicy=%s\n", p);198196 early_cachepolicy(p);199197 return 0;200198}···203201static int __init early_nowrite(char *__unused)204202{205203 char *p = "uncached";206206- printk(KERN_WARNING "nowb is deprecated; use cachepolicy=%s\n", p);204204+ pr_warn("nowb is deprecated; use cachepolicy=%s\n", p);207205 early_cachepolicy(p);208206 return 0;209207}···356354}357355EXPORT_SYMBOL(get_mem_type);358356359359-#define PTE_SET_FN(_name, pteop) \360360-static int pte_set_##_name(pte_t *ptep, pgtable_t token, unsigned long addr, \361361- void *data) \362362-{ \363363- pte_t pte = pteop(*ptep); \364364-\365365- set_pte_ext(ptep, pte, 0); \366366- return 0; \367367-} \368368-369369-#define SET_MEMORY_FN(_name, callback) \370370-int set_memory_##_name(unsigned long addr, int numpages) \371371-{ \372372- unsigned long start = addr; \373373- unsigned long size = PAGE_SIZE*numpages; \374374- unsigned end = start + size; \375375-\376376- if (start < MODULES_VADDR || start >= MODULES_END) \377377- return -EINVAL;\378378-\379379- if (end < MODULES_VADDR || end >= MODULES_END) \380380- return -EINVAL; \381381-\382382- apply_to_page_range(&init_mm, start, size, callback, NULL); \383383- flush_tlb_kernel_range(start, end); \384384- return 0;\385385-}386386-387387-PTE_SET_FN(ro, pte_wrprotect)388388-PTE_SET_FN(rw, pte_mkwrite)389389-PTE_SET_FN(x, pte_mkexec)390390-PTE_SET_FN(nx, pte_mknexec)391391-392392-SET_MEMORY_FN(ro, pte_set_ro)393393-SET_MEMORY_FN(rw, pte_set_rw)394394-SET_MEMORY_FN(x, pte_set_x)395395-SET_MEMORY_FN(nx, pte_set_nx)396396-397357/*398358 * Adjust the PMD section entries according to the CPU in use.399359 */···492528 hyp_device_pgprot = mem_types[MT_DEVICE].prot_pte;493529 s2_device_pgprot = mem_types[MT_DEVICE].prot_pte_s2;494530531531+#ifndef CONFIG_ARM_LPAE495532 /*496533 * We don't use domains on ARMv6 (since this causes problems with497534 * v6/v7 kernels), so we must use a separate memory type for user498535 * r/o, kernel r/w to map the vectors page.499536 */500500-#ifndef CONFIG_ARM_LPAE501537 if (cpu_arch == CPU_ARCH_ARMv6)502538 vecs_pgprot |= L_PTE_MT_VECTORS;539539+540540+ /*541541+ * Check is it with support for the PXN bit542542+ * in the Short-descriptor translation table format descriptors.543543+ */544544+ if (cpu_arch == CPU_ARCH_ARMv7 &&545545+ (read_cpuid_ext(CPUID_EXT_MMFR0) & 0xF) == 4) {546546+ user_pmd_table |= PMD_PXNTABLE;547547+ }503548#endif504549505550 /*···578605 }579606 kern_pgprot |= PTE_EXT_AF;580607 vecs_pgprot |= PTE_EXT_AF;608608+609609+ /*610610+ * Set PXN for user mappings611611+ */612612+ user_pgprot |= PTE_EXT_PXN;581613#endif582614583615 for (i = 0; i < 16; i++) {···764786 length = PAGE_ALIGN(md->length);765787766788 if (!(cpu_architecture() >= CPU_ARCH_ARMv6 || cpu_is_xsc3())) {767767- printk(KERN_ERR "MM: CPU does not support supersection "768768- "mapping for 0x%08llx at 0x%08lx\n",789789+ pr_err("MM: CPU does not support supersection mapping for 0x%08llx at 0x%08lx\n",769790 (long long)__pfn_to_phys((u64)md->pfn), addr);770791 return;771792 }···776799 * of the actual domain assignments in use.777800 */778801 if (type->domain) {779779- printk(KERN_ERR "MM: invalid domain in supersection "780780- "mapping for 0x%08llx at 0x%08lx\n",802802+ pr_err("MM: invalid domain in supersection mapping for 0x%08llx at 0x%08lx\n",781803 (long long)__pfn_to_phys((u64)md->pfn), addr);782804 return;783805 }784806785807 if ((addr | length | __pfn_to_phys(md->pfn)) & ~SUPERSECTION_MASK) {786786- printk(KERN_ERR "MM: cannot create mapping for 0x%08llx"787787- " at 0x%08lx invalid alignment\n",808808+ pr_err("MM: cannot create mapping for 0x%08llx at 0x%08lx invalid alignment\n",788809 (long long)__pfn_to_phys((u64)md->pfn), addr);789810 return;790811 }···825850 pgd_t *pgd;826851827852 if (md->virtual != vectors_base() && md->virtual < TASK_SIZE) {828828- printk(KERN_WARNING "BUG: not creating mapping for 0x%08llx"829829- " at 0x%08lx in user region\n",830830- (long long)__pfn_to_phys((u64)md->pfn), md->virtual);853853+ pr_warn("BUG: not creating mapping for 0x%08llx at 0x%08lx in user region\n",854854+ (long long)__pfn_to_phys((u64)md->pfn), md->virtual);831855 return;832856 }833857834858 if ((md->type == MT_DEVICE || md->type == MT_ROM) &&835859 md->virtual >= PAGE_OFFSET &&836860 (md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) {837837- printk(KERN_WARNING "BUG: mapping for 0x%08llx"838838- " at 0x%08lx out of vmalloc space\n",839839- (long long)__pfn_to_phys((u64)md->pfn), md->virtual);861861+ pr_warn("BUG: mapping for 0x%08llx at 0x%08lx out of vmalloc space\n",862862+ (long long)__pfn_to_phys((u64)md->pfn), md->virtual);840863 }841864842865 type = &mem_types[md->type];···854881 length = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK));855882856883 if (type->prot_l1 == 0 && ((addr | phys | length) & ~SECTION_MASK)) {857857- printk(KERN_WARNING "BUG: map for 0x%08llx at 0x%08lx can not "858858- "be mapped using pages, ignoring.\n",859859- (long long)__pfn_to_phys(md->pfn), addr);884884+ pr_warn("BUG: map for 0x%08llx at 0x%08lx can not be mapped using pages, ignoring.\n",885885+ (long long)__pfn_to_phys(md->pfn), addr);860886 return;861887 }862888···1025105310261054 if (vmalloc_reserve < SZ_16M) {10271055 vmalloc_reserve = SZ_16M;10281028- printk(KERN_WARNING10291029- "vmalloc area too small, limiting to %luMB\n",10561056+ pr_warn("vmalloc area too small, limiting to %luMB\n",10301057 vmalloc_reserve >> 20);10311058 }1032105910331060 if (vmalloc_reserve > VMALLOC_END - (PAGE_OFFSET + SZ_32M)) {10341061 vmalloc_reserve = VMALLOC_END - (PAGE_OFFSET + SZ_32M);10351035- printk(KERN_WARNING10361036- "vmalloc area is too big, limiting to %luMB\n",10621062+ pr_warn("vmalloc area is too big, limiting to %luMB\n",10371063 vmalloc_reserve >> 20);10381064 }10391065···1064109410651095 if (highmem) {10661096 pr_notice("Ignoring RAM at %pa-%pa (!CONFIG_HIGHMEM)\n",10671067- &block_start, &block_end);10971097+ &block_start, &block_end);10681098 memblock_remove(reg->base, reg->size);10691099 continue;10701100 }···10731103 phys_addr_t overlap_size = reg->size - size_limit;1074110410751105 pr_notice("Truncating RAM at %pa-%pa to -%pa",10761076- &block_start, &block_end, &vmalloc_limit);11061106+ &block_start, &block_end, &vmalloc_limit);10771107 memblock_remove(vmalloc_limit, overlap_size);10781108 block_end = vmalloc_limit;10791109 }
+91
arch/arm/mm/pageattr.c
···11+/*22+ * Copyright (c) 2014, The Linux Foundation. All rights reserved.33+ *44+ * This program is free software; you can redistribute it and/or modify55+ * it under the terms of the GNU General Public License version 2 and66+ * only version 2 as published by the Free Software Foundation.77+ *88+ * This program is distributed in the hope that it will be useful,99+ * but WITHOUT ANY WARRANTY; without even the implied warranty of1010+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1111+ * GNU General Public License for more details.1212+ */1313+#include <linux/mm.h>1414+#include <linux/module.h>1515+1616+#include <asm/pgtable.h>1717+#include <asm/tlbflush.h>1818+1919+struct page_change_data {2020+ pgprot_t set_mask;2121+ pgprot_t clear_mask;2222+};2323+2424+static int change_page_range(pte_t *ptep, pgtable_t token, unsigned long addr,2525+ void *data)2626+{2727+ struct page_change_data *cdata = data;2828+ pte_t pte = *ptep;2929+3030+ pte = clear_pte_bit(pte, cdata->clear_mask);3131+ pte = set_pte_bit(pte, cdata->set_mask);3232+3333+ set_pte_ext(ptep, pte, 0);3434+ return 0;3535+}3636+3737+static int change_memory_common(unsigned long addr, int numpages,3838+ pgprot_t set_mask, pgprot_t clear_mask)3939+{4040+ unsigned long start = addr;4141+ unsigned long size = PAGE_SIZE*numpages;4242+ unsigned long end = start + size;4343+ int ret;4444+ struct page_change_data data;4545+4646+ if (!IS_ALIGNED(addr, PAGE_SIZE)) {4747+ start &= PAGE_MASK;4848+ end = start + size;4949+ WARN_ON_ONCE(1);5050+ }5151+5252+ if (!is_module_address(start) || !is_module_address(end - 1))5353+ return -EINVAL;5454+5555+ data.set_mask = set_mask;5656+ data.clear_mask = clear_mask;5757+5858+ ret = apply_to_page_range(&init_mm, start, size, change_page_range,5959+ &data);6060+6161+ flush_tlb_kernel_range(start, end);6262+ return ret;6363+}6464+6565+int set_memory_ro(unsigned long addr, int numpages)6666+{6767+ return change_memory_common(addr, numpages,6868+ __pgprot(L_PTE_RDONLY),6969+ __pgprot(0));7070+}7171+7272+int set_memory_rw(unsigned long addr, int numpages)7373+{7474+ return change_memory_common(addr, numpages,7575+ __pgprot(0),7676+ __pgprot(L_PTE_RDONLY));7777+}7878+7979+int set_memory_nx(unsigned long addr, int numpages)8080+{8181+ return change_memory_common(addr, numpages,8282+ __pgprot(L_PTE_XN),8383+ __pgprot(0));8484+}8585+8686+int set_memory_x(unsigned long addr, int numpages)8787+{8888+ return change_memory_common(addr, numpages,8989+ __pgprot(0),9090+ __pgprot(L_PTE_XN));9191+}
+3-2
arch/arm/mm/proc-v7.S
···591591 /*592592 * Some Krait processors don't indicate support for SDIV and UDIV593593 * instructions in the ARM instruction set, even though they actually594594- * do support them.594594+ * do support them. They also don't indicate support for fused multiply595595+ * instructions even though they actually do support them.595596 */596596- __v7_proc __v7_setup, hwcaps = HWCAP_IDIV597597+ __v7_proc __v7_setup, hwcaps = HWCAP_IDIV | HWCAP_VFPv4597598 .size __krait_proc_info, . - __krait_proc_info598599599600 /*
+4-4
arch/arm/nwfpe/fpmodule.c
···8686static int __init fpe_init(void)8787{8888 if (sizeof(FPA11) > sizeof(union fp_state)) {8989- printk(KERN_ERR "nwfpe: bad structure size\n");8989+ pr_err("nwfpe: bad structure size\n");9090 return -EINVAL;9191 }92929393 if (sizeof(FPREG) != 12) {9494- printk(KERN_ERR "nwfpe: bad register size\n");9494+ pr_err("nwfpe: bad register size\n");9595 return -EINVAL;9696 }9797 if (fpe_type[0] && strcmp(fpe_type, "nwfpe"))9898 return 0;9999100100 /* Display title, version and copyright information. */101101- printk(KERN_WARNING "NetWinder Floating Point Emulator V0.97 ("102102- NWFPE_BITS " precision)\n");101101+ pr_info("NetWinder Floating Point Emulator V0.97 ("102102+ NWFPE_BITS " precision)\n");103103104104 thread_register_notifier(&nwfpe_notifier_block);105105
+6
arch/arm/vfp/vfphw.S
···197197 tst r5, #FPSCR_IXE198198 bne process_exception199199200200+ tst r5, #FPSCR_LENGTH_MASK201201+ beq skip202202+ orr r1, r1, #FPEXC_DEX203203+ b process_exception204204+skip:205205+200206 @ Fall into hand on to next handler - appropriate coproc instr201207 @ not recognised by VFP202208
+56-46
arch/arm/vfp/vfpmodule.c
···738738 vfp_vector = vfp_null_entry;739739740740 pr_info("VFP support v0.3: ");741741- if (VFP_arch)741741+ if (VFP_arch) {742742 pr_cont("not present\n");743743- else if (vfpsid & FPSID_NODOUBLE) {744744- pr_cont("no double precision support\n");745745- } else {746746- hotcpu_notifier(vfp_hotplug, 0);747747-748748- VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */749749- pr_cont("implementor %02x architecture %d part %02x variant %x rev %x\n",750750- (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT,751751- (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT,752752- (vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT,753753- (vfpsid & FPSID_VARIANT_MASK) >> FPSID_VARIANT_BIT,754754- (vfpsid & FPSID_REV_MASK) >> FPSID_REV_BIT);755755-756756- vfp_vector = vfp_support_entry;757757-758758- thread_register_notifier(&vfp_notifier_block);759759- vfp_pm_init();760760-761761- /*762762- * We detected VFP, and the support code is763763- * in place; report VFP support to userspace.764764- */765765- elf_hwcap |= HWCAP_VFP;766766-#ifdef CONFIG_VFPv3767767- if (VFP_arch >= 2) {768768- elf_hwcap |= HWCAP_VFPv3;769769-770770- /*771771- * Check for VFPv3 D16 and VFPv4 D16. CPUs in772772- * this configuration only have 16 x 64bit773773- * registers.774774- */775775- if (((fmrx(MVFR0) & MVFR0_A_SIMD_MASK)) == 1)776776- elf_hwcap |= HWCAP_VFPv3D16; /* also v4-D16 */777777- else778778- elf_hwcap |= HWCAP_VFPD32;779779- }780780-#endif743743+ return 0;744744+ /* Extract the architecture on CPUID scheme */745745+ } else if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) {746746+ VFP_arch = vfpsid & FPSID_CPUID_ARCH_MASK;747747+ VFP_arch >>= FPSID_ARCH_BIT;781748 /*782749 * Check for the presence of the Advanced SIMD783750 * load/store instructions, integer and single784751 * precision floating point operations. Only check785752 * for NEON if the hardware has the MVFR registers.786753 */787787- if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) {788788-#ifdef CONFIG_NEON789789- if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100)790790- elf_hwcap |= HWCAP_NEON;791791-#endif792792-#ifdef CONFIG_VFPv3754754+ if (IS_ENABLED(CONFIG_NEON) &&755755+ (fmrx(MVFR1) & 0x000fff00) == 0x00011100)756756+ elf_hwcap |= HWCAP_NEON;757757+758758+ if (IS_ENABLED(CONFIG_VFPv3)) {759759+ u32 mvfr0 = fmrx(MVFR0);760760+ if (((mvfr0 & MVFR0_DP_MASK) >> MVFR0_DP_BIT) == 0x2 ||761761+ ((mvfr0 & MVFR0_SP_MASK) >> MVFR0_SP_BIT) == 0x2) {762762+ elf_hwcap |= HWCAP_VFPv3;763763+ /*764764+ * Check for VFPv3 D16 and VFPv4 D16. CPUs in765765+ * this configuration only have 16 x 64bit766766+ * registers.767767+ */768768+ if ((mvfr0 & MVFR0_A_SIMD_MASK) == 1)769769+ /* also v4-D16 */770770+ elf_hwcap |= HWCAP_VFPv3D16;771771+ else772772+ elf_hwcap |= HWCAP_VFPD32;773773+ }774774+793775 if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000)794776 elf_hwcap |= HWCAP_VFPv4;795795-#endif796777 }778778+ /* Extract the architecture version on pre-cpuid scheme */779779+ } else {780780+ if (vfpsid & FPSID_NODOUBLE) {781781+ pr_cont("no double precision support\n");782782+ return 0;783783+ }784784+785785+ VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT;797786 }787787+788788+ hotcpu_notifier(vfp_hotplug, 0);789789+790790+ vfp_vector = vfp_support_entry;791791+792792+ thread_register_notifier(&vfp_notifier_block);793793+ vfp_pm_init();794794+795795+ /*796796+ * We detected VFP, and the support code is797797+ * in place; report VFP support to userspace.798798+ */799799+ elf_hwcap |= HWCAP_VFP;800800+801801+ pr_cont("implementor %02x architecture %d part %02x variant %x rev %x\n",802802+ (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT,803803+ VFP_arch,804804+ (vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT,805805+ (vfpsid & FPSID_VARIANT_MASK) >> FPSID_VARIANT_BIT,806806+ (vfpsid & FPSID_REV_MASK) >> FPSID_REV_BIT);807807+798808 return 0;799809}800810
···9595 struct amba_device *pcdev = to_amba_device(dev);9696 int ret = pm_generic_runtime_suspend(dev);97979898- if (ret == 0 && dev->driver)9999- clk_disable_unprepare(pcdev->pclk);9898+ if (ret == 0 && dev->driver) {9999+ if (pm_runtime_is_irq_safe(dev))100100+ clk_disable(pcdev->pclk);101101+ else102102+ clk_disable_unprepare(pcdev->pclk);103103+ }100104101105 return ret;102106}···111107 int ret;112108113109 if (dev->driver) {114114- ret = clk_prepare_enable(pcdev->pclk);110110+ if (pm_runtime_is_irq_safe(dev))111111+ ret = clk_enable(pcdev->pclk);112112+ else113113+ ret = clk_prepare_enable(pcdev->pclk);115114 /* Failure is probably fatal to the system, but... */116115 if (ret)117116 return ret;···122115123116 return pm_generic_runtime_resume(dev);124117}125125-#endif118118+#endif /* CONFIG_PM */126119127120static const struct dev_pm_ops amba_pm = {128121 .suspend = pm_generic_suspend,
+95-4
drivers/dma/pl330.c
···2727#include <linux/of.h>2828#include <linux/of_dma.h>2929#include <linux/err.h>3030+#include <linux/pm_runtime.h>30313132#include "dmaengine.h"3233#define PL330_MAX_CHAN 8···265264/* The number of default descriptors */266265267266#define NR_DEFAULT_DESC 16267267+268268+/* Delay for runtime PM autosuspend, ms */269269+#define PL330_AUTOSUSPEND_DELAY 20268270269271/* Populated by the PL330 core driver for DMA API driver's info */270272struct pl330_config {···19621958 struct dma_pl330_chan *pch = (struct dma_pl330_chan *)data;19631959 struct dma_pl330_desc *desc, *_dt;19641960 unsigned long flags;19611961+ bool power_down = false;1965196219661963 spin_lock_irqsave(&pch->lock, flags);19671964···19771972 /* Try to submit a req imm. next to the last completed cookie */19781973 fill_queue(pch);1979197419801980- /* Make sure the PL330 Channel thread is active */19811981- spin_lock(&pch->thread->dmac->lock);19821982- _start(pch->thread);19831983- spin_unlock(&pch->thread->dmac->lock);19751975+ if (list_empty(&pch->work_list)) {19761976+ spin_lock(&pch->thread->dmac->lock);19771977+ _stop(pch->thread);19781978+ spin_unlock(&pch->thread->dmac->lock);19791979+ power_down = true;19801980+ } else {19811981+ /* Make sure the PL330 Channel thread is active */19821982+ spin_lock(&pch->thread->dmac->lock);19831983+ _start(pch->thread);19841984+ spin_unlock(&pch->thread->dmac->lock);19851985+ }1984198619851987 while (!list_empty(&pch->completed_list)) {19861988 dma_async_tx_callback callback;···20021990 if (pch->cyclic) {20031991 desc->status = PREP;20041992 list_move_tail(&desc->node, &pch->work_list);19931993+ if (power_down) {19941994+ spin_lock(&pch->thread->dmac->lock);19951995+ _start(pch->thread);19961996+ spin_unlock(&pch->thread->dmac->lock);19971997+ power_down = false;19981998+ }20051999 } else {20062000 desc->status = FREE;20072001 list_move_tail(&desc->node, &pch->dmac->desc_pool);···20222004 }20232005 }20242006 spin_unlock_irqrestore(&pch->lock, flags);20072007+20082008+ /* If work list empty, power down */20092009+ if (power_down) {20102010+ pm_runtime_mark_last_busy(pch->dmac->ddma.dev);20112011+ pm_runtime_put_autosuspend(pch->dmac->ddma.dev);20122012+ }20252013}2026201420272015bool pl330_filter(struct dma_chan *chan, void *param)···2097207320982074 switch (cmd) {20992075 case DMA_TERMINATE_ALL:20762076+ pm_runtime_get_sync(pl330->ddma.dev);21002077 spin_lock_irqsave(&pch->lock, flags);2101207821022079 spin_lock(&pl330->lock);···21242099 dma_cookie_complete(&desc->txd);21252100 }2126210121022102+ if (!list_empty(&pch->work_list))21032103+ pm_runtime_put(pl330->ddma.dev);21042104+21272105 list_splice_tail_init(&pch->submitted_list, &pl330->desc_pool);21282106 list_splice_tail_init(&pch->work_list, &pl330->desc_pool);21292107 list_splice_tail_init(&pch->completed_list, &pl330->desc_pool);21302108 spin_unlock_irqrestore(&pch->lock, flags);21092109+ pm_runtime_mark_last_busy(pl330->ddma.dev);21102110+ pm_runtime_put_autosuspend(pl330->ddma.dev);21312111 break;21322112 case DMA_SLAVE_CONFIG:21332113 slave_config = (struct dma_slave_config *)arg;···2168213821692139 tasklet_kill(&pch->task);2170214021412141+ pm_runtime_get_sync(pch->dmac->ddma.dev);21712142 spin_lock_irqsave(&pch->lock, flags);2172214321732144 pl330_release_channel(pch->thread);···21782147 list_splice_tail_init(&pch->work_list, &pch->dmac->desc_pool);2179214821802149 spin_unlock_irqrestore(&pch->lock, flags);21502150+ pm_runtime_mark_last_busy(pch->dmac->ddma.dev);21512151+ pm_runtime_put_autosuspend(pch->dmac->ddma.dev);21812152}2182215321832154static enum dma_status···21952162 unsigned long flags;2196216321972164 spin_lock_irqsave(&pch->lock, flags);21652165+ if (list_empty(&pch->work_list)) {21662166+ /*21672167+ * Warn on nothing pending. Empty submitted_list may21682168+ * break our pm_runtime usage counter as it is21692169+ * updated on work_list emptiness status.21702170+ */21712171+ WARN_ON(list_empty(&pch->submitted_list));21722172+ pm_runtime_get_sync(pch->dmac->ddma.dev);21732173+ }21982174 list_splice_tail_init(&pch->submitted_list, &pch->work_list);21992175 spin_unlock_irqrestore(&pch->lock, flags);22002176···26272585 return 0;26282586}2629258725882588+/*25892589+ * Runtime PM callbacks are provided by amba/bus.c driver.25902590+ *25912591+ * It is assumed here that IRQ safe runtime PM is chosen in probe and amba25922592+ * bus driver will only disable/enable the clock in runtime PM callbacks.25932593+ */25942594+static int __maybe_unused pl330_suspend(struct device *dev)25952595+{25962596+ struct amba_device *pcdev = to_amba_device(dev);25972597+25982598+ pm_runtime_disable(dev);25992599+26002600+ if (!pm_runtime_status_suspended(dev)) {26012601+ /* amba did not disable the clock */26022602+ amba_pclk_disable(pcdev);26032603+ }26042604+ amba_pclk_unprepare(pcdev);26052605+26062606+ return 0;26072607+}26082608+26092609+static int __maybe_unused pl330_resume(struct device *dev)26102610+{26112611+ struct amba_device *pcdev = to_amba_device(dev);26122612+ int ret;26132613+26142614+ ret = amba_pclk_prepare(pcdev);26152615+ if (ret)26162616+ return ret;26172617+26182618+ if (!pm_runtime_status_suspended(dev))26192619+ ret = amba_pclk_enable(pcdev);26202620+26212621+ pm_runtime_enable(dev);26222622+26232623+ return ret;26242624+}26252625+26262626+static SIMPLE_DEV_PM_OPS(pl330_pm, pl330_suspend, pl330_resume);26272627+26302628static int26312629pl330_probe(struct amba_device *adev, const struct amba_id *id)26322630{···28202738 pcfg->data_buf_dep, pcfg->data_bus_width / 8, pcfg->num_chan,28212739 pcfg->num_peri, pcfg->num_events);2822274027412741+ pm_runtime_irq_safe(&adev->dev);27422742+ pm_runtime_use_autosuspend(&adev->dev);27432743+ pm_runtime_set_autosuspend_delay(&adev->dev, PL330_AUTOSUSPEND_DELAY);27442744+ pm_runtime_mark_last_busy(&adev->dev);27452745+ pm_runtime_put_autosuspend(&adev->dev);27462746+28232747 return 0;28242748probe_err3:28252749 /* Idle the DMAC */···28512763{28522764 struct pl330_dmac *pl330 = amba_get_drvdata(adev);28532765 struct dma_pl330_chan *pch, *_p;27662766+27672767+ pm_runtime_get_noresume(pl330->ddma.dev);2854276828552769 if (adev->dev.of_node)28562770 of_dma_controller_free(adev->dev.of_node);···28922802 .drv = {28932803 .owner = THIS_MODULE,28942804 .name = "dma-pl330",28052805+ .pm = &pl330_pm,28952806 },28962807 .id_table = pl330_ids,28972808 .probe = pl330_probe,
+1
drivers/pcmcia/sa1100_generic.c
···9393 for (i = 0; i < sinfo->nskt; i++)9494 soc_pcmcia_remove_one(&sinfo->skt[i]);95959696+ clk_put(sinfo->clk);9697 kfree(sinfo);9798 return 0;9899}
+7
drivers/pcmcia/sa1111_generic.c
···145145 return -ENOMEM;146146147147 s->soc.nr = ops->first + i;148148+ s->soc.clk = clk_get(&dev->dev, NULL);149149+ if (IS_ERR(s->soc.clk)) {150150+ ret = PTR_ERR(s->soc.clk);151151+ kfree(s);152152+ return ret;153153+ }148154 soc_pcmcia_init_one(&s->soc, ops, &dev->dev);149155 s->dev = dev;150156 if (s->soc.nr) {···226220 for (; s; s = next) {227221 next = s->next;228222 soc_pcmcia_remove_one(&s->soc);223223+ clk_put(s->soc.clk);229224 kfree(s);230225 }231226
+12-2
drivers/pcmcia/sa11xx_base.c
···135135static int136136sa1100_pcmcia_set_timing(struct soc_pcmcia_socket *skt)137137{138138- return sa1100_pcmcia_set_mecr(skt, cpufreq_get(0));138138+ unsigned long clk = clk_get_rate(skt->clk);139139+140140+ return sa1100_pcmcia_set_mecr(skt, clk / 1000);139141}140142141143static int142144sa1100_pcmcia_show_timing(struct soc_pcmcia_socket *skt, char *buf)143145{144146 struct soc_pcmcia_timing timing;145145- unsigned int clock = cpufreq_get(0);147147+ unsigned int clock = clk_get_rate(skt->clk);146148 unsigned long mecr = MECR;147149 char *p = buf;148150···220218 struct skt_dev_info *sinfo;221219 struct soc_pcmcia_socket *skt;222220 int i, ret = 0;221221+ struct clk *clk;222222+223223+ clk = clk_get(dev, NULL);224224+ if (IS_ERR(clk))225225+ return PTR_ERR(clk);223226224227 sa11xx_drv_pcmcia_ops(ops);225228···233226 return -ENOMEM;234227235228 sinfo->nskt = nr;229229+ sinfo->clk = clk;236230237231 /* Initialize processor specific parameters */238232 for (i = 0; i < nr; i++) {239233 skt = &sinfo->skt[i];240234241235 skt->nr = first + i;236236+ skt->clk = clk;242237 soc_pcmcia_init_one(skt, ops, dev);243238244239 ret = sa11xx_drv_pcmcia_add_one(skt);···251242 if (ret) {252243 while (--i >= 0)253244 soc_pcmcia_remove_one(&sinfo->skt[i]);245245+ clk_put(clk);254246 kfree(sinfo);255247 } else {256248 dev_set_drvdata(dev, sinfo);
+4
drivers/pcmcia/soc_common.c
···120120121121 if (skt->ops->hw_shutdown)122122 skt->ops->hw_shutdown(skt);123123+124124+ clk_disable_unprepare(skt->clk);123125}124126125127static void soc_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)···132130static int soc_pcmcia_hw_init(struct soc_pcmcia_socket *skt)133131{134132 int ret = 0, i;133133+134134+ clk_prepare_enable(skt->clk);135135136136 if (skt->ops->hw_init) {137137 ret = skt->ops->hw_init(skt);
+23-7
drivers/video/fbdev/sa1100fb.c
···178178#include <linux/dma-mapping.h>179179#include <linux/mutex.h>180180#include <linux/io.h>181181+#include <linux/clk.h>181182182183#include <video/sa1100fb.h>183184···417416 var->transp.offset);418417419418#ifdef CONFIG_CPU_FREQ420420- dev_dbg(fbi->dev, "dma period = %d ps, clock = %d kHz\n",419419+ dev_dbg(fbi->dev, "dma period = %d ps, clock = %ld kHz\n",421420 sa1100fb_display_dma_period(var),422422- cpufreq_get(smp_processor_id()));421421+ clk_get_rate(fbi->clk) / 1000);423422#endif424423425424 return 0;···593592 * Calculate the PCD value from the clock rate (in picoseconds).594593 * We take account of the PPCR clock setting.595594 */596596-static inline unsigned int get_pcd(unsigned int pixclock, unsigned int cpuclock)595595+static inline unsigned int get_pcd(struct sa1100fb_info *fbi,596596+ unsigned int pixclock)597597{598598- unsigned int pcd = cpuclock / 100;598598+ unsigned int pcd = clk_get_rate(fbi->clk) / 100 / 1000;599599600600 pcd *= pixclock;601601 pcd /= 10000000;···675673 LCCR2_BegFrmDel(var->upper_margin) +676674 LCCR2_EndFrmDel(var->lower_margin);677675678678- pcd = get_pcd(var->pixclock, cpufreq_get(0));676676+ pcd = get_pcd(fbi, var->pixclock);679677 new_regs.lccr3 = LCCR3_PixClkDiv(pcd) | fbi->inf->lccr3 |680678 (var->sync & FB_SYNC_HOR_HIGH_ACT ? LCCR3_HorSnchH : LCCR3_HorSnchL) |681679 (var->sync & FB_SYNC_VERT_HIGH_ACT ? LCCR3_VrtSnchH : LCCR3_VrtSnchL);···789787 fbi->palette_cpu[0] &= 0xcfff;790788 fbi->palette_cpu[0] |= palette_pbs(&fbi->fb.var);791789790790+ /* enable LCD controller clock */791791+ clk_prepare_enable(fbi->clk);792792+792793 /* Sequence from 11.7.10 */793794 writel_relaxed(fbi->reg_lccr3, fbi->base + LCCR3);794795 writel_relaxed(fbi->reg_lccr2, fbi->base + LCCR2);···836831837832 schedule_timeout(20 * HZ / 1000);838833 remove_wait_queue(&fbi->ctrlr_wait, &wait);834834+835835+ /* disable LCD controller clock */836836+ clk_disable_unprepare(fbi->clk);839837}840838841839/*···10171009 void *data)10181010{10191011 struct sa1100fb_info *fbi = TO_INF(nb, freq_transition);10201020- struct cpufreq_freqs *f = data;10211012 u_int pcd;1022101310231014 switch (val) {···10251018 break;1026101910271020 case CPUFREQ_POSTCHANGE:10281028- pcd = get_pcd(fbi->fb.var.pixclock, f->new);10211021+ pcd = get_pcd(fbi, fbi->fb.var.pixclock);10291022 fbi->reg_lccr3 = (fbi->reg_lccr3 & ~0xff) | LCCR3_PixClkDiv(pcd);10301023 set_ctrlr_state(fbi, C_ENABLE_CLKCHANGE);10311024 break;···12321225 if (!fbi)12331226 goto failed;1234122712281228+ fbi->clk = clk_get(&pdev->dev, NULL);12291229+ if (IS_ERR(fbi->clk)) {12301230+ ret = PTR_ERR(fbi->clk);12311231+ fbi->clk = NULL;12321232+ goto failed;12331233+ }12341234+12351235 fbi->base = ioremap(res->start, resource_size(res));12361236 if (!fbi->base)12371237 goto failed;···12911277 failed:12921278 if (fbi)12931279 iounmap(fbi->base);12801280+ if (fbi->clk)12811281+ clk_put(fbi->clk);12941282 kfree(fbi);12951283 release_mem_region(res->start, resource_size(res));12961284 return ret;