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: <CABPqkBRDu9_pwJszj6VDiwcrgyK9_UVHg4dc3sbhox9FYbDbtA@mail.gmail.com>
Date:	Wed, 12 Mar 2014 10:23:08 +0100
From:	Stephane Eranian <eranian@...gle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2] perf/x86/uncore: fix compilation warning in snb_uncore_imc_init_box()

On Wed, Mar 12, 2014 at 8:05 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Wed, Mar 12, 2014 at 12:53:30AM +0100, Stephane Eranian wrote:
>>  #ifdef CONFIG_PHYS_ADDR_T_64BIT
>> -     pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET+4, &addr_hi);
>> -     addr = ((resource_size_t)addr_hi << 32) | addr_lo;
>> +       pci_read_config_dword(pdev, where + 4, &pci_dword);
>> +       addr |= ((resource_size_t)pci_dword << 32);
>>  #endif
>
> Indent fail there; fixed it.
>
> FWIW; I thought of an even more horrible solution:
>
>         resource_size_t addr;
>         u32 *addr_ptr = &addr;
>
>         pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET, &addr_ptr[0]);
> #ifdef ..
>         pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET+4, &addr_ptr[1]);
> #endif
>
> :-)
Yeah, I really don't like that one. Always confused with little vs.
big endian or alignement!
--
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