diff options
Diffstat (limited to 'arch/sparc')
28 files changed, 59 insertions, 44 deletions
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index d4f7a6a163dc..7d8b7e94b93b 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -13,6 +13,7 @@ config SPARC | |||
13 | bool | 13 | bool |
14 | default y | 14 | default y |
15 | select ARCH_MIGHT_HAVE_PC_PARPORT if SPARC64 && PCI | 15 | select ARCH_MIGHT_HAVE_PC_PARPORT if SPARC64 && PCI |
16 | select ARCH_MIGHT_HAVE_PC_SERIO | ||
16 | select OF | 17 | select OF |
17 | select OF_PROMTREE | 18 | select OF_PROMTREE |
18 | select HAVE_IDE | 19 | select HAVE_IDE |
@@ -26,7 +27,7 @@ config SPARC | |||
26 | select RTC_DRV_M48T59 | 27 | select RTC_DRV_M48T59 |
27 | select HAVE_DMA_ATTRS | 28 | select HAVE_DMA_ATTRS |
28 | select HAVE_DMA_API_DEBUG | 29 | select HAVE_DMA_API_DEBUG |
29 | select HAVE_ARCH_JUMP_LABEL | 30 | select HAVE_ARCH_JUMP_LABEL if SPARC64 |
30 | select GENERIC_IRQ_SHOW | 31 | select GENERIC_IRQ_SHOW |
31 | select ARCH_WANT_IPC_PARSE_VERSION | 32 | select ARCH_WANT_IPC_PARSE_VERSION |
32 | select GENERIC_PCI_IOMAP | 33 | select GENERIC_PCI_IOMAP |
@@ -152,10 +153,10 @@ config SMP | |||
152 | a system with only one CPU, say N. If you have a system with more | 153 | a system with only one CPU, say N. If you have a system with more |
153 | than one CPU, say Y. | 154 | than one CPU, say Y. |
154 | 155 | ||
155 | If you say N here, the kernel will run on single and multiprocessor | 156 | If you say N here, the kernel will run on uni- and multiprocessor |
156 | machines, but will use only one CPU of a multiprocessor machine. If | 157 | machines, but will use only one CPU of a multiprocessor machine. If |
157 | you say Y here, the kernel will run on many, but not all, | 158 | you say Y here, the kernel will run on many, but not all, |
158 | singleprocessor machines. On a singleprocessor machine, the kernel | 159 | uniprocessor machines. On a uniprocessor machine, the kernel |
159 | will run faster if you say N here. | 160 | will run faster if you say N here. |
160 | 161 | ||
161 | People using multiprocessor machines who say Y here should also say | 162 | People using multiprocessor machines who say Y here should also say |
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index bf390667657a..4b60a0c325ec 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild | |||
@@ -17,3 +17,4 @@ generic-y += trace_clock.h | |||
17 | generic-y += types.h | 17 | generic-y += types.h |
18 | generic-y += word-at-a-time.h | 18 | generic-y += word-at-a-time.h |
19 | generic-y += preempt.h | 19 | generic-y += preempt.h |
20 | generic-y += hash.h | ||
diff --git a/arch/sparc/include/asm/barrier_32.h b/arch/sparc/include/asm/barrier_32.h index c1b76654ee76..ae69eda288f4 100644 --- a/arch/sparc/include/asm/barrier_32.h +++ b/arch/sparc/include/asm/barrier_32.h | |||
@@ -1,15 +1,7 @@ | |||
1 | #ifndef __SPARC_BARRIER_H | 1 | #ifndef __SPARC_BARRIER_H |
2 | #define __SPARC_BARRIER_H | 2 | #define __SPARC_BARRIER_H |
3 | 3 | ||
4 | /* XXX Change this if we ever use a PSO mode kernel. */ | 4 | #include <asm/processor.h> /* for nop() */ |
5 | #define mb() __asm__ __volatile__ ("" : : : "memory") | 5 | #include <asm-generic/barrier.h> |
6 | #define rmb() mb() | ||
7 | #define wmb() mb() | ||
8 | #define read_barrier_depends() do { } while(0) | ||
9 | #define set_mb(__var, __value) do { __var = __value; mb(); } while(0) | ||
10 | #define smp_mb() __asm__ __volatile__("":::"memory") | ||
11 | #define smp_rmb() __asm__ __volatile__("":::"memory") | ||
12 | #define smp_wmb() __asm__ __volatile__("":::"memory") | ||
13 | #define smp_read_barrier_depends() do { } while(0) | ||
14 | 6 | ||
15 | #endif /* !(__SPARC_BARRIER_H) */ | 7 | #endif /* !(__SPARC_BARRIER_H) */ |
diff --git a/arch/sparc/include/asm/barrier_64.h b/arch/sparc/include/asm/barrier_64.h index 95d45986f908..b5aad964558e 100644 --- a/arch/sparc/include/asm/barrier_64.h +++ b/arch/sparc/include/asm/barrier_64.h | |||
@@ -53,4 +53,19 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \ | |||
53 | 53 | ||
54 | #define smp_read_barrier_depends() do { } while(0) | 54 | #define smp_read_barrier_depends() do { } while(0) |
55 | 55 | ||
56 | #define smp_store_release(p, v) \ | ||
57 | do { \ | ||
58 | compiletime_assert_atomic_type(*p); \ | ||
59 | barrier(); \ | ||
60 | ACCESS_ONCE(*p) = (v); \ | ||
61 | } while (0) | ||
62 | |||
63 | #define smp_load_acquire(p) \ | ||
64 | ({ \ | ||
65 | typeof(*p) ___p1 = ACCESS_ONCE(*p); \ | ||
66 | compiletime_assert_atomic_type(*p); \ | ||
67 | barrier(); \ | ||
68 | ___p1; \ | ||
69 | }) | ||
70 | |||
56 | #endif /* !(__SPARC64_BARRIER_H) */ | 71 | #endif /* !(__SPARC64_BARRIER_H) */ |
diff --git a/arch/sparc/include/uapi/asm/socket.h b/arch/sparc/include/uapi/asm/socket.h index 0f21e9a5ca18..54d9608681b6 100644 --- a/arch/sparc/include/uapi/asm/socket.h +++ b/arch/sparc/include/uapi/asm/socket.h | |||
@@ -74,6 +74,8 @@ | |||
74 | 74 | ||
75 | #define SO_MAX_PACING_RATE 0x0031 | 75 | #define SO_MAX_PACING_RATE 0x0031 |
76 | 76 | ||
77 | #define SO_BPF_EXTENSIONS 0x0032 | ||
78 | |||
77 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | 79 | /* Security levels - as per NRL IPv6 - don't actually do anything */ |
78 | #define SO_SECURITY_AUTHENTICATION 0x5001 | 80 | #define SO_SECURITY_AUTHENTICATION 0x5001 |
79 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 | 81 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 |
diff --git a/arch/sparc/include/uapi/asm/unistd.h b/arch/sparc/include/uapi/asm/unistd.h index 62ced589bcf7..b73274fb961a 100644 --- a/arch/sparc/include/uapi/asm/unistd.h +++ b/arch/sparc/include/uapi/asm/unistd.h | |||
@@ -408,8 +408,10 @@ | |||
408 | #define __NR_kern_features 340 | 408 | #define __NR_kern_features 340 |
409 | #define __NR_kcmp 341 | 409 | #define __NR_kcmp 341 |
410 | #define __NR_finit_module 342 | 410 | #define __NR_finit_module 342 |
411 | #define __NR_sched_setattr 343 | ||
412 | #define __NR_sched_getattr 344 | ||
411 | 413 | ||
412 | #define NR_syscalls 343 | 414 | #define NR_syscalls 345 |
413 | 415 | ||
414 | /* Bitmask values returned from kern_features system call. */ | 416 | /* Bitmask values returned from kern_features system call. */ |
415 | #define KERN_FEATURE_MIXED_MODE_STACK 0x00000001 | 417 | #define KERN_FEATURE_MIXED_MODE_STACK 0x00000001 |
diff --git a/arch/sparc/kernel/cpumap.c b/arch/sparc/kernel/cpumap.c index cb5d272d658a..de1c844dfabc 100644 --- a/arch/sparc/kernel/cpumap.c +++ b/arch/sparc/kernel/cpumap.c | |||
@@ -6,7 +6,6 @@ | |||
6 | #include <linux/export.h> | 6 | #include <linux/export.h> |
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/init.h> | ||
10 | #include <linux/cpumask.h> | 9 | #include <linux/cpumask.h> |
11 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
12 | #include <asm/cpudata.h> | 11 | #include <asm/cpudata.h> |
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c index e306fb08ee5e..acf8314cec48 100644 --- a/arch/sparc/kernel/ebus.c +++ b/arch/sparc/kernel/ebus.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <linux/export.h> | 7 | #include <linux/export.h> |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/init.h> | ||
11 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
12 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
13 | 12 | ||
diff --git a/arch/sparc/kernel/hvtramp.S b/arch/sparc/kernel/hvtramp.S index 4eb1a5a1d544..b7ddcdd1dea9 100644 --- a/arch/sparc/kernel/hvtramp.S +++ b/arch/sparc/kernel/hvtramp.S | |||
@@ -3,7 +3,6 @@ | |||
3 | * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net> | 3 | * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net> |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/init.h> | ||
7 | 6 | ||
8 | #include <asm/thread_info.h> | 7 | #include <asm/thread_info.h> |
9 | #include <asm/hypervisor.h> | 8 | #include <asm/hypervisor.h> |
diff --git a/arch/sparc/kernel/of_device_common.c b/arch/sparc/kernel/of_device_common.c index de199bf0cb05..3241f56331c2 100644 --- a/arch/sparc/kernel/of_device_common.c +++ b/arch/sparc/kernel/of_device_common.c | |||
@@ -1,7 +1,6 @@ | |||
1 | #include <linux/string.h> | 1 | #include <linux/string.h> |
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/of.h> | 3 | #include <linux/of.h> |
4 | #include <linux/init.h> | ||
5 | #include <linux/export.h> | 4 | #include <linux/export.h> |
6 | #include <linux/mod_devicetable.h> | 5 | #include <linux/mod_devicetable.h> |
7 | #include <linux/errno.h> | 6 | #include <linux/errno.h> |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index cb021453de2a..1555bbcae1ee 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -392,7 +392,7 @@ static void apb_fake_ranges(struct pci_dev *dev, | |||
392 | res->flags = IORESOURCE_IO; | 392 | res->flags = IORESOURCE_IO; |
393 | region.start = (first << 21); | 393 | region.start = (first << 21); |
394 | region.end = (last << 21) + ((1 << 21) - 1); | 394 | region.end = (last << 21) + ((1 << 21) - 1); |
395 | pcibios_bus_to_resource(dev, res, ®ion); | 395 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
396 | 396 | ||
397 | pci_read_config_byte(dev, APB_MEM_ADDRESS_MAP, &map); | 397 | pci_read_config_byte(dev, APB_MEM_ADDRESS_MAP, &map); |
398 | apb_calc_first_last(map, &first, &last); | 398 | apb_calc_first_last(map, &first, &last); |
@@ -400,7 +400,7 @@ static void apb_fake_ranges(struct pci_dev *dev, | |||
400 | res->flags = IORESOURCE_MEM; | 400 | res->flags = IORESOURCE_MEM; |
401 | region.start = (first << 29); | 401 | region.start = (first << 29); |
402 | region.end = (last << 29) + ((1 << 29) - 1); | 402 | region.end = (last << 29) + ((1 << 29) - 1); |
403 | pcibios_bus_to_resource(dev, res, ®ion); | 403 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
404 | } | 404 | } |
405 | 405 | ||
406 | static void pci_of_scan_bus(struct pci_pbm_info *pbm, | 406 | static void pci_of_scan_bus(struct pci_pbm_info *pbm, |
@@ -491,7 +491,7 @@ static void of_scan_pci_bridge(struct pci_pbm_info *pbm, | |||
491 | res->flags = flags; | 491 | res->flags = flags; |
492 | region.start = GET_64BIT(ranges, 1); | 492 | region.start = GET_64BIT(ranges, 1); |
493 | region.end = region.start + size - 1; | 493 | region.end = region.start + size - 1; |
494 | pcibios_bus_to_resource(dev, res, ®ion); | 494 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
495 | } | 495 | } |
496 | after_ranges: | 496 | after_ranges: |
497 | sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), | 497 | sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), |
@@ -1005,6 +1005,5 @@ static int __init of_pci_slot_init(void) | |||
1005 | 1005 | ||
1006 | return 0; | 1006 | return 0; |
1007 | } | 1007 | } |
1008 | 1008 | device_initcall(of_pci_slot_init); | |
1009 | module_init(of_pci_slot_init); | ||
1010 | #endif | 1009 | #endif |
diff --git a/arch/sparc/kernel/pci_common.c b/arch/sparc/kernel/pci_common.c index a6895987fb70..944a06536ecc 100644 --- a/arch/sparc/kernel/pci_common.c +++ b/arch/sparc/kernel/pci_common.c | |||
@@ -5,7 +5,6 @@ | |||
5 | 5 | ||
6 | #include <linux/string.h> | 6 | #include <linux/string.h> |
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | #include <linux/init.h> | ||
9 | #include <linux/pci.h> | 8 | #include <linux/pci.h> |
10 | #include <linux/device.h> | 9 | #include <linux/device.h> |
11 | #include <linux/of_device.h> | 10 | #include <linux/of_device.h> |
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index fdd819dfdacf..510baec1b69b 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/reboot.h> | 22 | #include <linux/reboot.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
25 | #include <linux/init.h> | ||
26 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
27 | 26 | ||
28 | #include <asm/auxio.h> | 27 | #include <asm/auxio.h> |
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index 32a280ec38c1..d7b4967f8fa6 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c | |||
@@ -58,9 +58,12 @@ void arch_cpu_idle(void) | |||
58 | { | 58 | { |
59 | if (tlb_type != hypervisor) { | 59 | if (tlb_type != hypervisor) { |
60 | touch_nmi_watchdog(); | 60 | touch_nmi_watchdog(); |
61 | local_irq_enable(); | ||
61 | } else { | 62 | } else { |
62 | unsigned long pstate; | 63 | unsigned long pstate; |
63 | 64 | ||
65 | local_irq_enable(); | ||
66 | |||
64 | /* The sun4v sleeping code requires that we have PSTATE.IE cleared over | 67 | /* The sun4v sleeping code requires that we have PSTATE.IE cleared over |
65 | * the cpu sleep hypervisor call. | 68 | * the cpu sleep hypervisor call. |
66 | */ | 69 | */ |
@@ -82,7 +85,6 @@ void arch_cpu_idle(void) | |||
82 | : "=&r" (pstate) | 85 | : "=&r" (pstate) |
83 | : "i" (PSTATE_IE)); | 86 | : "i" (PSTATE_IE)); |
84 | } | 87 | } |
85 | local_irq_enable(); | ||
86 | } | 88 | } |
87 | 89 | ||
88 | #ifdef CONFIG_HOTPLUG_CPU | 90 | #ifdef CONFIG_HOTPLUG_CPU |
diff --git a/arch/sparc/kernel/sparc_ksyms_32.c b/arch/sparc/kernel/sparc_ksyms_32.c index e521c54560f9..bf4ccb10a78c 100644 --- a/arch/sparc/kernel/sparc_ksyms_32.c +++ b/arch/sparc/kernel/sparc_ksyms_32.c | |||
@@ -6,7 +6,6 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/init.h> | ||
10 | 9 | ||
11 | #include <asm/pgtable.h> | 10 | #include <asm/pgtable.h> |
12 | #include <asm/uaccess.h> | 11 | #include <asm/uaccess.h> |
diff --git a/arch/sparc/kernel/sparc_ksyms_64.c b/arch/sparc/kernel/sparc_ksyms_64.c index 9f5e24ddcc70..a92d5d2c46a3 100644 --- a/arch/sparc/kernel/sparc_ksyms_64.c +++ b/arch/sparc/kernel/sparc_ksyms_64.c | |||
@@ -7,7 +7,6 @@ | |||
7 | 7 | ||
8 | #include <linux/export.h> | 8 | #include <linux/export.h> |
9 | #include <linux/pci.h> | 9 | #include <linux/pci.h> |
10 | #include <linux/init.h> | ||
11 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
12 | 11 | ||
13 | #include <asm/cpudata.h> | 12 | #include <asm/cpudata.h> |
diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S index 87729fff13b9..33a17e7b3ccd 100644 --- a/arch/sparc/kernel/syscalls.S +++ b/arch/sparc/kernel/syscalls.S | |||
@@ -189,7 +189,8 @@ linux_sparc_syscall32: | |||
189 | mov %i0, %l5 ! IEU1 | 189 | mov %i0, %l5 ! IEU1 |
190 | 5: call %l7 ! CTI Group brk forced | 190 | 5: call %l7 ! CTI Group brk forced |
191 | srl %i5, 0, %o5 ! IEU1 | 191 | srl %i5, 0, %o5 ! IEU1 |
192 | ba,a,pt %xcc, 3f | 192 | ba,pt %xcc, 3f |
193 | sra %o0, 0, %o0 | ||
193 | 194 | ||
194 | /* Linux native system calls enter here... */ | 195 | /* Linux native system calls enter here... */ |
195 | .align 32 | 196 | .align 32 |
@@ -217,7 +218,6 @@ linux_sparc_syscall: | |||
217 | 3: stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | 218 | 3: stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] |
218 | ret_sys_call: | 219 | ret_sys_call: |
219 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3 | 220 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3 |
220 | sra %o0, 0, %o0 | ||
221 | mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 | 221 | mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 |
222 | sllx %g2, 32, %g2 | 222 | sllx %g2, 32, %g2 |
223 | 223 | ||
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index 7b87171ecf1e..151ace8766cc 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S | |||
@@ -85,4 +85,4 @@ sys_call_table: | |||
85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime | 86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
87 | /*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev | 87 | /*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev |
88 | /*340*/ .long sys_ni_syscall, sys_kcmp, sys_finit_module | 88 | /*340*/ .long sys_ni_syscall, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 6d81597064b6..4bd4e2bb26cf 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -86,7 +86,7 @@ sys_call_table32: | |||
86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init | 86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init |
87 | /*330*/ .word compat_sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime | 87 | /*330*/ .word compat_sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime |
88 | .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev | 88 | .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev |
89 | /*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module | 89 | /*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr |
90 | 90 | ||
91 | #endif /* CONFIG_COMPAT */ | 91 | #endif /* CONFIG_COMPAT */ |
92 | 92 | ||
@@ -164,4 +164,4 @@ sys_call_table: | |||
164 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 164 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
165 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime | 165 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
166 | .word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev | 166 | .word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev |
167 | /*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module | 167 | /*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr |
diff --git a/arch/sparc/kernel/trampoline_32.S b/arch/sparc/kernel/trampoline_32.S index 76dcbd3c988a..3eed99fc6989 100644 --- a/arch/sparc/kernel/trampoline_32.S +++ b/arch/sparc/kernel/trampoline_32.S | |||
@@ -5,7 +5,6 @@ | |||
5 | * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 5 | * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/init.h> | ||
9 | #include <asm/head.h> | 8 | #include <asm/head.h> |
10 | #include <asm/psr.h> | 9 | #include <asm/psr.h> |
11 | #include <asm/page.h> | 10 | #include <asm/page.h> |
diff --git a/arch/sparc/kernel/trampoline_64.S b/arch/sparc/kernel/trampoline_64.S index ad4bde3bb61e..737f8cbc7d56 100644 --- a/arch/sparc/kernel/trampoline_64.S +++ b/arch/sparc/kernel/trampoline_64.S | |||
@@ -4,7 +4,6 @@ | |||
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/init.h> | ||
8 | 7 | ||
9 | #include <asm/head.h> | 8 | #include <asm/head.h> |
10 | #include <asm/asi.h> | 9 | #include <asm/asi.h> |
diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c index 30963178d7e9..9bd9ce80bf77 100644 --- a/arch/sparc/mm/hugetlbpage.c +++ b/arch/sparc/mm/hugetlbpage.c | |||
@@ -4,7 +4,6 @@ | |||
4 | * Copyright (C) 2002, 2003, 2006 David S. Miller (davem@davemloft.net) | 4 | * Copyright (C) 2002, 2003, 2006 David S. Miller (davem@davemloft.net) |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/init.h> | ||
8 | #include <linux/fs.h> | 7 | #include <linux/fs.h> |
9 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
10 | #include <linux/hugetlb.h> | 9 | #include <linux/hugetlb.h> |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 5322e530d09c..eafbc65c9c47 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -1021,7 +1021,8 @@ static void __init add_node_ranges(void) | |||
1021 | "start[%lx] end[%lx]\n", | 1021 | "start[%lx] end[%lx]\n", |
1022 | nid, start, this_end); | 1022 | nid, start, this_end); |
1023 | 1023 | ||
1024 | memblock_set_node(start, this_end - start, nid); | 1024 | memblock_set_node(start, this_end - start, |
1025 | &memblock.memory, nid); | ||
1025 | start = this_end; | 1026 | start = this_end; |
1026 | } | 1027 | } |
1027 | } | 1028 | } |
@@ -1325,7 +1326,7 @@ static void __init bootmem_init_nonnuma(void) | |||
1325 | (top_of_ram - total_ram) >> 20); | 1326 | (top_of_ram - total_ram) >> 20); |
1326 | 1327 | ||
1327 | init_node_masks_nonnuma(); | 1328 | init_node_masks_nonnuma(); |
1328 | memblock_set_node(0, (phys_addr_t)ULLONG_MAX, 0); | 1329 | memblock_set_node(0, (phys_addr_t)ULLONG_MAX, &memblock.memory, 0); |
1329 | allocate_node_data(0); | 1330 | allocate_node_data(0); |
1330 | node_set_online(0); | 1331 | node_set_online(0); |
1331 | } | 1332 | } |
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 869023abe5a4..cfbe53c17b0d 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
15 | #include <linux/vmalloc.h> | 15 | #include <linux/vmalloc.h> |
16 | #include <linux/kdebug.h> | 16 | #include <linux/kdebug.h> |
17 | #include <linux/export.h> | ||
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/log2.h> | 20 | #include <linux/log2.h> |
@@ -62,6 +63,7 @@ extern unsigned long last_valid_pfn; | |||
62 | static pgd_t *srmmu_swapper_pg_dir; | 63 | static pgd_t *srmmu_swapper_pg_dir; |
63 | 64 | ||
64 | const struct sparc32_cachetlb_ops *sparc32_cachetlb_ops; | 65 | const struct sparc32_cachetlb_ops *sparc32_cachetlb_ops; |
66 | EXPORT_SYMBOL(sparc32_cachetlb_ops); | ||
65 | 67 | ||
66 | #ifdef CONFIG_SMP | 68 | #ifdef CONFIG_SMP |
67 | const struct sparc32_cachetlb_ops *local_ops; | 69 | const struct sparc32_cachetlb_ops *local_ops; |
diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c index ad3bf4b4324d..b12cb5e72812 100644 --- a/arch/sparc/mm/tlb.c +++ b/arch/sparc/mm/tlb.c | |||
@@ -4,7 +4,6 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/init.h> | ||
8 | #include <linux/percpu.h> | 7 | #include <linux/percpu.h> |
9 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
10 | #include <linux/swap.h> | 9 | #include <linux/swap.h> |
diff --git a/arch/sparc/mm/tsb.c b/arch/sparc/mm/tsb.c index 3b3a360b429a..f5d506fdddad 100644 --- a/arch/sparc/mm/tsb.c +++ b/arch/sparc/mm/tsb.c | |||
@@ -273,7 +273,7 @@ void __init pgtable_cache_init(void) | |||
273 | prom_halt(); | 273 | prom_halt(); |
274 | } | 274 | } |
275 | 275 | ||
276 | for (i = 0; i < 8; i++) { | 276 | for (i = 0; i < ARRAY_SIZE(tsb_cache_names); i++) { |
277 | unsigned long size = 8192 << i; | 277 | unsigned long size = 8192 << i; |
278 | const char *name = tsb_cache_names[i]; | 278 | const char *name = tsb_cache_names[i]; |
279 | 279 | ||
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c index 218b6b23c378..01fe9946d388 100644 --- a/arch/sparc/net/bpf_jit_comp.c +++ b/arch/sparc/net/bpf_jit_comp.c | |||
@@ -497,9 +497,20 @@ void bpf_jit_compile(struct sk_filter *fp) | |||
497 | case BPF_S_ALU_MUL_K: /* A *= K */ | 497 | case BPF_S_ALU_MUL_K: /* A *= K */ |
498 | emit_alu_K(MUL, K); | 498 | emit_alu_K(MUL, K); |
499 | break; | 499 | break; |
500 | case BPF_S_ALU_DIV_K: /* A /= K */ | 500 | case BPF_S_ALU_DIV_K: /* A /= K with K != 0*/ |
501 | emit_alu_K(MUL, K); | 501 | if (K == 1) |
502 | emit_read_y(r_A); | 502 | break; |
503 | emit_write_y(G0); | ||
504 | #ifdef CONFIG_SPARC32 | ||
505 | /* The Sparc v8 architecture requires | ||
506 | * three instructions between a %y | ||
507 | * register write and the first use. | ||
508 | */ | ||
509 | emit_nop(); | ||
510 | emit_nop(); | ||
511 | emit_nop(); | ||
512 | #endif | ||
513 | emit_alu_K(DIV, K); | ||
503 | break; | 514 | break; |
504 | case BPF_S_ALU_DIV_X: /* A /= X; */ | 515 | case BPF_S_ALU_DIV_X: /* A /= X; */ |
505 | emit_cmpi(r_X, 0); | 516 | emit_cmpi(r_X, 0); |
diff --git a/arch/sparc/prom/p1275.c b/arch/sparc/prom/p1275.c index 04a4540509dd..e58b81726319 100644 --- a/arch/sparc/prom/p1275.c +++ b/arch/sparc/prom/p1275.c | |||
@@ -5,7 +5,6 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/init.h> | ||
9 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
10 | #include <linux/smp.h> | 9 | #include <linux/smp.h> |
11 | #include <linux/string.h> | 10 | #include <linux/string.h> |