sh: More cosmetic cleanups and trivial fixes.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 27 Sep 2006 08:03:56 +0000 (17:03 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 27 Sep 2006 08:03:56 +0000 (17:03 +0900)
Nothing exciting here, just trivial fixes..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/drivers/dma/dma-sh.c
arch/sh/drivers/pci/ops-titan.c
arch/sh/kernel/setup.c
arch/sh/kernel/sh_ksyms.c
arch/sh/mm/cache-sh7705.c
arch/sh/mm/fault.c
arch/sh/mm/pmb.c
include/asm-sh/dma.h
include/asm-sh/irq.h
include/asm-sh/kexec.h
include/asm-sh/system.h

index 40a480d20aaf1c9f0cb8bdb226d4ed96c6436dd0..cbbe8bce3d679fd7d5b77e4f40363fd314dc3dee 100644 (file)
@@ -80,21 +80,23 @@ static irqreturn_t dma_tei(int irq, void *dev_id, struct pt_regs *regs)
 
 static int sh_dmac_request_dma(struct dma_channel *chan)
 {
-       char name[32];
-
        if (unlikely(!chan->flags & DMA_TEI_CAPABLE))
                return 0;
 
-       snprintf(name, sizeof(name), "DMAC Transfer End (Channel %d)",
+       chan->name = kzalloc(32, GFP_KERNEL);
+       if (unlikely(chan->name == NULL))
+               return -ENOMEM;
+       snprintf(chan->name, 32, "DMAC Transfer End (Channel %d)",
                 chan->chan);
 
        return request_irq(get_dmte_irq(chan->chan), dma_tei,
-                          IRQF_DISABLED, name, chan);
+                          IRQF_DISABLED, chan->name, chan);
 }
 
 static void sh_dmac_free_dma(struct dma_channel *chan)
 {
        free_irq(get_dmte_irq(chan->chan), chan);
+       kfree(chan->name);
 }
 
 static void
index 9c8b2027c35d356d308838b64bd6df8e0239210f..c6097bcd97fd4a5b1799024c7ee881534bd93bad 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/init.h>
+#include <linux/pci.h>
 #include <asm/io.h>
 #include <asm/titan.h>
 #include "pci-sh4.h"
index cff8d36f91b0ec61e8b1717c5565a3dba41a8584..4afdec07170068d11276de73dc2b5fd3871ce996 100644 (file)
@@ -507,7 +507,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
         * unified cache on the SH-2 and SH-3, as well as the harvard
         * style cache on the SH-4.
         */
-       if (test_bit(SH_CACHE_COMBINED, &(boot_cpu_data.icache.flags))) {
+       if (boot_cpu_data.icache.flags & SH_CACHE_COMBINED) {
                seq_printf(m, "unified\n");
                show_cacheinfo(m, "cache", boot_cpu_data.icache);
        } else {
index fd73ab0326e992c5922e1ea10b82cb0ec585b63c..7f3a42244cab10cb4d4487a118dfdc4f872a915c 100644 (file)
@@ -27,20 +27,11 @@ EXPORT_SYMBOL(sh_mv);
 
 /* platform dependent support */
 EXPORT_SYMBOL(dump_fpu);
-EXPORT_SYMBOL(enable_irq);
-EXPORT_SYMBOL(disable_irq);
-EXPORT_SYMBOL(probe_irq_mask);
 EXPORT_SYMBOL(kernel_thread);
-EXPORT_SYMBOL(disable_irq_nosync);
 EXPORT_SYMBOL(irq_desc);
 EXPORT_SYMBOL(no_irq_type);
 
-EXPORT_SYMBOL(strstr);
 EXPORT_SYMBOL(strlen);
-EXPORT_SYMBOL(strnlen);
-EXPORT_SYMBOL(strchr);
-EXPORT_SYMBOL(strcat);
-EXPORT_SYMBOL(strncat);
 
 /* PCI exports */
 #ifdef CONFIG_PCI
@@ -51,13 +42,8 @@ EXPORT_SYMBOL(pci_free_consistent);
 /* mem exports */
 EXPORT_SYMBOL(memchr);
 EXPORT_SYMBOL(memcpy);
-EXPORT_SYMBOL(memcpy_fromio);
-EXPORT_SYMBOL(memcpy_toio);
 EXPORT_SYMBOL(memset);
-EXPORT_SYMBOL(memset_io);
 EXPORT_SYMBOL(memmove);
-EXPORT_SYMBOL(memcmp);
-EXPORT_SYMBOL(memscan);
 EXPORT_SYMBOL(__copy_user);
 EXPORT_SYMBOL(boot_cpu_data);
 
@@ -124,5 +110,4 @@ EXPORT_SYMBOL(csum_partial);
 #ifdef CONFIG_IPV6
 EXPORT_SYMBOL(csum_ipv6_magic);
 #endif
-EXPORT_SYMBOL(consistent_sync);
 EXPORT_SYMBOL(clear_page);
index bf94eedb0a8e53e06fc0d0b88147aac636b80ad6..045abdf078f5bdc71a99c67f64da9c6cf76e6f4b 100644 (file)
@@ -9,7 +9,6 @@
  * for more details.
  *
  */
-
 #include <linux/init.h>
 #include <linux/mman.h>
 #include <linux/mm.h>
 #include <asm/mmu_context.h>
 #include <asm/cacheflush.h>
 
-/* The 32KB cache on the SH7705 suffers from the same synonym problem
- * as SH4 CPUs */
-
-#define __pte_offset(address) \
-               ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
-#define pte_offset(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + \
-               __pte_offset(address))
-
+/*
+ * The 32KB cache on the SH7705 suffers from the same synonym problem
+ * as SH4 CPUs
+ */
 static inline void cache_wback_all(void)
 {
        unsigned long ways, waysize, addrstart;
@@ -73,7 +68,6 @@ void flush_icache_range(unsigned long start, unsigned long end)
        __flush_wback_region((void *)start, end - start);
 }
 
-
 /*
  * Writeback&Invalidate the D-cache of the page
  */
@@ -128,7 +122,6 @@ static void __flush_dcache_page(unsigned long phys)
        local_irq_restore(flags);
 }
 
-
 /*
  * Write back & invalidate the D-cache of the page.
  * (To avoid "alias" issues)
@@ -186,7 +179,8 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
  *
  * ADDRESS: Virtual Address (U0 address)
  */
-void flush_cache_page(struct vm_area_struct *vma, unsigned long address, unsigned long pfn)
+void flush_cache_page(struct vm_area_struct *vma, unsigned long address,
+                     unsigned long pfn)
 {
        __flush_dcache_page(pfn << PAGE_SHIFT);
 }
@@ -203,4 +197,3 @@ void flush_icache_page(struct vm_area_struct *vma, struct page *page)
 {
        __flush_purge_region(page_address(page), PAGE_SIZE);
 }
-
index dc461d2bc183532e95984242f90d6b597ad3522d..c69fd603226aa80a20ba084aebd545e65c5142c3 100644 (file)
@@ -13,6 +13,8 @@
  */
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <linux/hardirq.h>
+#include <linux/kprobes.h>
 #include <asm/system.h>
 #include <asm/mmu_context.h>
 #include <asm/kgdb.h>
@@ -188,15 +190,16 @@ do_sigbus:
 /*
  * Called with interrupts disabled.
  */
-asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
-                              unsigned long address)
+asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
+                                        unsigned long writeaccess,
+                                        unsigned long address)
 {
        pgd_t *pgd;
        pud_t *pud;
        pmd_t *pmd;
        pte_t *pte;
        pte_t entry;
-       struct mm_struct *mm;
+       struct mm_struct *mm = current->mm;
        spinlock_t *ptl;
        int ret = 1;
 
@@ -214,10 +217,10 @@ asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
                pgd = pgd_offset_k(address);
                mm = NULL;
        } else {
-               if (unlikely(address >= TASK_SIZE || !(mm = current->mm)))
+               if (unlikely(address >= TASK_SIZE || !mm))
                        return 1;
 
-               pgd = pgd_offset(current->mm, address);
+               pgd = pgd_offset(mm, address);
        }
 
        pud = pud_offset(pgd, address);
index 819fd0faf022f5ace97f7ccc8a7989f968da2cde..92e745341e4d67335a23d7c09b934c48c8a02cca 100644 (file)
@@ -337,10 +337,8 @@ static int __init pmb_init(void)
 
        return 0;
 }
-
 arch_initcall(pmb_init);
 
-#ifdef CONFIG_DEBUG_FS
 static int pmb_seq_show(struct seq_file *file, void *iter)
 {
        int i;
@@ -399,6 +397,4 @@ static int __init pmb_debugfs_init(void)
 
        return 0;
 }
-
 postcore_initcall(pmb_debugfs_init);
-#endif
index e62a6d0ed932cec3631ee42e1d3e51331d09ae23..d9daa028689f91b675583c892c00aa48925b4534 100644 (file)
@@ -89,6 +89,7 @@ struct dma_channel {
        wait_queue_head_t wait_queue;
 
        struct sys_device dev;
+       char *name;
 };
 
 struct dma_info {
index 7e8455b1cb44c324ba39d72b8ebad1776b5804bc..648102e9236f09d34b3fb8d657a293a46797a207 100644 (file)
@@ -334,6 +334,11 @@ extern void enable_irq(unsigned int);
 extern void make_maskreg_irq(unsigned int irq);
 extern unsigned short *irq_mask_register;
 
+/*
+ * PINT IRQs
+ */
+void init_IRQ_pint(void);
+
 /*
  * Function for "on chip support modules".
  */
index 9dfe59f6fcb5c01a6ac2bc20ef6da871c31c04c9..a5f85e9e428d21fa1a591295a4800db440a722ea 100644 (file)
@@ -23,6 +23,8 @@
 /* The native architecture */
 #define KEXEC_ARCH KEXEC_ARCH_SH
 
+#define MAX_NOTE_BYTES 1024
+
 #ifndef __ASSEMBLY__
 
 extern void machine_shutdown(void);
index 477422afeb0d55530c7f78a6a64a6f3b7e0bf651..6c1f8fde5ac4a8e6a73c6d5059491db8c7e56554 100644 (file)
@@ -79,7 +79,7 @@ static inline void sched_cacheflush(void)
 }
 #endif
 
-static __inline__ unsigned long tas(volatile int *m)
+static inline unsigned long tas(volatile int *m)
 {
        unsigned long retval;
 
@@ -161,7 +161,7 @@ static inline void local_irq_enable(void)
 }
 #endif
 
-static __inline__ void local_irq_disable(void)
+static inline void local_irq_disable(void)
 {
        unsigned long __dummy;
        __asm__ __volatile__("stc       sr, %0\n\t"
@@ -172,7 +172,7 @@ static __inline__ void local_irq_disable(void)
                             : "memory");
 }
 
-static __inline__ void set_bl_bit(void)
+static inline void set_bl_bit(void)
 {
        unsigned long __dummy0, __dummy1;
 
@@ -185,7 +185,7 @@ static __inline__ void set_bl_bit(void)
                             : "memory");
 }
 
-static __inline__ void clear_bl_bit(void)
+static inline void clear_bl_bit(void)
 {
        unsigned long __dummy0, __dummy1;
 
@@ -207,7 +207,7 @@ static __inline__ void clear_bl_bit(void)
        (flags != 0);                   \
 })
 
-static __inline__ unsigned long local_irq_save(void)
+static inline unsigned long local_irq_save(void)
 {
        unsigned long flags, __dummy;
 
@@ -223,36 +223,10 @@ static __inline__ unsigned long local_irq_save(void)
        return flags;
 }
 
-#ifdef DEBUG_CLI_STI
-static __inline__ void  local_irq_restore(unsigned long x)
-{
-       if ((x & 0x000000f0) != 0x000000f0)
-               local_irq_enable();
-       else {
-               unsigned long flags;
-               local_save_flags(flags);
-
-               if (flags == 0) {
-                       extern void dump_stack(void);
-                       printk(KERN_ERR "BUG!\n");
-                       dump_stack();
-                       local_irq_disable();
-               }
-       }
-}
-#else
 #define local_irq_restore(x) do {                      \
        if ((x & 0x000000f0) != 0x000000f0)             \
                local_irq_enable();                     \
 } while (0)
-#endif
-
-#define really_restore_flags(x) do {                   \
-       if ((x & 0x000000f0) != 0x000000f0)             \
-               local_irq_enable();                     \
-       else                                            \
-               local_irq_disable();                    \
-} while (0)
 
 /*
  * Jump to P2 area.