lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5hmwvh73rp.wl%tiwai@suse.de>
Date:	Wed, 06 Feb 2013 18:26:02 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Heiko Carstens <heiko.carstens@...ibm.com>, axboe@...nel.dk,
	cbou@...l.ru, davem@...emloft.net, dtor@...l.ru,
	dwmw2@...radead.org, grant.likely@...retlab.ca,
	gregkh@...uxfoundation.org, jkosina@...e.cz, jslaby@...e.cz,
	khali@...ux-fr.org, mchehab@...hat.com, perex@...ex.cz,
	sameo@...ux.intel.com, w.sang@...gutronix.de,
	linux-kernel@...r.kernel.org, sebott@...ux.vnet.ibm.com,
	gerald.schaefer@...ibm.com, schwidefsky@...ibm.com
Subject: Re: [PATCH 12/15] sound: add missing HAS_IOPORT and GENERIC_HARDIRQS dependencies

At Thu, 07 Feb 2013 02:13:19 +0100,
Arnd Bergmann wrote:
> 
> On Wednesday 06 February 2013 18:05:14 Takashi Iwai wrote:
> > At Wed,  6 Feb 2013 17:24:00 +0100,
> > Heiko Carstens wrote:
> > > 
> > > Fix these two compile errors on s390 which does not have HAS_IOPORT
> > > nor GENERIC_HARDIRQS:
> > > 
> > > sound/pci/lx6464es/lx6464es.c: In function ‘snd_lx6464es_free’:
> > > sound/pci/lx6464es/lx6464es.c:565:2: error: implicit declaration of function ‘ioport_unmap’
> > 
> > Shouldn't this be fixed rather in asm-generic/io.h?
> > Something like,
> > 
> > #if defined(CONFIG_HAS_IOPORT) && defined(CONFIG_GENERIC_IOMAP)
> > extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
> > extern void ioport_unmap(void __iomem *p);
> > #else
> > static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
> > {
> > 	return (void __iomem *) port;
> > }
> > 
> > static inline void ioport_unmap(void __iomem *p)
> > {
> > }
> > #endif /* CONFIG_HAS_IOPORT */
> 
> No, it is intentional that the CONFIG_HAS_IOPORT symbol refers to
> the fact that you can use the ioport_map function, in order to
> disallow building drivers that depend on this function when it
> is unavailable. I actually want to change this, but in the opposite
> way of what you are proposing:
> 
> I think CONFIG_HAS_IOPORT should refer to the fact that the
> inb/outb family of functions are usuable and be unset when
> they are not provided, and I would introduce a new
> CONFIG_HAS_IOPORT_MAP symbol for those (few) platforms that
> have a working inb/outb but no ioport_map.

Yet another Kconfig, but sounds reasonable :)

> > > sound/soc/codecs/wm8903.c: In function ‘wm8903_set_pdata_irq_trigger’:
> > > sound/soc/codecs/wm8903.c:1954:9: error: implicit declaration of function ‘irq_get_irq_data’
> > 
> > Ditto, how about defining
> > 
> > #ifndef CONFIG_GENERIC_HARDIRQS
> > #define irq_get_irq_data(x)  NULL
> > #endif
> > 
> > somewhere appropriately?
> > 
> 
> Why not just make CONFIG_GENERIC_HARDIRQS mandatory for all
> platforms. It is use almost everywhere now.

I wonder it, too...


thanks,

Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ