Re: Sym2 scsi hang on boot on sparc64
On Tue, Aug 19, 2014 at 11:17:48PM +0300, Aaro Koskinen wrote: Hi, On Tue, Aug 19, 2014 at 09:47:35AM -0500, James Bottomley wrote: On Tue, 2014-08-19 at 17:37 +0300, Meelis Roos wrote: On Tue, 2014-08-19 at 14:25 +0300, Meelis Roos wrote: 3.16 scsi worked fine, 3.17-rc1 misbehaves on 3 of my sparc64 test machines. E220R and E420R are with onboard 5c3875, V210 is with onboarc 53c1010 and all behave the same. Any ideas whre to dig deeper? bisection might be nontrivial, because of sparc64 changes that are OK on 3.17-rc1 again - but is possible if nothing else helps. We've got a parisc with an 875 as a root SCSI bus ... I haven't got around to building for it yet, but I might find time to try today. Same on parisc: sym0: 1010-66 rev 0x1 at pci :20:01.0 irq 22 sym0: PA-RISC Firmware, ID 7, Fast-80, LVD, parity checking sym0: SCSI BUS has been reset. scsi host0: sym-2.2.3 random: nonblocking pool is initialized and hangs here. So hopefully it is reproducible for you. And also independent of the sparc changes. The only other change in the window you quote is 64 bit luns. Bisection (on PA-RISC) points to: 71e75c97f97a9645d25fbf3d8e4165a558f18747 is the first bad commit commit 71e75c97f97a9645d25fbf3d8e4165a558f18747 Author: Christoph Hellwig h...@lst.de Date: Fri Apr 11 19:07:01 2014 +0200 scsi: convert device_busy to atomic_t I guess you need this fix: diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 9c44392..ce62e87 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1774,7 +1774,7 @@ static void scsi_request_fn(struct request_queue *q) blk_requeue_request(q, req); atomic_dec(sdev-device_busy); out_delay: - if (atomic_read(sdev-device_busy) !scsi_device_blocked(sdev)) + if (!atomic_read(sdev-device_busy) !scsi_device_blocked(sdev)) blk_delay_queue(q, SCSI_QUEUE_DELAY); } James already sent it to Linus. Sam -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: aic7xxx build failure
On Tue, Feb 05, 2008 at 07:47:35PM +0100, Sam Ravnborg wrote: On Tue, Feb 05, 2008 at 07:40:24PM +0200, Adrian Bunk wrote: Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx compilation: -- snip -- $ make O=../out/x86-full ... SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h CC drivers/scsi/aic7xxx/aic79xx_core.o gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory gcc: no input files make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1 -- snip -- Next make run brings the same failure in drivers/scsi/aic7xxx/aic7xxx_core.c. With the third make it works. It might compile for people with SMP systems using -j? I can reproduce it and will fix it. Seems I was sidetracked by some wrong assumptions. Could you please test this fix. Works for me but this time I will do more testing Sam diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile index 4c54954..6aa49e7 100644 --- a/drivers/scsi/aic7xxx/Makefile +++ b/drivers/scsi/aic7xxx/Makefile @@ -44,8 +44,8 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c # Dependencies for generated files need to be listed explicitly -$(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h -$(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h +$(addprefix $(src)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h +$(addprefix $(src)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: aic7xxx build failure
index 4c54954..6aa49e7 100644 --- a/drivers/scsi/aic7xxx/Makefile +++ b/drivers/scsi/aic7xxx/Makefile @@ -44,8 +44,8 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c # Dependencies for generated files need to be listed explicitly -$(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h -$(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h +$(addprefix $(src)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h +$(addprefix $(src)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h OK, I think it's time for me to give up completely on understanding kbuild. To me this construction looks like you're adding source directory prefixes to objects ... which can never be satisfied can it, if the objectas are in the object directory? Or maybe I'm just so damn tired that I should sleep instead of trying to fix this Makefile for 117 time. You are right that it should read: -$(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h -$(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h +$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h +$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h But for now the distinction between src and obj is purely for documentation as they have the same value - also when O= is used. So it should work anyway. If you use M=... (or SUBDIRS=...) I think it matters but this is not the case for this in-tree driver in normal usage situations. I will test some more tomorrow and if feedback from Adrian is positive I will submit the hopefully last update to this Makefile to Linus. [I need to test if it can generate the files using the aicasm tool for instance). Sam - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] enclosure: add support for enclosure services
Hi James. Nitpicking only. Sam The enclosure misc device is really just a library providing sysfs support for physical enclosure devices and their components. Signed-off-by: James Bottomley [EMAIL PROTECTED] --- See the additional ses patch for SCSI enclosure services users of this. --- drivers/misc/Kconfig | 10 + drivers/misc/Makefile |1 + drivers/misc/enclosure.c | 449 + include/linux/enclosure.h | 120 4 files changed, 580 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/enclosure.c create mode 100644 include/linux/enclosure.h diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index b5e67c0..c6e5c09 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -11,6 +11,7 @@ menuconfig MISC_DEVICES If you say N, all options in this submenu will be skipped and disabled. + if MISC_DEVICES Unrelated change. config IBM_ASM @@ -232,4 +233,13 @@ config ATMEL_SSC If unsure, say N. +config ENCLOSURE_SERVICES + tristate Enclosure Services + default n Not needed. n is default. + help + Provides support for intelligent enclosures (bays which + contain storage devices). You also need either a host + driver (SCSI/ATA) which supports enclosures + or a SCSI enclosure device (SES) to use these services. + endif # MISC_DEVICES diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 87f2685..de9f1f5 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -17,3 +17,4 @@ obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o obj-$(CONFIG_FUJITSU_LAPTOP) += fujitsu-laptop.o obj-$(CONFIG_EEPROM_93CX6) += eeprom_93cx6.o +obj-$(CONFIG_ENCLOSURE_SERVICES) += enclosure.o \ No newline at end of file Can we get one.. diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c new file mode 100644 index 000..e4683cd --- /dev/null +++ b/drivers/misc/enclosure.c @@ -0,0 +1,449 @@ +/* + * Enclosure Services + * + * Copyright (C) 2008 James Bottomley [EMAIL PROTECTED] + * +**- +** +** This program is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License +** version 2 as published by the Free Software Foundation. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +** +**- +*/ +#include linux/device.h +#include linux/enclosure.h +#include linux/err.h +#include linux/list.h +#include linux/kernel.h +#include linux/module.h +#include linux/mutex.h + +static LIST_HEAD(container_list); +static DEFINE_MUTEX(container_list_lock); +static struct class enclosure_class; +static struct class enclosure_component_class; + +/** + * enclosure_find - find an enclosure given a device + * @dev: the device to find for + * + * Looks through the list of registered enclosures to see + * if it can find a match for a device. Returns NULL if no + * enclosure is found. + */ +struct enclosure_device *enclosure_find(struct device *dev) +{ + struct enclosure_device *edev = NULL; + + mutex_lock(container_list_lock); + list_for_each_entry(edev, container_list, node) { + if (edev-cdev.dev == dev) { + mutex_unlock(container_list_lock); + return edev; + } + } + mutex_unlock(container_list_lock); + + return NULL; +} +EXPORT_SYMBOL(enclosure_find); No GPL - but the other of your EXPORT's are GPL. + +/** + * enclosure_for_each_device - calls a function for each enclosure + * @fn: the function to call + * @data:the data to pass to each call + * + * Loops over all the enclosures calling the function. + * + * Note, this function uses a mutex which will be held across calls to + * @fn, so it must have user context, and @fn should not sleep or + * otherwise cause the mutex to be held for indefinite periods + */ +int enclosure_for_each_device(int (*fn)(struct enclosure_device *, void *), + void *data) +{ + int error = 0; + struct enclosure_device *edev; + + mutex_lock(container_list_lock); + list_for_each_entry(edev, container_list, node) { + error = fn(edev, data); + if (error) +
Re: [PATCH] kill hotplug init/exit section annotations
On Thu, Jan 31, 2008 at 09:48:01AM -0800, Arjan van de Ven wrote: On Thu, 31 Jan 2008 19:14:36 +0200 Adrian Bunk [EMAIL PROTECTED] wrote: cpuhotplug is required for suspend/resume. Not on UP computers. great! someone who still has one of those and uses a kernel without it. Can you look at your system.map and see how many kilobytes you've gained? Eg how many kilobytes are in these sections exactly? I have one. A Atmel AT91 board equipped with an 9263. So lets take a look at the defconfig build for the evaluation board. o-arm/vmlinux.o: file format elf32-littlearm 0 .text 001cdefc 0400 2**10 2 .init.text000165e8 001ce6c0 2**5 26 .init.data32ec 002578cc 2**2 --- 4 .devinit.text 1558 001e5270 2**2 9 .exit.text0bc8 001e8d2c 2**2 10 .cpuinit.text 0924 001e98f4 2**2 11 .meminit.text 04cc 001ea218 2**2 12 .devexit.text 0160 001ea6e4 2**2 38 .cpuinit.data 0040 0025afc0 2**2 39 .meminit.data 000c 0025b000 2**2 __devinit alone gives a net win of 5464 bytes. That is only ~3% of total .text size but this is non-swapable memory where everything is worth it. And the configuration selected is by no means optimal with respect to minimal size. Sam - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] kill hotplug init/exit section annotations
On Thu, Jan 31, 2008 at 10:48:11AM -0800, Arjan van de Ven wrote: On Thu, 31 Jan 2008 19:34:25 +0100 Sam Ravnborg [EMAIL PROTECTED] wrote: On Thu, Jan 31, 2008 at 09:48:01AM -0800, Arjan van de Ven wrote: On Thu, 31 Jan 2008 19:14:36 +0200 Adrian Bunk [EMAIL PROTECTED] wrote: cpuhotplug is required for suspend/resume. Not on UP computers. great! someone who still has one of those and uses a kernel without it. Can you look at your system.map and see how many kilobytes you've gained? Eg how many kilobytes are in these sections exactly? I have one. A Atmel AT91 board equipped with an 9263. So lets take a look at the defconfig build for the evaluation board. o-arm/vmlinux.o: file format elf32-littlearm 0 .text 001cdefc 0400 2**10 2 .init.text000165e8 001ce6c0 2**5 26 .init.data32ec 002578cc 2**2 --- 4 .devinit.text 1558 001e5270 2**2 9 .exit.text0bc8 001e8d2c 2**2 10 .cpuinit.text 0924 001e98f4 2**2 11 .meminit.text 04cc 001ea218 2**2 12 .devexit.text 0160 001ea6e4 2**2 38 .cpuinit.data 0040 0025afc0 2**2 39 .meminit.data 000c 0025b000 2**2 __devinit alone gives a net win of 5464 bytes. That is only ~3% of total .text size but this is non-swapable memory where everything is worth it. now how much of this is lost again because you have to round the stuff to pagesize? Lets take a look in the ARM vmlinux.lds.S file: .text.head : { _stext = .; _sinittext = .; *(.text.head) } .init : { /* Init code and data */ INIT_TEXT _einittext = .; __proc_info_begin = .; *(.proc.info.init) __proc_info_end = .; __arch_info_begin = .; *(.arch.info.init) __arch_info_end = .; __tagtable_begin = .; *(.taglist.init) __tagtable_end = .; . = ALIGN(16); __setup_start = .; *(.init.setup) __setup_end = .; __early_begin = .; *(.early_param.init) __early_end = .; __initcall_start = .; INITCALLS __initcall_end = .; __con_initcall_start = .; *(.con_initcall.init) __con_initcall_end = .; __security_initcall_start = .; *(.security_initcall.init) __security_initcall_end = .; #ifdef CONFIG_BLK_DEV_INITRD . = ALIGN(32); __initramfs_start = .; usr/built-in.o(.init.ramfs) __initramfs_end = .; #endif . = ALIGN(4096); __per_cpu_start = .; *(.data.percpu) *(.data.percpu.shared_aligned) __per_cpu_end = .; #ifndef CONFIG_XIP_KERNEL __init_begin = _stext; INIT_DATA . = ALIGN(4096); __init_end = .; Everything between _stext and __init_end are freed. And we have two PAGESIZE alignmnets here - one for the percpu stuff and the other to align the full area that can be freed. So there is no special alignment for the __devinit stuff. And there is no percpu data on ARM so that area is empty. So it is one or two pages extra that are freed up. Sam - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [2.6 patch] scsi/qlogicpti.c section fixes
On Wed, Jan 30, 2008 at 03:00:16PM -0600, James Bottomley wrote: On Wed, 2008-01-30 at 22:03 +0200, Adrian Bunk wrote: This patch fixes the following section mismatches: -- snip -- ... WARNING: drivers/scsi/qlogicpti.o(.devexit.text+0x8): Section mismatch in reference from the function qpti_sbus_remove() to the function .init.text:qpti_chain_del() WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x56c): Section mismatch in reference from the function qpti_sbus_probe() to the function .init.text:qpti_map_regs() WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x580): Section mismatch in reference from the function qpti_sbus_probe() to the function .init.text:qpti_register_irq() WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x594): Section mismatch in reference from the function qpti_sbus_probe() to the function .init.text:qpti_get_scsi_id() WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x5b8): Section mismatch in reference from the function qpti_sbus_probe() to the function .init.text:qpti_map_queues() WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x780): Section mismatch in reference from the function qpti_sbus_probe() to the function .init.text:qpti_chain_add() ... OK, look, this is really getting out of hand. We now at last have some infrastructure that does proper consistency check of the use of annotation. So it is by no means getting out-of-hands.. To my understanding Adrian just fixed a potential oops. You have a driver that surely are thought to be hotplugable - otherwise qpti_sbus_probe() would not have been annotated __devinit. And had it ever been hotplugged then you had called a function in a __init section that was long gone. __init is possibly justifiable with a few hundred k savings on boot. __devinit and the rest are surely killable on the grounds they provide little benefit for all the pain they cause. For the embedded people a few kb here and there is worth it. all __exit seems to do is set us up for unreferenced pointers in discarded sections, so could we kill that too? Again - savings when we build-in the drivers. And without the checks we see 'funny' linker errors on the architectues that can continue to add the .exit.text in /DISCARD/ Sam - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [2.6 patch] scsi/qlogicpti.c section fixes
I'm just reflecting that all of the problems would go away and we'd save thousands of person hours on the infrastructure and bug fixing if we simply #defined most of the sectional annotations to be nops. So far I have only seen three persons being really active in fixing the section mismatch bugs. And thats Randy, Adrian and myself. Granted a few other have done some sporadic efforts in their area of interest but nothing covering the tree as a whole. And most isssues are easy fixable - I would estimate less than half an hour in average for the fixes Adrian posted today. There are some tricky corners that are dfficult to deal with but I have not seen these occur in drivers. It is mostly when we mix assembler and C plus some of the core functionality. The hotplug cpu stuff for example look scary and here I may try to road you propose but for the hotplug stuff I think it is worth it. Sam - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Value of __*{init,exit} anotations?
I don't deny we can invest large amounts of work to fix our current issues and build large scriptable checks to ensure we keep it fixed ... I'm just asking if, at the end of the day, it's really worth it. Some people consider it worth it for their memory restricted systems and would like to drive the annotations even further. [1] My experience while fixing section bugs during the last years is that the __dev{init,exit}* are actually the main question since they are both the majority of annotations and the ones that bring benefits only in a case that has become very exotic (CONFIG_HOTPLUG=n). Some numbers... I my current tree with an allyesconfig build for x86 64bit I see: 136 Section mismatch warnings in total 99 Section mismatch warnings from drivers/ This is with a few patches of mine applied but none of the recently posted fixes by Adrian. I am concentrating on: drivers/pci/ kernel/ mm/ Will post my patches during the weekend if things goes well. There are some low hanging fruits in drivers/ but I stay away from these from now expecting others to fix these. Sam - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2.6.24] sym53c8xx_2 modpost section mismatch fix
On Sat, Jan 26, 2008 at 07:03:15PM +0100, Mikael Pettersson wrote: Building 2.6.24 with # CONFIG_HOTPLUG is not set CONFIG_SCSI_SYM53C8XX_2=y results in the following during modpost: WARNING: vmlinux.o(.text+0x14b36c): Section mismatch: reference to .exit.text:sym2_remove (between 'sym2_io_error_detected' and 'sym_set_cam_result_error') because sym2_io_error_detected() calls sym2_remove(), which is marked __devexit. Fixed by removing the __devexit from sym2_remove(). Signed-off-by: Mikael Pettersson [EMAIL PROTECTED] --- Resend. Previously reported against 2.6.24-rc6 on 2007-12-15. Fixed in upstream kernel by commit: 864473cbe99e95a57ad496894768cd77a567 Sam - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 11/77] aic7(3*x): fix firmware build
From: Vegard Nossum [EMAIL PROTECTED] This patch adds the proper $(obj) and $(src) prefixes to dependency rules in aic7xxx makefile. Without this patch, there is a remote possibility that parallel make with a different output directory can fail. Also changed the deprecated EXTRA_CFLAGS construct to ccflags-y syntax. Fixed up patch to survive make drivers/scsi/ -j with BUILD_FIRMWARE enable. /Sam Signed-off-by: Vegard Nossum [EMAIL PROTECTED] Signed-off-by: Sam Ravnborg [EMAIL PROTECTED] Acked-by: Hannes Reinecke [EMAIL PROTECTED] Cc: linux-scsi@vger.kernel.org --- drivers/scsi/aic7xxx/Makefile | 45 1 files changed, 18 insertions(+), 27 deletions(-) diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile index 9a6ce19..e4f70c5 100644 --- a/drivers/scsi/aic7xxx/Makefile +++ b/drivers/scsi/aic7xxx/Makefile @@ -33,11 +33,10 @@ aic79xx-y += aic79xx_osm.o\ aic79xx_proc.o \ aic79xx_osm_pci.o -EXTRA_CFLAGS += -Idrivers/scsi +ccflags-y += -Idrivers/scsi ifdef WARNINGS_BECOME_ERRORS -EXTRA_CFLAGS += -Werror +ccflags-y += -Werror endif -#EXTRA_CFLAGS += -g # Files generated that shall be removed upon make clean clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c @@ -46,53 +45,45 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c # Dependencies for generated files need to be listed explicitly $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h +$(obj)/aic7xxx_core.o: $(obj)/aic7xxx_reg.h $(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h -$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped -$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped +$(obj)/aic79xx_core.o: $(obj)/aic79xx_reg.h -$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_reg.h -$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_reg.h +$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h +$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h -aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_seq.h \ - $(obj)/aic7xxx_reg.h +aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \ -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) -# Create a dependency chain in generated files -# to avoid concurrent invocations of the single -# rule that builds them all. -aic7xxx_seq.h: aic7xxx_reg.h -ifeq ($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y) -aic7xxx_reg.h: aic7xxx_reg_print.c -endif -$(aic7xxx-gen-y): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm +$(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \ $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ $(src)/aic7xxx.seq + +$(aic7xxx-gen-y): $(obj)/aic7xxx_seq.h +else +$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped endif -aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_seq.h \ - $(obj)/aic79xx_reg.h +aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_reg.h aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \ -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) -# Create a dependency chain in generated files -# to avoid concurrent invocations of the single -# rule that builds them all. -aic79xx_seq.h: aic79xx_reg.h -ifeq ($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y) -aic79xx_reg.h: aic79xx_reg_print.c -endif -$(aic79xx-gen-y): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm +$(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \ $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ $(src)/aic79xx.seq + +$(aic79xx-gen-y): $(obj)/aic79xx_seq.h +else +$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped endif $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] -- 1.5.4.rc3.14.g44397 - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] cciss: section mismatch
On Thu, Jan 10, 2008 at 02:32:35PM -0800, Randy Dunlap wrote: From: Randy Dunlap [EMAIL PROTECTED] Mark cciss_pci_init() as __devinit, to fix section mismatch warning. WARNING: vmlinux.o(.text+0x601fc9): Section mismatch: reference to .init.text: (between 'cciss_pci_init' and 'cciss_getgeometry') Signed-off-by: Randy Dunlap [EMAIL PROTECTED] Acked-by: Sam Ravnborg [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] qla2xyz: fix section mismatch
On Thu, Jan 10, 2008 at 02:33:09PM -0800, Randy Dunlap wrote: From: Randy Dunlap [EMAIL PROTECTED] Fix section mismatch: qla2x00_remove_one() should not be __devexit. WARNING: vmlinux.o(.text+0xb014f5): Section mismatch: reference to .exit.text: (between 'qla2xxx_pci_error_detected' and 'qla2xxx_pci_mmio_enabled') Signed-off-by: Randy Dunlap [EMAIL PROTECTED] Acked-by: Sam Ravnborg [EMAIL PROTECTED] This could oops under the wrong conditions. Sam - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] megaraid: fix section mismatch
On Thu, Jan 10, 2008 at 02:33:16PM -0800, Randy Dunlap wrote: From: Randy Dunlap [EMAIL PROTECTED] Change megaraid_pci_driver_g variable name so that it matches the modpost whitelist that allows pointers to init text/data. WARNING: vmlinux.o(.data+0x1a8e30): Section mismatch: reference to .init.text:megaraid_probe_one (between 'megaraid_pci_driver_g' and 'class_device_attr_megaraid_mbox_app_hndl') Signed-off-by: Randy Dunlap [EMAIL PROTECTED] Acked-by: Sam Ravnborg [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] SCSI: make pcmcia directory use obj-y|m instead of subdir-y|m
On Fri, Dec 07, 2007 at 10:36:23PM +0900, Tejun Heo wrote: subdir-y|m isn't supposed to contain modules or built-in components. Change subdir-$(CONFIG_PCMCIA) to obj-$(CONFIG_PCMCIA). Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Sam Ravnborg [EMAIL PROTECTED] Cc: James Bottomley [EMAIL PROTECTED] Ack-by: Sam Ravnborg [EMAIL PROTECTED] --- drivers/scsi/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile index 2e6129f..72c8d2e 100644 --- a/drivers/scsi/Makefile +++ b/drivers/scsi/Makefile @@ -18,7 +18,7 @@ CFLAGS_aha152x.o = -DAHA152X_STAT -DAUTOCONF CFLAGS_gdth.o= # -DDEBUG_GDTH=2 -D__SERIAL__ -D__COM2__ -DGDTH_STATISTICS CFLAGS_seagate.o = -DARBITRATE -DPARITY -DSEAGATE_USE_ASM -subdir-$(CONFIG_PCMCIA) += pcmcia +obj-$(CONFIG_PCMCIA) += pcmcia/ obj-$(CONFIG_SCSI) += scsi_mod.o obj-$(CONFIG_SCSI_TGT) += scsi_tgt.o - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
aic7-triple x build fixed in kbuild.git
akpm reported that: make mrproper make allmodconfig make drivers/scsi/aic7xxx/ were broken in recent kbuild.git - and as a logical consequence removed kbuild.git from his -mm lineup. I have now fixed it (stupid bug I made) and pushed out a fresh kbuild.git tree. As previously announced I am not very active in kbuild land the next couple of weeks so I may be slow if there is any comments. The fixed commit is included below. Sam commit 63b7c4e77e9204407ee8a5d5243ba9c502550252 Author: Vegard Nossum [EMAIL PROTECTED] Date: Fri Oct 26 13:31:13 2007 +0200 aic7(3*x): fix firmware build This patch adds the proper $(obj) and $(src) prefixes to dependency rules in aic7xxx makefile. Without this patch, there is a remote possibility that parallel make with a different output directory can fail. Also changed the deprecated EXTRA_CFLAGS construct to ccflags-y syntax. Fixed up patch to survive make drivers/scsi/ -j with BUILD_FIRMWARE enable. /Sam Signed-off-by: Vegard Nossum [EMAIL PROTECTED] Signed-off-by: Sam Ravnborg [EMAIL PROTECTED] Cc: linux-scsi@vger.kernel.org diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile index 9a6ce19..e4f70c5 100644 --- a/drivers/scsi/aic7xxx/Makefile +++ b/drivers/scsi/aic7xxx/Makefile @@ -33,11 +33,10 @@ aic79xx-y += aic79xx_osm.o\ aic79xx_proc.o \ aic79xx_osm_pci.o -EXTRA_CFLAGS += -Idrivers/scsi +ccflags-y += -Idrivers/scsi ifdef WARNINGS_BECOME_ERRORS -EXTRA_CFLAGS += -Werror +ccflags-y += -Werror endif -#EXTRA_CFLAGS += -g # Files generated that shall be removed upon make clean clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c @@ -46,53 +45,45 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c # Dependencies for generated files need to be listed explicitly $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h +$(obj)/aic7xxx_core.o: $(obj)/aic7xxx_reg.h $(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h -$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped -$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped +$(obj)/aic79xx_core.o: $(obj)/aic79xx_reg.h -$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_reg.h -$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_reg.h +$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h +$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h -aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_seq.h \ - $(obj)/aic7xxx_reg.h +aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \ -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) -# Create a dependency chain in generated files -# to avoid concurrent invocations of the single -# rule that builds them all. -aic7xxx_seq.h: aic7xxx_reg.h -ifeq ($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y) -aic7xxx_reg.h: aic7xxx_reg_print.c -endif -$(aic7xxx-gen-y): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm +$(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \ $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ $(src)/aic7xxx.seq + +$(aic7xxx-gen-y): $(obj)/aic7xxx_seq.h +else +$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped endif -aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_seq.h \ - $(obj)/aic79xx_reg.h +aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_reg.h aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \ -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) -# Create a dependency chain in generated files -# to avoid concurrent invocations of the single -# rule that builds them all. -aic79xx_seq.h: aic79xx_reg.h -ifeq ($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y) -aic79xx_reg.h: aic79xx_reg_print.c -endif -$(aic79xx-gen-y): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm +$(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \ $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ $(src)/aic79xx.seq + +$(aic79xx-gen-y): $(obj)/aic79xx_seq.h +else +$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped endif $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] - To unsubscribe from this list: send the line unsubscribe
Re: [RFC PATCH] SCSI: split Kconfig menu into two
Hi Stefan. Such a patch really calls for some minimal unifacation among the architectures. arch/alpha/Kconfig|2 arch/arm/Kconfig |2 arch/avr32/Kconfig|2 arch/blackfin/Kconfig |2 arch/cris/Kconfig |2 arch/frv/Kconfig |2 arch/i386/Kconfig |2 arch/ia64/Kconfig |2 arch/m32r/Kconfig |2 arch/m68k/Kconfig |2 arch/m68knommu/Kconfig|2 arch/mips/Kconfig |2 arch/parisc/Kconfig |2 arch/powerpc/Kconfig |2 arch/ppc/Kconfig |2 arch/s390/Kconfig |2 arch/sh/Kconfig |2 arch/sh64/Kconfig |2 arch/sparc/Kconfig|2 arch/sparc64/Kconfig |2 arch/um/Kconfig |2 arch/v850/Kconfig |2 arch/x86_64/Kconfig |4 arch/xtensa/Kconfig |2 Exactly the same change for all architectures. IT would be good to introduce a common file that contains some of the shared stuff from the different architectures. We could start out simple with: arch/Kconfig.arch: source net/Kconfig source drivers/Kconfig source fs/Kconfig source security/Kconfig source crypto/Kconfig source lib/Kconfig And then source it in all relevant arch Kconfig files. It is not all that can use it but most do. A trivial task but one small step towards unification between the architectures on the Kconfig level. Sam - To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html