1. 14 8月, 2014 4 次提交
  2. 12 8月, 2014 2 次提交
    • D
      sparc64: Fix pcr_ops initialization and usage bugs. · 8bccf5b3
      David S. Miller 提交于
      Christopher reports that perf_event_print_debug() can crash in uniprocessor
      builds.  The crash is due to pcr_ops being NULL.
      
      This happens because pcr_arch_init() is only invoked by smp_cpus_done() which
      only executes in SMP builds.
      
      init_hw_perf_events() is closely intertwined with pcr_ops being setup properly,
      therefore:
      
      1) Call pcr_arch_init() early on from init_hw_perf_events(), instead of
         from smp_cpus_done().
      
      2) Do not hook up a PMU type if pcr_ops is NULL after pcr_arch_init().
      
      3) Move init_hw_perf_events to a later initcall so that it we will be
         sure to invoke pcr_arch_init() after all cpus are brought up.
      
      Finally, guard the one naked sequence of pcr_ops dereferences in
      __global_pmu_self() with an appropriate NULL check.
      Reported-by: NChristopher Alexander Tobias Schulze <cat.schulze@alice-dsl.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8bccf5b3
    • D
      sparc64: Do not disable interrupts in nmi_cpu_busy() · 58556104
      David S. Miller 提交于
      nmi_cpu_busy() is a SMP function call that just makes sure that all of the
      cpus are spinning using cpu cycles while the NMI test runs.
      
      It does not need to disable IRQs because we just care about NMIs executing
      which will even with 'normal' IRQs disabled.
      
      It is not legal to enable hard IRQs in a SMP cross call, in fact this bug
      triggers the BUG check in irq_work_run_list():
      
      	BUG_ON(!irqs_disabled());
      
      Because now irq_work_run() is invoked from the tail of
      generic_smp_call_function_single_interrupt().
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      58556104
  3. 07 8月, 2014 2 次提交
  4. 05 8月, 2014 1 次提交
  5. 22 7月, 2014 3 次提交
  6. 24 6月, 2014 1 次提交
  7. 28 5月, 2014 1 次提交
  8. 22 5月, 2014 1 次提交
  9. 19 5月, 2014 24 次提交
    • S
      sparc64: fix sparse warning in kgdb_64.c · 48c7eca5
      Sam Ravnborg 提交于
      Fix following warnings:
      kgdb_64.c:114:18: warning: symbol 'smp_kgdb_capture_client' was not declared. Should it be static?
      kgdb_64.c:161:17: warning: symbol 'kgdb_trap' was not declared. Should it be static?
      
      Add proper prototypes
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48c7eca5
    • S
      sparc64: fix sparse warnings in compat_audit.c · a1ca187e
      Sam Ravnborg 提交于
      Fix following warnings:
      compat_audit.c:4:10: warning: symbol 'sparc32_dir_class' was not declared. Should it be static?
      compat_audit.c:9:10: warning: symbol 'sparc32_chattr_class' was not declared. Should it be static?
      compat_audit.c:14:10: warning: symbol 'sparc32_write_class' was not declared. Should it be static?
      compat_audit.c:19:10: warning: symbol 'sparc32_read_class' was not declared. Should it be static?
      compat_audit.c:24:10: warning: symbol 'sparc32_signal_class' was not declared. Should it be static?
      compat_audit.c:29:5: warning: symbol 'sparc32_classify_syscall' was not declared. Should it be static?
      
      Add declarations to kernel.h
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1ca187e
    • S
      sparc64: fix sparse warnings in init_64.c · 59dec13b
      Sam Ravnborg 提交于
      Fix following warnings:
      init_64.c:191:10: warning: symbol 'dcpage_flushes' was not declared. Should it be static?
      init_64.c:193:10: warning: symbol 'dcpage_flushes_xcall' was not declared. Should it be static?
      
      Add extern declaration to asm/setup.h and drop local declaration in smp_64.h
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59dec13b
    • S
      sparc: fix sparse warnings in smp_32.c + smp_64.c · d3091298
      Sam Ravnborg 提交于
      Fix following warnings:
      smp_32.c:177:5: warning: symbol 'setup_profiling_timer' was not declared. Should it be static?
      smp_64.c:1202:5: warning: symbol 'setup_profiling_timer' was not declared. Should it be static?
      smp_64.c:989:6: warning: symbol 'kgdb_roundup_cpus' was not declared. Should it be static?
      
      Add prototype to include/linux/profile.h of setup_profiling_timer
      Add missing include to smp_64.c
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d3091298
    • S
      sparc64: fix sparse warnings in perf_event.c · 265c1ffa
      Sam Ravnborg 提交于
      Fix following sparse warnings:
      kernel/perf_event.c:113:1: warning: symbol 'cpu_hw_events' was not declared. Should it be static?
      kernel/perf_event.c:1156:6: warning: symbol 'perf_event_grab_pmc' was not declared. Should it be static?
      kernel/perf_event.c:1172:6: warning: symbol 'perf_event_release_pmc' was not declared. Should it be static?
      kernel/perf_event.c:1672:12: warning: symbol 'init_hw_perf_events' was not declared. Should it be static?
      kernel/perf_event.c:1749:52: warning: incorrect type in argument 2 (different address spaces)
      kernel/perf_event.c:1772:60: warning: incorrect type in argument 2 (different address spaces)
      kernel/perf_event.c:1779:60: warning: incorrect type in argument 2 (different address spaces)
      
      Define the functions static as they are not used outside this file.
      Fix it so copy_from_user are supplied with pointers annotated _user
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      265c1ffa
    • S
      sparc64: fix sparse warnings in kprobes.c · 2f827ea7
      Sam Ravnborg 提交于
      Fix following warnings:
      kprobes.c:515:15: warning: symbol 'trampoline_probe_handler' was not declared. Should it be static?
      kprobes.c:579:6: warning: symbol 'kretprobe_trampoline_holder' was not declared. Should it be static?
      
      Declare the functions static.
      kretprobe_trampoline_holder is magically used without any real
      reference so mark is __used, like other arch's do too.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2f827ea7
    • S
      sparc64: clean up compat_sigset_t.seta handling · c19ac326
      Sam Ravnborg 提交于
      Use compat_sigset_t rather than opencode the array
      Drop "switch (_NSIG_WORDS)" as we know this is always 1
      Introduce BUILD_BUG_ON() to catch if this changes
      
      As a side-effect of this fix following sparse warnings:
      signal32.c:220:60: warning: invalid access past the end of 'seta' (12 8)
      signal32.c:220:42: warning: invalid access past the end of 'seta' (8 8)
      signal32.c:219:60: warning: invalid access past the end of 'seta' (20 8)
      signal32.c:219:42: warning: invalid access past the end of 'seta' (16 8)
      signal32.c:218:60: warning: invalid access past the end of 'seta' (28 8)
      signal32.c:218:42: warning: invalid access past the end of 'seta' (24 8)
      signal32.c:309:68: warning: invalid access past the end of 'seta' (12 8)
      signal32.c:309:46: warning: invalid access past the end of 'seta' (8 8)
      signal32.c:308:68: warning: invalid access past the end of 'seta' (20 8)
      signal32.c:308:46: warning: invalid access past the end of 'seta' (16 8)
      signal32.c:307:68: warning: invalid access past the end of 'seta' (28 8)
      signal32.c:307:46: warning: invalid access past the end of 'seta' (24 8)
      
      They all pointed to code that was never executed - so no bugs fixed.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c19ac326
    • S
      sparc64: fix sparse "Should it be static?" warnings in signal32.c · abaff455
      Sam Ravnborg 提交于
      Fix following warnings:
      signal32.c:140:6: warning: symbol 'do_sigreturn32' was not declared. Should it be static?
      signal32.c:230:17: warning: symbol 'do_rt_sigreturn32' was not declared. Should it be static?
      signal32.c:729:6: warning: symbol 'do_signal32' was not declared. Should it be static?
      signal32.c:773:16: warning: symbol 'do_sys32_sigstack' was not declared. Should it be static?
      
      Add proper prototypes and drop local prototype
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      abaff455
    • S
      sparc64: fix sparse warnings in sys_sparc32.c · ed8eb755
      Sam Ravnborg 提交于
      Fix following warnings:
      sys_sparc32.c:52:17: warning: symbol 'sys32_truncate64' was not declared. Should it be static?
      sys_sparc32.c:60:17: warning: symbol 'sys32_ftruncate64' was not declared. Should it be static?
      sys_sparc32.c:98:17: warning: symbol 'compat_sys_stat64' was not declared. Should it be static?
      sys_sparc32.c:109:17: warning: symbol 'compat_sys_lstat64' was not declared. Should it be static?
      sys_sparc32.c:120:17: warning: symbol 'compat_sys_fstat64' was not declared. Should it be static?
      sys_sparc32.c:131:17: warning: symbol 'compat_sys_fstatat64' was not declared. Should it be static?
      sys_sparc32.c:196:27: warning: symbol 'sys32_pread64' was not declared. Should it be static?
      sys_sparc32.c:205:27: warning: symbol 'sys32_pwrite64' was not declared. Should it be static?
      sys_sparc32.c:214:17: warning: symbol 'compat_sys_readahead' was not declared. Should it be static?
      sys_sparc32.c:222:6: warning: symbol 'compat_sys_fadvise64' was not declared. Should it be static?
      sys_sparc32.c:230:6: warning: symbol 'compat_sys_fadvise64_64' was not declared. Should it be static?
      sys_sparc32.c:241:6: warning: symbol 'sys32_sync_file_range' was not declared. Should it be static?
      sys_sparc32.c:249:17: warning: symbol 'compat_sys_fallocate' was not declared. Should it be static?
      
      Add proper prototypes in systbls.h
      Include linux/compat.h to get access to necessary types
      Use inverse christmas tree order in includes
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ed8eb755
    • S
      sparc64: fix sparse warning in pci.c · 4ac7b826
      Sam Ravnborg 提交于
      Fix following warning:
      pci.c:886:5: warning: symbol 'pci64_dma_supported' was not declared. Should it be static?
      
      Add proper prototype in kernel.h and delete local prototype in iommu.c
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4ac7b826
    • S
      sparc64: fix sparse warnings in smp_64.c · a0c54a21
      Sam Ravnborg 提交于
      Fix following warnings:
      smp_64.c:88:6: warning: symbol 'smp_callin' was not declared. Should it be static?
      smp_64.c:133:6: warning: symbol 'cpu_panic' was not declared. Should it be static?
      smp_64.c:187:6: warning: symbol 'smp_synchronize_tick_client' was not declared. Should it be static?
      smp_64.c:821:18: warning: symbol 'smp_call_function_client' was not declared. Should it be static?
      smp_64.c:827:18: warning: symbol 'smp_call_function_single_client' was not declared. Should it be static?
      smp_64.c:964:18: warning: symbol 'smp_new_mmu_context_version_client' was not declared. Should it be static?
      smp_64.c:1149:6: warning: symbol 'smp_capture' was not declared. Should it be static?
      smp_64.c:1171:6: warning: symbol 'smp_release' was not declared. Should it be static?
      smp_64.c:1190:18: warning: symbol 'smp_penguin_jailcell' was not declared. Should it be static?
      smp_64.c:1410:18: warning: symbol 'smp_receive_signal_client' was not declared. Should it be static?
      
      Add prototypes in kernel.h or asm/smp_64.h as appropriate.
      Delete duplicate function kimage_addr_to_ra(), and
      adapt parameter to const void * to match the broader use.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a0c54a21
    • S
      sparc64: fix sparse warning in prom_64.c · cfbddd0d
      Sam Ravnborg 提交于
      Fix following warning:
      prom_64.c:376:6: warning: symbol 'arch_find_n_match_cpu_physical_id' was not declared. Should it be static?
      
      Add missing include to pick up prototype.
      Rearrange includes to use the inverse christmas tree structure.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cfbddd0d
    • S
      sparc64: fix sparse warning in btext.c · f1eabec5
      Sam Ravnborg 提交于
      Fix following warning:
      btext.c:140:6: warning: symbol 'btext_drawchar' was not declared. Should it be static?
      
      Define the function static as it is only used in this file.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f1eabec5
    • S
      sparc64: fix sparse warnings in sys_sparc_64.c + unaligned_64.c · 8df52620
      Sam Ravnborg 提交于
      Fix following warnings:
      kernel/sys_sparc_64.c:643:17: warning: symbol 'sys_kern_features' was not declared. Should it be static?
      kernel/unaligned_64.c:297:17: warning: symbol 'kernel_unaligned_trap' was not declared. Should it be static?
      kernel/unaligned_64.c:387:5: warning: symbol 'handle_popc' was not declared. Should it be static?
      kernel/unaligned_64.c:428:5: warning: symbol 'handle_ldf_stq' was not declared. Should it be static?
      kernel/unaligned_64.c:553:6: warning: symbol 'handle_ld_nf' was not declared. Should it be static?
      kernel/unaligned_64.c:579:6: warning: symbol 'handle_lddfmna' was not declared. Should it be static?
      kernel/unaligned_64.c:643:6: warning: symbol 'handle_stdfmna' was not declared. Should it be static?
      
      Functions that are only used in kernel/ - add prototypes in kernel.h
      Functions used outside kernel/ - add prototype in asm/setup.h
      Removed local prototypes
      
      One of the local prototypes had wrong signature (return void - not int).
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8df52620
    • S
      sparc64: fix sparse warning in process_64.c · d1584504
      Sam Ravnborg 提交于
      Fix following warning:
      process_64.c:91:25: warning: non-ANSI function declaration of function 'arch_cpu_idle_dead'
      
      Add proper (void) to function definition
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d1584504
    • S
      sparc64: fix sparse warning in traps_64.c · 9c2d84de
      Sam Ravnborg 提交于
      Fix following warning:
      traps_64.c:2384:6: error: symbol 'die_if_kernel' redeclared with different type (originally declared at include/asm/bug.h:23) - different modifiers
      
      Add proper __noreturn to the implementation to fix this
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9c2d84de
    • S
      sparc: drop use of extern for prototypes in arch/sparc/* · 2e74a74f
      Sam Ravnborg 提交于
      Drop the remaining uses of extern for prototypes in .h files
      in the sparc specific part of the kernel tree.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e74a74f
    • S
      sparc32: drop tadpole specific code · 77e39a79
      Sam Ravnborg 提交于
      tadpole.c assigned cpu_pwr_save based on the current configuration.
      The rest of the tadpole.c file was only used if cpu_pwr_save was
      dereferenced.
      But this variable was never dereferenced - and I went back to a 2.6.12
      kernel to check (from June 2005) - and not even then was it used.
      
      Drop this code as it has not been in use for ~10 years.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      77e39a79
    • S
      sparc: fix sparse warning in math_{32,64} · 8e9f0935
      Sam Ravnborg 提交于
      Fix following sparse warning:
      math_{32,64}.c: warning: symbol 'do_mathemu' was not declared. Should it be static?
      
      Add prototype in processor_{32,64} and drop extern in traps_{32,64}.c
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8e9f0935
    • S
      sparc32: fix sparse warnings in sys_sparc_32.c · 958b7b07
      Sam Ravnborg 提交于
      Fix following warnings:
      sys_sparc_32.c:32:26: warning: symbol 'sys_getpagesize' was not declared. Should it be static?
      sys_sparc_32.c:71:16: warning: symbol 'sparc_pipe' was not declared. Should it be static?
      sys_sparc_32.c:96:26: warning: symbol 'sys_mmap2' was not declared. Should it be static?
      sys_sparc_32.c:106:26: warning: symbol 'sys_mmap' was not declared. Should it be static?
      sys_sparc_32.c:114:6: warning: symbol 'sparc_remap_file_pages' was not declared. Should it be static?
      sys_sparc_32.c:127:1: warning: symbol 'c_sys_nis_syscall' was not declared. Should it be static?
      sys_sparc_32.c:144:1: warning: symbol 'sparc_breakpoint' was not declared. Should it be static?
      sys_sparc_32.c:200:16: warning: symbol 'sys_getdomainname' was not declared. Should it be static?
      
      Adapt systbls.h for use by both sparc32 + sparc64.
      In the process modify the return type of a few functions.
      
      Change return type from unsigned long to long:
      sys_mmap2()
      sys_mmap()
      
      Change return type from int to long:
      sparc_pipe()
      sys_getdomainname()
      
      The changed return type was done to align with sparc64.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      958b7b07
    • S
      sparc32: fix sparse warnings in time_32.c · fcea8b27
      Sam Ravnborg 提交于
      Fix following warnings:
      time_32.c:63:1: warning: symbol 'rtc_lock' was not declared. Should it be static?
      time_32.c:357:13: warning: symbol 'time_init' was not declared. Should it be static?
      time_32.c:148:16: warning: dereference of noderef expression
      
      Add extern definition of rtc_lock in mc146818rtc.h.
      time_init() is called from init/main.c - add prototype to kernel.h.
      Use proper u32 __iomem * for master_l10_counter.
      Fix all users.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fcea8b27
    • S
      sparc32: fix sparse warning in auxio_32.c · d2aca8f9
      Sam Ravnborg 提交于
      Fix following warning:
      auxio_32.c:133:33: warning: cast removes address space of expression
      
      To fix this auxio_power_register had to be defined as u8 _iomem.
      Use proper sbus operations on the pointer.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d2aca8f9
    • S
      sparc32: fix sparse warnings in pcic.c · 7738925d
      Sam Ravnborg 提交于
      Fix following warnings:
      pcic.c:164:14: warning: symbol 'pcic_regs' was not declared. Should it be static?
      pcic.c:165:14: warning: symbol 'pcic_speculative' was not declared. Should it be static?
      pcic.c:166:14: warning: symbol 'pcic_trapped' was not declared. Should it be static?
      pcic.c:332:66: warning: Using plain integer as NULL pointer
      pcic.c:344:66: warning: Using plain integer as NULL pointer
      pcic.c:539:38: warning: Using plain integer as NULL pointer
      pcic.c:677:1: warning: symbol 'pcic_pin_to_irq' was not declared. Should it be static?
      pcic.c:783:6: warning: symbol 'pcic_nmi' was not declared. Should it be static?
      
      Add extern for pcic_regs.
      Define a few variables static.
      Replace 0 with NULL.
      Delete unused funtion pcic_pin_to_irq().
      Include kernel.h so we could drop declaration of
      t_nmi and add prototype for pcic_nmi.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7738925d
    • S
      sparc32: fix build breakage · 178f0ffa
      Sam Ravnborg 提交于
      Add forward declaration to kernel.h to fix build breakage
      in some configurations
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      178f0ffa
  10. 04 5月, 2014 1 次提交