linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] Documentation: Build mic/mpssd only for x86_64
@ 2014-12-04 21:27 Ashutosh Dixit
  2014-12-05  3:27 ` Dan Streetman
  2014-12-05 16:18 ` Jonathan Corbet
  0 siblings, 2 replies; 7+ messages in thread
From: Ashutosh Dixit @ 2014-12-04 21:27 UTC (permalink / raw)
  To: Jonathan Corbet, Jiri Kosina, Jiri Kosina, Peter Foley, Randy Dunlap
  Cc: Greg Kroah-Hartman, Dan Streetman, Jennings, Ashutosh Dixit,
	Caz Yokoyama, Sudeep Dutt, Dasaratharaman Chandramouli,
	linux-kernel, linux-doc, Nikhil Rao, Daniel Borkmann,
	linuxppc-dev, Siva Yerramreddy

mic/mpssd along with MIC drivers are currently only usable on
x86_64. So build mic/mpssd only for x86_64 to avoid build breaks on
big-endian systems.

Reported-by: Daniel Borkmann <dborkman@redhat.com>
Reported-by: Dan Streetman <ddstreet@gmail.com>
Suggested-by: Peter Foley <pefoley2@pefoley.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 Documentation/mic/mpssd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/mic/mpssd/Makefile b/Documentation/mic/mpssd/Makefile
index 0f31568..f47fe6b 100644
--- a/Documentation/mic/mpssd/Makefile
+++ b/Documentation/mic/mpssd/Makefile
@@ -1,5 +1,5 @@
 # List of programs to build
-hostprogs-y := mpssd
+hostprogs-$(CONFIG_X86_64) := mpssd
 
 mpssd-objs := mpssd.o sysfs.o
 
-- 
2.0.0.rc3.2.g998f840


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH linux-next] Documentation: Build mic/mpssd only for x86_64
  2014-12-04 21:27 [PATCH linux-next] Documentation: Build mic/mpssd only for x86_64 Ashutosh Dixit
@ 2014-12-05  3:27 ` Dan Streetman
  2014-12-05 18:18   ` Ashutosh Dixit
  2014-12-05 16:18 ` Jonathan Corbet
  1 sibling, 1 reply; 7+ messages in thread
From: Dan Streetman @ 2014-12-05  3:27 UTC (permalink / raw)
  To: Ashutosh Dixit
  Cc: Jonathan Corbet, Jiri Kosina, Peter Foley, Randy Dunlap,
	Greg Kroah-Hartman, Jennings, Caz Yokoyama, Sudeep Dutt,
	Dasaratharaman Chandramouli, linux-kernel, linux-doc, Nikhil Rao,
	Daniel Borkmann, linuxppc-dev, Siva Yerramreddy

On Thu, Dec 4, 2014 at 4:27 PM, Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:
> mic/mpssd along with MIC drivers are currently only usable on
> x86_64. So build mic/mpssd only for x86_64 to avoid build breaks on
> big-endian systems.

Only building for x86_64 is fine, but in that case what's the point of
leaving the htole16() et. al. functions in mpssd.c?  Shouldn't they be
removed?

>
> Reported-by: Daniel Borkmann <dborkman@redhat.com>
> Reported-by: Dan Streetman <ddstreet@gmail.com>
> Suggested-by: Peter Foley <pefoley2@pefoley.com>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  Documentation/mic/mpssd/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/mic/mpssd/Makefile b/Documentation/mic/mpssd/Makefile
> index 0f31568..f47fe6b 100644
> --- a/Documentation/mic/mpssd/Makefile
> +++ b/Documentation/mic/mpssd/Makefile
> @@ -1,5 +1,5 @@
>  # List of programs to build
> -hostprogs-y := mpssd
> +hostprogs-$(CONFIG_X86_64) := mpssd
>
>  mpssd-objs := mpssd.o sysfs.o
>
> --
> 2.0.0.rc3.2.g998f840
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH linux-next] Documentation: Build mic/mpssd only for x86_64
  2014-12-04 21:27 [PATCH linux-next] Documentation: Build mic/mpssd only for x86_64 Ashutosh Dixit
  2014-12-05  3:27 ` Dan Streetman
@ 2014-12-05 16:18 ` Jonathan Corbet
  2014-12-05 18:26   ` Ashutosh Dixit
  2014-12-05 18:29   ` Ashutosh Dixit
  1 sibling, 2 replies; 7+ messages in thread
From: Jonathan Corbet @ 2014-12-05 16:18 UTC (permalink / raw)
  To: Ashutosh Dixit
  Cc: Jiri Kosina, Peter Foley, Randy Dunlap, Greg Kroah-Hartman,
	Dan Streetman, Jennings, Caz Yokoyama, Sudeep Dutt,
	Dasaratharaman Chandramouli, linux-kernel, linux-doc, Nikhil Rao,
	Daniel Borkmann, linuxppc-dev, Siva Yerramreddy

On Thu,  4 Dec 2014 13:27:29 -0800
Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:

> mic/mpssd along with MIC drivers are currently only usable on
> x86_64. So build mic/mpssd only for x86_64 to avoid build breaks on
> big-endian systems.

I can certainly apply this.  But it seems to me that this kind of code
doesn't belong in the documentation directory.  How about a patch to move
it to tools/ ?

jon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH linux-next] Documentation: Build mic/mpssd only for x86_64
  2014-12-05  3:27 ` Dan Streetman
@ 2014-12-05 18:18   ` Ashutosh Dixit
  2014-12-05 19:53     ` Dan Streetman
  0 siblings, 1 reply; 7+ messages in thread
From: Ashutosh Dixit @ 2014-12-05 18:18 UTC (permalink / raw)
  To: Dan Streetman
  Cc: Jonathan Corbet, Jiri Kosina, Peter Foley, Randy Dunlap,
	Greg Kroah-Hartman, Jennings, Yokoyama, Caz, Dutt, Sudeep,
	Chandramouli, Dasaratharaman, linux-kernel, linux-doc, Rao,
	Nikhil, Daniel Borkmann, linuxppc-dev, Siva Yerramreddy

On Thu, Dec 04 2014 at 07:27:06 PM, Dan Streetman <ddstreet@ieee.org> wrote:
> On Thu, Dec 4, 2014 at 4:27 PM, Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:
>> mic/mpssd along with MIC drivers are currently only usable on
>> x86_64. So build mic/mpssd only for x86_64 to avoid build breaks on
>> big-endian systems.
>
> Only building for x86_64 is fine, but in that case what's the point of
> leaving the htole16() et. al. functions in mpssd.c?  Shouldn't they be
> removed?

I am hoping that once glibc is fixed we can remove this limitation on
building only for x86_64, so I'd rather htole16() et. al. stayed.  As I
said earlier, I'm fine with your patch too, but restricting the build
for x86_64 seems to be the smallest patch which provides an acceptable
solution.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH linux-next] Documentation: Build mic/mpssd only for x86_64
  2014-12-05 16:18 ` Jonathan Corbet
@ 2014-12-05 18:26   ` Ashutosh Dixit
  2014-12-05 18:29   ` Ashutosh Dixit
  1 sibling, 0 replies; 7+ messages in thread
From: Ashutosh Dixit @ 2014-12-05 18:26 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Jiri Kosina, Peter Foley, Randy Dunlap, Greg Kroah-Hartman,
	Dan Streetman, Jennings, Yokoyama, Caz, Dutt, Sudeep,
	Chandramouli, Dasaratharaman, linux-kernel, linux-doc, Rao,
	Nikhil, Daniel Borkmann, linuxppc-dev, Siva Yerramreddy

On Fri, Dec 05 2014 at 08:18:18 AM, Jonathan Corbet <corbet@lwn.net> wrote:
> On Thu,  4 Dec 2014 13:27:29 -0800
> Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:
>
>> mic/mpssd along with MIC drivers are currently only usable on
>> x86_64. So build mic/mpssd only for x86_64 to avoid build breaks on
>> big-endian systems.
>
> I can certainly apply this.  But it seems to me that this kind of code
> doesn't belong in the documentation directory.  How about a patch to move
> it to tools/ ?

Yes, let's resolve the situation for now and then we'll submit another
patch soon to move it to tools.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH linux-next] Documentation: Build mic/mpssd only for x86_64
  2014-12-05 16:18 ` Jonathan Corbet
  2014-12-05 18:26   ` Ashutosh Dixit
@ 2014-12-05 18:29   ` Ashutosh Dixit
  1 sibling, 0 replies; 7+ messages in thread
From: Ashutosh Dixit @ 2014-12-05 18:29 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Jiri Kosina, Peter Foley, Randy Dunlap, Greg Kroah-Hartman,
	Dan Streetman, Jennings, Yokoyama, Caz, Dutt, Sudeep,
	Chandramouli, Dasaratharaman, linux-kernel, linux-doc, Rao,
	Nikhil, Daniel Borkmann, linuxppc-dev, Siva Yerramreddy

On Fri, Dec 05 2014 at 08:18:18 AM, Jonathan Corbet <corbet@lwn.net> wrote:
> On Thu,  4 Dec 2014 13:27:29 -0800
> Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:
>
>> mic/mpssd along with MIC drivers are currently only usable on
>> x86_64. So build mic/mpssd only for x86_64 to avoid build breaks on
>> big-endian systems.
>
> I can certainly apply this.  But it seems to me that this kind of code
> doesn't belong in the documentation directory.  How about a patch to move
> it to tools/ ?

Yes, let's resolve the situation for now and then we'll submit another
patch soon to move it to tools.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH linux-next] Documentation: Build mic/mpssd only for x86_64
  2014-12-05 18:18   ` Ashutosh Dixit
@ 2014-12-05 19:53     ` Dan Streetman
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Streetman @ 2014-12-05 19:53 UTC (permalink / raw)
  To: Ashutosh Dixit
  Cc: Jonathan Corbet, Jiri Kosina, Peter Foley, Randy Dunlap,
	Greg Kroah-Hartman, Jennings, Yokoyama, Caz, Dutt, Sudeep,
	Chandramouli, Dasaratharaman, linux-kernel, linux-doc, Rao,
	Nikhil, Daniel Borkmann, linuxppc-dev, Siva Yerramreddy

On Fri, Dec 5, 2014 at 1:18 PM, Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:
> On Thu, Dec 04 2014 at 07:27:06 PM, Dan Streetman <ddstreet@ieee.org> wrote:
>> On Thu, Dec 4, 2014 at 4:27 PM, Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:
>>> mic/mpssd along with MIC drivers are currently only usable on
>>> x86_64. So build mic/mpssd only for x86_64 to avoid build breaks on
>>> big-endian systems.
>>
>> Only building for x86_64 is fine, but in that case what's the point of
>> leaving the htole16() et. al. functions in mpssd.c?  Shouldn't they be
>> removed?
>
> I am hoping that once glibc is fixed we can remove this limitation on
> building only for x86_64, so I'd rather htole16() et. al. stayed.

FYI, the bug I opened with glibc:
https://sourceware.org/bugzilla/show_bug.cgi?id=17679

was rejected because Andreas states "C does not allow function calls
in file scope."  The suggestion was made to try to fix gcc, but
honestly I don't have the time (or energy) to push for a gcc change
just for this. :-)

I do think it's too bad that glibc hto* functions don't work in file
scope (i.e. with static/global var initialization) for constant values
(using them with variables is different, which is why
__bswap_constant_* works in file scope but __bswap_* doesn't), since
it's simply a 2-step process that's entirely doable by the
preprocessor and/or compiler; just check if target endianness matches
desired endianness, and if not the compiler does a simple byte swap of
the constant value.

Anyway, I doubt glibc and/or gcc will be updated anytime soon to allow this.

>  As I
> said earlier, I'm fine with your patch too, but restricting the build
> for x86_64 seems to be the smallest patch which provides an acceptable
> solution.

Fine with me too.  It'll get big-endian building again.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-12-05 19:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-04 21:27 [PATCH linux-next] Documentation: Build mic/mpssd only for x86_64 Ashutosh Dixit
2014-12-05  3:27 ` Dan Streetman
2014-12-05 18:18   ` Ashutosh Dixit
2014-12-05 19:53     ` Dan Streetman
2014-12-05 16:18 ` Jonathan Corbet
2014-12-05 18:26   ` Ashutosh Dixit
2014-12-05 18:29   ` Ashutosh Dixit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).