Translate printk to dev_*
Subsystems (3)
PATCH 1/1 Translate printk to dev_*
From: Eduardo Valentin <[email protected]>
- Translates printk to dev_*
- Breaks lines with more than 80 columns
Signed-off-by Eduardo Valentin <[email protected]>
--- arch/arm/mach-omap2/mmu.c | 29 ++++++---- arch/arm/plat-omap/mmu.c | 107 +++++++++++++++++++-------------------- include/asm-arm/arch-omap/mmu.h | 15 ++++-- 3 files changed, 80 insertions(+), 71 deletions(-)
arch/arm/mach-omap2/mmu.c +17 -12
@@ -64,7 +64,7 @@ static void exmap_setup_iomap_page(struct omap_mmu *mmu, unsigned long phys, dspadr = (IOMAP_VAL <<18 ) + (dsp_io_adr <<1 ); virt =omap_mmu_to_virt (mmu, dspadr); -exmap_set_armmmu ((unsigned long )virt, phys,PAGE_SIZE ); +exmap_set_armmmu (mmu, (unsigned long )virt, phys,PAGE_SIZE );INIT_EXMAP_TBL_ENTRY_4KB_PRESERVED (mmu->exmap_tbl + index,NULL , virt);INIT_TLB_ENTRY_4KB_ES32_PRESERVED (&tlb_ent, dspadr, phys);omap_mmu_load_pte_entry (mmu, &tlb_ent);
@@ -78,7 +78,7 @@ static void exmap_clear_iomap_page(struct omap_mmu *mmu, dspadr = (IOMAP_VAL <<18 ) + (dsp_io_adr <<1 ); virt =omap_mmu_to_virt (mmu, dspadr); -exmap_clear_armmmu ((unsigned long )virt,PAGE_SIZE ); +exmap_clear_armmmu (mmu, (unsigned long )virt,PAGE_SIZE );/* DSP MMU is shutting down. not handled here. */ }
@@ -153,8 +153,8 @@ static int omap2_mmu_startup(struct omap_mmu *mmu) dspvect_page = (void *)__get_dma_pages (GFP_KERNEL ,0 );if (dspvect_page ==NULL ) { -printk (KERN_ERR "MMU: failed to allocate memory " -"for dsp vector table\n" ); +dev_err (&mmu->dev,"MMU: failed to allocate memory " +"for dsp vector table\n" );return -ENOMEM ; }
@@ -261,13 +261,13 @@ static inline unsigned long omap2_mmu_cam_va(struct cam_ram_regset *cr) }static struct cam_ram_regset * -omap2_mmu_cam_ram_alloc (struct omap_mmu_tlb_entry *entry) +omap2_mmu_cam_ram_alloc (struct omap_mmu *mmu,struct omap_mmu_tlb_entry *entry) {struct cam_ram_regset *cr;if (entry->va & ~(get_cam_va_mask (entry->pgsz))) { -printk (KERN_ERR "MMU: mapping vadr (0x%06lx) is not on an " -"aligned boundary\n" , entry->va); +dev_err (&mmu->dev,"MMU: mapping vadr (0x%06lx) is not on an " +"aligned boundary\n" , entry->va);return ERR_PTR (-EINVAL ); }
@@ -292,11 +292,16 @@ static void omap2_mmu_interrupt(struct omap_mmu *mmu) status =MMU_IRQ_MASK &omap_mmu_read_reg (mmu,OMAP_MMU_IRQSTATUS ); va =omap_mmu_read_reg (mmu,OMAP_MMU_FAULT_AD ); -pr_info ("%s\n" , (status &OMAP_MMU_IRQ_MULTIHITFAULT ) ?"multi hit" :"" ); -pr_info ("%s\n" , (status &OMAP_MMU_IRQ_TABLEWALKFAULT ) ?"table walk fault" :"" ); -pr_info ("%s\n" , (status &OMAP_MMU_IRQ_EMUMISS ) ?"EMU miss" :"" ); -pr_info ("%s\n" , (status &OMAP_MMU_IRQ_TRANSLATIONFAULT ) ?"translation fault" :"" ); -pr_info ("%s\n" , (status &OMAP_MMU_IRQ_TLBMISS ) ?"TLB miss" :"" ); +pr_info ("%s\n" , (status &OMAP_MMU_IRQ_MULTIHITFAULT )? +"multi hit" :"" ); +pr_info ("%s\n" , (status &OMAP_MMU_IRQ_TABLEWALKFAULT )? +"table walk fault" :"" ); +pr_info ("%s\n" , (status &OMAP_MMU_IRQ_EMUMISS )? +"EMU miss" :"" ); +pr_info ("%s\n" , (status &OMAP_MMU_IRQ_TRANSLATIONFAULT )? +"translation fault" :"" ); +pr_info ("%s\n" , (status &OMAP_MMU_IRQ_TLBMISS )? +"TLB miss" :"" );pr_info ("fault address = %#08lx\n" , va);omap_mmu_disable (mmu);
arch/arm/plat-omap/mmu.c +53 -54
267 lines not on this page · raw message
include/asm-arm/arch-omap/mmu.h +10 -5
@@ -69,7 +69,8 @@ struct omap_mmu_ops {ssize_t (*show)(struct omap_mmu *,char *,struct omap_mmu_tlb_lock *);/* CAM / RAM operations */ -struct cam_ram_regset *(*cam_ram_alloc)(struct omap_mmu_tlb_entry *); +struct cam_ram_regset *(*cam_ram_alloc)(struct omap_mmu *, +struct omap_mmu_tlb_entry *);int (*cam_ram_valid)(struct cam_ram_regset *);unsigned long (*cam_va)(struct cam_ram_regset *);
@@ -182,15 +183,19 @@ void omap_mmu_exmap_flush(struct omap_mmu *mmu);void omap_mmu_exmap_use (struct omap_mmu *mmu,void *vadr,size_t len);void omap_mmu_exmap_unuse (struct omap_mmu *mmu,void *vadr,size_t len); -int exmap_set_armmmu (unsigned long virt,unsigned long phys,unsigned long size); -void exmap_clear_armmmu (unsigned long virt,unsigned long size); +int exmap_set_armmmu (struct omap_mmu *mmu,unsigned long virt, +unsigned long phys,unsigned long size); +void exmap_clear_armmmu (struct omap_mmu *mmu,unsigned long virt, +unsigned long size);void exmap_setup_preserved_mem_page (struct omap_mmu *mmu,void *buf,unsigned long dspadr,int index);void exmap_clear_mem_page (struct omap_mmu *mmu,unsigned long dspadr);int exmap_valid (struct omap_mmu *mmu,void *vadr,size_t len);/* To be obsolete for backward compatibility */ -ssize_t __omap_mmu_mem_read (struct omap_mmu *mmu,struct bin_attribute *,char *buf,loff_t offset,size_t count); -ssize_t __omap_mmu_mem_write (struct omap_mmu *mmu,struct bin_attribute *,char *buf,loff_t offset,size_t count); +ssize_t __omap_mmu_mem_read (struct omap_mmu *mmu,struct bin_attribute *, +char *buf,loff_t offset,size_t count); +ssize_t __omap_mmu_mem_write (struct omap_mmu *mmu,struct bin_attribute *, +char *buf,loff_t offset,size_t count);#endif /* __ARCH_OMAP_MMU_H */
Signature · 1 line
1.5.3.rc6.17.g1911
This looks ok to me. Ack.
From: "ext Eduardo Valentin" <[email protected]>
Subject: [PATCH 1/1] [OMAP MMU FW] Translate printk to dev_*
Date: Fri, 24 Aug 2007 14:47:30 -0400
Quoted 6 lines
From: Eduardo Valentin <[email protected]>
- Translates printk to dev_*
- Breaks lines with more than 80 columnsSigned-off-by Eduardo Valentin <[email protected]>