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: <alpine.LFD.1.10.0806031240120.3235@apollo.tec.linutronix.de>
Date:	Tue, 3 Jun 2008 12:46:06 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Olaf Dabrunz <od@...e.de>
cc:	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Jon Masters <jonathan@...masters.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Stefan Assmann <sassmann@...e.de>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Jesse Barnes <jbarnes@...tuousgeek.org>
Subject: Re: [PATCH 4/7] disable broadcomm legacy boot interrupt generation

On Mon, 2 Jun 2008, Olaf Dabrunz wrote:
>  /*
> + * disabled boot interrupts on HT-1000
> + */
> +static void quirk_disable_broadcom_boot_interrupt(struct pci_dev *dev)
> +{
> +	u32 feature_enable;
> +	u32 saved_feature_enable;

  u32 a,b;

> +	u8 irq;
> +
> +	if (nobootirqquirk)
> +		return;
> +
> +	pci_read_config_dword(dev, 0x64,
> +		       &feature_enable);

one line. 

Can we please have a useful constant for 0x64 ?

> +	saved_feature_enable = feature_enable;
> +	feature_enable |= (1<<0);

What does (1<<0) ? Please use a #define with a understandable name.

> +	pci_write_config_dword(dev, 0x64, feature_enable);

  	pci_write_config_dword(dev, 0x64, feature_enable | WHATEVERTHISMEANS);

That way you dont need an extra variable.

> +	for (irq = 0x10; irq < 0x10 + 32; irq++) {
> +		outb(irq, 0xC00);
> +		outb(0x00, 0xC01);

  #defines for magic port constants please

> +	}
> +
> +	pci_write_config_dword(dev, 0x64, saved_feature_enable);
> +
> +	printk(KERN_INFO "disabled boot interrupts on PCI device 0x%04x:0x%04x\n",
> +		       dev->vendor, dev->device);
> +}
> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS,   PCI_DEVICE_ID_SERVERWORKS_HT1000SB, 	quirk_disable_broadcom_boot_interrupt);
> +
> +/*
>   * On some chipsets we can disable the generation of legacy INTx boot
>   * interrupts.
>   */
> -- 
> 1.5.2.4
> 
> -- 
> Olaf Dabrunz (od/odabrunz), SUSE Linux Products GmbH, N??rnberg
> 
--
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