8724a18868
config handling stack overflow 55a62eb0-xl-correct-handling-of-extra_config-in-main_cpupoolcreate.patch - bsc#907514 - Bus fatal error & sles12 sudden reboot has been observed - bsc#910258 - SLES12 Xen host crashes with FATAL NMI after shutdown of guest with VT-d NIC - bsc#918984 - Bus fatal error & sles11-SP4 sudden reboot has been observed - bsc#923967 - Partner-L3: Bus fatal error & sles11-SP3 sudden reboot has been observed 552d293b-x86-vMSI-X-honor-all-mask-requests.patch 552d2966-x86-vMSI-X-add-valid-bits-for-read-acceleration.patch 5576f143-x86-adjust-PV-I-O-emulation-functions-types.patch 55795a52-x86-vMSI-X-support-qword-MMIO-access.patch 5583d9c5-x86-MSI-X-cleanup.patch 5583da09-x86-MSI-track-host-and-guest-masking-separately.patch 55b0a218-x86-PCI-CFG-write-intercept.patch 55b0a255-x86-MSI-X-maskall.patch 55b0a283-x86-MSI-X-teardown.patch 55b0a2ab-x86-MSI-X-enable.patch 55b0a2db-x86-MSI-track-guest-masking.patch - Upstream patches from Jan 552d0f49-x86-traps-identify-the-vcpu-in-context-when-dumping-regs.patch 559bc633-x86-cpupool-clear-proper-cpu_valid-bit-on-CPU-teardown.patch 559bc64e-credit1-properly-deal-with-CPUs-not-in-any-pool.patch 559bc87f-x86-hvmloader-avoid-data-corruption-with-xenstore-rw.patch 55a66a1e-make-rangeset_report_ranges-report-all-ranges.patch 55a77e4f-dmar-device-scope-mem-leak-fix.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=373
267 lines
6.9 KiB
Diff
267 lines
6.9 KiB
Diff
# Commit e62e49e6d5d4e8d22f3df0b75443ede65a812435
|
|
# Date 2015-05-15 09:52:25 +0200
|
|
# Author David Vrabel <david.vrabel@citrix.com>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
x86,arm: remove asm/spinlock.h from all architectures
|
|
|
|
Now that all architecture use a common ticket lock implementation for
|
|
spinlocks, remove the architecture specific byte lock implementations.
|
|
|
|
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
|
|
Reviewed-by: Tim Deegan <tim@xen.org>
|
|
Acked-by: Jan Beulich <jbeulich@suse.com>
|
|
Acked-by: Ian Campbell <ian.campbell@citrix.com>
|
|
|
|
--- a/xen/arch/arm/README.LinuxPrimitives
|
|
+++ b/xen/arch/arm/README.LinuxPrimitives
|
|
@@ -25,16 +25,6 @@ linux/arch/arm64/include/asm/atomic.h
|
|
|
|
---------------------------------------------------------------------
|
|
|
|
-spinlocks: last sync @ v3.16-rc6 (last commit: 95c4189689f9)
|
|
-
|
|
-linux/arch/arm64/include/asm/spinlock.h xen/include/asm-arm/arm64/spinlock.h
|
|
-
|
|
-Skipped:
|
|
- 5686b06 arm64: lockref: add support for lockless lockrefs using cmpxchg
|
|
- 52ea2a5 arm64: locks: introduce ticket-based spinlock implementation
|
|
-
|
|
----------------------------------------------------------------------
|
|
-
|
|
mem*: last sync @ v3.16-rc6 (last commit: d875c9b37240)
|
|
|
|
linux/arch/arm64/lib/memchr.S xen/arch/arm/arm64/lib/memchr.S
|
|
@@ -103,24 +93,6 @@ linux/arch/arm/include/asm/atomic.h
|
|
|
|
---------------------------------------------------------------------
|
|
|
|
-spinlocks: last sync: 15e7e5c1ebf5
|
|
-
|
|
-linux/arch/arm/include/asm/spinlock.h xen/include/asm-arm/arm32/spinlock.h
|
|
-
|
|
-*** Linux has switched to ticket locks but we still use bitlocks.
|
|
-
|
|
-resync to v3.14-rc7:
|
|
-
|
|
- 7c8746a ARM: 7955/1: spinlock: ensure we have a compiler barrier before sev
|
|
- 0cbad9c ARM: 7854/1: lockref: add support for lockless lockrefs using cmpxchg64
|
|
- 9bb17be ARM: locks: prefetch the destination word for write prior to strex
|
|
- 27a8479 ARM: smp_on_up: move inline asm ALT_SMP patching macro out of spinlock.
|
|
- 00efaa0 ARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lo
|
|
- afa31d8 ARM: 7811/1: locks: use early clobber in arch_spin_trylock
|
|
- 73a6fdc ARM: spinlock: use inner-shareable dsb variant prior to sev instruction
|
|
-
|
|
----------------------------------------------------------------------
|
|
-
|
|
mem*: last sync @ v3.16-rc6 (last commit: d98b90ea22b0)
|
|
|
|
linux/arch/arm/lib/copy_template.S xen/arch/arm/arm32/lib/copy_template.S
|
|
--- a/xen/include/asm-arm/arm32/spinlock.h
|
|
+++ /dev/null
|
|
@@ -1,66 +0,0 @@
|
|
-#ifndef __ASM_ARM32_SPINLOCK_H
|
|
-#define __ASM_ARM32_SPINLOCK_H
|
|
-
|
|
-static inline void dsb_sev(void)
|
|
-{
|
|
- __asm__ __volatile__ (
|
|
- "dsb\n"
|
|
- "sev\n"
|
|
- );
|
|
-}
|
|
-
|
|
-typedef struct {
|
|
- volatile unsigned int lock;
|
|
-} raw_spinlock_t;
|
|
-
|
|
-#define _RAW_SPIN_LOCK_UNLOCKED { 0 }
|
|
-
|
|
-#define _raw_spin_is_locked(x) ((x)->lock != 0)
|
|
-
|
|
-static always_inline void _raw_spin_unlock(raw_spinlock_t *lock)
|
|
-{
|
|
- ASSERT(_raw_spin_is_locked(lock));
|
|
-
|
|
- smp_mb();
|
|
-
|
|
- __asm__ __volatile__(
|
|
-" str %1, [%0]\n"
|
|
- :
|
|
- : "r" (&lock->lock), "r" (0)
|
|
- : "cc");
|
|
-
|
|
- dsb_sev();
|
|
-}
|
|
-
|
|
-static always_inline int _raw_spin_trylock(raw_spinlock_t *lock)
|
|
-{
|
|
- unsigned long contended, res;
|
|
-
|
|
- do {
|
|
- __asm__ __volatile__(
|
|
- " ldrex %0, [%2]\n"
|
|
- " teq %0, #0\n"
|
|
- " strexeq %1, %3, [%2]\n"
|
|
- " movne %1, #0\n"
|
|
- : "=&r" (contended), "=r" (res)
|
|
- : "r" (&lock->lock), "r" (1)
|
|
- : "cc");
|
|
- } while (res);
|
|
-
|
|
- if (!contended) {
|
|
- smp_mb();
|
|
- return 1;
|
|
- } else {
|
|
- return 0;
|
|
- }
|
|
-}
|
|
-
|
|
-#endif /* __ASM_SPINLOCK_H */
|
|
-/*
|
|
- * Local variables:
|
|
- * mode: C
|
|
- * c-file-style: "BSD"
|
|
- * c-basic-offset: 4
|
|
- * indent-tabs-mode: nil
|
|
- * End:
|
|
- */
|
|
--- a/xen/include/asm-arm/arm64/spinlock.h
|
|
+++ /dev/null
|
|
@@ -1,63 +0,0 @@
|
|
-/*
|
|
- * Derived from Linux arch64 spinlock.h which is:
|
|
- * Copyright (C) 2012 ARM Ltd.
|
|
- *
|
|
- * This program is free software; you can redistribute it and/or modify
|
|
- * it under the terms of the GNU General Public License version 2 as
|
|
- * published by the Free Software Foundation.
|
|
- *
|
|
- * This program is distributed in the hope that it will be useful,
|
|
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
- * GNU General Public License for more details.
|
|
- *
|
|
- * You should have received a copy of the GNU General Public License
|
|
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
- */
|
|
-
|
|
-#ifndef __ASM_ARM64_SPINLOCK_H
|
|
-#define __ASM_ARM64_SPINLOCK_H
|
|
-
|
|
-typedef struct {
|
|
- volatile unsigned int lock;
|
|
-} raw_spinlock_t;
|
|
-
|
|
-#define _RAW_SPIN_LOCK_UNLOCKED { 0 }
|
|
-
|
|
-#define _raw_spin_is_locked(x) ((x)->lock != 0)
|
|
-
|
|
-static always_inline void _raw_spin_unlock(raw_spinlock_t *lock)
|
|
-{
|
|
- ASSERT(_raw_spin_is_locked(lock));
|
|
-
|
|
- asm volatile(
|
|
- " stlr %w1, %0\n"
|
|
- : "=Q" (lock->lock) : "r" (0) : "memory");
|
|
-}
|
|
-
|
|
-static always_inline int _raw_spin_trylock(raw_spinlock_t *lock)
|
|
-{
|
|
- unsigned int tmp;
|
|
-
|
|
- asm volatile(
|
|
- "2: ldaxr %w0, %1\n"
|
|
- " cbnz %w0, 1f\n"
|
|
- " stxr %w0, %w2, %1\n"
|
|
- " cbnz %w0, 2b\n"
|
|
- "1:\n"
|
|
- : "=&r" (tmp), "+Q" (lock->lock)
|
|
- : "r" (1)
|
|
- : "cc", "memory");
|
|
-
|
|
- return !tmp;
|
|
-}
|
|
-
|
|
-#endif /* __ASM_SPINLOCK_H */
|
|
-/*
|
|
- * Local variables:
|
|
- * mode: C
|
|
- * c-file-style: "BSD"
|
|
- * c-basic-offset: 4
|
|
- * indent-tabs-mode: nil
|
|
- * End:
|
|
- */
|
|
--- a/xen/include/asm-arm/spinlock.h
|
|
+++ /dev/null
|
|
@@ -1,23 +0,0 @@
|
|
-#ifndef __ASM_SPINLOCK_H
|
|
-#define __ASM_SPINLOCK_H
|
|
-
|
|
-#include <xen/config.h>
|
|
-#include <xen/lib.h>
|
|
-
|
|
-#if defined(CONFIG_ARM_32)
|
|
-# include <asm/arm32/spinlock.h>
|
|
-#elif defined(CONFIG_ARM_64)
|
|
-# include <asm/arm64/spinlock.h>
|
|
-#else
|
|
-# error "unknown ARM variant"
|
|
-#endif
|
|
-
|
|
-#endif /* __ASM_SPINLOCK_H */
|
|
-/*
|
|
- * Local variables:
|
|
- * mode: C
|
|
- * c-file-style: "BSD"
|
|
- * c-basic-offset: 4
|
|
- * indent-tabs-mode: nil
|
|
- * End:
|
|
- */
|
|
--- a/xen/include/asm-x86/spinlock.h
|
|
+++ /dev/null
|
|
@@ -1,34 +0,0 @@
|
|
-#ifndef __ASM_SPINLOCK_H
|
|
-#define __ASM_SPINLOCK_H
|
|
-
|
|
-#include <xen/config.h>
|
|
-#include <xen/lib.h>
|
|
-#include <asm/atomic.h>
|
|
-
|
|
-typedef struct {
|
|
- volatile s16 lock;
|
|
-} raw_spinlock_t;
|
|
-
|
|
-#define _RAW_SPIN_LOCK_UNLOCKED /*(raw_spinlock_t)*/ { 1 }
|
|
-
|
|
-#define _raw_spin_is_locked(x) ((x)->lock <= 0)
|
|
-
|
|
-static always_inline void _raw_spin_unlock(raw_spinlock_t *lock)
|
|
-{
|
|
- ASSERT(_raw_spin_is_locked(lock));
|
|
- asm volatile (
|
|
- "movw $1,%0"
|
|
- : "=m" (lock->lock) : : "memory" );
|
|
-}
|
|
-
|
|
-static always_inline int _raw_spin_trylock(raw_spinlock_t *lock)
|
|
-{
|
|
- s16 oldval;
|
|
- asm volatile (
|
|
- "xchgw %w0,%1"
|
|
- :"=r" (oldval), "=m" (lock->lock)
|
|
- :"0" ((s16)0) : "memory" );
|
|
- return (oldval > 0);
|
|
-}
|
|
-
|
|
-#endif /* __ASM_SPINLOCK_H */
|
|
--- a/xen/include/xen/spinlock.h
|
|
+++ b/xen/include/xen/spinlock.h
|
|
@@ -2,7 +2,6 @@
|
|
#define __SPINLOCK_H__
|
|
|
|
#include <asm/system.h>
|
|
-#include <asm/spinlock.h>
|
|
|
|
#ifndef NDEBUG
|
|
struct lock_debug {
|