public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ppc32: Fix sector_t definition with CONFIG_LBD
@ 2004-03-29  6:32 Benjamin Herrenschmidt
  2004-03-29  7:03 ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2004-03-29  6:32 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linus Torvalds, Linux Kernel list

Hi !

sector_t depends on CONFIG_LBD but include/config.h may not be there
thus causing interesting breakage in some places...

Here's the fix for ppc32 (problem found by Roman Zippel, other archs
need a similar fix).

diff -urN linux-2.5/include/asm-ppc/types.h linuxppc-2.5-benh/include/asm-ppc/types.h
--- linux-2.5/include/asm-ppc/types.h	2004-03-01 18:13:06.000000000 +1100
+++ linuxppc-2.5-benh/include/asm-ppc/types.h	2004-03-29 13:14:50.000000000 +1000
@@ -37,6 +37,8 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/config.h>
+
 typedef signed char s8;
 typedef unsigned char u8;
 



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

* Re: [PATCH] ppc32: Fix sector_t definition with CONFIG_LBD
  2004-03-29  6:32 Benjamin Herrenschmidt
@ 2004-03-29  7:03 ` Andrew Morton
       [not found]   ` <20040328230351.1a0d0e9c.akpm@osdl.org.suse.lists.linux.kernel>
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andrew Morton @ 2004-03-29  7:03 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: torvalds, linux-kernel

Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
>  sector_t depends on CONFIG_LBD but include/config.h may not be there
>  thus causing interesting breakage in some places...

Nasty.

>  Here's the fix for ppc32 (problem found by Roman Zippel, other archs
>  need a similar fix).

Three of them.

 25-akpm/include/asm-s390/types.h   |    2 ++
 25-akpm/include/asm-sh/types.h     |    2 ++
 25-akpm/include/asm-x86_64/types.h |    2 ++
 3 files changed, 6 insertions(+)

diff -puN include/asm-s390/types.h~types_h-needs-config_h include/asm-s390/types.h
--- 25/include/asm-s390/types.h~types_h-needs-config_h	2004-03-28 23:02:57.481365480 -0800
+++ 25-akpm/include/asm-s390/types.h	2004-03-28 23:02:57.486364720 -0800
@@ -50,6 +50,8 @@ typedef __signed__ long saddr_t;
  */
 #ifdef __KERNEL__
 
+#include <linux/config.h>
+
 #ifndef __s390x__
 #define BITS_PER_LONG 32
 #else
diff -puN include/asm-sh/types.h~types_h-needs-config_h include/asm-sh/types.h
--- 25/include/asm-sh/types.h~types_h-needs-config_h	2004-03-28 23:02:57.482365328 -0800
+++ 25-akpm/include/asm-sh/types.h	2004-03-28 23:02:57.486364720 -0800
@@ -31,6 +31,8 @@ typedef unsigned long long __u64;
  */
 #ifdef __KERNEL__
 
+#include <linux/config.h>
+
 #define BITS_PER_LONG 32
 
 #ifndef __ASSEMBLY__
diff -puN include/asm-x86_64/types.h~types_h-needs-config_h include/asm-x86_64/types.h
--- 25/include/asm-x86_64/types.h~types_h-needs-config_h	2004-03-28 23:02:57.484365024 -0800
+++ 25-akpm/include/asm-x86_64/types.h	2004-03-28 23:02:57.486364720 -0800
@@ -29,6 +29,8 @@ typedef unsigned long long  __u64;
  */
 #ifdef __KERNEL__
 
+#include <linux/config.h>
+
 #define BITS_PER_LONG 64
 
 #ifndef __ASSEMBLY__

_


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

* Re: [PATCH] ppc32: Fix sector_t definition with CONFIG_LBD
       [not found]   ` <20040328230351.1a0d0e9c.akpm@osdl.org.suse.lists.linux.kernel>
@ 2004-03-29  8:08     ` Andi Kleen
  2004-03-29 13:18       ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 8+ messages in thread
From: Andi Kleen @ 2004-03-29  8:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Andrew Morton <akpm@osdl.org> writes:

> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> >  sector_t depends on CONFIG_LBD but include/config.h may not be there
> >  thus causing interesting breakage in some places...
> 
> Nasty.
> 
> >  Here's the fix for ppc32 (problem found by Roman Zippel, other archs
> >  need a similar fix).
> 
> Three of them.
> 
>  25-akpm/include/asm-s390/types.h   |    2 ++
>  25-akpm/include/asm-sh/types.h     |    2 ++
>  25-akpm/include/asm-x86_64/types.h |    2 ++

Please use this change for x86-64 instead.

-Andi

diff -u linux-2.6.5rc2-amd64/include/asm-x86_64/types.h-o linux-2.6.5rc2-amd64/include/asm-x86_64/types.h
--- linux-2.6.5rc2-amd64/include/asm-x86_64/types.h-o	2004-03-21 21:11:54.000000000 +0100
+++ linux-2.6.5rc2-amd64/include/asm-x86_64/types.h	2004-03-29 04:44:24.000000000 +0200
@@ -48,10 +48,8 @@
 typedef u64 dma64_addr_t;
 typedef u64 dma_addr_t;
 
-#ifdef CONFIG_LBD
 typedef u64 sector_t;
 #define HAVE_SECTOR_T
-#endif
 
 #endif /* __ASSEMBLY__ */
 

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

* Re: [PATCH] ppc32: Fix sector_t definition with CONFIG_LBD
  2004-03-29 13:18       ` Benjamin Herrenschmidt
@ 2004-03-29 10:00         ` Andi Kleen
  0 siblings, 0 replies; 8+ messages in thread
From: Andi Kleen @ 2004-03-29 10:00 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: akpm, linux-kernel

On Mon, 29 Mar 2004 23:18:23 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> 
> >  
> > -#ifdef CONFIG_LBD
> >  typedef u64 sector_t;
> >  #define HAVE_SECTOR_T
> > -#endif
> 
> Do you need that at all then ? The default unsigned long should
> be just fine...

True, it could be completely dropped too.

-Andi

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

* Re: [PATCH] ppc32: Fix sector_t definition with CONFIG_LBD
  2004-03-29  7:03 ` Andrew Morton
       [not found]   ` <20040328230351.1a0d0e9c.akpm@osdl.org.suse.lists.linux.kernel>
@ 2004-03-29 13:10   ` Anton Blanchard
  2004-03-29 13:19   ` Christoph Hellwig
  2 siblings, 0 replies; 8+ messages in thread
From: Anton Blanchard @ 2004-03-29 13:10 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Sun, Mar 28, 2004 at 11:03:51PM -0800, Andrew Morton wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> >  sector_t depends on CONFIG_LBD but include/config.h may not be there
> >  thus causing interesting breakage in some places...
> 
> Nasty.

Dont forget trusty old linux/scripts/checkconfig.pl.

Anton

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

* Re: [PATCH] ppc32: Fix sector_t definition with CONFIG_LBD
  2004-03-29  8:08     ` Andi Kleen
@ 2004-03-29 13:18       ` Benjamin Herrenschmidt
  2004-03-29 10:00         ` Andi Kleen
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2004-03-29 13:18 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Andrew Morton, Linux Kernel list


>  
> -#ifdef CONFIG_LBD
>  typedef u64 sector_t;
>  #define HAVE_SECTOR_T
> -#endif

Do you need that at all then ? The default unsigned long should
be just fine...

Ben.



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

* Re: [PATCH] ppc32: Fix sector_t definition with CONFIG_LBD
  2004-03-29  7:03 ` Andrew Morton
       [not found]   ` <20040328230351.1a0d0e9c.akpm@osdl.org.suse.lists.linux.kernel>
  2004-03-29 13:10   ` Anton Blanchard
@ 2004-03-29 13:19   ` Christoph Hellwig
  2 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2004-03-29 13:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Benjamin Herrenschmidt, torvalds, linux-kernel

On Sun, Mar 28, 2004 at 11:03:51PM -0800, Andrew Morton wrote:
> >  Here's the fix for ppc32 (problem found by Roman Zippel, other archs
> >  need a similar fix).
> 
> Three of them.

Why do we keep thios in asm-*/types.h instead of linux/types.h, btw?

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

* Re: [PATCH] ppc32: Fix sector_t definition with CONFIG_LBD
@ 2004-03-29 19:02 Michel Roelofs
  0 siblings, 0 replies; 8+ messages in thread
From: Michel Roelofs @ 2004-03-29 19:02 UTC (permalink / raw)
  To: linux-kernel

> sector_t depends on CONFIG_LBD but include/config.h may not be there
> thus causing interesting breakage in some places... 
> Here's the fix for ppc32 (problem found by Roman Zippel, other archs
> need a similar fix).

This indeed solves the oops when mounting an HFS fs on my ppc32.



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

end of thread, other threads:[~2004-03-29 19:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-29 19:02 [PATCH] ppc32: Fix sector_t definition with CONFIG_LBD Michel Roelofs
  -- strict thread matches above, loose matches on Subject: below --
2004-03-29  6:32 Benjamin Herrenschmidt
2004-03-29  7:03 ` Andrew Morton
     [not found]   ` <20040328230351.1a0d0e9c.akpm@osdl.org.suse.lists.linux.kernel>
2004-03-29  8:08     ` Andi Kleen
2004-03-29 13:18       ` Benjamin Herrenschmidt
2004-03-29 10:00         ` Andi Kleen
2004-03-29 13:10   ` Anton Blanchard
2004-03-29 13:19   ` Christoph Hellwig

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