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: <20080729095001.GA509@verge.net.au>
Date:	Tue, 29 Jul 2008 19:50:02 +1000
From:	Simon Horman <horms@...ge.net.au>
To:	Linux-kernel <Linux-kernel@...r.kernel.org>,
	linux-ia64@...r.kernel.org
Cc:	Ingo Molnar <mingo@...e.hu>, Rusty Russell <rusty@...tcorp.com.au>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Al Viro <viro@...IV.linux.org.uk>, Mike Travis <travis@....com>
Subject: Re: Regression on ia64 with cpu masks: optimize and clean up
	cpumask_of_cpu()

On Tue, Jul 29, 2008 at 01:45:01PM +1000, Simon Horman wrote:
> Hi,
> 
> I haven't had a time to look into this closeley yet,
> but "cpu masks: optimize and clean up cpumask_of_cpu()"
> aka e56b3bc7942982ac2589c942fb345e38bc7a341a causes
> a build failure for me on ia64.
> 
> # ia64-unknown-linux-gnu-gcc --version
> ia64-unknown-linux-gnu-gcc (GCC) 3.4.5
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> # make
> make[1]: `include/asm-ia64/nr-irqs.h' is up to date.
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   CALL    scripts/checksyscalls.sh
>   CHK     include/linux/compile.h
>   CC      drivers/acpi/processor_throttling.o
> drivers/acpi/processor_throttling.c: In function `acpi_processor_get_throttling':
> drivers/acpi/processor_throttling.c:841: error: invalid lvalue in unary `&'
> drivers/acpi/processor_throttling.c: In function `acpi_processor_set_throttling':
> drivers/acpi/processor_throttling.c:1028: error: invalid lvalue in unary `&'
> drivers/acpi/processor_throttling.c:1059: error: invalid lvalue in unary `&'
> make[2]: *** [drivers/acpi/processor_throttling.o] Error 1
> make[1]: *** [drivers/acpi] Error 2
> make: *** [drivers] Error 2

I'm pretty sure that I am missing something subtle here,
but something that is working for me is:

Index: linux-2.6/include/linux/cpumask.h
===================================================================
--- linux-2.6.orig/include/linux/cpumask.h	2008-07-29 19:03:06.000000000 +1000
+++ linux-2.6/include/linux/cpumask.h	2008-07-29 19:03:16.000000000 +1000
@@ -287,7 +287,7 @@ static inline const cpumask_t *get_cpu_m
  * gcc optimizes it out (it's a constant) and there's no huge stack
  * variable created:
  */
-#define cpumask_of_cpu(cpu) ({ *get_cpu_mask(cpu); })
+#define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu))
 
 
 #define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS)

--
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