Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1374439

Re: [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From William Breathitt Gray <vilhelm.gray@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS
Date Fri, 08 Apr 2016 21:30:01 +0200
Message-ID <rlKgp-eI-7@gated-at.bofh.it> (permalink)
References <rljpT-5mp-3@gated-at.bofh.it> <rljzA-5ql-23@gated-at.bofh.it> <rlsMx-3PM-1@gated-at.bofh.it> <rlDRE-3K5-19@gated-at.bofh.it> <rlEum-4hr-13@gated-at.bofh.it> <rlGmu-5Qa-11@gated-at.bofh.it> <rlJkn-82k-41@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=02iZIAQ4IEVEEIaTqMMUAtyCh8O0YC1p6TfzozKRoWk=; b=ZB4oA2yuO35psIwD7cjjRyovqt5+RqUcRLzzk18JZzoBaIOxXuRJ4yi6D6j6nbTYwS q0eO8Jo3U8SRfz6q+Bs5cssZXPMakucMXIPc47bpVBeqqmkUKWllNmM0NxFXclNT0LZt NISc2rkfHTI0tWEr/I6ckIymYPvfakdza9GuB6VdY766rM3oiADYWxVjz2PpHaPn14jh IKnKBDBQhf0osZLGQ2UHkUFxj329Ny2xDHIehjbX7FMbs8moQOyqOruAvkzDMBkRqjN0 71NzXUCewcWMYvqn0gr52orejyhyonO/lM8gMOHfgoa2PXq/MAo4dapG/buL9argRfdh ++gQ==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=02iZIAQ4IEVEEIaTqMMUAtyCh8O0YC1p6TfzozKRoWk=; b=id+H2REXayPxqdDaX2PPtR6a4Y1fZy7mFcXhMjPKewmFbW7WJb6OhEvLZDe4lzeHM6 6MbXw/OflCfCW9KZ/m7RmfUzJHwp6If/cJMUpB6YuTAwSUmWH5bb+6p+iHXcQkp8Mw2i /dFHMJJfpcIu8+AtxB1MLUOOackBSO00WRMv/TsBuKZNeFwH1nCCwv6EPMcVwHuAQjre 9EnjqEMq0rzhv6P7SeGf/gOvBkRDunMMs05VVDF7DlAtzDbqIUkpVf4PAyS8oNlJirkY X+Rn/SHkQ5ewnN1NJixYzAGTKHouqkB7ijjN/Mhm0KUBW3oZsl5CtQhDOvR/LgemeS0W gjgA==
X-Gm-Message-State AD7BkJJ8FhIr3zYnsPbH8LP0xzmL0fANktazDY2d8GyIx7QXDQLuM0CSjccY4D/11RVu3g==
X-Received by 10.107.140.202 with SMTP id o193mr11307121iod.161.1460143651307; Fri, 08 Apr 2016 12:27:31 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Disposition inline
User-Agent Mutt/1.5.24 (2015-08-30)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 62
Organization linux.* mail to news gateway
X-Original-Cc gregkh@linuxfoundation.org, tglx@linutronix.de, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, wim@iguana.be, linus.walleij@linaro.org, gnurou@gmail.com, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-gpio@vger.kernel.org
X-Original-Date Fri, 8 Apr 2016 15:27:23 -0400
X-Original-Message-ID <20160408192723.GA31687@sophia>
X-Original-References <cover.1460040201.git.vilhelm.gray@gmail.com> <783be62acf68b35f3fe4785a2cedfe017624688b.1460040201.git.vilhelm.gray@gmail.com> <20160408004503.GB10211@roeck-us.net> <20160408123158.GB18202@sophia> <5707AF91.5010704@roeck-us.net> <20160408150922.GA28058@sophia> <20160408182801.GB7083@roeck-us.net>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1374439

Show key headers only | View raw


On Fri, Apr 08, 2016 at 11:28:01AM -0700, Guenter Roeck wrote:
>On Fri, Apr 08, 2016 at 11:09:22AM -0400, William Breathitt Gray wrote:
>> I feel now that the introduction of the ISA_BUS option may the wrong
>> approach to resolve lack of ISA support for the X86_64 architecture;
>> adding ISA_BUS depends or selects through various Kconfigs would simply
>> obfuscate the ISA option. The true issue is that various driver
>> configs are assuming X86_32 architecture when they depend on the ISA
>> option, but the ISA bus does not require an X86_32 architecture.
>> 
>> The proper resolution then is to remove the misguided ISA_BUS option and
>> move the X86_32 dependency to the relevant drivers configs explicitly.
>> A grep for isa_register_driver calls within the kernel reveals that only
>> a few drivers explicitly use it. It should be trivial to create a patch
>> to add the explicit X86_32 dependency to the relevant drivers, so I will
>> submit one soon when I get the time to decouple X86_32 from the ISA
>> config option.
>> 
>
>That might be tricky: At least some if not many of those drivers are expected
>to run on non-X86 architectures, and thus don't really depend on X86_32
>(possibly some depend on 32 bit - I didn't check).
>
>I count 44 calls to isa_register_driver() in the current mainline.
>Not sure if this counts as "only a few drivers".
>
>Thanks,
>Guenter

You're right, I there are more drivers that call isa_register_driver
than I had estimated. I think a different approach may work however.

When I initially proposed a patch to decouple the X86_32 dependency from
the ISA config option, I received a reply from the 0-DAY kernel test
auto-build indicating the errors from the drivers assuming a X86_32
architecture
(http://www.gossamer-threads.com/lists/linux/kernel/2350122#2350122).
After reviewing the debug messages, I realized there are only four main
issues:

 1. sound/isa/sscape.c:594:14:
     snd_printk format uses '%d' but a size_t is passed in
 2. arch/x86/mm/extable.c:23:15:
     'SEGMENT_IS_PNP_CODE' is undeclared
 3. drivers/pnp/pnpbios/bioscall.c:
     a slew of undeclared symbols and casting type mismatches
 4. drivers/scsi/ultrastor.c:674:29:
     sprintf format uses '%05X' but a kernel pointer is passed in

Both issue 1 and issue 4 are easily fixed by patching the respective
lines to match the format string with the variable type and vice-versa.

Issue 2 and 3 are the actual X86_32 assumption I had suspected: these
files depend on symbols declared in the include/asm/segment.h file; the
declaration of these symbols is conditional: #ifdef CONFIG_X86_32.

I believe this is the source of the issues I encountered on my initial
attempt to decouple the X86_32 dependency from the ISA option. I suspect
if I add an explicit X86_32 dependency to the PNPBIOS driver, I will be
able to remove the X86_32 dependency from the ISA option without
incident from the other drivers.

William Breathitt Gray

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/10] Use the ISA bus driver for PC/104 and ISA devices William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-04-07 16:50 +0200
  [PATCH 01/10] isa: Implement the module_isa_driver macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-04-07 16:50 +0200
  [PATCH 06/10] watchdog: ebc-c384_wdt: Utilize the ISA bus driver William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-04-07 16:50 +0200
    Re: [PATCH 06/10] watchdog: ebc-c384_wdt: Utilize the ISA bus driver Guenter Roeck <linux@roeck-us.net> - 2016-04-08 02:40 +0200
      Re: [PATCH 06/10] watchdog: ebc-c384_wdt: Utilize the ISA bus driver William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-04-08 14:10 +0200
  [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-04-07 17:00 +0200
    Re: [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS Guenter Roeck <linux@roeck-us.net> - 2016-04-08 02:50 +0200
      Re: [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-04-08 14:40 +0200
        Re: [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS Guenter Roeck <linux@roeck-us.net> - 2016-04-08 15:20 +0200
          Re: [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-04-08 17:20 +0200
            Re: [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS Guenter Roeck <linux@roeck-us.net> - 2016-04-08 20:30 +0200
              Re: [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-04-08 21:30 +0200
                Re: [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-04-09 15:00 +0200
                Re: [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-04-09 16:00 +0200
                Re: [PATCH 04/10] iio: stx104: Change STX104 dependency to ISA_BUS One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-04-09 18:00 +0200
  [PATCH 02/10] isa: Implement the max_num_isa_dev macro William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-04-07 17:00 +0200
  Re: [PATCH 00/10] Use the ISA bus driver for PC/104 and ISA devices Linus Walleij <linus.walleij@linaro.org> - 2016-04-11 09:00 +0200

csiph-web