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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1429954999.2927.117.camel@x220>
Date:	Sat, 25 Apr 2015 11:43:19 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc:	tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
	x86@...nel.org, linux-kernel@...r.kernel.org,
	Kumar P Mahesh <mahesh.kumar.p@...el.com>
Subject: Re: [PATCH] x86: punit_atom: punit device state debug driver

On Fri, 2015-04-24 at 14:42 -0700, Srinivas Pandruvada wrote:
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
>  
> +config PUNIT_ATOM
> +	bool "ATOM Punit debug driver"
> +	def_bool n

The kconfig tools will do what you mean here. But just
	default n

is neater. And, moreover, even that is probably not needed, as n is the
default anyway.

> +	depends on DEBUG_FS
> +	select IOSF_MBI
> +	---help---
> +	  This is a debug driver, which gets the power states
> +	  of all Punit North Complex devices.The power states of
> +	  each IP is exposed as part of the debugfs interface.

(This menu will show up in menuconfig's main menu. Shouldn't this be put
in some debug related menu?)

> --- a/arch/x86/kernel/Makefile
> +++ b/arch/x86/kernel/Makefile

> +obj-$(CONFIG_PUNIT_ATOM)		+= punit_atom.o

PUNIT_ATOM is a bool symbol, so punit_atom.o will never be part of a
module, correct?

> --- /dev/null
> +++ b/arch/x86/kernel/punit_atom.c

> +#include <linux/module.h>

Is this include needed (except for the stuff that will be preprocessed
away, see below)?

> +MODULE_DEVICE_TABLE(x86cpu, intel_punit_cpu_ids);

MODULE_DEVICE_TABLE will be preprocessed away for built-in code,
according to include/linux/module.h.

> +static void __exit punit_atom_exit(void)
> +{
> +	punit_dbgfs_unregister();
> +}
> +
> +module_init(punit_atom_init);

According to include/linux/init.h this is equal to
	device_initcall(punit_atom_init);

for built-in code.

> +module_exit(punit_atom_exit);

Built-in only code will never call that function.

> +MODULE_AUTHOR("Kumar P, Mahesh <mahesh.kumar.p.intel.com>");

(<mahesh.kumar.p@...el.com>?)

> +MODULE_DESCRIPTION("Driver for Punit devices states debugging");
> +MODULE_LICENSE("GPL v2");

And these three macros will be effectively preprocessed away for
built-in only code.

But, on the other hand, changing PUNIT_ATOM to tristate allows it to be
built as a module (I just did that). So perhaps that was your intention?


Paul Bolle

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