2007-02-12 17:37:54

by Andrey Borzenkov

[permalink] [raw]
Subject: 2.6.20: Rebuild after trivial patch rebuilds way too much

Is not it too much fore a trivial two lines patch to a single file?

{pts/1}% stg import
~/patch/Re_2_6_20_rc6_libata_PATA_ATAPI_CDROM_is_not_working.patch
Importing
patch "Re_2_6_20_rc6_libata_PATA_ATAPI_CDROM_is_not_working.patch"... done
Now at patch "Re_2_6_20_rc6_libata_PATA_ATAPI_CDROM_is_not_working.patch"
{pts/1}% make -C ~/src/linux-git O=$HOME/build/linux-2.6.20
make: Entering directory `/home/bor/src/linux-git'
Using /home/bor/src/linux-git as source for kernel
GEN /home/bor/build/linux-2.6.20/Makefile
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
HOSTCC usr/gen_init_cpio
GEN usr/initramfs_data.cpio.gz
AS usr/initramfs_data.o
LD usr/built-in.o
LDS arch/i386/kernel/vsyscall.lds
AS arch/i386/kernel/vsyscall-int80.o
AS arch/i386/kernel/vsyscall-note.o
SYSCALL arch/i386/kernel/vsyscall-int80.so
AS arch/i386/kernel/vsyscall-sysenter.o
SYSCALL arch/i386/kernel/vsyscall-sysenter.so
AS arch/i386/kernel/vsyscall.o
SYSCALL arch/i386/kernel/vsyscall-syms.o
LD arch/i386/kernel/built-in.o
AS arch/i386/kernel/head.o
CC arch/i386/kernel/init_task.o
LDS arch/i386/kernel/vmlinux.lds
CC [M] drivers/ata/libata-core.o
/home/bor/src/linux-git/drivers/ata/libata-core.c: In
function ‘ata_pci_device_do_resume’:
/home/bor/src/linux-git/drivers/ata/libata-core.c:6228: warning: ignoring
return value of ‘pci_enable_device’, declared with attribute
warn_unused_result
LD [M] drivers/ata/libata.o
CONMK drivers/char/consolemap_deftbl.c
CC drivers/char/consolemap_deftbl.o
SHIPPED drivers/char/defkeymap.c
CC drivers/char/defkeymap.o
LD drivers/char/built-in.o
HOSTCC drivers/md/mktables
TABLE drivers/md/raid6tables.c
CC [M] drivers/md/raid6tables.o
UNROLL drivers/md/raid6int1.c
CC [M] drivers/md/raid6int1.o
UNROLL drivers/md/raid6int2.c
CC [M] drivers/md/raid6int2.o
UNROLL drivers/md/raid6int4.c
CC [M] drivers/md/raid6int4.o
UNROLL drivers/md/raid6int8.c
CC [M] drivers/md/raid6int8.o
UNROLL drivers/md/raid6int16.c
CC [M] drivers/md/raid6int16.o
UNROLL drivers/md/raid6int32.c
CC [M] drivers/md/raid6int32.o
UNROLL drivers/md/raid6altivec1.c
CC [M] drivers/md/raid6altivec1.o
UNROLL drivers/md/raid6altivec2.c
CC [M] drivers/md/raid6altivec2.o
UNROLL drivers/md/raid6altivec4.c
CC [M] drivers/md/raid6altivec4.o
UNROLL drivers/md/raid6altivec8.c
CC [M] drivers/md/raid6altivec8.o
LD [M] drivers/md/raid456.o
LD [M] drivers/md/md-mod.o
LD [M] drivers/md/dm-mod.o
LD [M] drivers/md/dm-multipath.o
LD [M] drivers/md/dm-snapshot.o
LD [M] drivers/md/dm-mirror.o
CC drivers/video/logo/logo.o
LOGO drivers/video/logo/logo_linux_mono.c
CC drivers/video/logo/logo_linux_mono.o
LOGO drivers/video/logo/logo_linux_vga16.c
CC drivers/video/logo/logo_linux_vga16.o
LOGO drivers/video/logo/logo_linux_clut224.c
CC drivers/video/logo/logo_linux_clut224.o
LD drivers/video/logo/built-in.o
LOGO drivers/video/logo/logo_superh_mono.c
LOGO drivers/video/logo/clut_vga16.c
LOGO drivers/video/logo/logo_superh_vga16.c
LOGO drivers/video/logo/logo_dec_clut224.c
LOGO drivers/video/logo/logo_m32r_clut224.c
LOGO drivers/video/logo/logo_mac_clut224.c
LOGO drivers/video/logo/logo_parisc_clut224.c
LOGO drivers/video/logo/logo_sgi_clut224.c
LOGO drivers/video/logo/logo_sun_clut224.c
LOGO drivers/video/logo/logo_superh_clut224.c
LD drivers/video/built-in.o
LD drivers/built-in.o
HOSTCC lib/gen_crc32table
GEN lib/crc32table.h
CC lib/crc32.o
LD lib/built-in.o
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
LD .tmp_vmlinux3
KSYM .tmp_kallsyms3.S
AS .tmp_kallsyms3.o
LD vmlinux
SYSMAP System.map
SYSMAP .tmp_System.map
MODPOST vmlinux
AS arch/i386/boot/bootsect.o
LD arch/i386/boot/bootsect
AS arch/i386/boot/setup.o
LD arch/i386/boot/setup
AS arch/i386/boot/compressed/head.o
CC arch/i386/boot/compressed/misc.o
OBJCOPY arch/i386/boot/compressed/vmlinux.bin
GZIP arch/i386/boot/compressed/vmlinux.bin.gz
LD arch/i386/boot/compressed/piggy.o
LD arch/i386/boot/compressed/vmlinux
OBJCOPY arch/i386/boot/vmlinux.bin
HOSTCC arch/i386/boot/tools/build
BUILD arch/i386/boot/bzImage
Root device is (8, 2)
Boot sector 512 bytes.
Setup is 7247 bytes.
System is 1334 kB
Kernel: arch/i386/boot/bzImage is ready (#15)
Building modules, stage 2.
MODPOST 435 modules
CC drivers/ata/libata.mod.o
LD [M] drivers/ata/libata.ko
LD [M] drivers/md/dm-mirror.ko
LD [M] drivers/md/dm-mod.ko
LD [M] drivers/md/dm-multipath.ko
LD [M] drivers/md/dm-snapshot.ko
LD [M] drivers/md/md-mod.ko
LD [M] drivers/md/raid456.ko
make: Leaving directory `/home/bor/src/linux-git'
{pts/1}% stg diff -r
Re_2_6_20_rc6_libata_PATA_ATAPI_CDROM_is_not_working.patch//bottom..Re_2_6_20_rc6_libata_PATA_ATAPI_CDROM_is_not_working.patch//top |
cat
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 667acd2..d6fcf0a 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1478,7 +1478,16 @@ int ata_dev_read_id(struct ata_device *dev, unsigned
int *p_class,
}

tf.protocol = ATA_PROT_PIO;
- tf.flags |= ATA_TFLAG_POLLING; /* for polling presence detection */
+
+ /* Some devices choke if TF registers contain garbage. Make
+ * sure those are properly initialized.
+ */
+ tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
+
+ /* Device presence detection is unreliable on some
+ * controllers. Always poll IDENTIFY if available.
+ */
+ tf.flags |= ATA_TFLAG_POLLING;

err_mask = ata_exec_internal(dev, &tf, NULL, DMA_FROM_DEVICE,
id, sizeof(id[0]) * ATA_ID_WORDS);

.config attached.

-andrey


Attachments:
(No filename) (0.00 B)
(No filename) (189.00 B)
Download all attachments

2007-02-12 19:41:56

by Randy Dunlap

[permalink] [raw]
Subject: Re: 2.6.20: Rebuild after trivial patch rebuilds way too much

On Mon, 12 Feb 2007 20:37:35 +0300 Andrey Borzenkov wrote:

> Is not it too much fore a trivial two lines patch to a single file?
>
> {pts/1}% stg import
> ~/patch/Re_2_6_20_rc6_libata_PATA_ATAPI_CDROM_is_not_working.patch
> Importing
> patch "Re_2_6_20_rc6_libata_PATA_ATAPI_CDROM_is_not_working.patch"... done
> Now at patch "Re_2_6_20_rc6_libata_PATA_ATAPI_CDROM_is_not_working.patch"
> {pts/1}% make -C ~/src/linux-git O=$HOME/build/linux-2.6.20
> make: Entering directory `/home/bor/src/linux-git'
> Using /home/bor/src/linux-git as source for kernel
> GEN /home/bor/build/linux-2.6.20/Makefile
> CHK include/linux/version.h
> CHK include/linux/utsrelease.h
> CHK include/linux/compile.h
> UPD include/linux/compile.h
> CC init/version.o
> LD init/built-in.o
> HOSTCC usr/gen_init_cpio
> GEN usr/initramfs_data.cpio.gz
> AS usr/initramfs_data.o
> LD usr/built-in.o
> LDS arch/i386/kernel/vsyscall.lds
> AS arch/i386/kernel/vsyscall-int80.o
> AS arch/i386/kernel/vsyscall-note.o
> SYSCALL arch/i386/kernel/vsyscall-int80.so
> AS arch/i386/kernel/vsyscall-sysenter.o
> SYSCALL arch/i386/kernel/vsyscall-sysenter.so
> AS arch/i386/kernel/vsyscall.o
> SYSCALL arch/i386/kernel/vsyscall-syms.o
> LD arch/i386/kernel/built-in.o
> AS arch/i386/kernel/head.o
> CC arch/i386/kernel/init_task.o
> LDS arch/i386/kernel/vmlinux.lds
> CC [M] drivers/ata/libata-core.o
> /home/bor/src/linux-git/drivers/ata/libata-core.c: In
> function ‘ata_pci_device_do_resume’:
> /home/bor/src/linux-git/drivers/ata/libata-core.c:6228: warning: ignoring
> return value of ‘pci_enable_device’, declared with attribute
> warn_unused_result
> LD [M] drivers/ata/libata.o
> CONMK drivers/char/consolemap_deftbl.c
> CC drivers/char/consolemap_deftbl.o
> SHIPPED drivers/char/defkeymap.c
> CC drivers/char/defkeymap.o
> LD drivers/char/built-in.o
> HOSTCC drivers/md/mktables
> TABLE drivers/md/raid6tables.c
> CC [M] drivers/md/raid6tables.o
> UNROLL drivers/md/raid6int1.c
> CC [M] drivers/md/raid6int1.o
> UNROLL drivers/md/raid6int2.c
> CC [M] drivers/md/raid6int2.o
> UNROLL drivers/md/raid6int4.c
> CC [M] drivers/md/raid6int4.o
> UNROLL drivers/md/raid6int8.c
> CC [M] drivers/md/raid6int8.o
> UNROLL drivers/md/raid6int16.c
> CC [M] drivers/md/raid6int16.o
> UNROLL drivers/md/raid6int32.c
> CC [M] drivers/md/raid6int32.o
> UNROLL drivers/md/raid6altivec1.c
> CC [M] drivers/md/raid6altivec1.o
> UNROLL drivers/md/raid6altivec2.c
> CC [M] drivers/md/raid6altivec2.o
> UNROLL drivers/md/raid6altivec4.c
> CC [M] drivers/md/raid6altivec4.o
> UNROLL drivers/md/raid6altivec8.c
> CC [M] drivers/md/raid6altivec8.o
> LD [M] drivers/md/raid456.o
> LD [M] drivers/md/md-mod.o
> LD [M] drivers/md/dm-mod.o
> LD [M] drivers/md/dm-multipath.o
> LD [M] drivers/md/dm-snapshot.o
> LD [M] drivers/md/dm-mirror.o
> CC drivers/video/logo/logo.o
> LOGO drivers/video/logo/logo_linux_mono.c
> CC drivers/video/logo/logo_linux_mono.o
> LOGO drivers/video/logo/logo_linux_vga16.c
> CC drivers/video/logo/logo_linux_vga16.o
> LOGO drivers/video/logo/logo_linux_clut224.c
> CC drivers/video/logo/logo_linux_clut224.o
> LD drivers/video/logo/built-in.o
> LOGO drivers/video/logo/logo_superh_mono.c
> LOGO drivers/video/logo/clut_vga16.c
> LOGO drivers/video/logo/logo_superh_vga16.c
> LOGO drivers/video/logo/logo_dec_clut224.c
> LOGO drivers/video/logo/logo_m32r_clut224.c
> LOGO drivers/video/logo/logo_mac_clut224.c
> LOGO drivers/video/logo/logo_parisc_clut224.c
> LOGO drivers/video/logo/logo_sgi_clut224.c
> LOGO drivers/video/logo/logo_sun_clut224.c
> LOGO drivers/video/logo/logo_superh_clut224.c
> LD drivers/video/built-in.o
> LD drivers/built-in.o
> HOSTCC lib/gen_crc32table
> GEN lib/crc32table.h
> CC lib/crc32.o
> LD lib/built-in.o
> GEN .version
> CHK include/linux/compile.h
> UPD include/linux/compile.h
> CC init/version.o
> LD init/built-in.o
> LD .tmp_vmlinux1
> KSYM .tmp_kallsyms1.S
> AS .tmp_kallsyms1.o
> LD .tmp_vmlinux2
> KSYM .tmp_kallsyms2.S
> AS .tmp_kallsyms2.o
> LD .tmp_vmlinux3
> KSYM .tmp_kallsyms3.S
> AS .tmp_kallsyms3.o
> LD vmlinux
> SYSMAP System.map
> SYSMAP .tmp_System.map
> MODPOST vmlinux
> AS arch/i386/boot/bootsect.o
> LD arch/i386/boot/bootsect
> AS arch/i386/boot/setup.o
> LD arch/i386/boot/setup
> AS arch/i386/boot/compressed/head.o
> CC arch/i386/boot/compressed/misc.o
> OBJCOPY arch/i386/boot/compressed/vmlinux.bin
> GZIP arch/i386/boot/compressed/vmlinux.bin.gz
> LD arch/i386/boot/compressed/piggy.o
> LD arch/i386/boot/compressed/vmlinux
> OBJCOPY arch/i386/boot/vmlinux.bin
> HOSTCC arch/i386/boot/tools/build
> BUILD arch/i386/boot/bzImage
> Root device is (8, 2)
> Boot sector 512 bytes.
> Setup is 7247 bytes.
> System is 1334 kB
> Kernel: arch/i386/boot/bzImage is ready (#15)
> Building modules, stage 2.
> MODPOST 435 modules
> CC drivers/ata/libata.mod.o
> LD [M] drivers/ata/libata.ko
> LD [M] drivers/md/dm-mirror.ko
> LD [M] drivers/md/dm-mod.ko
> LD [M] drivers/md/dm-multipath.ko
> LD [M] drivers/md/dm-snapshot.ko
> LD [M] drivers/md/md-mod.ko
> LD [M] drivers/md/raid456.ko
> make: Leaving directory `/home/bor/src/linux-git'

Bummer. It works as expected (as it should) for me.
Only libata is rebuilt.

I don't know stgit. Are you sure that is the only patch that you applied?

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

2007-02-13 11:30:23

by Milton Miller

[permalink] [raw]
Subject: Re: 2.6.20: Rebuild after trivial patch rebuilds way too much

On Mon, 12 Feb 2007 12:38:15 -0500 (EST), Andrey Borzenkov wrote:
> Is not it too much fore a trivial two lines patch to a single file?
>
> {pts/1}% stg import
> ~/patch/Re_2_6_20_rc6_libata_PATA_ATAPI_CDROM_is_not_working.patch
> Importing
> patch "Re_2_6_20_rc6_libata_PATA_ATAPI_CDROM_is_not_working.patch"... done
> Now at patch "Re_2_6_20_rc6_libata_PATA_ATAPI_CDROM_is_not_working.patch"
> {pts/1}% make -C ~/src/linux-git O=$HOME/build/linux-2.6.20
> make: Entering directory `/home/bor/src/linux-git'
.. 120 lines of make ...


You can ask Kbuild why its building with make V=2.

make V=2 -C ~/src/linux-git O=$HOME/build/linux-2.6.20

from scripts/Kbuild.include:
###
# why - tell why a a target got build
# enabled by make V=2
# Output (listed in the order they are checked):
# (1) - due to target is PHONY
# (2) - due to target missing
# (3) - due to: file1.h file2.h
# (4) - due to command line change
# (5) - due to missing .cmd file
# (6) - due to target not in $(targets)
# (1) PHONY targets are always build
# (2) No target, so we better build it
# (3) Prerequisite is newer than target
# (4) The command line stored in the file named dir/.target.cmd
# differed from actual command line. This happens when compiler
# options changes
# (5) No dir/.target.cmd file (used to store command line)
# (6) No dir/.target.cmd file and target not listed in $(targets)
# This is a good hint that there is a bug in the kbuild file


Regards,
milton