public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Alan Cox <alan@redhat.com>, David Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Mel Gorman <mel@csn.ul.ie>
Subject: 2.6.23-rc6-git1 -- termios *_1 compile failures on powerpc
Date: Wed, 12 Sep 2007 12:58:23 +0100	[thread overview]
Message-ID: <20070912115823.GG4835@shadowen.org> (raw)

The following commit just hit mainline and all my powerpc test boxes are
failing during compilation:

	commit f629307c857c030d5a3dd777fee37c8bb395e171
	tty: termios locking functions break with new termios type

Failing as follows:

  drivers/char/tty_ioctl.c: In function `n_tty_ioctl':
  drivers/char/tty_ioctl.c:799: error: implicit declaration of function
				`kernel_termios_to_user_termios_1'
  drivers/char/tty_ioctl.c:806: error: implicit declaration of function
				`user_termios_to_kernel_termios_1'
  make[2]: *** [drivers/char/tty_ioctl.o] Error 1

It seems that a lot of architectures already have these varients, but not
powerpc:

	include/asm-arm/termios.h
	include/asm-blackfin/termios.h
	include/asm-cris/termios.h
	include/asm-h8300/termios.h
	include/asm-i386/termios.h
	include/asm-ia64/termios.h
	include/asm-m32r/termios.h
	include/asm-m68k/termios.h
	include/asm-mips/termios.h
	include/asm-v850/termios.h
	include/asm-x86_64/termios.h
	include/asm-xtensa/termios.h

Looking closer there seems to be a generic implementation of the non _1
variants, which seem out of step with the architecture specific
variants?  Seems bad.

>From i386 we have the following (wrapped for clarity), and they seem
typical:

  #define user_termios_to_kernel_termios(k, u) 
  	copy_from_user(k, u, sizeof(struct termios2))
  #define kernel_termios_to_user_termios(u, k)
	copy_to_user(u, k, sizeof(struct termios2))
  #define user_termios_to_kernel_termios_1(k, u)
	copy_from_user(k, u, sizeof(struct termios))
  #define kernel_termios_to_user_termios_1(u, k)
	copy_to_user(u, k, sizeof(struct termios))

Generic versions from asm-generic/termios.h seem to be:

  #define user_termios_to_kernel_termios(k, u)
	copy_from_user(k, u, sizeof(struct termios))
  #define kernel_termios_to_user_termios(u, k)
	copy_to_user(u, k, sizeof(struct termios))

So I'd say we've missed a trick on this in the conversion.  Alan seems
to be the main source of these changes.  From the various commits which
update these defines in the architectures I get the implication that you
should be able to convert an architecture at a time as we go.  However,
the commit above seems to fly in the face of that.  It is therefore not
obvious if this commit is in error, or if the generic code needs fixing
to match?

Alan?

-apw

             reply	other threads:[~2007-09-12 11:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-12 11:58 Andy Whitcroft [this message]
2007-09-12 14:33 ` 2.6.23-rc6-git1 -- termios *_1 compile failures on powerpc Josh Boyer
2007-09-15 12:54   ` Guido Guenther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070912115823.GG4835@shadowen.org \
    --to=apw@shadowen.org \
    --cc=alan@redhat.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox