public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: uninline check_signature()
       [not found] <200707161802.l6GI2tNp007390@hera.kernel.org>
@ 2007-07-16 22:12 ` Heiko Carstens
  2007-07-16 22:29   ` Andrew Morton
  2007-07-17  8:59   ` Pekka Enberg
  0 siblings, 2 replies; 17+ messages in thread
From: Heiko Carstens @ 2007-07-16 22:12 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Andrew Morton, Linus Torvalds, geert, zippel, jdike, alan,
	Martin Schwidefsky

On Mon, Jul 16, 2007 at 06:02:55PM +0000, Linux Kernel Mailing List wrote:
> Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc2ea416b2aa04d0c34ff2281a23dae5b76b7b3b
> Commit:     cc2ea416b2aa04d0c34ff2281a23dae5b76b7b3b
> Parent:     4e7bd66318b3ae60fbba7d886d9a98b71ffbf74e
> Author:     Andrew Morton <akpm@linux-foundation.org>
> AuthorDate: Sun Jul 15 23:41:38 2007 -0700
> Committer:  Linus Torvalds <torvalds@woody.linux-foundation.org>
> CommitDate: Mon Jul 16 09:05:50 2007 -0700
> 
>     uninline check_signature()
>     
>     This is a rather bizarre thing to have inlined in io.h.  Stick it in lib/
>     instead.
>     
>     While we're there, despaghetti it a bit, and fix its off-by-one behaviour when
>     passed a zero length.
>     
>     Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>     Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> ---
>  include/linux/io.h    |   29 ++---------------------------
>  lib/Makefile          |    2 +-
>  lib/check_signature.c |   26 ++++++++++++++++++++++++++
>  3 files changed, 29 insertions(+), 28 deletions(-)

Hmm.. this breaks s390 and probably m68k and UML as well:

  CC      lib/check_signature.o
lib/check_signature.c: In function 'check_signature':
lib/check_signature.c:19: error: implicit declaration of function 'readb'

Actually we tried to fix this, but it looks like there was no final
conclusion: http://lkml.org/lkml/2007/6/28/98

Now what? Revert until things have been sorted out?

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

* Re: uninline check_signature()
  2007-07-16 22:12 ` uninline check_signature() Heiko Carstens
@ 2007-07-16 22:29   ` Andrew Morton
  2007-07-16 22:35     ` Linus Torvalds
  2007-07-17  8:59   ` Pekka Enberg
  1 sibling, 1 reply; 17+ messages in thread
From: Andrew Morton @ 2007-07-16 22:29 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Linux Kernel Mailing List, Linus Torvalds, geert, zippel, jdike,
	alan, Martin Schwidefsky

On Tue, 17 Jul 2007 00:12:57 +0200
Heiko Carstens <heiko.carstens@de.ibm.com> wrote:

> On Mon, Jul 16, 2007 at 06:02:55PM +0000, Linux Kernel Mailing List wrote:
> > Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc2ea416b2aa04d0c34ff2281a23dae5b76b7b3b
> > Commit:     cc2ea416b2aa04d0c34ff2281a23dae5b76b7b3b
> > Parent:     4e7bd66318b3ae60fbba7d886d9a98b71ffbf74e
> > Author:     Andrew Morton <akpm@linux-foundation.org>
> > AuthorDate: Sun Jul 15 23:41:38 2007 -0700
> > Committer:  Linus Torvalds <torvalds@woody.linux-foundation.org>
> > CommitDate: Mon Jul 16 09:05:50 2007 -0700
> > 
> >     uninline check_signature()
> >     
> >     This is a rather bizarre thing to have inlined in io.h.  Stick it in lib/
> >     instead.
> >     
> >     While we're there, despaghetti it a bit, and fix its off-by-one behaviour when
> >     passed a zero length.
> >     
> >     Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> >     Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> > ---
> >  include/linux/io.h    |   29 ++---------------------------
> >  lib/Makefile          |    2 +-
> >  lib/check_signature.c |   26 ++++++++++++++++++++++++++
> >  3 files changed, 29 insertions(+), 28 deletions(-)
> 
> Hmm.. this breaks s390 and probably m68k and UML as well:
> 
>   CC      lib/check_signature.o
> lib/check_signature.c: In function 'check_signature':
> lib/check_signature.c:19: error: implicit declaration of function 'readb'

Yep.  They were already broken, only less so.

> Actually we tried to fix this, but it looks like there was no final
> conclusion: http://lkml.org/lkml/2007/6/28/98
> 
> Now what? Revert until things have been sorted out?

No, no revert, please.  If the architecture doesn't support readb() then we
need some reliable way of working that out within Kconfig.


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

* Re: uninline check_signature()
  2007-07-16 22:29   ` Andrew Morton
@ 2007-07-16 22:35     ` Linus Torvalds
  2007-07-16 23:03       ` Heiko Carstens
  2007-07-17  8:50       ` uninline check_signature() Geert Uytterhoeven
  0 siblings, 2 replies; 17+ messages in thread
From: Linus Torvalds @ 2007-07-16 22:35 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Heiko Carstens, Linux Kernel Mailing List, geert, zippel, jdike,
	alan, Martin Schwidefsky



On Mon, 16 Jul 2007, Andrew Morton wrote:
> 
> No, no revert, please.  If the architecture doesn't support readb() then we
> need some reliable way of working that out within Kconfig.

Isn't that CONFIG_HAS_IOMEM?

		Linus

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

* Re: uninline check_signature()
  2007-07-16 22:35     ` Linus Torvalds
@ 2007-07-16 23:03       ` Heiko Carstens
  2007-07-17 13:22         ` Geert Uytterhoeven
  2007-07-17  8:50       ` uninline check_signature() Geert Uytterhoeven
  1 sibling, 1 reply; 17+ messages in thread
From: Heiko Carstens @ 2007-07-16 23:03 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Andrew Morton, Linux Kernel Mailing List, geert, zippel, jdike,
	alan, Martin Schwidefsky

On Mon, Jul 16, 2007 at 03:35:34PM -0700, Linus Torvalds wrote:
> On Mon, 16 Jul 2007, Andrew Morton wrote:
> > 
> > No, no revert, please.  If the architecture doesn't support readb() then we
> > need some reliable way of working that out within Kconfig.
> 
> Isn't that CONFIG_HAS_IOMEM?

That was my understanding as well considering commits  
5ea8176994003483a18c8fed580901e2125f8a83 and  
23db764d3db5a4bb1e104ad9310e5dc18e4ffa1b  
  
so the patch below should be correct... Geert, Roman?

Subject: [PATCH] Make check_signature() depend on CONFIG_HAS_IOMEM

From: Heiko Carstens <heiko.carstens@de.ibm.com>

check_signature() uses readb() and therefore should only be build on
CONFIG_HAS_IOMEM.

Otherwise breaks s390:
lib/check_signature.c: In function `check_signature':
lib/check_signature.c:19: error: implicit declaration of function `readb'

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 lib/Makefile |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Index: linux-2.6/lib/Makefile
===================================================================
--- linux-2.6.orig/lib/Makefile
+++ linux-2.6/lib/Makefile
@@ -13,7 +13,7 @@ lib-$(CONFIG_SMP) += cpumask.o
 lib-y	+= kobject.o kref.o kobject_uevent.o klist.o
 
 obj-y += div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
-	 bust_spinlocks.o hexdump.o check_signature.o
+	 bust_spinlocks.o hexdump.o
 
 ifeq ($(CONFIG_DEBUG_KOBJECT),y)
 CFLAGS_kobject.o += -DDEBUG
@@ -21,7 +21,7 @@ CFLAGS_kobject_uevent.o += -DDEBUG
 endif
 
 obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
-obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
+obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o check_signature.o
 obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
 obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
 lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o

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

* Re: uninline check_signature()
  2007-07-16 22:35     ` Linus Torvalds
  2007-07-16 23:03       ` Heiko Carstens
@ 2007-07-17  8:50       ` Geert Uytterhoeven
  2007-07-17  8:53         ` Geert Uytterhoeven
  2007-07-18 11:33         ` Maciej W. Rozycki
  1 sibling, 2 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2007-07-17  8:50 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Andrew Morton, Heiko Carstens, Linux Kernel Mailing List, zippel,
	jdike, alan, Martin Schwidefsky

On Mon, 16 Jul 2007, Linus Torvalds wrote:
> On Mon, 16 Jul 2007, Andrew Morton wrote:
> > No, no revert, please.  If the architecture doesn't support readb() then we
> > need some reliable way of working that out within Kconfig.
> 
> Isn't that CONFIG_HAS_IOMEM?

No, having memory mapped I/O doesn't mean you have PCI.
How to access memory mapped I/O depends on the bus behind the device.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* Re: uninline check_signature()
  2007-07-17  8:50       ` uninline check_signature() Geert Uytterhoeven
@ 2007-07-17  8:53         ` Geert Uytterhoeven
  2007-07-18 11:33         ` Maciej W. Rozycki
  1 sibling, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2007-07-17  8:53 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Andrew Morton, Heiko Carstens, Linux Kernel Mailing List, zippel,
	jdike, alan, Martin Schwidefsky

On Tue, 17 Jul 2007, Geert Uytterhoeven wrote:
> On Mon, 16 Jul 2007, Linus Torvalds wrote:
> > On Mon, 16 Jul 2007, Andrew Morton wrote:
> > > No, no revert, please.  If the architecture doesn't support readb() then we
> > > need some reliable way of working that out within Kconfig.
> > 
> > Isn't that CONFIG_HAS_IOMEM?
> 
> No, having memory mapped I/O doesn't mean you have PCI.
> How to access memory mapped I/O depends on the bus behind the device.

Like I said before:

| Just make check_signature() depend on ISA || PCI (and maybe || X86_32).

It's used by only a handful of legacy drivers.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* Re: uninline check_signature()
  2007-07-16 22:12 ` uninline check_signature() Heiko Carstens
  2007-07-16 22:29   ` Andrew Morton
@ 2007-07-17  8:59   ` Pekka Enberg
  1 sibling, 0 replies; 17+ messages in thread
From: Pekka Enberg @ 2007-07-17  8:59 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Linux Kernel Mailing List, Andrew Morton, Linus Torvalds, geert,
	zippel, jdike, alan, Martin Schwidefsky

Hi Heiko,

On 7/17/07, Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> Hmm.. this breaks s390 and probably m68k and UML as well:
>
>   CC      lib/check_signature.o
> lib/check_signature.c: In function 'check_signature':
> lib/check_signature.c:19: error: implicit declaration of function 'readb'

Just to confirm: it breaks UML too.

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

* Re: uninline check_signature()
  2007-07-16 23:03       ` Heiko Carstens
@ 2007-07-17 13:22         ` Geert Uytterhoeven
  2007-07-17 16:33           ` Jeff Dike
  0 siblings, 1 reply; 17+ messages in thread
From: Geert Uytterhoeven @ 2007-07-17 13:22 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Linus Torvalds, Andrew Morton, Linux Kernel Mailing List, zippel,
	jdike, alan, Martin Schwidefsky

On Tue, 17 Jul 2007, Heiko Carstens wrote:
> On Mon, Jul 16, 2007 at 03:35:34PM -0700, Linus Torvalds wrote:
> > On Mon, 16 Jul 2007, Andrew Morton wrote:
> > > 
> > > No, no revert, please.  If the architecture doesn't support readb() then we
> > > need some reliable way of working that out within Kconfig.
> > 
> > Isn't that CONFIG_HAS_IOMEM?
> 
> That was my understanding as well considering commits  
> 5ea8176994003483a18c8fed580901e2125f8a83 and  
> 23db764d3db5a4bb1e104ad9310e5dc18e4ffa1b  
>   
> so the patch below should be correct... Geert, Roman?
> 
> Subject: [PATCH] Make check_signature() depend on CONFIG_HAS_IOMEM
> 
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
> 
> check_signature() uses readb() and therefore should only be build on
> CONFIG_HAS_IOMEM.
> 
> Otherwise breaks s390:
> lib/check_signature.c: In function `check_signature':
> lib/check_signature.c:19: error: implicit declaration of function `readb'
> 
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
>  lib/Makefile |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> Index: linux-2.6/lib/Makefile
> ===================================================================
> --- linux-2.6.orig/lib/Makefile
> +++ linux-2.6/lib/Makefile
> @@ -13,7 +13,7 @@ lib-$(CONFIG_SMP) += cpumask.o
>  lib-y	+= kobject.o kref.o kobject_uevent.o klist.o
>  
>  obj-y += div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
> -	 bust_spinlocks.o hexdump.o check_signature.o
> +	 bust_spinlocks.o hexdump.o
>  
>  ifeq ($(CONFIG_DEBUG_KOBJECT),y)
>  CFLAGS_kobject.o += -DDEBUG
> @@ -21,7 +21,7 @@ CFLAGS_kobject_uevent.o += -DDEBUG
>  endif
>  
>  obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
> -obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
> +obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o check_signature.o
>  obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
>  obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
>  lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o

I saw this patch went in.

iomap_copy.o ues the raw I/O memory accessors, so it truly depends on
CONFIG_HAS_IOMEM.

check_signature.o depends on ISA/PCI I/O memory, not on generic I/O
memory.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* Re: uninline check_signature()
  2007-07-17 13:22         ` Geert Uytterhoeven
@ 2007-07-17 16:33           ` Jeff Dike
  2007-07-17 16:46             ` Geert Uytterhoeven
  0 siblings, 1 reply; 17+ messages in thread
From: Jeff Dike @ 2007-07-17 16:33 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Heiko Carstens, Linus Torvalds, Andrew Morton,
	Linux Kernel Mailing List, zippel, jdike, alan,
	Martin Schwidefsky

On Tue, Jul 17, 2007 at 03:22:16PM +0200, Geert Uytterhoeven wrote:
> I saw this patch went in.
> 
> iomap_copy.o ues the raw I/O memory accessors, so it truly depends on
> CONFIG_HAS_IOMEM.

This works for UML.

		Jeff

-- 
Work email - jdike at linux dot intel dot com

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

* Re: uninline check_signature()
  2007-07-17 16:33           ` Jeff Dike
@ 2007-07-17 16:46             ` Geert Uytterhoeven
  2007-07-17 18:03               ` Linus Torvalds
  0 siblings, 1 reply; 17+ messages in thread
From: Geert Uytterhoeven @ 2007-07-17 16:46 UTC (permalink / raw)
  To: Jeff Dike
  Cc: Heiko Carstens, Linus Torvalds, Andrew Morton,
	Linux Kernel Mailing List, zippel, jdike, alan,
	Martin Schwidefsky

On Tue, 17 Jul 2007, Jeff Dike wrote:
> On Tue, Jul 17, 2007 at 03:22:16PM +0200, Geert Uytterhoeven wrote:
> > I saw this patch went in.
> > 
> > iomap_copy.o ues the raw I/O memory accessors, so it truly depends on
> > CONFIG_HAS_IOMEM.
> 
> This works for UML.

Of course. UML (and s390) doesn't have (a need for) I/O memory because it uses
paravirtualization for all drivers.

M68k uses I/O memory for all I/O (hence it sets CONFIG_HAS_IOMEM), but
many m68k machines don't have PCI or ISA (hence it doesn't set
CONFIG_PCI resp. CONFIG_ISA).

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* Re: uninline check_signature()
  2007-07-17 16:46             ` Geert Uytterhoeven
@ 2007-07-17 18:03               ` Linus Torvalds
  2007-07-17 20:31                 ` Geert Uytterhoeven
  0 siblings, 1 reply; 17+ messages in thread
From: Linus Torvalds @ 2007-07-17 18:03 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Jeff Dike, Heiko Carstens, Andrew Morton,
	Linux Kernel Mailing List, zippel, jdike, alan,
	Martin Schwidefsky



On Tue, 17 Jul 2007, Geert Uytterhoeven wrote:
> 
> M68k uses I/O memory for all I/O (hence it sets CONFIG_HAS_IOMEM), but
> many m68k machines don't have PCI or ISA (hence it doesn't set
> CONFIG_PCI resp. CONFIG_ISA).

It doesn't matter whether the machine has PCI or ISA. The only thing that 
matters is whether the thing compiles (which in turn depends on whether it 
has "readb()", which in turn is what HAS_IOMEM is all about).

So I do think that HAS_IOMEM is the right thing here.

		Linus

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

* Re: uninline check_signature()
  2007-07-17 18:03               ` Linus Torvalds
@ 2007-07-17 20:31                 ` Geert Uytterhoeven
  2007-07-17 20:38                   ` Al Viro
  2007-07-17 20:40                   ` Linus Torvalds
  0 siblings, 2 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2007-07-17 20:31 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Jeff Dike, Heiko Carstens, Andrew Morton,
	Linux Kernel Mailing List, Roman Zippel, jdike, Alan Cox,
	Martin Schwidefsky, Russell King

On Tue, 17 Jul 2007, Linus Torvalds wrote:
> On Tue, 17 Jul 2007, Geert Uytterhoeven wrote:
> > M68k uses I/O memory for all I/O (hence it sets CONFIG_HAS_IOMEM), but
> > many m68k machines don't have PCI or ISA (hence it doesn't set
> > CONFIG_PCI resp. CONFIG_ISA).
> 
> It doesn't matter whether the machine has PCI or ISA. The only thing that 
> matters is whether the thing compiles (which in turn depends on whether it 
> has "readb()", which in turn is what HAS_IOMEM is all about).
> 
> So I do think that HAS_IOMEM is the right thing here.

Good, I guess then either I'll have to do something similar to what ARM does:

| #elif !defined(readb)
| 
| #define readb(c)                        (__readwrite_bug("readb"),0)
| #define readw(c)                        (__readwrite_bug("readw"),0)
| #define readl(c)                        (__readwrite_bug("readl"),0)
| #define writeb(v,c)                     __readwrite_bug("writeb")
| #define writew(v,c)                     __readwrite_bug("writew")
| #define writel(v,c)                     __readwrite_bug("writel")
| 
| #define check_signature(io,sig,len)     (0)
| 
| #endif  /* __mem_pci */

(but use the real BUG() instead, I don't think the above will still
 compile now check_signature() is out-of-line)

And we'll all live with a check_signature() in our kernel, which is used
only by a few legacy drivers that depend on ISA || PCI...

OR I'll have to disable HAS_IOMEM on m68k, and invent a new Kconfig
symbol for lots of other stuff that currently depends on HAS_IOMEM...

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* Re: uninline check_signature()
  2007-07-17 20:31                 ` Geert Uytterhoeven
@ 2007-07-17 20:38                   ` Al Viro
  2007-07-17 20:40                   ` Linus Torvalds
  1 sibling, 0 replies; 17+ messages in thread
From: Al Viro @ 2007-07-17 20:38 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linus Torvalds, Jeff Dike, Heiko Carstens, Andrew Morton,
	Linux Kernel Mailing List, Roman Zippel, jdike, Alan Cox,
	Martin Schwidefsky, Russell King

On Tue, Jul 17, 2007 at 10:31:08PM +0200, Geert Uytterhoeven wrote:
> And we'll all live with a check_signature() in our kernel, which is used
> only by a few legacy drivers that depend on ISA || PCI...
> 
> OR I'll have to disable HAS_IOMEM on m68k, and invent a new Kconfig
> symbol for lots of other stuff that currently depends on HAS_IOMEM...

Actually...  Is there any reason why it's not simply
	kmalloc
	memcpy_fromio
	memcmp
on all targets?  Or just a variably-sized auto array, since we never
do it for large stuff, IIRC...

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

* Re: uninline check_signature()
  2007-07-17 20:31                 ` Geert Uytterhoeven
  2007-07-17 20:38                   ` Al Viro
@ 2007-07-17 20:40                   ` Linus Torvalds
  2007-07-18  6:45                     ` Geert Uytterhoeven
  2007-08-12 10:24                     ` [PATCH] Introduce CONFIG_CHECK_SIGNATURE (was: Re: uninline check_signature()) Geert Uytterhoeven
  1 sibling, 2 replies; 17+ messages in thread
From: Linus Torvalds @ 2007-07-17 20:40 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Jeff Dike, Heiko Carstens, Andrew Morton,
	Linux Kernel Mailing List, Roman Zippel, jdike, Alan Cox,
	Martin Schwidefsky, Russell King



On Tue, 17 Jul 2007, Geert Uytterhoeven wrote:
> 
> OR I'll have to disable HAS_IOMEM on m68k, and invent a new Kconfig
> symbol for lots of other stuff that currently depends on HAS_IOMEM...

Well, as far as I'm concerned, you could also make all drivers that 
actually need "check_signature()" do a Kconfig level

	select CHECK_SIGNATURE

along with a

	config CHECK_SIGNATURE
		bool
		default n

in lib/Kconfig, and thus make it totally independent of any hw/bus 
features at all, and simply depend on whether it is needed or not. I'd be 
ok with that, and it's certainly "correct" too.

Hmm?

		Linus

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

* Re: uninline check_signature()
  2007-07-17 20:40                   ` Linus Torvalds
@ 2007-07-18  6:45                     ` Geert Uytterhoeven
  2007-08-12 10:24                     ` [PATCH] Introduce CONFIG_CHECK_SIGNATURE (was: Re: uninline check_signature()) Geert Uytterhoeven
  1 sibling, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2007-07-18  6:45 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Jeff Dike, Heiko Carstens, Andrew Morton,
	Linux Kernel Mailing List, Roman Zippel, jdike, Alan Cox,
	Martin Schwidefsky, Russell King

On Tue, 17 Jul 2007, Linus Torvalds wrote:
> On Tue, 17 Jul 2007, Geert Uytterhoeven wrote:
> > OR I'll have to disable HAS_IOMEM on m68k, and invent a new Kconfig
> > symbol for lots of other stuff that currently depends on HAS_IOMEM...
> 
> Well, as far as I'm concerned, you could also make all drivers that 
> actually need "check_signature()" do a Kconfig level
> 
> 	select CHECK_SIGNATURE
> 
> along with a
> 
> 	config CHECK_SIGNATURE
> 		bool
> 		default n
> 
> in lib/Kconfig, and thus make it totally independent of any hw/bus 
> features at all, and simply depend on whether it is needed or not. I'd be 
> ok with that, and it's certainly "correct" too.
> 
> Hmm?

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> ;-)

(will cook a patch when I find a timeslot)

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* Re: uninline check_signature()
  2007-07-17  8:50       ` uninline check_signature() Geert Uytterhoeven
  2007-07-17  8:53         ` Geert Uytterhoeven
@ 2007-07-18 11:33         ` Maciej W. Rozycki
  1 sibling, 0 replies; 17+ messages in thread
From: Maciej W. Rozycki @ 2007-07-18 11:33 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linus Torvalds, Andrew Morton, Heiko Carstens,
	Linux Kernel Mailing List, zippel, jdike, alan,
	Martin Schwidefsky

On Tue, 17 Jul 2007, Geert Uytterhoeven wrote:

> > > No, no revert, please.  If the architecture doesn't support readb() then we
> > > need some reliable way of working that out within Kconfig.
> > 
> > Isn't that CONFIG_HAS_IOMEM?
> 
> No, having memory mapped I/O doesn't mean you have PCI.

 Hmm, TURBOchannel is not PCI, but is still accessible with 
{read,write}{b,w,l}().

> How to access memory mapped I/O depends on the bus behind the device.

 I would have thought this is to be resolved within ioremap() so that 
drivers can be made portable without twisting your arms.  With the more 
recent ioport_map() call that may be extended to port I/O type devices as 
well.  The Alpha with its dense and sparse I/O space proves it can be done 
for arbitrarily complicated arrangements.

  Maciej

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

* [PATCH] Introduce CONFIG_CHECK_SIGNATURE (was: Re: uninline check_signature())
  2007-07-17 20:40                   ` Linus Torvalds
  2007-07-18  6:45                     ` Geert Uytterhoeven
@ 2007-08-12 10:24                     ` Geert Uytterhoeven
  1 sibling, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2007-08-12 10:24 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Jeff Dike, Heiko Carstens, Andrew Morton,
	Linux Kernel Mailing List, Roman Zippel, jdike, Alan Cox,
	Martin Schwidefsky, Russell King

	Hi Linus,

On Tue, 17 Jul 2007, Linus Torvalds wrote:
> On Tue, 17 Jul 2007, Geert Uytterhoeven wrote:
> > OR I'll have to disable HAS_IOMEM on m68k, and invent a new Kconfig
> > symbol for lots of other stuff that currently depends on HAS_IOMEM...
> 
> Well, as far as I'm concerned, you could also make all drivers that 
> actually need "check_signature()" do a Kconfig level
> 
> 	select CHECK_SIGNATURE
> 
> along with a
> 
> 	config CHECK_SIGNATURE
> 		bool
> 		default n
> 
> in lib/Kconfig, and thus make it totally independent of any hw/bus 
> features at all, and simply depend on whether it is needed or not. I'd be 
> ok with that, and it's certainly "correct" too.
> 
> Hmm?

So here it is...

---
Subject: Introduce CONFIG_CHECK_SIGNATURE

Introduce CONFIG_CHECK_SIGNATURE to control inclusion of check_signature()
and avoid problems on platforms that don't have readb().

Let the few legacy (ISA || PCI || X86) drivers that need check_signature()
select CONFIG_CHECK_SIGNATURE.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/block/Kconfig      |    1 +
 drivers/input/misc/Kconfig |    1 +
 drivers/scsi/Kconfig       |    6 ++++++
 lib/Kconfig                |    3 +++
 lib/Makefile               |    3 ++-
 5 files changed, 13 insertions(+), 1 deletion(-)

--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -62,6 +62,7 @@ config AMIGA_Z2RAM
 config BLK_DEV_XD
 	tristate "XT hard disk support"
 	depends on ISA && ISA_DMA_API
+	select CHECK_SIGNATURE
 	help
 	  Very old 8 bit hard disk controllers used in the IBM XT computer
 	  will be supported if you say Y here.
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -68,6 +68,7 @@ config INPUT_WISTRON_BTNS
 	select INPUT_POLLDEV
 	select NEW_LEDS
 	select LEDS_CLASS
+	select CHECK_SIGNATURE
 	help
 	  Say Y here for support of Winstron laptop button interface, used on
 	  laptops of various brands, including Acer and Fujitsu-Siemens. If
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -367,6 +367,7 @@ config SCSI_3W_9XXX
 config SCSI_7000FASST
 	tristate "7000FASST SCSI support"
 	depends on ISA && SCSI && ISA_DMA_API
+	select CHECK_SIGNATURE
 	help
 	  This driver supports the Western Digital 7000 SCSI host adapter
 	  family.  Some information is in the source:
@@ -388,6 +389,7 @@ config SCSI_AHA152X
 	tristate "Adaptec AHA152X/2825 support"
 	depends on ISA && SCSI && !64BIT
 	select SCSI_SPI_ATTRS
+	select CHECK_SIGNATURE
 	---help---
 	  This is a driver for the AHA-1510, AHA-1520, AHA-1522, and AHA-2825
 	  SCSI host adapters. It also works for the AVA-1505, but the IRQ etc.
@@ -583,6 +585,7 @@ config SCSI_DTC3280
 	tristate "DTC3180/3280 SCSI support"
 	depends on ISA && SCSI
 	select SCSI_SPI_ATTRS
+	select CHECK_SIGNATURE
 	help
 	  This is support for DTC 3180/3280 SCSI Host Adapters.  Please read
 	  the SCSI-HOWTO, available from
@@ -657,6 +660,7 @@ config SCSI_EATA_PIO
 config SCSI_FUTURE_DOMAIN
 	tristate "Future Domain 16xx SCSI/AHA-2920A support"
 	depends on (ISA || PCI) && SCSI
+	select CHECK_SIGNATURE
 	---help---
 	  This is support for Future Domain's 16-bit SCSI host adapters
 	  (TMC-1660/1680, TMC-1650/1670, TMC-3260, TMC-1610M/MER/MEX) and
@@ -1324,6 +1328,7 @@ config SCSI_LPFC
 config SCSI_SEAGATE
 	tristate "Seagate ST-02 and Future Domain TMC-8xx SCSI support"
 	depends on X86 && ISA && SCSI
+	select CHECK_SIGNATURE
 	---help---
 	  These are 8-bit SCSI controllers; the ST-01 is also supported by
 	  this driver.  It is explained in section 3.9 of the SCSI-HOWTO,
@@ -1397,6 +1402,7 @@ config SCSI_T128
 	tristate "Trantor T128/T128F/T228 SCSI support"
 	depends on ISA && SCSI
 	select SCSI_SPI_ATTRS
+	select CHECK_SIGNATURE
 	---help---
 	  This is support for a SCSI host adapter. It is explained in section
 	  3.11 of the SCSI-HOWTO, available from
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -138,4 +138,7 @@ config HAS_DMA
 	depends on !NO_DMA
 	default y
 
+config CHECK_SIGNATURE
+	bool
+
 endmenu
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -21,7 +21,8 @@ CFLAGS_kobject_uevent.o += -DDEBUG
 endif
 
 obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
-obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o check_signature.o
+obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
+obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o
 obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
 obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
 lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

end of thread, other threads:[~2007-08-12 10:25 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200707161802.l6GI2tNp007390@hera.kernel.org>
2007-07-16 22:12 ` uninline check_signature() Heiko Carstens
2007-07-16 22:29   ` Andrew Morton
2007-07-16 22:35     ` Linus Torvalds
2007-07-16 23:03       ` Heiko Carstens
2007-07-17 13:22         ` Geert Uytterhoeven
2007-07-17 16:33           ` Jeff Dike
2007-07-17 16:46             ` Geert Uytterhoeven
2007-07-17 18:03               ` Linus Torvalds
2007-07-17 20:31                 ` Geert Uytterhoeven
2007-07-17 20:38                   ` Al Viro
2007-07-17 20:40                   ` Linus Torvalds
2007-07-18  6:45                     ` Geert Uytterhoeven
2007-08-12 10:24                     ` [PATCH] Introduce CONFIG_CHECK_SIGNATURE (was: Re: uninline check_signature()) Geert Uytterhoeven
2007-07-17  8:50       ` uninline check_signature() Geert Uytterhoeven
2007-07-17  8:53         ` Geert Uytterhoeven
2007-07-18 11:33         ` Maciej W. Rozycki
2007-07-17  8:59   ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox