- revert-x86_64-mm-i386-remove-lock-section.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     revert x86_64-mm-i386-remove-lock-section

has been removed from the -mm tree.  Its filename is

     revert-x86_64-mm-i386-remove-lock-section.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: revert x86_64-mm-i386-remove-lock-section
From: Andrew Morton <akpm@xxxxxxxx>

This causes udev to get timeouts during bootup.  FC5 on a Vaio.  But
everything still seems to work correctly.

Cc: Jan Beulich <jbeulich@xxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/i386/lib/semaphore.S    |   63 ---------------------------------
 include/asm-i386/mutex.h     |   16 ++++++--
 include/asm-i386/rwsem.h     |   62 ++++++++++++++++++++++++++------
 include/asm-i386/semaphore.h |   49 ++++++++++++++++---------
 4 files changed, 94 insertions(+), 96 deletions(-)

diff -puN arch/i386/lib/semaphore.S~revert-x86_64-mm-i386-remove-lock-section arch/i386/lib/semaphore.S
--- a/arch/i386/lib/semaphore.S~revert-x86_64-mm-i386-remove-lock-section
+++ a/arch/i386/lib/semaphore.S
@@ -130,66 +130,3 @@ ENTRY(__read_lock_failed)
 	END(__read_lock_failed)
 
 #endif
-
-/* Fix up special calling conventions */
-ENTRY(call_rwsem_down_read_failed)
-	CFI_STARTPROC
-	push %ecx
-	CFI_ADJUST_CFA_OFFSET 4
-	CFI_REL_OFFSET ecx,0
-	push %edx
-	CFI_ADJUST_CFA_OFFSET 4
-	CFI_REL_OFFSET edx,0
-	call rwsem_down_read_failed
-	pop %edx
-	CFI_ADJUST_CFA_OFFSET -4
-	pop %ecx
-	CFI_ADJUST_CFA_OFFSET -4
-	ret
-	CFI_ENDPROC
-	END(call_rwsem_down_read_failed)
-
-ENTRY(call_rwsem_down_write_failed)
-	CFI_STARTPROC
-	push %ecx
-	CFI_ADJUST_CFA_OFFSET 4
-	CFI_REL_OFFSET ecx,0
-	calll rwsem_down_write_failed
-	pop %ecx
-	CFI_ADJUST_CFA_OFFSET -4
-	ret
-	CFI_ENDPROC
-	END(call_rwsem_down_write_failed)
-
-ENTRY(call_rwsem_wake)
-	CFI_STARTPROC
-	decw %dx    /* do nothing if still outstanding active readers */
-	jz 1f
-	push %ecx
-	CFI_ADJUST_CFA_OFFSET 4
-	CFI_REL_OFFSET ecx,0
-	call rwsem_wake
-	pop %ecx
-	CFI_ADJUST_CFA_OFFSET -4
-1:	ret
-	CFI_ENDPROC
-	END(call_rwsem_wake)
-
-/* Fix up special calling conventions */
-ENTRY(call_rwsem_downgrade_wake)
-	CFI_STARTPROC
-	push %ecx
-	CFI_ADJUST_CFA_OFFSET 4
-	CFI_REL_OFFSET ecx,0
-	push %edx
-	CFI_ADJUST_CFA_OFFSET 4
-	CFI_REL_OFFSET edx,0
-	call rwsem_downgrade_wake
-	pop %edx
-	CFI_ADJUST_CFA_OFFSET -4
-	pop %ecx
-	CFI_ADJUST_CFA_OFFSET -4
-	ret
-	CFI_ENDPROC
-	END(call_rwsemgrade_wake)
-
diff -puN include/asm-i386/mutex.h~revert-x86_64-mm-i386-remove-lock-section include/asm-i386/mutex.h
--- a/include/asm-i386/mutex.h~revert-x86_64-mm-i386-remove-lock-section
+++ a/include/asm-i386/mutex.h
@@ -30,10 +30,14 @@ do {									\
 									\
 	__asm__ __volatile__(						\
 		LOCK_PREFIX "   decl (%%eax)	\n"			\
-			"   jns 1f		\n"			\
-			"   call "#fail_fn"	\n"			\
+			"   js 2f		\n"			\
 			"1:			\n"			\
 									\
+		LOCK_SECTION_START("")					\
+			"2: call "#fail_fn"	\n"			\
+			"   jmp 1b		\n"			\
+		LOCK_SECTION_END					\
+									\
 		:"=a" (dummy)						\
 		: "a" (count)						\
 		: "memory", "ecx", "edx");				\
@@ -82,10 +86,14 @@ do {									\
 									\
 	__asm__ __volatile__(						\
 		LOCK_PREFIX "   incl (%%eax)	\n"			\
-			"   jg	1f		\n"			\
-			"   call "#fail_fn"	\n"			\
+			"   jle 2f		\n"			\
 			"1:			\n"			\
 									\
+		LOCK_SECTION_START("")					\
+			"2: call "#fail_fn"	\n"			\
+			"   jmp 1b		\n"			\
+		LOCK_SECTION_END					\
+									\
 		:"=a" (dummy)						\
 		: "a" (count)						\
 		: "memory", "ecx", "edx");				\
diff -puN include/asm-i386/rwsem.h~revert-x86_64-mm-i386-remove-lock-section include/asm-i386/rwsem.h
--- a/include/asm-i386/rwsem.h~revert-x86_64-mm-i386-remove-lock-section
+++ a/include/asm-i386/rwsem.h
@@ -99,9 +99,17 @@ static inline void __down_read(struct rw
 	__asm__ __volatile__(
 		"# beginning down_read\n\t"
 LOCK_PREFIX	"  incl      (%%eax)\n\t" /* adds 0x00000001, returns the old value */
-		"  jns        1f\n"
-		"  call call_rwsem_down_read_failed\n"
+		"  js        2f\n\t" /* jump if we weren't granted the lock */
 		"1:\n\t"
+		LOCK_SECTION_START("")
+		"2:\n\t"
+		"  pushl     %%ecx\n\t"
+		"  pushl     %%edx\n\t"
+		"  call      rwsem_down_read_failed\n\t"
+		"  popl      %%edx\n\t"
+		"  popl      %%ecx\n\t"
+		"  jmp       1b\n"
+		LOCK_SECTION_END
 		"# ending down_read\n\t"
 		: "+m" (sem->count)
 		: "a" (sem)
@@ -143,9 +151,15 @@ static inline void __down_write_nested(s
 		"# beginning down_write\n\t"
 LOCK_PREFIX	"  xadd      %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */
 		"  testl     %%edx,%%edx\n\t" /* was the count 0 before? */
-		"  jz        1f\n"
-		"  call call_rwsem_down_write_failed\n"
-		"1:\n"
+		"  jnz       2f\n\t" /* jump if we weren't granted the lock */
+		"1:\n\t"
+		LOCK_SECTION_START("")
+		"2:\n\t"
+		"  pushl     %%ecx\n\t"
+		"  call      rwsem_down_write_failed\n\t"
+		"  popl      %%ecx\n\t"
+		"  jmp       1b\n"
+		LOCK_SECTION_END
 		"# ending down_write"
 		: "+m" (sem->count), "=d" (tmp)
 		: "a" (sem), "1" (tmp)
@@ -179,9 +193,17 @@ static inline void __up_read(struct rw_s
 	__asm__ __volatile__(
 		"# beginning __up_read\n\t"
 LOCK_PREFIX	"  xadd      %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */
-		"  jns        1f\n\t"
-		"  call call_rwsem_wake\n"
-		"1:\n"
+		"  js        2f\n\t" /* jump if the lock is being waited upon */
+		"1:\n\t"
+		LOCK_SECTION_START("")
+		"2:\n\t"
+		"  decw      %%dx\n\t" /* do nothing if still outstanding active readers */
+		"  jnz       1b\n\t"
+		"  pushl     %%ecx\n\t"
+		"  call      rwsem_wake\n\t"
+		"  popl      %%ecx\n\t"
+		"  jmp       1b\n"
+		LOCK_SECTION_END
 		"# ending __up_read\n"
 		: "+m" (sem->count), "=d" (tmp)
 		: "a" (sem), "1" (tmp)
@@ -197,9 +219,17 @@ static inline void __up_write(struct rw_
 		"# beginning __up_write\n\t"
 		"  movl      %2,%%edx\n\t"
 LOCK_PREFIX	"  xaddl     %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */
-		"  jz       1f\n"
-		"  call call_rwsem_wake\n"
+		"  jnz       2f\n\t" /* jump if the lock is being waited upon */
 		"1:\n\t"
+		LOCK_SECTION_START("")
+		"2:\n\t"
+		"  decw      %%dx\n\t" /* did the active count reduce to 0? */
+		"  jnz       1b\n\t" /* jump back if not */
+		"  pushl     %%ecx\n\t"
+		"  call      rwsem_wake\n\t"
+		"  popl      %%ecx\n\t"
+		"  jmp       1b\n"
+		LOCK_SECTION_END
 		"# ending __up_write\n"
 		: "+m" (sem->count)
 		: "a" (sem), "i" (-RWSEM_ACTIVE_WRITE_BIAS)
@@ -214,9 +244,17 @@ static inline void __downgrade_write(str
 	__asm__ __volatile__(
 		"# beginning __downgrade_write\n\t"
 LOCK_PREFIX	"  addl      %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 0xYYYY0001 */
-		"  jns       1f\n\t"
-		"  call call_rwsem_downgrade_wake\n"
+		"  js        2f\n\t" /* jump if the lock is being waited upon */
 		"1:\n\t"
+		LOCK_SECTION_START("")
+		"2:\n\t"
+		"  pushl     %%ecx\n\t"
+		"  pushl     %%edx\n\t"
+		"  call      rwsem_downgrade_wake\n\t"
+		"  popl      %%edx\n\t"
+		"  popl      %%ecx\n\t"
+		"  jmp       1b\n"
+		LOCK_SECTION_END
 		"# ending __downgrade_write\n"
 		: "+m" (sem->count)
 		: "a" (sem), "i" (-RWSEM_WAITING_BIAS)
diff -puN include/asm-i386/semaphore.h~revert-x86_64-mm-i386-remove-lock-section include/asm-i386/semaphore.h
--- a/include/asm-i386/semaphore.h~revert-x86_64-mm-i386-remove-lock-section
+++ a/include/asm-i386/semaphore.h
@@ -100,10 +100,13 @@ static inline void down(struct semaphore
 	__asm__ __volatile__(
 		"# atomic down operation\n\t"
 		LOCK_PREFIX "decl %0\n\t"     /* --sem->count */
-		"jns 2f\n"
-		"\tlea %0,%%eax\n\t"
-		"call __down_failed\n"
-		"2:"
+		"js 2f\n"
+		"1:\n"
+		LOCK_SECTION_START("")
+		"2:\tlea %0,%%eax\n\t"
+		"call __down_failed\n\t"
+		"jmp 1b\n"
+		LOCK_SECTION_END
 		:"+m" (sem->count)
 		:
 		:"memory","ax");
@@ -120,12 +123,15 @@ static inline int down_interruptible(str
 	might_sleep();
 	__asm__ __volatile__(
 		"# atomic interruptible down operation\n\t"
-		"xorl %0,%0\n\t"
 		LOCK_PREFIX "decl %1\n\t"     /* --sem->count */
-		"jns 2f\n\t"
-		"lea %1,%%eax\n\t"
-		"call __down_failed_interruptible\n"
-		"2:"
+		"js 2f\n\t"
+		"xorl %0,%0\n"
+		"1:\n"
+		LOCK_SECTION_START("")
+		"2:\tlea %1,%%eax\n\t"
+		"call __down_failed_interruptible\n\t"
+		"jmp 1b\n"
+		LOCK_SECTION_END
 		:"=a" (result), "+m" (sem->count)
 		:
 		:"memory");
@@ -142,12 +148,15 @@ static inline int down_trylock(struct se
 
 	__asm__ __volatile__(
 		"# atomic interruptible down operation\n\t"
-		"xorl %0,%0\n\t"
 		LOCK_PREFIX "decl %1\n\t"     /* --sem->count */
-		"jns 2f\n\t"
-		"lea %1,%%eax\n\t"
+		"js 2f\n\t"
+		"xorl %0,%0\n"
+		"1:\n"
+		LOCK_SECTION_START("")
+		"2:\tlea %1,%%eax\n\t"
 		"call __down_failed_trylock\n\t"
-		"2:\n"
+		"jmp 1b\n"
+		LOCK_SECTION_END
 		:"=a" (result), "+m" (sem->count)
 		:
 		:"memory");
@@ -157,16 +166,22 @@ static inline int down_trylock(struct se
 /*
  * Note! This is subtle. We jump to wake people up only if
  * the semaphore was negative (== somebody was waiting on it).
+ * The default case (no contention) will result in NO
+ * jumps for both down() and up().
  */
 static inline void up(struct semaphore * sem)
 {
 	__asm__ __volatile__(
 		"# atomic up operation\n\t"
 		LOCK_PREFIX "incl %0\n\t"     /* ++sem->count */
-		"jg 1f\n\t"
-		"lea %0,%%eax\n\t"
-		"call __up_wakeup\n"
-		"1:"
+		"jle 2f\n"
+		"1:\n"
+		LOCK_SECTION_START("")
+		"2:\tlea %0,%%eax\n\t"
+		"call __up_wakeup\n\t"
+		"jmp 1b\n"
+		LOCK_SECTION_END
+		".subsection 0\n"
 		:"+m" (sem->count)
 		:
 		:"memory","ax");
_

Patches currently in -mm which might be from akpm@xxxxxxxx are

add-force-of-use-mmconfig.patch
add-efi-e820-memory-mapping-on-x86.patch
acpi-asus-s3-resume-fix.patch
sony_apci-resume.patch
kauditd_thread-warning-fix.patch
git-block-dasd-fix.patch
git-block-dasd-fix-2.patch
revert-gregkh-driver-class_device_rename-remove.patch
revert-gregkh-driver-network-class_device-to-device.patch
revert-gregkh-driver-tty-device.patch
revert-gregkh-driver-mem-devices.patch
add-__must_check-to-device-management-code.patch
add-config_enable_must_check.patch
v4l-dev2-handle-__must_check.patch
drivers-base-check-errors.patch
drivers-base-check-errors-fix.patch
sysfs-add-proper-sysfs_init-prototype.patch
scsi-device_reprobe-can-fail.patch
git-gfs2.patch
git-ia64.patch
git-ieee1394-fixup.patch
git-input.patch
git-libata-all.patch
sata-is-bust-on-s390.patch
rework-legacy-handling-to-remove-much-of-the-cruft-fix.patch
rework-legacy-handling-to-remove-much-of-the-cruft-powerpc-fix.patch
asus-mv-device-ids.patch
git-netdev-all.patch
82596-section-fixes.patch
ac3200-section-fixes.patch
cops-section-fix.patch
cs89x0-section-fix.patch
at1700-section-fix.patch
e2100-section-fix.patch
eepro-section-fix.patch
eexpress-section-fix.patch
es3210-section-fix.patch
eth16i-section-fix.patch
lance-section-fix.patch
lne390-section-fix.patch
ni52-section-fix.patch
ibmtr-section-fix.patch
smctr-section-fix.patch
wd-section-fix.patch
ni65-section-fix.patch
seeq8005-section-fix.patch
winbond-840-section-fix.patch
fealnx-section-fix.patch
sundance-section-fix.patch
e1000_7033_dump_ring-fix.patch
s2io-build-fix.patch
drivers-net-ns83820c-add-paramter-to-disable-auto.patch
git-net-fib_rules-linkage-fix.patch
ppp-handle-kmalloc-failures-leak-fix.patch
ppp-handle-kmalloc-failures-leak-tweaks.patch
xt_physdev-build-fix.patch
fix-memory-leak-in-net-ipv4-tcp_probectcpprobe_read.patch
git-nfs.patch
git-pcmcia-fixup.patch
git-powerpc.patch
git-sas.patch
git-block-vs-git-sas.patch
serial-fix-uart_bug_txen-test.patch
fix-gregkh-pci-pci-express-aer-implemetation-pcie_portdrv-error-handler.patch
pcie-check-and-return-bus_register-errors-fix.patch
git-scsi-misc.patch
fix-panic-when-reinserting-adaptec-pcmcia-scsi-card-tidy.patch
git-scsi-target-fixup.patch
git-scsi-target-vs-git-block.patch
usb-hub-driver-improve-use-of-ifdef-fix.patch
pm-usb-hcds-use-pm_event_prethaw-fix.patch
rtl8150_disconnect-needs-tasklet_kill.patch
git-supertrak-fixup.patch
git-watchdog.patch
kthread-airoc-race-fix.patch
fix-x86_64-mm-early-param-again.patch
fix-x86_64-mm-via-force-dma-mask-config_pcin-fix.patch
fix-x86_64-mm-allow-users-to-force-a-panic-on-nmi.patch
sleazy-fpu-feature-x86_64-support.patch
x86_64-wire-up-oops_enter-oops_exit.patch
git-geode-vs-git-cryptodev.patch
adix-tree-rcu-lockless-readside-update-tidy.patch
mm-tracking-shared-dirty-pages-checks.patch
mm-tracking-shared-dirty-pages-wimp.patch
convert-i386-numa-kva-space-to-bootmem-tidy.patch
reduce-max_nr_zones-make-display-of-highmem-counters-conditional-on-config_highmem-tidy.patch
reduce-max_nr_zones-use-enum-to-define-zones-reformat-and-comment-cleanup.patch
reduce-max_nr_zones-use-enum-to-define-zones-reformat-and-comment-fix.patch
reduce-max_nr_zones-remove-display-of-counters-for-unconfigured-zones-s390-fix.patch
out-of-memory-notifier-tidy.patch
mm-swap-write-failure-fixup-fix.patch
slab-optimize-kmalloc_node-the-same-way-as-kmalloc-fix.patch
acx1xx-wireless-driver.patch
tiacx-pci-build-fix.patch
tiacx-ia64-fix.patch
tiacx-build-fix.patch
binfmt_elf-consistently-use-loff_t.patch
convert-i386-summit-subarch-to-use-srat-info-for-apicid_to_node-calls-tidy.patch
x86-increase-max_mp_busses-on-default-arch.patch
i386-adds-smp_call_function_single-fix.patch
swsusp-write-timer.patch
swsusp-write-speedup.patch
swsusp-read-timer.patch
swsusp-read-speedup.patch
swsusp-read-speedup-fix.patch
swsusp-read-speedup-cleanup.patch
swsusp-read-speedup-cleanup-2.patch
deprecate-smbfs-in-favour-of-cifs.patch
edac-new-opteron-athlon64-memory-controller-driver-tidy.patch
inode_diet-replace-inodeugeneric_ip-with-inodei_private-gfs-fix.patch
x86-microcode-microcode-driver-cleanup-tidy.patch
x86-microcode-add-sysfs-and-hotplug-support-fix.patch
eisa-bus-modalias-attributes-support-1-fix-git-kbuild-fix.patch
add-address_space_operationsbatch_write-fix.patch
alloc_fdtable-cleanup.patch
add-probe_kernel_address.patch
x86-use-probe_kernel_address-in-handle_bug.patch
blockdevc-check-errors.patch
let-warn_on-warn_on_once-return-the-condition-fix.patch
let-warn_on-warn_on_once-return-the-condition-fix-2.patch
omap-add-watchdog-driver-support-tweaks.patch
move-valid_dma_direction-from-x86_64-to-generic-code-fix.patch
single-bit-flip-detector-tidy.patch
workqueue-remove-lock_cpu_hotplug.patch
reiserfs-on-demand-bitmap-loading.patch
streamline-generic_file_-interfaces-and-filemap-gfs-fix.patch
add-vector-aio-support-fix.patch
fs-cache-make-kafs-use-fs-cache-vs-streamline-generic_file_-interfaces-and-filemap.patch
stack-overflow-safe-kdump-crash_use_safe_smp_processor_id-fix.patch
knfsd-add-a-callback-for-when-last-rpc-thread-finishes-tidy.patch
knfsd-add-a-callback-for-when-last-rpc-thread-finishes-fix.patch
knfsd-separate-out-some-parts-of-nfsd_svc-which-start-nfs-servers-tweaks.patch
knfsd-define-new-nfsdfs-file-portlist-contains-list-of-ports-tidy.patch
knfsd-define-new-nfsdfs-file-portlist-contains-list-of-ports-fix.patch
knfsd-have-ext2-reject-file-handles-with-bad-inode-numbers-early-tidy.patch
knfsd-make-ext3-reject-filehandles-referring-to-invalid-inode-numbers-tidy.patch
knfsd-drop-serv-option-to-svc_recv-and-svc_process-nfs-callback-fix-nfs-callback-fix.patch
knfsd-move-tempsock-aging-to-a-timer-tidy.patch
revert-knfsd-make-rpc-threads-pools-numa-aware.patch
sched-remove-unnecessary-sched-group-allocations-fix.patch
swap_prefetch-vs-zoned-counters.patch
ecryptfs-mmap-operations.patch
ecryptfs-alpha-build-fix.patch
ecryptfs-more-elegant-aes-key-size-manipulation.patch
ecryptfs-get_sb_dev-fix.patch
namespaces-add-nsproxy-dont-include-compileh.patch
namespaces-utsname-switch-to-using-uts-namespaces.patch
namespaces-utsname-use-init_utsname-when-appropriate.patch
namespaces-utsname-implement-utsname-namespaces.patch
namespaces-utsname-sysctl-hack.patch
namespaces-utsname-switch-to-using-uts-namespaces-klibc-bit-sparc.patch
ipc-namespace-core.patch
readahead-sysctl-parameters-fix.patch
make-copy_from_user_inatomic-not-zero-the-tail-on-i386-vs-reiser4.patch
reiser4-hardirq-include-fix.patch
reiser4-run-truncate_inode_pages-in-reiser4_delete_inode.patch
reiser4-get_sb_dev-fix.patch
reiser4-vs-zoned-allocator.patch
hpt3xx-rework-rate-filtering-tidy.patch
asus-mv-ide-device-ids.patch
genirq-convert-the-i386-architecture-to-irq-chips.patch
genirq-x86_64-irq-reenable-migrating-irqs-to-other-cpus.patch
genirq-msi-simplify-msi-enable-and-disable.patch
genirq-ia64-irq-dynamic-irq-support.patch
genirq-msi-only-build-msi-apicc-on-ia64-fix.patch
genirq-i386-irq-remove-the-msi-assumption-that-irq-==-vector.patch
genirq-x86_64-irq-make-vector_irq-per-cpu-fix.patch
genirq-x86_64-irq-make-vector_irq-per-cpu-warning-fix.patch
add-hypertransport-capability-defines-fix.patch
initial-generic-hypertransport-interrupt-support-Kconfig-fix.patch
srcu-report-out-of-memory-errors-fixlet.patch
nr_blockdev_pages-in_interrupt-warning.patch
device-suspend-debug.patch
slab-leaks3-default-y.patch
x86-kmap_atomic-debugging.patch
restore-rogue-readahead-printk.patch
input_register_device-debug.patch
jmicron-warning-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux