[PATCH] document atkbd.softraw

2005-01-28 Thread Andries.Brouwer
Document atkbd.softraw (and shorten a few long lines nearby).

diff -uprN -X /linux/dontdiff a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt   2004-12-29 03:39:42.0 
+0100
+++ b/Documentation/kernel-parameters.txt   2005-01-29 00:21:07.0 
+0100
@@ -222,15 +222,19 @@ running once the system is up.
 
atascsi=[HW,SCSI] Atari SCSI
 
-   atkbd.extra=[HW] Enable extra LEDs and keys on IBM RapidAccess, 
EzKey
-   and similar keyboards
+   atkbd.extra=[HW] Enable extra LEDs and keys on IBM RapidAccess,
+   EzKey and similar keyboards
 
atkbd.reset=[HW] Reset keyboard during initialization
 
atkbd.set=  [HW] Select keyboard code set 
Format:  (2 = AT (default) 3 = PS/2)
 
-   atkbd.scroll=   [HW] Enable scroll wheel on MS Office and similar 
keyboards
+   atkbd.scroll=   [HW] Enable scroll wheel on MS Office and similar
+   keyboards
+
+   atkbd.softraw=  [HW] Choose between synthetic and real raw mode
+   Format:  (0 = real, 1 = synthetic (default))

atkbd.softrepeat=
[HW] Use software keyboard repeat
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


cyrix_arr_init and centaur_mcr_init unused?

2005-02-26 Thread Andries.Brouwer
arch/i386/kernel/cpu/mtrr/cyrix.c has a routine cyrix_arr_init(), and
arch/i386/kernel/cpu/mtrr/centaur.c has a routine centaur_mcr_init().
At first sight it looks like these are unused.
Do I overlook something?

(They occur as the .init fields of some struct, and I did not find any
calls of ->init().)

If there are no calls and the code is needed, then some systems
may be broken today. If the code is not needed, maybe it should
be removed.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Minix V3 support

2007-01-08 Thread Andries.Brouwer
This morning I needed to read a Minix V3 filesystem,
but unfortunately my 2.6.19 did not support that,
and neither did the downloaded 2.6.20rc4.

Fortunately, google told me that Daniel Aragones had
already done the work, patch found at
http://www.terra.es/personal2/danarag/

Unfortunaly, looking at the patch was painful to my eyes,
so I polished it a bit before applying. The resulting
kernel boots, and reads the filesystem it needed to read.

(So, I do not guarantee the patch below, it is almost untested,
writing is entirely untested, but it certainly contains fewer
bugs than the patch found at the url above.
The patch is relative to 2.6.20rc4.)

Andries

diff -uprN -X /linux/dontdiff a/fs/minix/bitmap.c b/fs/minix/bitmap.c
--- a/fs/minix/bitmap.c 2006-11-30 14:56:42.0 +0100
+++ b/fs/minix/bitmap.c 2007-01-08 18:16:02.879794568 +0100
@@ -26,14 +26,14 @@ static unsigned long count_free(struct b
for (i=0; ib_size; j++)
sum += nibblemap[bh->b_data[j] & 0xf]
+ nibblemap[(bh->b_data[j]>>4) & 0xf];
}
 
if (numblocks==0 || !(bh=map[numblocks-1]))
return(0);
-   i = ((numbits-(numblocks-1)*BLOCK_SIZE*8)/16)*2;
+   i = ((numbits - (numblocks-1) * bh->b_size * 8) / 16) * 2;
for (j=0; jb_data[j] & 0xf]
+ nibblemap[(bh->b_data[j]>>4) & 0xf];
@@ -48,28 +48,29 @@ static unsigned long count_free(struct b
return(sum);
 }
 
-void minix_free_block(struct inode * inode, int block)
+void minix_free_block(struct inode *inode, unsigned long block)
 {
-   struct super_block * sb = inode->i_sb;
-   struct minix_sb_info * sbi = minix_sb(sb);
-   struct buffer_head * bh;
-   unsigned int bit,zone;
+   struct super_block *sb = inode->i_sb;
+   struct minix_sb_info *sbi = minix_sb(sb);
+   struct buffer_head *bh;
+   int k = sb->s_blocksize_bits + 3;
+   unsigned long bit, zone;
 
if (block < sbi->s_firstdatazone || block >= sbi->s_nzones) {
printk("Trying to free block not in datazone\n");
return;
}
zone = block - sbi->s_firstdatazone + 1;
-   bit = zone & 8191;
-   zone >>= 13;
+   bit = zone & ((1<>= k;
if (zone >= sbi->s_zmap_blocks) {
printk("minix_free_block: nonexistent bitmap buffer\n");
return;
}
bh = sbi->s_zmap[zone];
lock_kernel();
-   if (!minix_test_and_clear_bit(bit,bh->b_data))
-   printk("free_block (%s:%d): bit already cleared\n",
+   if (!minix_test_and_clear_bit(bit, bh->b_data))
+   printk("minix_free_block (%s:%lu): bit already cleared\n",
   sb->s_id, block);
unlock_kernel();
mark_buffer_dirty(bh);
@@ -79,6 +80,7 @@ void minix_free_block(struct inode * ino
 int minix_new_block(struct inode * inode)
 {
struct minix_sb_info *sbi = minix_sb(inode->i_sb);
+   int bits_per_zone = 8 * inode->i_sb->s_blocksize;
int i;
 
for (i = 0; i < sbi->s_zmap_blocks; i++) {
@@ -86,11 +88,12 @@ int minix_new_block(struct inode * inode
int j;
 
lock_kernel();
-   if ((j = minix_find_first_zero_bit(bh->b_data, 8192)) < 8192) {
-   minix_set_bit(j,bh->b_data);
+   j = minix_find_first_zero_bit(bh->b_data, bits_per_zone);
+   if (j < bits_per_zone) {
+   minix_set_bit(j, bh->b_data);
unlock_kernel();
mark_buffer_dirty(bh);
-   j += i*8192 + sbi->s_firstdatazone-1;
+   j += i * bits_per_zone + sbi->s_firstdatazone-1;
if (j < sbi->s_firstdatazone || j >= sbi->s_nzones)
break;
return j;
@@ -137,6 +140,7 @@ minix_V2_raw_inode(struct super_block *s
int block;
struct minix_sb_info *sbi = minix_sb(sb);
struct minix2_inode *p;
+   int minix2_inodes_per_block = sb->s_blocksize / sizeof(struct 
minix2_inode);
 
*bh = NULL;
if (!ino || ino > sbi->s_ninodes) {
@@ -146,14 +150,14 @@ minix_V2_raw_inode(struct super_block *s
}
ino--;
block = 2 + sbi->s_imap_blocks + sbi->s_zmap_blocks +
-ino / MINIX2_INODES_PER_BLOCK;
+ino / minix2_inodes_per_block;
*bh = sb_bread(sb, block);
if (!*bh) {
printk("Unable to read inode block\n");
return NULL;
}
p = (void *)(*bh)->b_data;
-   return p + ino % MINIX2_INODES_PER_BLOCK;
+   return p + ino % minix2_inodes_per_block;
 }
 
 /* Clear the link count and mode of a deleted inode on disk. */
@@ -185,26 +189,30 @@ static void minix_clear_inode(struct ino
 
 void minix_free_inode(struct inode * inode)
 {
+   struct super_block *sb = inode->i_sb;
struct min

mount-2.12r-ggk.tar.gz

2007-06-19 Thread Andries.Brouwer
The present situation of util-linux and mount is not quite clear to me.
On kernel.org under utils/util-linux nothing has happened for over a year,
and there is also an empty utils/util-linux-ng.

Anyway, Dirk Gerrits, René Gabriël and Peter Kooijmans sent me
a patch to add support for shared subtrees to the mount from
util-linux 2.12r, and I put up the result for ftp at
ftp://ftp.win.tue.nl/pub/linux-local/utils/mount/mount-2.12r-ggk.tar.gz

They remark that it feels like a kernel bug that --make-unbindable
is not reset by --make-private and suggest the patch

--- pnode.old   2007-04-17 12:53:11.0 +0200
+++ pnode.c 2007-04-17 13:22:03.0 +0200
@@ -83,6 +83,8 @@
mnt->mnt_master = NULL;
if (type == MS_UNBINDABLE)
mnt->mnt_flags |= MNT_UNBINDABLE;
+   else
+   mnt->mnt_flags &= ~MNT_UNBINDABLE;
}
 }

(with white-space damage - my cut&paste).

Without this patch one needs the detour "--make-shared; --make-private"
in order to reset the "unbindable" flag for a private tree.

Andries



[By the way, this shared subtree stuff is a bit messy,
and impossible to support correctly by mount without help
from the kernel. So far the shared/slave/unbindable status
of mounts is not visible in /proc/mounts or /proc/$$/mountstats.
The above mount makes a feeble attempt to record these flags
in /etc/mtab, but will fail in any nontrivial situation.]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/