lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150116105015.GB18880@pd.tnic>
Date:	Fri, 16 Jan 2015 11:50:15 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	Joerg Roedel <joro@...tes.org>, x86@...nel.org,
	Tony Luck <tony.luck@...el.com>
Subject: Re: [patch 02/23] x86/apic: Make x2apic_mode depend on
 CONFIG_X86_X2APIC

On Thu, Jan 15, 2015 at 09:22:11PM -0000, Thomas Gleixner wrote:
> No point in having a static variable around which is always 0. Let the
> compiler optimize code out if disabled.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

Acked-by: Borislav Petkov <bp@...e.de>

> ---
>  arch/x86/include/asm/apic.h |    8 ++++----
>  arch/x86/kernel/apic/apic.c |    2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> Index: tip/arch/x86/include/asm/apic.h
> ===================================================================
> --- tip.orig/arch/x86/include/asm/apic.h
> +++ tip/arch/x86/include/asm/apic.h
> @@ -106,8 +106,6 @@ extern u32 native_safe_apic_wait_icr_idl
>  extern void native_apic_icr_write(u32 low, u32 id);
>  extern u64 native_apic_icr_read(void);
>  
> -extern int x2apic_mode;
> -
>  static inline bool apic_is_x2apic_enabled(void)
>  {
>  	u64 msr;
> @@ -177,6 +175,7 @@ static inline u64 native_x2apic_icr_read
>  	return val;
>  }
>  
> +extern int x2apic_mode;
>  extern int x2apic_phys;
>  extern int x2apic_preenabled;
>  extern void check_x2apic(void);
> @@ -209,8 +208,9 @@ static inline void x2apic_force_phys(voi
>  {
>  }
>  
> -#define	x2apic_preenabled 0
> -#define	x2apic_supported()	0
> +#define x2apic_mode		(0)
> +#define	x2apic_preenabled	(0)

Btw, while you're at it, you can kill this yet another knob
x2apic_preenabled and use check_x2apic() directly. There are just too
many useless knobs in there.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ