Who uses hdx=bswap or hdx=swapdata?
Is the hdx=bswap or hdx=swapdata option actually in use?
When is it needed?
The current implementation can cause data corruptions on SMP with PIO transfers:
It modifies the source buffer during disk writes, and these temporary modifications (within the irq handler) are visible with mmap on SMP.
Is it possible to remove the option entirely, or should it be fixed?
--
Manfred
It used to be necessary on the IBM 830 CDROM but I think those have fallen into disrepair and have undergone many changes. The 830's likely need that still but probably can't boot for other reasons now, though.
} Is the hdx=bswap or hdx=swapdata option actually in use?
} When is it needed?
} The current implementation can cause data corruptions on SMP with PIO } transfers:
} It modifies the source buffer during disk writes, and these temporary } modifications (within the irq handler) are visible with mmap on SMP. }
} Is it possible to remove the option entirely, or should it be fixed? }
} --
} Manfred
}
} -
} 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/
Quoted 2 lines
Is the hdx=bswap or hdx=swapdata option actually in use? When is it needed?
Certain M68K machines
Quoted 4 lines
The current implementation can cause data corruptions on SMP with PIO transfers:
Is it possible to remove the option entirely, or should it be fixed?
Show me an SMP Atari ST 8)
Quoted 11 lines · Alan Cox
Quoted 2 lines
Is the hdx=bswap or hdx=swapdata option actually in use? When is it needed?
Certain M68K machines
Quoted 4 lines
The current implementation can cause data corruptions on SMP with PIO transfers:
Is it possible to remove the option entirely, or should it be fixed?
Show me an SMP Atari ST 8)
IIRC it's used to access non-Atari IDE disks on Atari (which has a byte-swapped IDE interface) and vice-versa.
So yes, you can use it on SMP machines, to access disks that were used before on Atari.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Quoted 5 lines
IIRC it's used to access non-Atari IDE disks on Atari (which has a byte-swapped IDE interface) and vice-versa.
So yes, you can use it on SMP machines, to access disks that were used before on Atari.
For 2.5 would it perhaps be cleaner if we had a bswapping loop device. Sort of very bad crypto mode ?
Quoted 8 lines · Alan Cox
Quoted 5 lines
IIRC it's used to access non-Atari IDE disks on Atari (which has a byte-swapped IDE interface) and vice-versa.
So yes, you can use it on SMP machines, to access disks that were used before on Atari.
For 2.5 would it perhaps be cleaner if we had a bswapping loop device. Sort of very bad crypto mode ?
Don't mention crypto, or Atari will come after us with the DMCA sword, claiming they deliberately implemented access control? ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Quoted 5 lines
Quoted 2 lines
For 2.5 would it perhaps be cleaner if we had a bswapping loop device. Sort of very bad crypto mode ?
Don't mention crypto, or Atari will come after us with the DMCA sword, claiming they deliberately implemented access control? ;-)
Caution - I recall that on some m68k boxes we had to further byteswap specific parts of the identify data or they wouldn't make sense. The IDE driver will still have to be aware of these exceptions. I can't recall the particulars anymore - Geert?
Since hdx=swapdata only works on disks replacing this with a byteswapping loop device sounds fine (loopback being used for anything kernel-internally now :-)
Michael
Quoted 10 lines · Michael Schmitz
Quoted 5 lines
Quoted 2 lines
For 2.5 would it perhaps be cleaner if we had a bswapping loop device. Sort of very bad crypto mode ?
Don't mention crypto, or Atari will come after us with the DMCA sword, claiming they deliberately implemented access control? ;-)
Caution - I recall that on some m68k boxes we had to further byteswap specific parts of the identify data or they wouldn't make sense. The IDE driver will still have to be aware of these exceptions. I can't recall the particulars anymore - Geert?
That's the drive identification. It indeed shouldn't be swapped once again when accessing a `non-native' IDE disk.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Quoted 3 lines · In article <Pine.LNX.4.33.0201041751360.5790-100000@opal.biophys.uni-duesseldor…
Since hdx=swapdata only works on disks replacing this with a byteswapping loop device sounds fine (loopback being used for anything kernel-internally now :-)
It does not make sense to swap all data in data blocks, because:
tid eo son tameks neest owspaa lld ta anid ta albcosk
Greetings
Bernd
Quoted 7 lines · Geert Uytterhoeven
Quoted 6 lines · Michael Schmitz
Quoted 5 lines
Quoted 2 lines
For 2.5 would it perhaps be cleaner if we had a bswapping loop device. Sort of very bad crypto mode ?
Don't mention crypto, or Atari will come after us with the DMCA sword, claiming they deliberately implemented access control? ;-)
Quoted 7 lines
Quoted 4 lines
Caution - I recall that on some m68k boxes we had to further byteswap specific parts of the identify data or they wouldn't make sense. The IDE driver will still have to be aware of these exceptions. I can't recall the particulars anymore - Geert?
That's the drive identification. It indeed shouldn't be swapped once again when accessing a `non-native' IDE disk.
sometimes it should, eg some of the ioctls that read data via special commands from the drive that could also use byteswapping - ide-smart comes to my mind.
Btw the Q40 has also byteswapped IDE bus like the atari.
We already have atapi_{input|output}_bytes bytes that does the swapping, and m68k has {ins|outs}[wl]_swapw. Perhaps one of this could be reused to do the bswap?
Bye
Richard
Quoted 9 lines · Alan Cox
Quoted 6 lines
IIRC it's used to access non-Atari IDE disks on Atari (which has a byte-swapped IDE interface) and vice-versa.
So yes, you can use it on SMP machines, to access disks that were used before on Atari.
For 2.5 would it perhaps be cleaner if we had a bswapping loop device. Sort of very bad crypto mode ?
I tried to implement that, but hdx=bswap operates on drives, and loop on partitions. Do you have another idea? It probably has to wait until the partition code is further cleaned up.
--
Manfred
Quoted 7 lines · Manfred Spraul
Quoted 6 lines · Alan Cox
Quoted 5 lines
IIRC it's used to access non-Atari IDE disks on Atari (which has a byte-swapped IDE interface) and vice-versa.
So yes, you can use it on SMP machines, to access disks that were used before on Atari.
Quoted 6 lines
Quoted 2 lines
For 2.5 would it perhaps be cleaner if we had a bswapping loop device. Sort of very bad crypto mode ?
I tried to implement that, but hdx=bswap operates on drives, and loop on partitions. Do you have another idea? It probably has to wait until the partition code is further cleaned up.
And if you use e.g. /dev/hda as loop parameter instead of /dev/hdaX?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Quoted 11 lines · Geert Uytterhoeven
Quoted 10 lines · Alan Cox
Quoted 2 lines
Is the hdx=bswap or hdx=swapdata option actually in use? When is it needed?
Certain M68K machines
Quoted 4 lines
The current implementation can cause data corruptions on SMP with PIO transfers:
Is it possible to remove the option entirely, or should it be fixed?
Quoted 7 lines
Quoted 1 line
Show me an SMP Atari ST 8)
IIRC it's used to access non-Atari IDE disks on Atari (which has a byte-swapped IDE interface) and vice-versa.
So yes, you can use it on SMP machines, to access disks that were used before on Atari.
The byteswapping flags are also used by people hacking TiVos; the non-MIPS models have byte-swapped IDE interfaces, and so the bswap flag is needed to mount a TiVo disk on a PC.
Chris
Signature · 4 lines
Chris Lawrence <[email protected]> - http://www.lordsutch.com/chris/ Instructor and Ph.D. Candidate, Political Science, Univ. of Mississippi 208 Deupree Hall - 662-915-5765
Quoted 4 lines · Alan Cox
Quoted 2 lines
Is the hdx=bswap or hdx=swapdata option actually in use? When is it needed?
Certain M68K machines
Is this parameter actually used on these machines, or do we rely on the code in atapi_{input,output}_bytes:
#if defined(CONFIG_ATARI) || defined(CONFIG_Q40)
if (MACH_IS_ATARI || MACH_IS_Q40) {
/* Atari has a byte-swapped IDE interface */
insw_swapw(IDE_DATA_REG, buffer, bytecount / 2);
return;
}#endif /* CONFIG_ATARI */
and:
#if defined(CONFIG_ATARI) || defined(CONFIG_Q40)
if (MACH_IS_ATARI || MACH_IS_Q40) {
/* Atari has a byte-swapped IDE interface */
outsw_swapw(IDE_DATA_REG, buffer, bytecount / 2);
return;
}#endif /* CONFIG_ATARI */
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html