Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2016660pxb; Fri, 5 Mar 2021 05:34:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbBXRrmS1iCQ0AmiNUXGPrzciuSKkDiF3slOfB8pJ3j3eXQ/3kCSPBS//H76uW7ZmHI1Tz X-Received: by 2002:a17:906:384e:: with SMTP id w14mr2196150ejc.285.1614951280022; Fri, 05 Mar 2021 05:34:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614951280; cv=none; d=google.com; s=arc-20160816; b=utK/gtathXKsUfS1wlFruZ5Edj828c2kOlDNf9oqdp4UCjpKdg4cPW2krCtZgVRmnZ UFpcq/WCT5pO6PIlFEDHg3nJoYyOS7CewpUHRZTZdAQrd6561RCRTMQ6hAvDJWhaVTJ7 54XXezJqLfstIy0eVRQWHEKMqbBYzmxHRgpt4vy1VH81b11FQsL3TtZEn4qANQUdg6vG Di2gEi6uhxDLysSKmu2eMIOqbyw6i34V/BZLstysWzGJ/HZvft6hTmInG6H+0whYldBA R+Sa7xsHssS9o5qks4nSY7KvAwPMyqtSXlHi/PDFWuOpKMxKzTchSnnTZIypHBcXctzZ Zn0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0Th1RXdS5jfatB3xEXJfO7yhQRHxe42CzTqgDoPcZ/M=; b=mzJ1iU0e0JxQR+vhvCVxk7Dmn91chltaTMd3I3mhFFCYlnZE/vgJw1qCehfFPLUYMV 9+0vR1cTgJp7ltLtvnFcc5i9u0TsS59HDX78WMgN0/v7M+zlShr5KlYyVGAmsqYLwcGv 2U6UiR+AeqchdaMHeURSRlV494LusBmHOSt7DONH1AdT+n41HKsQHPCRj26HtHO4TFh/ Uja8K68ufo2eRL6aqm7/wAAlZLWN00H+15ZC8VOFKGGFqxZfKYyI/lRHidL/DhdAPpJK 3TDvJFtGzg8O6AU2zsUfk+vGIOslK+/NB2EfQxXNBwBH2gLYNgckQr1EUf5z/R31YM9e SHnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oSeA+bg0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si1569179ede.108.2021.03.05.05.34.16; Fri, 05 Mar 2021 05:34:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oSeA+bg0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbhCENc3 (ORCPT + 99 others); Fri, 5 Mar 2021 08:32:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:46454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230214AbhCENcK (ORCPT ); Fri, 5 Mar 2021 08:32:10 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9511E64FE1; Fri, 5 Mar 2021 13:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614951129; bh=55hgLVLRpKPexGnBCm48Hok+NXMns/a7aBDs5Q2HzgI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oSeA+bg03jj5FJKgyQZeHgtF/vk8ozEXBbVuHNyiRoWHtwsdnHahf5LnKPIkZfeFG dzRsqqOktklLQKMs+aiqLZUJucPjeS/UP1X8XRlhlSWiesYUOFxgLUSGsEpkGKqKUU GyUUQzxlR7/WORegymL22JHsFIuSbaBIamE1MmTSIVSIdVsD5olQYArmZZ7iSz4Yoy dMPpbUDF/nKtgBnWzYPu0A3eVUSJ2XmE7GdEa/oXbz4FsiHwjXp/5piqx5N8NTCPPt fdOFk5+GS752l1Xy6Xozz29lYY+vuD2mJ+VSgiQ+cmdR6Jzhh5fdUVjHL0vAioNc9k PH6NVrqGw5rzw== Received: by mail-ot1-f49.google.com with SMTP id w3so1764782oti.8; Fri, 05 Mar 2021 05:32:09 -0800 (PST) X-Gm-Message-State: AOAM531nNYRgjn/6dbh0uweBfPSsHWXVLTKTVw2fS4sBTyP7CMCZFkMB H7T+lzq5Z1PtzNk4hmYWPsRZcbzaIkU96woFmDQ= X-Received: by 2002:a9d:6b8b:: with SMTP id b11mr8029668otq.210.1614951128966; Fri, 05 Mar 2021 05:32:08 -0800 (PST) MIME-Version: 1.0 References: <20210222230519.73f3e239@sf> <8decdd2e-a380-9951-3ebb-2bc3e48aa1c3@physik.fu-berlin.de> <20210223083507.43b5a6dd@sf> <51cbf584-07ef-1e62-7a3b-81494a04faa6@physik.fu-berlin.de> <9441757f-d4bc-a5b5-5fb0-967c9aaca693@physik.fu-berlin.de> <20210223192743.0198d4a9@sf> <20210302222630.5056f243@sf> <25dfced0-88b2-b5b3-f1b6-8b8a9931bf90@physik.fu-berlin.de> <20210303002236.2f4ec01f@sf> <20210303085533.505b1590@sf> In-Reply-To: From: Arnd Bergmann Date: Fri, 5 Mar 2021 14:31:52 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [bisected] 5.12-rc1 hpsa regression: "scsi: hpsa: Correct dev cmds outstanding for retried cmds" breaks hpsa P600 To: Geert Uytterhoeven Cc: Don.Brace@microchip.com, slyich@gmail.com, John Paul Adrian Glaubitz , storagedev@microchip.com, scsi , "linux-ia64@vger.kernel.org" , Linux Kernel Mailing List , jszczype@redhat.com, Scott.Benesh@microchip.com, Scott.Teel@microchip.com, thenzl@redhat.com, "Martin K. Petersen" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 5, 2021 at 10:24 AM Geert Uytterhoeven wrote: > On Fri, Mar 5, 2021 at 12:26 AM wrote: > > > > On 3/2/21 11:26 PM, Sergei Trofimovich wrote: > > struct CommandList { > > struct CommandListHeader Header; /* 0 20 */ > > struct RequestBlock Request; /* 20 20 */ > > struct ErrDescriptor ErrDesc; /* 40 12 */ > > struct SGDescriptor SG[32]; /* 52 512 */ > > /* --- cacheline 8 boundary (512 bytes) was 52 bytes ago --- */ > > u32 busaddr; /* 564 4 */ > > struct ErrorInfo * err_info; /* 568 8 */ > > /* --- cacheline 9 boundary (576 bytes) --- */ > > struct ctlr_info * h; /* 576 8 */ > > int cmd_type; /* 584 4 */ > > long int cmdindex; /* 588 8 */ > > struct completion * waiting; /* 596 8 */ > > struct scsi_cmnd * scsi_cmd; /* 604 8 */ > > struct work_struct work; /* 612 32 */ > > /* --- cacheline 10 boundary (640 bytes) was 4 bytes ago --- */ > > struct hpsa_scsi_dev_t * phys_disk; /* 644 8 */ > > struct hpsa_scsi_dev_t * device; /* 652 8 */ > > bool retry_pending; /* 660 1 */ > > atomic_t refcount; /* 661 4 */ > > How come this atomic_t is no longer aligned to its natural alignment? There is a #pragma pack(1) in linux 203 of this file! It looks like some of the members in struct raid_map_data and struct CommandListHeader need to be annotated as packed, but the file accidentally packs everything until the '#pragma pack()' in line 875, including the kernel-side CommandList data structure that clearly must not be packed. Arnd