Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1799797pxb; Mon, 20 Sep 2021 05:43:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqwKxCS6mmlbe6UwO5YR9BB1/k7RZ5lm5TbsYaODqhao0+EUVaVmqs6pEC2MyGCCkMnROb X-Received: by 2002:a92:bf01:: with SMTP id z1mr16489844ilh.155.1632141812196; Mon, 20 Sep 2021 05:43:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632141812; cv=none; d=google.com; s=arc-20160816; b=uCyh+K4jrTHGnUKWq8TXVCGmBrMtGZQxUP5psrcdXh2gzZn44iHRnsFVhhIKXOk5Ro Cp8p9FB5y6oOUbpnINhdS0DJ6+3/9BPmy7nbqdYW+gL9KPKgRZbgqHMDeRq1KvReLex6 /iAbvKWHEo/VzdvOwRZri+zgPflgHFHxzjpAqrViosOf9gbjDEW6KlARKisxlgin9dXs k+k2QXEj/dy377VqFyq7ZHWU7oNHqmwFbJxKFSoH0Q/sh5/RktchB6kRXSQFxJCoZKty vYwBQSB12r414WqjUSmMkytZ1Q519/5DxKiL2dj3nwLd5w2sXSiAM7wcDYcY/eCUAWEE Z3FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Paa1kzOmpJBMRxri1T1/v3bJ/87hSVXjiGD94CSac6I=; b=eq5LkyZHwleBIUEBpo/43RJg4Bv5uoSLTg7xlUUYyJ7s7wVLfCiH61heIsOaQ3hLkv UuDSitM83Iv4yV8a8ClmeTvrO8mlalW681L/MW8A1RJSoDNH8EuNd0YcqbGXBkxcQps0 W2w5/VFH0E1Skd1O/vzO9qz6rBG6wWcIOv/SVxdLxP3OxDE6O4BWuypPziWJ6/jUJTKT 3cxWDJSu8EJOU2zbnp2BoCI8D8Dkpeu8WB0wudybHZ5mQ4Pjyyacq+9Go3PZM10u4ztm w/yHPnRPMgSrDmKPTSAdNWyaQw0kZr0f8hgf9Jd5eaa3NadvbDS3tzkxSxFCDyDN5Qc5 LZoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Wd1Oo1Wz; 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=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l17si422514ilt.1.2021.09.20.05.43.19; Mon, 20 Sep 2021 05:43:32 -0700 (PDT) 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=@alien8.de header.s=dkim header.b=Wd1Oo1Wz; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235457AbhITIQr (ORCPT + 99 others); Mon, 20 Sep 2021 04:16:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233811AbhITIQp (ORCPT ); Mon, 20 Sep 2021 04:16:45 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22311C061574 for ; Mon, 20 Sep 2021 01:15:19 -0700 (PDT) Received: from zn.tnic (p200300ec2f0a2a0063d0dab944a9c04a.dip0.t-ipconnect.de [IPv6:2003:ec:2f0a:2a00:63d0:dab9:44a9:c04a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 9FD121EC0354; Mon, 20 Sep 2021 10:15:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1632125713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Paa1kzOmpJBMRxri1T1/v3bJ/87hSVXjiGD94CSac6I=; b=Wd1Oo1WzCVjhv2Z3jVSPmQaJvCKFebmMUzmkYAceAfhB4dMEn/2Q8gYVpQcS4PgaZSA9M6 AIUwGr1AOD87tmB+nyaI21sY0IxAo2mByg+ZTjX8mZ6CiJ37mqhujQaz9q9oT0eIQaYXVK SQFNx2F6DQCVAg0K7yxLTfCNeqmqszM= Date: Mon, 20 Sep 2021 10:15:13 +0200 From: Borislav Petkov To: Rasmus Villemoes Cc: "Luck, Tony" , Yazen Ghannam , X86 ML , LKML Subject: Re: [PATCH 2/4] x86/mce: Get rid of machine_check_vector Message-ID: References: <20210917105355.2368-1-bp@alien8.de> <20210917105355.2368-3-bp@alien8.de> <5eb3ac0a-4887-08b2-82fa-0348e04ace95@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5eb3ac0a-4887-08b2-82fa-0348e04ace95@rasmusvillemoes.dk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 20, 2021 at 09:42:22AM +0200, Rasmus Villemoes wrote: > And, since in the concrete case mca_config just has four bool members > before the bitfields, we see that the 1-bit bitfields are put within the > first 8 bytes of the struct, while the __reserved field gets an entire > u64 all to itself: I probably should move that into alignment. > But why the messy mix between 1-bit bitfields and _Bools in the first place? My intention was to convert those boolean flags into a bitfield. But you can't convert them all, unfortunately: In file included from ./include/linux/miscdevice.h:7, from arch/x86/kernel/cpu/mce/core.c:14: ./include/linux/device.h:148:64: error: cannot take address of bit-field ‘dont_log_ce’ 148 | { __ATTR(_name, _mode, device_show_bool, device_store_bool), &(_var) } | ^ arch/x86/kernel/cpu/mce/core.c:2415:8: note: in expansion of macro ‘DEVICE_BOOL_ATTR’ 2415 | static DEVICE_BOOL_ATTR(dont_log_ce, 0644, mca_cfg.dont_log_ce); | ^~~~~~~~~~~~~~~~ make[4]: *** [scripts/Makefile.build:277: arch/x86/kernel/cpu/mce/core.o] Error 1 make[3]: *** [scripts/Makefile.build:540: arch/x86/kernel/cpu/mce] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [scripts/Makefile.build:540: arch/x86/kernel/cpu] Error 2 make[1]: *** [scripts/Makefile.build:540: arch/x86/kernel] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1874: arch/x86] Error 2 make: *** Waiting for unfinished jobs.... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette