Patch "Revert "mtip32xx: use runtime tag to initialize command header"" has been added to the 4.4-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    Revert "mtip32xx: use runtime tag to initialize command header"

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     revert-mtip32xx-use-runtime-tag-to-initialize-command-header.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Fri Apr  6 10:31:28 CEST 2018
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 6 Apr 2018 09:27:10 +0200
Subject: Revert "mtip32xx: use runtime tag to initialize command header"

From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

This reverts commit 9bf9e352ed51d4cdee107675609ba12b42d00c5b which was
commit a4e84aae8139aca9fbfbced1f45c51ca81b57488 upstream.

Ben writes:
	MQ IO schedulers were introduced in 4.11, so this shouldn't be
	needed in older branches.  It also causes a performance
	regression (fixed upstream).  Please revert this for 4.4 and
	4.9.

So let's revert it!

Reported-by: Ben Hutchings <ben.hutchings@xxxxxxxxxxxxxxx>
Cc: Ming Lei <ming.lei@xxxxxxxxxx>
Cc: Jens Axboe <axboe@xxxxxx>
Cc: Sasha Levin <alexander.levin@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/block/mtip32xx/mtip32xx.c |   36 ++++++++++++------------------------
 1 file changed, 12 insertions(+), 24 deletions(-)

--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -169,25 +169,6 @@ static bool mtip_check_surprise_removal(
 	return false; /* device present */
 }
 
-/* we have to use runtime tag to setup command header */
-static void mtip_init_cmd_header(struct request *rq)
-{
-	struct driver_data *dd = rq->q->queuedata;
-	struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
-	u32 host_cap_64 = readl(dd->mmio + HOST_CAP) & HOST_CAP_64;
-
-	/* Point the command headers at the command tables. */
-	cmd->command_header = dd->port->command_list +
-				(sizeof(struct mtip_cmd_hdr) * rq->tag);
-	cmd->command_header_dma = dd->port->command_list_dma +
-				(sizeof(struct mtip_cmd_hdr) * rq->tag);
-
-	if (host_cap_64)
-		cmd->command_header->ctbau = __force_bit2int cpu_to_le32((cmd->command_dma >> 16) >> 16);
-
-	cmd->command_header->ctba = __force_bit2int cpu_to_le32(cmd->command_dma & 0xFFFFFFFF);
-}
-
 static struct mtip_cmd *mtip_get_int_command(struct driver_data *dd)
 {
 	struct request *rq;
@@ -199,9 +180,6 @@ static struct mtip_cmd *mtip_get_int_com
 	if (IS_ERR(rq))
 		return NULL;
 
-	/* Internal cmd isn't submitted via .queue_rq */
-	mtip_init_cmd_header(rq);
-
 	return blk_mq_rq_to_pdu(rq);
 }
 
@@ -3840,8 +3818,6 @@ static int mtip_queue_rq(struct blk_mq_h
 	struct request *rq = bd->rq;
 	int ret;
 
-	mtip_init_cmd_header(rq);
-
 	if (unlikely(mtip_check_unal_depth(hctx, rq)))
 		return BLK_MQ_RQ_QUEUE_BUSY;
 
@@ -3873,6 +3849,7 @@ static int mtip_init_cmd(void *data, str
 {
 	struct driver_data *dd = data;
 	struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
+	u32 host_cap_64 = readl(dd->mmio + HOST_CAP) & HOST_CAP_64;
 
 	/*
 	 * For flush requests, request_idx starts at the end of the
@@ -3889,6 +3866,17 @@ static int mtip_init_cmd(void *data, str
 
 	memset(cmd->command, 0, CMD_DMA_ALLOC_SZ);
 
+	/* Point the command headers at the command tables. */
+	cmd->command_header = dd->port->command_list +
+				(sizeof(struct mtip_cmd_hdr) * request_idx);
+	cmd->command_header_dma = dd->port->command_list_dma +
+				(sizeof(struct mtip_cmd_hdr) * request_idx);
+
+	if (host_cap_64)
+		cmd->command_header->ctbau = __force_bit2int cpu_to_le32((cmd->command_dma >> 16) >> 16);
+
+	cmd->command_header->ctba = __force_bit2int cpu_to_le32(cmd->command_dma & 0xFFFFFFFF);
+
 	sg_init_table(cmd->sg, MTIP_MAX_SG);
 	return 0;
 }


Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are

queue-4.4/rdma-ucma-check-af-family-prior-resolving-address.patch
queue-4.4/documentation-pinctrl-palmas-add-ti-palmas-powerhold-override-property-definition.patch
queue-4.4/netfilter-x_tables-add-and-use-xt_check_proc_name.patch
queue-4.4/usb-serial-ftdi_sio-add-support-for-harman-firmwarehubemulator.patch
queue-4.4/dm-ioctl-remove-double-parentheses.patch
queue-4.4/arm64-avoid-overflow-in-va_start-and-page_offset.patch
queue-4.4/nospec-move-array_index_nospec-parameter-checking-into-separate-macro.patch
queue-4.4/audit-add-tty-field-to-login-event.patch
queue-4.4/usb-gadget-change-len-to-size_t-on-alloc_ep_req.patch
queue-4.4/revert-mtip32xx-use-runtime-tag-to-initialize-command-header.patch
queue-4.4/vt-change-sgr-21-to-follow-the-standards.patch
queue-4.4/genirq-use-cpumask_available-for-check-of-cpumask-variable.patch
queue-4.4/xfrm_user-uncoditionally-validate-esn-replay-attribute-struct.patch
queue-4.4/selinux-remove-redundant-check-for-unknown-labeling-behavior.patch
queue-4.4/fs-compat-remove-warning-from-compatible_ioctl.patch
queue-4.4/usb-dwc2-improve-gadget-state-disconnection-handling.patch
queue-4.4/crypto-x86-cast5-avx-fix-ecb-encryption-when-long-sg-follows-short-one.patch
queue-4.4/net-cavium-liquidio-fix-up-avoid-dma_unmap_single-on-uninitialized-ndata.patch
queue-4.4/writeback-fix-the-wrong-congested-state-variable-definition.patch
queue-4.4/bluetooth-fix-missing-encryption-refresh-on-security-request.patch
queue-4.4/rdma-ucma-don-t-allow-join-attempts-for-unsupported-af-family.patch
queue-4.4/revert-arm-dts-omap3-n900-fix-the-audio-codec-s-reset-pin.patch
queue-4.4/mtd-jedec_probe-fix-crash-in-jedec_read_mfr.patch
queue-4.4/input-i8042-add-lenovo-thinkpad-l460-to-i8042-reset-list.patch
queue-4.4/perf-hwbp-simplify-the-perf-hwbp-code-fix-documentation.patch
queue-4.4/revert-pci-msi-stop-disabling-msi-msi-x-in-pci_device_shutdown.patch
queue-4.4/rdma-ucma-check-that-device-is-connected-prior-to-access-it.patch
queue-4.4/scsi-virtio_scsi-always-read-vpd-pages-for-multiqueue-too.patch
queue-4.4/media-usbtv-prevent-double-free-in-error-case.patch
queue-4.4/revert-arm-dts-am335x-pepper-fix-the-audio-codec-s-reset-pin.patch
queue-4.4/staging-comedi-ni_mio_common-ack-ai-fifo-error-interrupts.patch
queue-4.4/alsa-pcm-potential-uninitialized-return-values.patch
queue-4.4/usb-gadget-define-free_ep_req-as-universal-function.patch
queue-4.4/jiffies.h-declare-jiffies-and-jiffies_64-with-____cacheline_aligned_in_smp.patch
queue-4.4/rdma-ucma-fix-use-after-free-access-in-ucma_close.patch
queue-4.4/revert-cpufreq-fix-governor-module-removal-race.patch
queue-4.4/selinux-remove-unnecessary-check-of-array-base-in-selinux_set_mapping.patch
queue-4.4/xfrm-refuse-to-insert-32-bit-userspace-socket-policies-on-64-bit-systems.patch
queue-4.4/pci-make-pci_rom_address_mask-a-32-bit-constant.patch
queue-4.4/netfilter-bridge-ebt_among-add-more-missing-match-size-checks.patch
queue-4.4/md-raid10-reset-the-first-at-the-end-of-loop.patch
queue-4.4/kprobes-x86-fix-to-set-rwx-bits-correctly-before-releasing-trampoline.patch
queue-4.4/rdma-ucma-ensure-that-cm_id-exists-prior-to-access-it.patch
queue-4.4/llist-clang-introduce-member_address_is_nonnull.patch
queue-4.4/usb-gadget-fix-usb_ep_align_maybe-endianness-and-new-usb_ep_align.patch
queue-4.4/frv-declare-jiffies-to-be-located-in-the-.data-section.patch
queue-4.4/fs-proc-stop-trying-to-report-thread-stacks.patch
queue-4.4/arm-dts-am57xx-beagle-x15-common-add-overide-powerhold-property.patch
queue-4.4/rdma-ucma-introduce-safer-rdma_addr_size-variants.patch
queue-4.4/netfilter-nf_nat_h323-fix-logical-not-parentheses-warning.patch
queue-4.4/mei-remove-dev_err-message-on-an-unsupported-ioctl.patch
queue-4.4/net-hns-fix-ethtool-private-flags.patch
queue-4.4/rdma-ucma-check-that-device-exists-prior-to-accessing-it.patch
queue-4.4/spi-davinci-fix-up-dma_mapping_error-incorrect-patch.patch
queue-4.4/net-xfrm-use-preempt-safe-this_cpu_read-in-ipcomp_alloc_tfms.patch
queue-4.4/tty-provide-tty_name-even-without-config_tty.patch
queue-4.4/usb-gadget-f_hid-fix-prevent-accessing-released-memory.patch
queue-4.4/arm-dts-dra7-add-power-hold-and-power-controller-properties-to-palmas.patch
queue-4.4/input-mousedev-fix-implicit-conversion-warning.patch
queue-4.4/input-i8042-enable-mux-on-sony-vaio-vgn-cs-series-to-fix-touchpad.patch
queue-4.4/netfilter-ctnetlink-make-some-parameters-integer-to-avoid-enum-mismatch.patch
queue-4.4/nospec-kill-array_index_nospec_mask_check.patch
queue-4.4/alsa-pcm-use-dma_bytes-as-size-parameter-in-dma_mmap_coherent.patch
queue-4.4/revert-ip6_vti-adjust-vti-mtu-according-to-mtu-of-lower-device.patch
queue-4.4/parport_pc-add-support-for-wch-ch382l-pci-e-single-parallel-port-card.patch
queue-4.4/usb-gadget-align-buffer-size-when-allocating-for-out-endpoint.patch
queue-4.4/cpumask-add-helper-cpumask_available.patch
queue-4.4/acpi-pci-irq-remove-redundant-check-for-null-string-pointer.patch
queue-4.4/usb-serial-ftdi_sio-add-rt-systems-vx-8-cable.patch
queue-4.4/usb-serial-cp210x-add-eldat-easywave-rx09-id.patch
queue-4.4/crypto-ahash-fix-early-termination-in-hash-walk.patch
queue-4.4/partitions-msdos-unable-to-mount-ufs-44bsd-partitions.patch



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]