The patch titled revert x86_64-mm-i386-semaphore-to-asm has been removed from the -mm tree. Its filename is revert-x86_64-mm-i386-semaphore-to-asm.patch This patch was dropped because it is obsolete ------------------------------------------------------ Subject: revert x86_64-mm-i386-semaphore-to-asm From: Andrew Morton <akpm@xxxxxxxx> It crashes. Cc: Andi Kleen <ak@xxxxxx> Cc: Jan Beulich <jbeulich@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/i386/kernel/Makefile | 2 arch/i386/kernel/semaphore.c | 134 ++++++++++++++++++++++++++++ arch/i386/lib/Makefile | 2 arch/i386/lib/semaphore.S | 154 --------------------------------- include/asm-i386/frame.i | 24 ----- 5 files changed, 136 insertions(+), 180 deletions(-) diff -puN arch/i386/kernel/Makefile~revert-x86_64-mm-i386-semaphore-to-asm arch/i386/kernel/Makefile --- a/arch/i386/kernel/Makefile~revert-x86_64-mm-i386-semaphore-to-asm +++ a/arch/i386/kernel/Makefile @@ -4,7 +4,7 @@ extra-y := head.o init_task.o vmlinux.lds -obj-y := process.o signal.o entry.o traps.o irq.o \ +obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ pci-dma.o i386_ksyms.o i387.o bootflag.o \ quirks.o i8237.o topology.o alternative.o i8253.o tsc.o diff -puN /dev/null arch/i386/kernel/semaphore.c --- /dev/null +++ a/arch/i386/kernel/semaphore.c @@ -0,0 +1,134 @@ +/* + * i386 semaphore implementation. + * + * (C) Copyright 1999 Linus Torvalds + * + * Portions Copyright 1999 Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@xxxxxxxxx> + */ +#include <asm/semaphore.h> + +/* + * The semaphore operations have a special calling sequence that + * allow us to do a simpler in-line version of them. These routines + * need to convert that sequence back into the C sequence when + * there is contention on the semaphore. + * + * %eax contains the semaphore pointer on entry. Save the C-clobbered + * registers (%eax, %edx and %ecx) except %eax whish is either a return + * value or just clobbered.. + */ +asm( +".section .sched.text\n" +".align 4\n" +".globl __down_failed\n" +"__down_failed:\n\t" +#if defined(CONFIG_FRAME_POINTER) + "pushl %ebp\n\t" + "movl %esp,%ebp\n\t" +#endif + "pushl %edx\n\t" + "pushl %ecx\n\t" + "call __down\n\t" + "popl %ecx\n\t" + "popl %edx\n\t" +#if defined(CONFIG_FRAME_POINTER) + "movl %ebp,%esp\n\t" + "popl %ebp\n\t" +#endif + "ret" +); + +asm( +".section .sched.text\n" +".align 4\n" +".globl __down_failed_interruptible\n" +"__down_failed_interruptible:\n\t" +#if defined(CONFIG_FRAME_POINTER) + "pushl %ebp\n\t" + "movl %esp,%ebp\n\t" +#endif + "pushl %edx\n\t" + "pushl %ecx\n\t" + "call __down_interruptible\n\t" + "popl %ecx\n\t" + "popl %edx\n\t" +#if defined(CONFIG_FRAME_POINTER) + "movl %ebp,%esp\n\t" + "popl %ebp\n\t" +#endif + "ret" +); + +asm( +".section .sched.text\n" +".align 4\n" +".globl __down_failed_trylock\n" +"__down_failed_trylock:\n\t" +#if defined(CONFIG_FRAME_POINTER) + "pushl %ebp\n\t" + "movl %esp,%ebp\n\t" +#endif + "pushl %edx\n\t" + "pushl %ecx\n\t" + "call __down_trylock\n\t" + "popl %ecx\n\t" + "popl %edx\n\t" +#if defined(CONFIG_FRAME_POINTER) + "movl %ebp,%esp\n\t" + "popl %ebp\n\t" +#endif + "ret" +); + +asm( +".section .sched.text\n" +".align 4\n" +".globl __up_wakeup\n" +"__up_wakeup:\n\t" + "pushl %edx\n\t" + "pushl %ecx\n\t" + "call __up\n\t" + "popl %ecx\n\t" + "popl %edx\n\t" + "ret" +); + +/* + * rw spinlock fallbacks + */ +#if defined(CONFIG_SMP) +asm( +".section .sched.text\n" +".align 4\n" +".globl __write_lock_failed\n" +"__write_lock_failed:\n\t" + LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ",(%eax)\n" +"1: rep; nop\n\t" + "cmpl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" + "jne 1b\n\t" + LOCK_PREFIX "subl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" + "jnz __write_lock_failed\n\t" + "ret" +); + +asm( +".section .sched.text\n" +".align 4\n" +".globl __read_lock_failed\n" +"__read_lock_failed:\n\t" + LOCK_PREFIX "incl (%eax)\n" +"1: rep; nop\n\t" + "cmpl $1,(%eax)\n\t" + "js 1b\n\t" + LOCK_PREFIX "decl (%eax)\n\t" + "js __read_lock_failed\n\t" + "ret" +); +#endif diff -puN arch/i386/lib/Makefile~revert-x86_64-mm-i386-semaphore-to-asm arch/i386/lib/Makefile --- a/arch/i386/lib/Makefile~revert-x86_64-mm-i386-semaphore-to-asm +++ a/arch/i386/lib/Makefile @@ -4,6 +4,6 @@ lib-y = checksum.o delay.o usercopy.o getuser.o putuser.o memcpy.o strstr.o \ - bitops.o semaphore.o + bitops.o lib-$(CONFIG_X86_USE_3DNOW) += mmx.o diff -puN arch/i386/lib/semaphore.S~revert-x86_64-mm-i386-semaphore-to-asm /dev/null --- a/arch/i386/lib/semaphore.S +++ /dev/null @@ -1,154 +0,0 @@ -/* - * i386 semaphore implementation. - * - * (C) Copyright 1999 Linus Torvalds - * - * Portions Copyright 1999 Red Hat, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@xxxxxxxxx> - */ - -#include <linux/config.h> -#include <linux/linkage.h> -#include <asm/rwlock.h> -#include <asm/alternative-asm.i> -#include <asm/frame.i> -#include <asm/dwarf2.h> - -/* - * The semaphore operations have a special calling sequence that - * allow us to do a simpler in-line version of them. These routines - * need to convert that sequence back into the C sequence when - * there is contention on the semaphore. - * - * %eax contains the semaphore pointer on entry. Save the C-clobbered - * registers (%eax, %edx and %ecx) except %eax whish is either a return - * value or just clobbered.. - */ - .section .sched.text -ENTRY(__down_failed) - CFI_STARTPROC - FRAME - pushl %edx - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET edx,0 - pushl %ecx - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET ecx,0 - call __down - popl %ecx - CFI_ADJUST_CFA_OFFSET -4 - CFI_RESTORE ecx - popl %edx - CFI_ADJUST_CFA_OFFSET -4 - CFI_RESTORE edx - ENDFRAME - ret - CFI_ENDPROC - END(__down_failed) - -ENTRY(__down_failed_interruptible) - CFI_STARTPROC - FRAME - pushl %edx - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET edx,0 - pushl %ecx - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET ecx,0 - call __down_interruptible - popl %ecx - CFI_ADJUST_CFA_OFFSET -4 - CFI_RESTORE ecx - popl %edx - CFI_ADJUST_CFA_OFFSET -4 - CFI_RESTORE edx - ENDFRAME - ret - CFI_ENDPROC - END(__down_failed_interruptible) - -ENTRY(__down_failed_trylock) - CFI_STARTPROC - FRAME - pushl %edx - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET edx,0 - pushl %ecx - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET ecx,0 - call __down_trylock - popl %ecx - CFI_ADJUST_CFA_OFFSET -4 - CFI_RESTORE ecx - popl %edx - CFI_ADJUST_CFA_OFFSET -4 - CFI_RESTORE edx - ENDFRAME - ret - CFI_ENDPROC - END(__down_failed_trylock) - -ENTRY(__up_wakeup) - CFI_STARTPROC - FRAME - pushl %edx - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET edx,0 - pushl %ecx - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET ecx,0 - call __up - popl %ecx - CFI_ADJUST_CFA_OFFSET -4 - CFI_RESTORE ecx - popl %edx - CFI_ADJUST_CFA_OFFSET -4 - CFI_RESTORE edx - ENDFRAME - ret - CFI_ENDPROC - END(__up_wakeup) - -/* - * rw spinlock fallbacks - */ -#ifdef CONFIG_SMP -ENTRY(__write_lock_failed) - CFI_STARTPROC simple - FRAME - LOCK_PREFIX - addl $ RW_LOCK_BIAS,(%eax) -1: rep; nop - cmpl $ RW_LOCK_BIAS,(%eax) - jne 1b - LOCK_PREFIX - subl $ RW_LOCK_BIAS,(%eax) - jnz __write_lock_failed - ENDFRAME - ret - CFI_ENDPROC - END(__write_lock_failed) - -ENTRY(__read_lock_failed) - CFI_STARTPROC - FRAME - LOCK_PREFIX - incl (%eax) -1: rep; nop - cmpl $1,(%eax) - js 1b - LOCK_PREFIX - decl (%eax) - js __read_lock_failed - ENDFRAME - ret - CFI_ENDPROC - END(__read_lock_failed) - -#endif diff -puN include/asm-i386/frame.i~revert-x86_64-mm-i386-semaphore-to-asm /dev/null --- a/include/asm-i386/frame.i +++ /dev/null @@ -1,24 +0,0 @@ -#include <linux/config.h> -#include <asm/dwarf2.h> - -/* The annotation hides the frame from the unwinder and makes it look - like a ordinary ebp save/restore. This avoids some special cases for - frame pointer later */ -#ifdef CONFIG_FRAME_POINTER - .macro FRAME - pushl %ebp - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET ebp,0 - movl %esp,%ebp - .endm - .macro ENDFRAME - popl %ebp - CFI_ADJUST_CFA_OFFSET -4 - CFI_RESTORE ebp - .endm -#else - .macro FRAME - .endm - .macro ENDFRAME - .endm -#endif _ Patches currently in -mm which might be from akpm@xxxxxxxx are adfs-error-message-fix.patch fix-x86_64-mm-allow-users-to-force-a-panic-on-nmi.patch workqueue-remove-lock_cpu_hotplug.patch fuse-fix-error-case-in-fuse_readpages.patch acpi-asus-s3-resume-fix.patch sony_apci-resume.patch kauditd_thread-warning-fix.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 drm-build-fix.patch drm-build-fixes-2.patch git-drm-build-fix.patch git-dvb.patch git-gfs2.patch git-ia64.patch git-ieee1394-fixup.patch git-input.patch git-kbuild.patch git-libata-all.patch asus-mv-device-ids.patch 1-of-2-jmicron-driver-hard_port_no-fix.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 pal-support-of-the-fixed-phy-fix.patch pal-support-of-the-fixed-phy-export.patch drivers-net-ns83820c-add-paramter-to-disable-auto.patch ppp-handle-kmalloc-failures-leak-fix.patch ppp-handle-kmalloc-failures-leak-tweaks.patch xt_physdev-build-fix.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 revert-gregkh-pci-pci-use-pci_bios-as-last-fallback.patch fix-gregkh-pci-pci-express-aer-implemetation-aer-core-and-aerdriver-on-powerpc.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 revert-x86_64-mm-i386-remove-lock-section.patch revert-x86_64-mm-i386-semaphore-to-asm.patch revert-x86_64-mm-detect-cfi.patch x86_64-mm-module-locks-raw-spinlock-hack-hack-hack.patch fix-x86_64-mm-stacktrace-cleanup-for-s390.patch x86_64-wire-up-oops_enter-oops_exit.patch x86_64-make-numa_emulation-__init.patch git-cryptodev-s390-fixes.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 slab-fix-lockdep-warnings-fix-2.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 add-force-of-use-mmconfig.patch add-efi-e820-memory-mapping-on-x86.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 fix-unserialized-task-files-changing-fix.patch ntp-move-all-the-ntp-related-code-to-ntpc-fix.patch reiserfs-on-demand-bitmap-loading.patch streamline-generic_file_-interfaces-and-filemap-gfs-fix.patch add-vector-aio-support-fix.patch csa-basic-accounting-over-taskstats-fix.patch fs-cache-make-kafs-use-fs-cache-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 isdn-work-around-excessive-udelay.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 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-use-init_utsname-when-appropriate-gmidi.patch namespaces-utsname-use-init_utsname-when-appropriate-print_kernel_version.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 reiser4-rename-generic_sounding_globalspatch-fix.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 put_bh-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