]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
scsi: hisi_sas: define hisi_sas_device.device_id as int
authorJohn Garry <john.garry@huawei.com>
Fri, 4 Aug 2017 19:50:23 +0000 (13:50 -0600)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 9 Aug 2017 14:38:36 +0000 (16:38 +0200)
commit502a3f2fcbf721ad66b29704ed6d3af05f7bd9ff
treef974e92abcc3b42e44e2e492fb1debf028a46ba2
parentb7288bde6792697f8a3f5e854f35666fee439c67
scsi: hisi_sas: define hisi_sas_device.device_id as int

BugLink: https://bugs.launchpad.net/bugs/1708734
Currently hisi_sas_device.device_id is a u64. This can create a problem
in selecting the queue for a device, in that this code does a 64b
division on device id. For some 32b systems, 64b division is slow and
the lib reference must be explicitly included.

The device id does not need to be 64b in size, so, as a solution, just
make as an int.

Also, struct hisi_sas_device elements are re-ordered to improve packing
efficiency.

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit ad6048325c7807818c6c49e485660143d97a622e)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_main.c