diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-21 22:28:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-21 22:28:24 -0500 |
commit | 1459143386c5d868c87903b8d433a52cffcf3e66 (patch) | |
tree | e7878a550aaf6a3af5e84f4258bbcc3bbdd20fef /arch/sparc | |
parent | 53b15ef3c2a6bac8e3d9bb58c5689d731ed9593b (diff) | |
parent | 8a84e01e147f44111988f9d8ccd2eaa30215a0f2 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ieee802154/fakehard.c
A bug fix went into 'net' for ieee802154/fakehard.c, which is removed
in 'net-next'.
Add build fix into the merge from Stephen Rothwell in openvswitch, the
logging macros take a new initial 'log' argument, a new call was added
in 'net' so when we merge that in here we have to explicitly add the
new 'log' arg to it else the build fails.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/atomic_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/cmpxchg_32.h | 12 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/swab.h | 12 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_schizo.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/smp_64.c | 4 | ||||
-rw-r--r-- | arch/sparc/lib/atomic32.c | 27 |
6 files changed, 43 insertions, 20 deletions
diff --git a/arch/sparc/include/asm/atomic_32.h b/arch/sparc/include/asm/atomic_32.h index 765c1776ec9f..0e69b7e7a439 100644 --- a/arch/sparc/include/asm/atomic_32.h +++ b/arch/sparc/include/asm/atomic_32.h | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | int atomic_add_return(int, atomic_t *); | 23 | int atomic_add_return(int, atomic_t *); |
24 | int atomic_cmpxchg(atomic_t *, int, int); | 24 | int atomic_cmpxchg(atomic_t *, int, int); |
25 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | 25 | int atomic_xchg(atomic_t *, int); |
26 | int __atomic_add_unless(atomic_t *, int, int); | 26 | int __atomic_add_unless(atomic_t *, int, int); |
27 | void atomic_set(atomic_t *, int); | 27 | void atomic_set(atomic_t *, int); |
28 | 28 | ||
diff --git a/arch/sparc/include/asm/cmpxchg_32.h b/arch/sparc/include/asm/cmpxchg_32.h index 32c29a133f9d..d38b52dca216 100644 --- a/arch/sparc/include/asm/cmpxchg_32.h +++ b/arch/sparc/include/asm/cmpxchg_32.h | |||
@@ -11,22 +11,14 @@ | |||
11 | #ifndef __ARCH_SPARC_CMPXCHG__ | 11 | #ifndef __ARCH_SPARC_CMPXCHG__ |
12 | #define __ARCH_SPARC_CMPXCHG__ | 12 | #define __ARCH_SPARC_CMPXCHG__ |
13 | 13 | ||
14 | static inline unsigned long xchg_u32(__volatile__ unsigned long *m, unsigned long val) | 14 | unsigned long __xchg_u32(volatile u32 *m, u32 new); |
15 | { | ||
16 | __asm__ __volatile__("swap [%2], %0" | ||
17 | : "=&r" (val) | ||
18 | : "0" (val), "r" (m) | ||
19 | : "memory"); | ||
20 | return val; | ||
21 | } | ||
22 | |||
23 | void __xchg_called_with_bad_pointer(void); | 15 | void __xchg_called_with_bad_pointer(void); |
24 | 16 | ||
25 | static inline unsigned long __xchg(unsigned long x, __volatile__ void * ptr, int size) | 17 | static inline unsigned long __xchg(unsigned long x, __volatile__ void * ptr, int size) |
26 | { | 18 | { |
27 | switch (size) { | 19 | switch (size) { |
28 | case 4: | 20 | case 4: |
29 | return xchg_u32(ptr, x); | 21 | return __xchg_u32(ptr, x); |
30 | } | 22 | } |
31 | __xchg_called_with_bad_pointer(); | 23 | __xchg_called_with_bad_pointer(); |
32 | return x; | 24 | return x; |
diff --git a/arch/sparc/include/uapi/asm/swab.h b/arch/sparc/include/uapi/asm/swab.h index a34ad079487e..4c7c12d69bea 100644 --- a/arch/sparc/include/uapi/asm/swab.h +++ b/arch/sparc/include/uapi/asm/swab.h | |||
@@ -9,9 +9,9 @@ static inline __u16 __arch_swab16p(const __u16 *addr) | |||
9 | { | 9 | { |
10 | __u16 ret; | 10 | __u16 ret; |
11 | 11 | ||
12 | __asm__ __volatile__ ("lduha [%1] %2, %0" | 12 | __asm__ __volatile__ ("lduha [%2] %3, %0" |
13 | : "=r" (ret) | 13 | : "=r" (ret) |
14 | : "r" (addr), "i" (ASI_PL)); | 14 | : "m" (*addr), "r" (addr), "i" (ASI_PL)); |
15 | return ret; | 15 | return ret; |
16 | } | 16 | } |
17 | #define __arch_swab16p __arch_swab16p | 17 | #define __arch_swab16p __arch_swab16p |
@@ -20,9 +20,9 @@ static inline __u32 __arch_swab32p(const __u32 *addr) | |||
20 | { | 20 | { |
21 | __u32 ret; | 21 | __u32 ret; |
22 | 22 | ||
23 | __asm__ __volatile__ ("lduwa [%1] %2, %0" | 23 | __asm__ __volatile__ ("lduwa [%2] %3, %0" |
24 | : "=r" (ret) | 24 | : "=r" (ret) |
25 | : "r" (addr), "i" (ASI_PL)); | 25 | : "m" (*addr), "r" (addr), "i" (ASI_PL)); |
26 | return ret; | 26 | return ret; |
27 | } | 27 | } |
28 | #define __arch_swab32p __arch_swab32p | 28 | #define __arch_swab32p __arch_swab32p |
@@ -31,9 +31,9 @@ static inline __u64 __arch_swab64p(const __u64 *addr) | |||
31 | { | 31 | { |
32 | __u64 ret; | 32 | __u64 ret; |
33 | 33 | ||
34 | __asm__ __volatile__ ("ldxa [%1] %2, %0" | 34 | __asm__ __volatile__ ("ldxa [%2] %3, %0" |
35 | : "=r" (ret) | 35 | : "=r" (ret) |
36 | : "r" (addr), "i" (ASI_PL)); | 36 | : "m" (*addr), "r" (addr), "i" (ASI_PL)); |
37 | return ret; | 37 | return ret; |
38 | } | 38 | } |
39 | #define __arch_swab64p __arch_swab64p | 39 | #define __arch_swab64p __arch_swab64p |
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 8f76f23dac38..f9c6813c132d 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
@@ -581,7 +581,7 @@ static irqreturn_t schizo_pcierr_intr_other(struct pci_pbm_info *pbm) | |||
581 | { | 581 | { |
582 | unsigned long csr_reg, csr, csr_error_bits; | 582 | unsigned long csr_reg, csr, csr_error_bits; |
583 | irqreturn_t ret = IRQ_NONE; | 583 | irqreturn_t ret = IRQ_NONE; |
584 | u16 stat; | 584 | u32 stat; |
585 | 585 | ||
586 | csr_reg = pbm->pbm_regs + SCHIZO_PCI_CTRL; | 586 | csr_reg = pbm->pbm_regs + SCHIZO_PCI_CTRL; |
587 | csr = upa_readq(csr_reg); | 587 | csr = upa_readq(csr_reg); |
@@ -617,7 +617,7 @@ static irqreturn_t schizo_pcierr_intr_other(struct pci_pbm_info *pbm) | |||
617 | pbm->name); | 617 | pbm->name); |
618 | ret = IRQ_HANDLED; | 618 | ret = IRQ_HANDLED; |
619 | } | 619 | } |
620 | pci_read_config_word(pbm->pci_bus->self, PCI_STATUS, &stat); | 620 | pbm->pci_ops->read(pbm->pci_bus, 0, PCI_STATUS, 2, &stat); |
621 | if (stat & (PCI_STATUS_PARITY | | 621 | if (stat & (PCI_STATUS_PARITY | |
622 | PCI_STATUS_SIG_TARGET_ABORT | | 622 | PCI_STATUS_SIG_TARGET_ABORT | |
623 | PCI_STATUS_REC_TARGET_ABORT | | 623 | PCI_STATUS_REC_TARGET_ABORT | |
@@ -625,7 +625,7 @@ static irqreturn_t schizo_pcierr_intr_other(struct pci_pbm_info *pbm) | |||
625 | PCI_STATUS_SIG_SYSTEM_ERROR)) { | 625 | PCI_STATUS_SIG_SYSTEM_ERROR)) { |
626 | printk("%s: PCI bus error, PCI_STATUS[%04x]\n", | 626 | printk("%s: PCI bus error, PCI_STATUS[%04x]\n", |
627 | pbm->name, stat); | 627 | pbm->name, stat); |
628 | pci_write_config_word(pbm->pci_bus->self, PCI_STATUS, 0xffff); | 628 | pbm->pci_ops->write(pbm->pci_bus, 0, PCI_STATUS, 2, 0xffff); |
629 | ret = IRQ_HANDLED; | 629 | ret = IRQ_HANDLED; |
630 | } | 630 | } |
631 | return ret; | 631 | return ret; |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 302c476413d5..da6f1a7fc4db 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -816,13 +816,17 @@ void arch_send_call_function_single_ipi(int cpu) | |||
816 | void __irq_entry smp_call_function_client(int irq, struct pt_regs *regs) | 816 | void __irq_entry smp_call_function_client(int irq, struct pt_regs *regs) |
817 | { | 817 | { |
818 | clear_softint(1 << irq); | 818 | clear_softint(1 << irq); |
819 | irq_enter(); | ||
819 | generic_smp_call_function_interrupt(); | 820 | generic_smp_call_function_interrupt(); |
821 | irq_exit(); | ||
820 | } | 822 | } |
821 | 823 | ||
822 | void __irq_entry smp_call_function_single_client(int irq, struct pt_regs *regs) | 824 | void __irq_entry smp_call_function_single_client(int irq, struct pt_regs *regs) |
823 | { | 825 | { |
824 | clear_softint(1 << irq); | 826 | clear_softint(1 << irq); |
827 | irq_enter(); | ||
825 | generic_smp_call_function_single_interrupt(); | 828 | generic_smp_call_function_single_interrupt(); |
829 | irq_exit(); | ||
826 | } | 830 | } |
827 | 831 | ||
828 | static void tsb_sync(void *info) | 832 | static void tsb_sync(void *info) |
diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c index a7c418ac26af..71cd65ab200c 100644 --- a/arch/sparc/lib/atomic32.c +++ b/arch/sparc/lib/atomic32.c | |||
@@ -45,6 +45,19 @@ ATOMIC_OP(add, +=) | |||
45 | 45 | ||
46 | #undef ATOMIC_OP | 46 | #undef ATOMIC_OP |
47 | 47 | ||
48 | int atomic_xchg(atomic_t *v, int new) | ||
49 | { | ||
50 | int ret; | ||
51 | unsigned long flags; | ||
52 | |||
53 | spin_lock_irqsave(ATOMIC_HASH(v), flags); | ||
54 | ret = v->counter; | ||
55 | v->counter = new; | ||
56 | spin_unlock_irqrestore(ATOMIC_HASH(v), flags); | ||
57 | return ret; | ||
58 | } | ||
59 | EXPORT_SYMBOL(atomic_xchg); | ||
60 | |||
48 | int atomic_cmpxchg(atomic_t *v, int old, int new) | 61 | int atomic_cmpxchg(atomic_t *v, int old, int new) |
49 | { | 62 | { |
50 | int ret; | 63 | int ret; |
@@ -137,3 +150,17 @@ unsigned long __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new) | |||
137 | return (unsigned long)prev; | 150 | return (unsigned long)prev; |
138 | } | 151 | } |
139 | EXPORT_SYMBOL(__cmpxchg_u32); | 152 | EXPORT_SYMBOL(__cmpxchg_u32); |
153 | |||
154 | unsigned long __xchg_u32(volatile u32 *ptr, u32 new) | ||
155 | { | ||
156 | unsigned long flags; | ||
157 | u32 prev; | ||
158 | |||
159 | spin_lock_irqsave(ATOMIC_HASH(ptr), flags); | ||
160 | prev = *ptr; | ||
161 | *ptr = new; | ||
162 | spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags); | ||
163 | |||
164 | return (unsigned long)prev; | ||
165 | } | ||
166 | EXPORT_SYMBOL(__xchg_u32); | ||