Re: [PATCH 00/15] Remove asm/segment.h from low hanging architectures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Cox wrote:

On Mer, 2005-08-24 at 11:43 -0500, Kumar Gala wrote:
The following set of patches removes the use and existence of asm/segment.h from the architecture ports

You've broken various things by doing this because some driver code
rightly or wrongly uses segment.h. That is fine because they shouldn't
do so. However asm/segment.h isn't supoosed to be removed on
architectures that use segments- like x86, and x86-64. There it is a
real arch private file and shouldn't be disappearing.

It shouldn't be leaking into drivers any more (eg mxser.c is an offender
there)

Yes, agree totally, i386 _requires_ asm/segment.h. It is used in low-level trap handling and bootup code from assembly files. In addition, even parts of userspace on i386 depend on asm/segment.h, although that is a different beast.

It is a total bug if generic drivers include it, there is simply no reason to use segment.h unless you have to use segmentation. Ideally, all includes of segment.h should be confined to architectures that require it, and limited to either arch/foo or include/asm-foo.

I'm looking at -rc6-mm1, and I see the following bad guys:

./drivers/char/mxser.c:#include <asm/segment.h>
./drivers/char/speakup/speakup_drvcommon.c:#include <asm/segment.h> /* for put_user_byte */
./drivers/isdn/hisax/hisax.h:#include <asm/segment.h>
./drivers/media/video/adv7170.c:#include <asm/segment.h>
./drivers/media/video/adv7175.c:#include <asm/segment.h>
./drivers/media/video/bt819.c:#include <asm/segment.h>
./drivers/media/video/bt856.c:#include <asm/segment.h>
./drivers/media/video/saa7111.c:#include <asm/segment.h>
./drivers/media/video/saa7114.c:#include <asm/segment.h>
./drivers/media/video/saa7185.c:#include <asm/segment.h>
./drivers/serial/68328serial.c:#include <asm/segment.h>
./drivers/serial/crisv10.c:#include <asm/segment.h>
./drivers/serial/icom.c:#include <asm/segment.h>
./drivers/serial/mcfserial.c:#include <asm/segment.h>
./drivers/video/q40fb.c:#include <asm/segment.h>
./include/linux/isdn.h:#include <asm/segment.h>
./sound/oss/os.h:#include <asm/segment.h>

Zach
-
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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux