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] [day] [month] [year] [list]
Message-ID: <BAE9DCEF64577A439B3A37F36F9B691C02E51CDD@orsmsx418.amr.corp.intel.com>
Date:	Mon, 20 Aug 2007 16:21:44 -0700
From:	"Nelson, Shannon" <shannon.nelson@...el.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	<akpm@...ux-foundation.org>, <linux-kernel@...r.kernel.org>,
	<chris.leech@...il.com>, <ak@...e.de>,
	"Luck, Tony" <tony.luck@...el.com>
Subject: RE: [PATCH -mm] IOAT: fix for UP use of cpu_physical_id()

>-----Original Message-----
>From: H. Peter Anvin [mailto:hpa@...or.com] 
>Sent: Monday, August 20, 2007 3:27 PM
>To: Nelson, Shannon
>Cc: akpm@...ux-foundation.org; linux-kernel@...r.kernel.org; 
>chris.leech@...il.com; ak@...e.de; Luck, Tony
>Subject: Re: [PATCH -mm] IOAT: fix for UP use of cpu_physical_id()
>
>Shannon Nelson wrote:
>> Make sure we can use cpu_physical_id() even when compiled for
>> uni-processor.
>> 
>> diff --git a/drivers/dma/ioat_dca.c b/drivers/dma/ioat_dca.c
>> index c3a500b..b1af49c 100644
>> --- a/drivers/dma/ioat_dca.c
>> +++ b/drivers/dma/ioat_dca.c
>> @@ -25,6 +25,14 @@
>>  #include <linux/smp.h>
>>  #include <linux/interrupt.h>
>>  #include <linux/dca.h>
>> +
>> +// either a kernel change is needed, or we need something 
>like this in kernel
>> +#ifndef CONFIG_SMP
>> +#include <asm/smp.h>
>> +#undef cpu_physical_id
>> +#define cpu_physical_id(cpu) (cpuid_ebx(1) >> 24)
>> +#endif
>> +
>
>This value should probably be cached.  Executing cpuid to get a static
>value seems like a bad idea.

Yeah, this whole cpu_physical_id() gizmo needs to be fixed so it is
actually usable for non-SMP configurations.  Unfortunately, I'm not the
guy to do it.

sln
--
======================================================================
Mr. Shannon Nelson                 LAN Access Division, Intel Corp.
Shannon.Nelson@...el.com                I don't speak for Intel
(503) 712-7659                    Parents can't afford to be squeamish.
-
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