summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
Commit message (Collapse)AuthorAgeFilesLines
* sparc: Hook up seccomp and getrandom system calls.David S. Miller2014-08-062-3/+3
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: fix decimal printf format specifiers prefixed with 0xHans Wennborg2014-08-061-1/+1
| | | | | | | | | | The prefix suggests the number should be printed in hex, so use the %x specifier to do that. Found by using regex suggested by Joe Perches. Signed-off-by: Hans Wennborg <hans@hanshq.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparcDavid S. Miller2014-08-054-1/+5
|\ | | | | | | | | | | | | | | | | Conflicts: arch/sparc/mm/init_64.c Conflict was simple non-overlapping additions. Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: ldc_connect() should not return EINVAL when handshake is in progress.Sowmini Varadhan2014-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The LDC handshake could have been asynchronously triggered after ldc_bind() enables the ldc_rx() receive interrupt-handler (and thus intercepts incoming control packets) and before vio_port_up() calls ldc_connect(). If that is the case, ldc_connect() should return 0 and let the state-machine progress. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Karl Volz <karl.volz@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc: Hook up renameat2 syscall.David S. Miller2014-07-213-0/+4
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: Add support for seek and shorter read to /dev/mdescKhalid Aziz2014-07-211-13/+69
| | | | | | | | | | | | | | | | | | | | | | /dev/mdesc on Linux does not support reading arbitrary number of bytes and seeking while /dev/mdesc on Solaris does. This causes tools that work on Solaris to break on Linux. This patch adds these two capabilities to /dev/mdesc. Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: use %s for unaligned panicKees Cook2014-07-211-1/+1
|/ | | | | | | | Since unaligned_panic() takes a literal string, make sure it can never accidentally be used as a format string. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* nmi: provide the option to issue an NMI back trace to every cpu but currentAaron Tomlin2014-06-231-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | Sometimes it is preferred not to use the trigger_all_cpu_backtrace() routine when one wants to avoid capturing a back trace for current. For instance if one was previously captured recently. This patch provides a new routine namely trigger_allbutself_cpu_backtrace() which offers the flexibility to issue an NMI to every cpu but current and capture a back trace accordingly. Patch x86 and sparc to support new routine. [dzickus@redhat.com: add stub in #else clause] [dzickus@redhat.com: don't print message in single processor case, wrap with get/put_cpu based on Oleg's suggestion] [sfr@canb.auug.org.au: undo C99ism] Signed-off-by: Aaron Tomlin <atomlin@redhat.com> Signed-off-by: Don Zickus <dzickus@redhat.com> Acked-by: David S. Miller <davem@davemloft.net> Cc: Mateusz Guzik <mguzik@redhat.com> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-nextLinus Torvalds2014-06-1953-787/+617
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull sparc fixes from David Miller: "Sparc sparse fixes from Sam Ravnborg" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next: (67 commits) sparc64: fix sparse warnings in int_64.c sparc64: fix sparse warning in ftrace.c sparc64: fix sparse warning in kprobes.c sparc64: fix sparse warning in kgdb_64.c sparc64: fix sparse warnings in compat_audit.c sparc64: fix sparse warnings in init_64.c sparc64: fix sparse warnings in aes_glue.c sparc: fix sparse warnings in smp_32.c + smp_64.c sparc64: fix sparse warnings in perf_event.c sparc64: fix sparse warnings in kprobes.c sparc64: fix sparse warning in tsb.c sparc64: clean up compat_sigset_t.seta handling sparc64: fix sparse "Should it be static?" warnings in signal32.c sparc64: fix sparse warnings in sys_sparc32.c sparc64: fix sparse warning in pci.c sparc64: fix sparse warnings in smp_64.c sparc64: fix sparse warning in prom_64.c sparc64: fix sparse warning in btext.c sparc64: fix sparse warnings in sys_sparc_64.c + unaligned_64.c sparc64: fix sparse warning in process_64.c ... Conflicts: arch/sparc/include/asm/pgtable_64.h
| * sparc64: fix sparse warning in kgdb_64.cSam Ravnborg2014-05-182-0/+5
| | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warnings in compat_audit.cSam Ravnborg2014-05-183-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warnings in init_64.cSam Ravnborg2014-05-181-5/+1
| | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc: fix sparse warnings in smp_32.c + smp_64.cSam Ravnborg2014-05-182-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warnings in perf_event.cSam Ravnborg2014-05-181-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warnings in kprobes.cSam Ravnborg2014-05-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: clean up compat_sigset_t.seta handlingSam Ravnborg2014-05-181-38/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse "Should it be static?" warnings in signal32.cSam Ravnborg2014-05-183-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warnings in sys_sparc32.cSam Ravnborg2014-05-182-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warning in pci.cSam Ravnborg2014-05-183-2/+5
| | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warnings in smp_64.cSam Ravnborg2014-05-182-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warning in prom_64.cSam Ravnborg2014-05-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warning in btext.cSam Ravnborg2014-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warnings in sys_sparc_64.c + unaligned_64.cSam Ravnborg2014-05-184-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warning in process_64.cSam Ravnborg2014-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc64: fix sparse warning in traps_64.cSam Ravnborg2014-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc: drop use of extern for prototypes in arch/sparc/*Sam Ravnborg2014-05-189-263/+262
| | | | | | | | | | | | | | | | Drop the remaining uses of extern for prototypes in .h files in the sparc specific part of the kernel tree. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: drop tadpole specific codeSam Ravnborg2014-05-184-135/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc: fix sparse warning in math_{32,64}Sam Ravnborg2014-05-182-4/+0
| | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in sys_sparc_32.cSam Ravnborg2014-05-182-34/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in time_32.cSam Ravnborg2014-05-183-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warning in auxio_32.cSam Ravnborg2014-05-182-5/+9
| | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in pcic.cSam Ravnborg2014-05-182-30/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix build breakageSam Ravnborg2014-05-181-0/+1
| | | | | | | | | | | | | | | | Add forward declaration to kernel.h to fix build breakage in some configurations Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: introduce asm-generic/io.hSam Ravnborg2014-05-022-157/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: replace flip_dword() with swab32()Sam Ravnborg2014-05-023-5/+5
| | | | | | | | | | | | | | | | | | The latter is a generic implmentation. flip_{,d}word() is sparc32 specific and will be dropped. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in leon_smp.cSam Ravnborg2014-04-292-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in sun4d_smp.cSam Ravnborg2014-04-292-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in sun4m_smp.cSam Ravnborg2014-04-292-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in leon_pmc.cSam Ravnborg2014-04-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in leon_kernel.cSam Ravnborg2014-04-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc: fix sparse warnings in of_device_common.cSam Ravnborg2014-04-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in unaligned_32.cSam Ravnborg2014-04-292-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warning in ptrace_32.cSam Ravnborg2014-04-292-0/+5
| | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in smp_32.cSam Ravnborg2014-04-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in auxio_32.cSam Ravnborg2014-04-293-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in leon_pci_grpci2.cSam Ravnborg2014-04-291-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in leon_pci_grpci1.cSam Ravnborg2014-04-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warnings in tadpole.cSam Ravnborg2014-04-293-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc32: fix sparse warning in devices.cSam Ravnborg2014-04-291-0/+1
| | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc: fix sparse warnings in cpu.cSam Ravnborg2014-04-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud