1. 19 5月, 2014 18 次提交
  2. 02 5月, 2014 5 次提交
    • D
      Merge branch 'sparc32_generic_io_h' · bf656998
      David S. Miller 提交于
      Sam Ravnborg says:
      
      ====================
      sparc32: introduce asm-generic
      
      Inspired by Michal Simek <monstr@monstr.eu> this patch-set
      introduces asm-generic/io.h for sparc32.
      
      As the diff-stat tells this was a nice code-reduction.
      
      The changes are done on top of the previous sent sparse warning cleanup.
      But I do not expect any difficult conflicts if applied alone.
      
      leon_pci + pcic are touched because they had local
      and identical implementations of functiones that are
      static inline in asm-generic/io.h
      
      leon_pci_grpci1 + leon_pci_grpci2 are touched becuse they
      used a sparc spacific implmentation of swab32.
      They have just been changed to use the global variant.
      
      I also looked at sparc64 - but there were to many
      sparc64 assembler implementations of the io
      functons - and the generic io.h did not support this mix.
      
      The last patch kills a few defines in io.h for sbus.
      I assume they were introduced before the functions
      were all shifted over to __iomem style pointers.
      The same could be done for sparc64 - but then
      there were even more of the same so I left
      this for another time.
      
      The patch-set has been build tested only.
      My attempts to test this using qemu have failed as
      the qemu version I have errors out.
      And my fedora box are mssing some libs to build
      qemu from source :-(
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bf656998
    • S
      sparc32: clean up io_32.h · c3373da9
      Sam Ravnborg 提交于
      After introducing asm-generic/io.h a few things could still be cleaned up
      o Drop useless macro indirection for sbus_* io access methods
        They were in the past used to hide casts between long and pointers
        but this is no longer so
      o Fix function definitions for sbus memory functions so
        return value appear on same line as function name
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c3373da9
    • S
      sparc32: introduce asm-generic/io.h · e1039fb4
      Sam Ravnborg 提交于
      Use asm-generic/io.h definitions where applicable.
      The inxx() and outxx() methods whcih was duplicated in pcic.c +
      leon_pci.c are replaced by a set of static inlins from asm-generic/io.h
      
      iomap.c is replaced by the generic versions, but are still
      present to support sparc64.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Daniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e1039fb4
    • S
      sparc32: replace flip_dword() with swab32() · 01c6505d
      Sam Ravnborg 提交于
      The latter is a generic implmentation.
      flip_{,d}word() is sparc32 specific and will be dropped.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Daniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      01c6505d
    • S
      sparc: move page_to_phys to page.h · c46064b4
      Sam Ravnborg 提交于
      Preparation for introducing asm-generic/io.h this move was required.
      In asm-generic page_to_phys is placed in page.h - so do the same here.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c46064b4
  3. 29 4月, 2014 17 次提交
    • D
      Merge branch 'sparc32-sparse' · 8cf749a8
      David S. Miller 提交于
      Sam Ravnborg says:
      
      ====================
      sparse warning fixes in arch/sparc/
      
      The following patch-set address a lot of sparse warnings
      in the sparc32 specific parts of arch/sparc/.
      A few sparc64 bits are touched too when code are shared.
      
      Within arch/sparc/mm/ only two warnings remains.
      These are related to the return value of of_ioremap() which is __iomem.
      
      Within arch/sparc/kernel/ only three files now produces sparse warnings:
          sys_sparc_32.c
          time_32.c
          auxio_32.c
      
      The fixes was not obvious so the warnings was left for now.
      
      When looking at tadpole.c I was left with the impression that most
      of the code was actually unused - but for now I added a "TODO".
      
      This is made on top of 3.15-rc2.
      
      This set replaces the two sets sent the last days.
      V2:
      - Do not add extern in front of prototypes.
      - Tidy up a few changelongs
      
      There are still sparse warnings left that are easy to address.
      But this fixes the majority.
      ====================
      8cf749a8
    • S
      sparc32: fix sparse warnings in leon_smp.c · 1bbc9060
      Sam Ravnborg 提交于
      Fix following warnings:
      leon_smp.c:133:6: warning: symbol 'leon_smp_setbroadcast' was not declared. Should it be static?
      leon_smp.c:151:14: warning: symbol 'leon_smp_getbroadcast' was not declared. Should it be static?
      leon_smp.c:269:6: warning: symbol 'leon_irq_rotate' was not declared. Should it be static?
      leon_smp.c:355:6: warning: symbol 'leonsmp_ipi_interrupt' was not declared. Should it be static?
      leon_smp.c:457:6: warning: symbol 'leon_cross_call_irq' was not declared. Should it be static?
      
      Add static.
      Remove unused functions.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Daniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1bbc9060
    • S
      sparc32: fix sparse warnings in sun4d_smp.c · 65199b0a
      Sam Ravnborg 提交于
      Fix following warnings:
      sun4d_smp.c:113:13: warning: symbol 'smp4d_boot_cpus' was not declared. Should it be static?
      sun4d_smp.c:121:5: warning: symbol 'smp4d_boot_one_cpu' was not declared. Should it be static?
      sun4d_smp.c:162:13: warning: symbol 'smp4d_smp_done' was not declared. Should it be static?
      sun4d_smp.c:353:6: warning: symbol 'smp4d_cross_call_irq' was not declared. Should it be static?
      sun4d_smp.c:363:6: warning: symbol 'smp4d_percpu_timer_interrupt' was not declared. Should it be static?
      
      Add proper declarations
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      65199b0a
    • S
      sparc32: fix sparse warnings in sun4m_smp.c · b8417de3
      Sam Ravnborg 提交于
      Fix following warnings:
      sun4m_smp.c:72:13: warning: symbol 'smp4m_boot_cpus' was not declared. Should it be static?
      sun4m_smp.c:78:5: warning: symbol 'smp4m_boot_one_cpu' was not declared. Should it be static?
      sun4m_smp.c:120:13: warning: symbol 'smp4m_smp_done' was not declared. Should it be static?
      sun4m_smp.c:230:6: warning: symbol 'smp4m_cross_call_irq' was not declared. Should it be static?
      sun4m_smp.c:240:6: warning: symbol 'smp4m_percpu_timer_interrupt' was not declared. Should it be static?
      
      Add proper declarations.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b8417de3
    • S
      sparc32: fix sparse warnings in leon_pmc.c · 8b45c796
      Sam Ravnborg 提交于
      Fix following warnings:
      leon_pmc.c:15:14: warning: symbol 'pmc_leon_fixup_ids' was not declared. Should it be static?
      leon_pmc.c:22:5: warning: symbol 'pmc_leon_need_fixup' was not declared. Should it be static?
      leon_pmc.c:41:6: warning: symbol 'pmc_leon_idle_fixup' was not declared. Should it be static?
      leon_pmc.c:65:6: warning: symbol 'pmc_leon_idle' was not declared. Should it be static?
      
      Add static to definitions.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Daniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b45c796
    • S
      sparc32: fix sparse warnings in leon_kernel.c · 4007b65a
      Sam Ravnborg 提交于
      Fix following warnings:
      leon_kernel.c:40:15: warning: symbol 'leon3_gptimer_idx' was not declared. Should it be static?
      leon_kernel.c:68:6: warning: symbol 'leon_eirq_setup' was not declared. Should it be static?
      leon_kernel.c:273:13: warning: symbol 'leon_percpu_timer_ce_interrupt' was not declared. Should it be static?
      
      Define symbols as static.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Daniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4007b65a
    • S
      sparc: fix sparse warnings in of_device_common.c · 985edb5b
      Sam Ravnborg 提交于
      Fix following warnings (both sparc32 and sparc64):
      of_device_common.c:13:14: warning: symbol 'irq_of_parse_and_map' was not declared. Should it be static?
      of_device_common.c:24:5: warning: symbol 'of_address_to_resource' was not declared. Should it be static?
      of_device_common.c:37:14: warning: symbol 'of_iomap' was not declared. Should it be static?
      
      Add missing includes.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      985edb5b
    • S
      sparc32: fix sparse warnings in unaligned_32.c · 9edfae3f
      Sam Ravnborg 提交于
      Fix following warnings:
      unaligned_32.c:146:15: warning: symbol 'safe_compute_effective_address' was not declared. Should it be static?
      unaligned_32.c:235:17: warning: symbol 'kernel_unaligned_trap' was not declared. Should it be static?
      unaligned_32.c:319:17: warning: symbol 'user_unaligned_trap' was not declared. Should it be static?
      
      Add proper declarations in kernel.h + setup.h
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9edfae3f
    • S
      sparc32: fix sparse warning in ptrace_32.c · c8c8782d
      Sam Ravnborg 提交于
      Fix following warning:
      ptrace_32.c:444:16: warning: symbol 'syscall_trace' was not declared. Should it be static?
      
      Add declaration in kernel.h
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c8c8782d
    • S
      sparc32: fix sparse warnings in smp_32.c · c0b0ba84
      Sam Ravnborg 提交于
      Fix following warnings:
      smp_32.c:300:6: warning: symbol 'arch_cpu_pre_starting' was not declared. Should it be static?
      smp_32.c:320:6: warning: symbol 'arch_cpu_pre_online' was not declared. Should it be static?
      smp_32.c:347:6: warning: symbol 'sparc_start_secondary' was not declared. Should it be static?
      
      Add missing static definition.
      
      This left one warning:
         warning: symbol 'setup_profiling_timer' was not declared.
      
      This is a global symbol that has no declaration in any global header.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0b0ba84
    • S
      sparc32: fix sparse warnings in auxio_32.c · a3ee8faa
      Sam Ravnborg 提交于
      Fix following warnings:
      auxio_32.c:23:14: warning: symbol 'auxio_register' was not declared. Should it be static?
      auxio_32.c:26:13: warning: symbol 'auxio_probe' was not declared. Should it be static?
      auxio_32.c:108:13: warning: symbol 'auxio_power_probe' was not declared. Should it be static?
      
      Add proper decalarations for the above.
      
      The leaves one sparse warning:
      auxio_32.c:130:33: warning: cast removes address space of expression
      
      This is here:
          auxio_power_register = (unsigned char *) of_ioremap()
      
      This is __iomem that is removed from return value of of_ioremap()
      The pointer is later used without any helpers in process_32.c:
          *auxio_power_register |= AUXIO_POWER_OFF;
      
      It would be simple to introduce a few sbus() helpers.
      But as I was not sure this was correct the warning are left as-is.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a3ee8faa
    • S
      sparc32: fix sparse warnings in leon_pci_grpci2.c · 3731e199
      Sam Ravnborg 提交于
      Fix following warnings:
      leon_pci_grpci2.c:218:1: warning: symbol 'grpci2_dev_lock' was not declared. Should it be static?
      leon_pci_grpci2.c:219:20: warning: symbol 'grpci2priv' was not declared. Should it be static?
      leon_pci_grpci2.c:221:5: warning: symbol 'grpci2_map_irq' was not declared. Should it be static?
      leon_pci_grpci2.c:564:6: warning: symbol 'grpci2_hw_init' was not declared. Should it be
      static?
      
      + a lot of these:
      leon_pci_grpci2.c:252:9: warning: incorrect type in argument 1 (different address spaces)
      
      Declare the symbols static as they are only used in this file.
      Added missing __iomem annotations.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Daniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3731e199
    • S
      sparc32: fix sparse warnings in leon_pci_grpci1.c · d65f0cd3
      Sam Ravnborg 提交于
      Fix following warnings:
      leon_pci_grpci1.c:104:5: warning: symbol 'grpci1_map_irq' was not declared. Should it be static?
      leon_pci_grpci1.c:420:6: warning: symbol 'grpci1_hw_init' was not declared. Should it be static?
      + a lot of these:
      leon_pci_grpci1.c:693:18: warning: incorrect type in argument 1 (different address spaces)
      
      Added missing static to definitions.
      Added __iomem annotations
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Daniel Hellstrom <daniel@gaisler.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d65f0cd3
    • S
      sparc32: fix sparse warnings in tadpole.c · 6b5f02f3
      Sam Ravnborg 提交于
      Fix following warnings:
      tadpole.c:21:6: warning: symbol 'cpu_pwr_save' was not declared. Should it be static?
      tadpole.c:101:13: warning: symbol 'clock_stop_probe' was not declared. Should it be static?
      
      This actually revealed that cpu_pwr_save is only assigned.
      It was left static with a TODO comment for now - this should be cleaned up later.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b5f02f3
    • S
      sparc32: fix sparse warning in devices.c · 8885ec7c
      Sam Ravnborg 提交于
      Fix following warning:
      devices.c:114:13: warning: symbol 'device_scan' was not declared. Should it be static?
      
      Add prototype to asm/setup.h
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8885ec7c
    • S
      sparc: fix sparse warnings in cpu.c · fd250a66
      Sam Ravnborg 提交于
      Fix following sparc32 warning:
      cpu.c:430:29: warning: symbol 'cpuinfo_op' was not declared. Should it be static?
      
      Fix following sparc64 warnings:
      cpu.c:364:14: warning: symbol 'dcache_parity_tl1_occurred' was not declared. Should it be static?
      cpu.c:365:14: warning: symbol 'icache_parity_tl1_occurred' was not declared. Should it be static?
      
      Rearrange asm/cpu.h to share more stuff between sparc32 and sparc64.
      Added missing include to cpu.c of kernel.h
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd250a66
    • S
      sparc32: fix sparse warnings in windows.c · 7c8ee361
      Sam Ravnborg 提交于
      Fix following warnings:
      windows.c:16:6: warning: symbol 'flush_user_windows' was not declared. Should it be static?
      windows.c:109:6: warning: symbol 'try_to_clear_window_buffer' was not declared. Should it be static?
      
      Add missing include of cacheflush.h + add declaration of try_to_clear_window_buffer in kernel.h
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c8ee361