* linux/completion.h
@ 2001-10-14 9:46 Kremer, Alex
2001-10-14 15:30 ` linux/completion.h David Woodhouse
0 siblings, 1 reply; 7+ messages in thread
From: Kremer, Alex @ 2001-10-14 9:46 UTC (permalink / raw)
To: linux-mtd
Hi all,
>From about a month ago, the jffs2 code uses the "completion" interface that
appeared
only around 2.4.8. This means that jffs2 cannot be compiled unmodified with
kernels
prior to this. I'm using 2.4.1 and cannot currently upgrade (hw
compatibility issues,
that would demand too many changes).
Does anyone know what would be a sufficient set of changes either to
jffs2 or the kernel that wouldn't break anything and allow me use the latest
jffs2
code?
It seems that completion() and wait_for_completion() just manage
the wait queue. I'll try to just add them. Has anyone tried this, yet?
Thanks,
Kreso
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux/completion.h
2001-10-14 9:46 linux/completion.h Kremer, Alex
@ 2001-10-14 15:30 ` David Woodhouse
0 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2001-10-14 15:30 UTC (permalink / raw)
To: Kremer, Alex; +Cc: linux-mtd
alex.kremer@intel.com said:
> From about a month ago, the jffs2 code uses the "completion" interface
> that appeared only around 2.4.8. This means that jffs2 cannot be
> compiled unmodified with kernels prior to this. I'm using 2.4.1 and
> cannot currently upgrade (hw compatibility issues, that would demand
> too many changes).
> Does anyone know what would be a sufficient set of changes either to
> jffs2 or the kernel that wouldn't break anything and allow me use the
> latest jffs2 code?
The necessary magic should already be in include/linux/mtd/compatmac.h
It should just work if you include that from background.c.
--
dwmw2
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: linux/completion.h
@ 2001-10-14 16:39 Kremer, Alex
2001-10-14 19:02 ` linux/completion.h David Woodhouse
0 siblings, 1 reply; 7+ messages in thread
From: Kremer, Alex @ 2001-10-14 16:39 UTC (permalink / raw)
To: 'David Woodhouse', Kremer, Alex; +Cc: linux-mtd
Thanks!
Now there is another problem:
drivers/mtd/mtdlink.o: In function `mtdblock_ioctl':
drivers/mtd/mtdlink.o(.text+0xafa4): undefined reference to `__put_user_bad'
There was a discussion concerning put_user here, right? Something about
BLKGETSIZE64.
If I comment out the #define BLKGETSIZE64 in compatmac.h the
case BLKGETSIZE64:
return put_user((u64)mtdblk->mtd->size, (u64 *)arg);
in mtdblock.c is not compiled, and then there is no problem.
But then the whole purpose of
#ifndef BLKGETSIZE64 /* LINUX_VERSION_CODE <
KERNEL_VERSION(2,4,10-pre13) */
#define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device
size in bytes (u64 *arg) */
#endif
in compatmac.h is missed.
What is the right way to do it?
Kreso
| -----Original Message-----
| From: David Woodhouse [mailto:dwmw2@infradead.org]
| Sent: Sun, October 14, 2001 5:31 PM
| To: Kremer, Alex
| Cc: linux-mtd@lists.infradead.org
| Subject: Re: linux/completion.h
|
|
|
|
| alex.kremer@intel.com said:
| > From about a month ago, the jffs2 code uses the
| "completion" interface
| > that appeared only around 2.4.8. This means that jffs2 cannot be
| > compiled unmodified with kernels prior to this. I'm using 2.4.1 and
| > cannot currently upgrade (hw compatibility issues, that would demand
| > too many changes).
|
| > Does anyone know what would be a sufficient set of changes either to
| > jffs2 or the kernel that wouldn't break anything and allow
| me use the
| > latest jffs2 code?
|
| The necessary magic should already be in include/linux/mtd/compatmac.h
|
| It should just work if you include that from background.c.
|
| --
| dwmw2
|
|
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux/completion.h
2001-10-14 16:39 linux/completion.h Kremer, Alex
@ 2001-10-14 19:02 ` David Woodhouse
0 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2001-10-14 19:02 UTC (permalink / raw)
To: Kremer, Alex; +Cc: linux-mtd
alex.kremer@intel.com said:
> What is the right way to do it?
Don't define it in compatmac.h, and surround the case BLKGETSIZE64 with
#ifdef BLKGETSIZE64. I was given a patch to do this but haven't yet merged
it.
--
dwmw2
^ permalink raw reply [flat|nested] 7+ messages in thread
* linux/completion.h
@ 2001-10-15 15:34 Larry Doolittle
0 siblings, 0 replies; 7+ messages in thread
From: Larry Doolittle @ 2001-10-15 15:34 UTC (permalink / raw)
To: linux-mtd
David said:
> Don't define it in compatmac.h, and surround the case BLKGETSIZE64 with
> #ifdef BLKGETSIZE64. I was given a patch to do this but haven't yet merged
> it.
You did merge the part that protects the BLKGETSIZE64 cases with an #ifdef.
All Alex has to do is disable the #define BLKGETSIZE64 from compatmac.h.
There might be good reason for _some_ people to define BLKGETSIZE64 in
compatmac.h, but I don't think that's a robust default.
- Larry
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: linux/completion.h
@ 2001-10-15 16:47 Kremer, Alex
2001-10-18 17:01 ` linux/completion.h Joakim Tjernlund
0 siblings, 1 reply; 7+ messages in thread
From: Kremer, Alex @ 2001-10-15 16:47 UTC (permalink / raw)
To: 'Larry Doolittle', linux-mtd
[-- Attachment #1: Type: text/plain, Size: 2633 bytes --]
| From: Larry Doolittle [mailto:ldoolitt@recycle.lbl.gov]
|
| You did merge the part that protects the BLKGETSIZE64 cases
| with an #ifdef. All Alex has to do is disable the #define BLKGETSIZE64
from
| compatmac.h.
| There might be good reason for _some_ people to define BLKGETSIZE64 in
| compatmac.h, but I don't think that's a robust default.
That is correct. It is already there. Maybe a CONFIG options are in place
here.
I'm attaching a patch that did the trick for me.
diff -urN mtd/drivers/mtd/Config.in mtd-fix/drivers/mtd/Config.in
--- mtd/drivers/mtd/Config.in Wed Oct 3 13:38:38 2001
+++ mtd-fix/drivers/mtd/Config.in Mon Oct 15 18:31:34 2001
@@ -11,6 +11,12 @@
if [ "$CONFIG_MTD_DEBUG" = "y" ]; then
int ' Debugging verbosity (0 = quiet, 3 = noisy)'
CONFIG_MTD_DEBUG_VERBOSE 0
fi
+ bool 'Compatibility with kernels older than 2.4.8' CONFIG_MTD_COMPATMAC
+
+ if [ "$CONFIG_MTD_COMPATMAC" = "y" ]; then
+ bool ' Enable 64 bit block operations'
CONFIG_MTD_COMPATMAC_BLKGETSIZE64
+ fi
+
dep_tristate ' MTD partitioning support' CONFIG_MTD_PARTITIONS
$CONFIG_MTD
dep_tristate ' RedBoot partition table parsing'
CONFIG_MTD_REDBOOT_PARTS $CONFIG_M
TD_PARTITIONS
if [ "$CONFIG_ARM" = "y" ]; then
diff -urN mtd/fs/jffs2/background.c mtd-fix/fs/jffs2/background.c
--- mtd/fs/jffs2/background.c Mon Oct 8 11:22:38 2001
+++ mtd-fix/fs/jffs2/background.c Mon Oct 15 18:31:20 2001
@@ -43,7 +43,11 @@
#include <linux/jffs2.h>
#include <linux/mtd/mtd.h>
#include <linux/interrupt.h>
+#ifdef CONFIG_MTD_COMPATMAC
+#include <linux/mtd/compatmac.h>
+#else
#include <linux/completion.h>
+#endif
#include "nodelist.h"
diff -urN mtd/include/linux/jffs2_fs_sb.h
mtd-fix/include/linux/jffs2_fs_sb.h
--- mtd/include/linux/jffs2_fs_sb.h Tue Sep 18 23:15:18 2001
+++ mtd-fix/include/linux/jffs2_fs_sb.h Mon Oct 15 18:31:20 2001
@@ -5,7 +5,11 @@
#include <linux/types.h>
#include <linux/spinlock.h>
+#ifdef CONFIG_MTD_COMPATMAC
+#include <linux/mtd/compatmac.h>
+#else
#include <linux/completion.h>
+#endif
#include <asm/semaphore.h>
#include <linux/list.h>
diff -urN mtd/include/linux/mtd/compatmac.h
mtd-fix/include/linux/mtd/compatmac.h
--- mtd/include/linux/mtd/compatmac.h Tue Oct 2 11:13:53 2001
+++ mtd-fix/include/linux/mtd/compatmac.h Mon Oct 15 18:31:20 2001
@@ -463,7 +463,7 @@
}
}
#endif
-#ifndef BLKGETSIZE64 /* LINUX_VERSION_CODE < KERNEL_VERSION(2,4,10-pre13)
*/
+#ifdef CONFIG_MTD_COMPATMAC_BLKGETSIZE64
#define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device size in
bytes (u64 *a
rg) */
#endif
[-- Attachment #2: mtd-compat.patch --]
[-- Type: application/octet-stream, Size: 2164 bytes --]
diff -urN mtd/drivers/mtd/Config.in mtd-fix/drivers/mtd/Config.in
--- mtd/drivers/mtd/Config.in Wed Oct 3 13:38:38 2001
+++ mtd-fix/drivers/mtd/Config.in Mon Oct 15 18:31:34 2001
@@ -11,6 +11,12 @@
if [ "$CONFIG_MTD_DEBUG" = "y" ]; then
int ' Debugging verbosity (0 = quiet, 3 = noisy)' CONFIG_MTD_DEBUG_VERBOSE 0
fi
+ bool 'Compatibility with kernels older than 2.4.8' CONFIG_MTD_COMPATMAC
+
+ if [ "$CONFIG_MTD_COMPATMAC" = "y" ]; then
+ bool ' Enable 64 bit block operations' CONFIG_MTD_COMPATMAC_BLKGETSIZE64
+ fi
+
dep_tristate ' MTD partitioning support' CONFIG_MTD_PARTITIONS $CONFIG_MTD
dep_tristate ' RedBoot partition table parsing' CONFIG_MTD_REDBOOT_PARTS $CONFIG_MTD_PARTITIONS
if [ "$CONFIG_ARM" = "y" ]; then
diff -urN mtd/fs/jffs2/background.c mtd-fix/fs/jffs2/background.c
--- mtd/fs/jffs2/background.c Mon Oct 8 11:22:38 2001
+++ mtd-fix/fs/jffs2/background.c Mon Oct 15 18:31:20 2001
@@ -43,7 +43,11 @@
#include <linux/jffs2.h>
#include <linux/mtd/mtd.h>
#include <linux/interrupt.h>
+#ifdef CONFIG_MTD_COMPATMAC
+#include <linux/mtd/compatmac.h>
+#else
#include <linux/completion.h>
+#endif
#include "nodelist.h"
diff -urN mtd/include/linux/jffs2_fs_sb.h mtd-fix/include/linux/jffs2_fs_sb.h
--- mtd/include/linux/jffs2_fs_sb.h Tue Sep 18 23:15:18 2001
+++ mtd-fix/include/linux/jffs2_fs_sb.h Mon Oct 15 18:31:20 2001
@@ -5,7 +5,11 @@
#include <linux/types.h>
#include <linux/spinlock.h>
+#ifdef CONFIG_MTD_COMPATMAC
+#include <linux/mtd/compatmac.h>
+#else
#include <linux/completion.h>
+#endif
#include <asm/semaphore.h>
#include <linux/list.h>
diff -urN mtd/include/linux/mtd/compatmac.h mtd-fix/include/linux/mtd/compatmac.h
--- mtd/include/linux/mtd/compatmac.h Tue Oct 2 11:13:53 2001
+++ mtd-fix/include/linux/mtd/compatmac.h Mon Oct 15 18:31:20 2001
@@ -463,7 +463,7 @@
}
}
#endif
-#ifndef BLKGETSIZE64 /* LINUX_VERSION_CODE < KERNEL_VERSION(2,4,10-pre13) */
+#ifdef CONFIG_MTD_COMPATMAC_BLKGETSIZE64
#define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device size in bytes (u64 *arg) */
#endif
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: linux/completion.h
2001-10-15 16:47 linux/completion.h Kremer, Alex
@ 2001-10-18 17:01 ` Joakim Tjernlund
0 siblings, 0 replies; 7+ messages in thread
From: Joakim Tjernlund @ 2001-10-18 17:01 UTC (permalink / raw)
To: linux-mtd
Hi
I just upgraded MV's 2.4.2 kernel to the latest MTD CVS. I had
to apply the patch below to get it to compile. I am running it now
and it's working fine. I think it should be applied to CVS, comments?
Jocke
> -----Original Message-----
> From: linux-mtd-admin@lists.infradead.org
> [mailto:linux-mtd-admin@lists.infradead.org]On Behalf Of Kremer, Alex
> Sent: Monday, October 15, 2001 18:48
> To: 'Larry Doolittle'; linux-mtd@lists.infradead.org
> Subject: RE: linux/completion.h
>
>
>
> | From: Larry Doolittle [mailto:ldoolitt@recycle.lbl.gov]
> |
> | You did merge the part that protects the BLKGETSIZE64 cases
> | with an #ifdef. All Alex has to do is disable the #define BLKGETSIZE64
> from
> | compatmac.h.
> | There might be good reason for _some_ people to define BLKGETSIZE64 in
> | compatmac.h, but I don't think that's a robust default.
>
> That is correct. It is already there. Maybe a CONFIG options are in place
> here.
>
> I'm attaching a patch that did the trick for me.
>
>
>
> diff -urN mtd/drivers/mtd/Config.in mtd-fix/drivers/mtd/Config.in
> --- mtd/drivers/mtd/Config.in Wed Oct 3 13:38:38 2001
> +++ mtd-fix/drivers/mtd/Config.in Mon Oct 15 18:31:34 2001
> @@ -11,6 +11,12 @@
> if [ "$CONFIG_MTD_DEBUG" = "y" ]; then
> int ' Debugging verbosity (0 = quiet, 3 = noisy)'
> CONFIG_MTD_DEBUG_VERBOSE 0
> fi
> + bool 'Compatibility with kernels older than 2.4.8' CONFIG_MTD_COMPATMAC
> +
> + if [ "$CONFIG_MTD_COMPATMAC" = "y" ]; then
> + bool ' Enable 64 bit block operations'
> CONFIG_MTD_COMPATMAC_BLKGETSIZE64
> + fi
> +
> dep_tristate ' MTD partitioning support' CONFIG_MTD_PARTITIONS
> $CONFIG_MTD
> dep_tristate ' RedBoot partition table parsing'
> CONFIG_MTD_REDBOOT_PARTS $CONFIG_M
> TD_PARTITIONS
> if [ "$CONFIG_ARM" = "y" ]; then
> diff -urN mtd/fs/jffs2/background.c mtd-fix/fs/jffs2/background.c
> --- mtd/fs/jffs2/background.c Mon Oct 8 11:22:38 2001
> +++ mtd-fix/fs/jffs2/background.c Mon Oct 15 18:31:20 2001
> @@ -43,7 +43,11 @@
> #include <linux/jffs2.h>
> #include <linux/mtd/mtd.h>
> #include <linux/interrupt.h>
> +#ifdef CONFIG_MTD_COMPATMAC
> +#include <linux/mtd/compatmac.h>
> +#else
> #include <linux/completion.h>
> +#endif
> #include "nodelist.h"
>
>
> diff -urN mtd/include/linux/jffs2_fs_sb.h
> mtd-fix/include/linux/jffs2_fs_sb.h
> --- mtd/include/linux/jffs2_fs_sb.h Tue Sep 18 23:15:18 2001
> +++ mtd-fix/include/linux/jffs2_fs_sb.h Mon Oct 15 18:31:20 2001
> @@ -5,7 +5,11 @@
>
> #include <linux/types.h>
> #include <linux/spinlock.h>
> +#ifdef CONFIG_MTD_COMPATMAC
> +#include <linux/mtd/compatmac.h>
> +#else
> #include <linux/completion.h>
> +#endif
> #include <asm/semaphore.h>
> #include <linux/list.h>
>
> diff -urN mtd/include/linux/mtd/compatmac.h
> mtd-fix/include/linux/mtd/compatmac.h
> --- mtd/include/linux/mtd/compatmac.h Tue Oct 2 11:13:53 2001
> +++ mtd-fix/include/linux/mtd/compatmac.h Mon Oct 15 18:31:20 2001
> @@ -463,7 +463,7 @@
> }
> }
> #endif
> -#ifndef BLKGETSIZE64 /* LINUX_VERSION_CODE < KERNEL_VERSION(2,4,10-pre13)
> */
> +#ifdef CONFIG_MTD_COMPATMAC_BLKGETSIZE64
> #define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device size in
> bytes (u64 *a
> rg) */
> #endif
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-10-18 16:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-14 9:46 linux/completion.h Kremer, Alex
2001-10-14 15:30 ` linux/completion.h David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2001-10-14 16:39 linux/completion.h Kremer, Alex
2001-10-14 19:02 ` linux/completion.h David Woodhouse
2001-10-15 15:34 linux/completion.h Larry Doolittle
2001-10-15 16:47 linux/completion.h Kremer, Alex
2001-10-18 17:01 ` linux/completion.h Joakim Tjernlund
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox