29 Jan, 2008
7 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25: (1470 commits)
[IPV6] ADDRLABEL: Fix double free on label deletion.
[PPP]: Sparse warning fixes.
[IPV4] fib_trie: remove unneeded NULL check
[IPV4] fib_trie: More whitespace cleanup.
[NET_SCHED]: Use nla_policy for attribute validation in ematches
[NET_SCHED]: Use nla_policy for attribute validation in actions
[NET_SCHED]: Use nla_policy for attribute validation in classifiers
[NET_SCHED]: Use nla_policy for attribute validation in packet schedulers
[NET_SCHED]: sch_api: introduce constant for rate table size
[NET_SCHED]: Use typeful attribute parsing helpers
[NET_SCHED]: Use typeful attribute construction helpers
[NET_SCHED]: Use NLA_PUT_STRING for string dumping
[NET_SCHED]: Use nla_nest_start/nla_nest_end
[NET_SCHED]: Propagate nla_parse return value
[NET_SCHED]: act_api: use PTR_ERR in tcf_action_init/tcf_action_get
[NET_SCHED]: act_api: use nlmsg_parse
[NET_SCHED]: act_api: fix netlink API conversion bug
[NET_SCHED]: sch_netem: use nla_parse_nested_compat
[NET_SCHED]: sch_atm: fix format string warning
[NETNS]: Add namespace for ICMP replying code.
... -
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (79 commits)
Remove references to "make dep"
kconfig: document use of HAVE_*
Introduce new section reference annotations tags: __ref, __refdata, __refconst
kbuild: warn about ld added unique sections
kbuild: add verbose option to Section mismatch reporting in modpost
kconfig: tristate choices with mixed tristate and boolean values
asm-generic/vmlix.lds.h: simplify __mem{init,exit}* dependencies
remove __attribute_used__
kbuild: support ARCH=x86 in buildtar
kconfig: remove "enable"
kbuild: simplified warning report in modpost
kbuild: introduce a few helpers in modpost
kbuild: use simpler section mismatch warnings in modpost
kbuild: link vmlinux.o before kallsyms passes
kbuild: introduce new option to enhance section mismatch analysis
Use separate sections for __dev/__cpu/__mem code/data
compiler.h: introduce __section()
all archs: consolidate init and exit sections in vmlinux.lds.h
kbuild: check section names consistently in modpost
kbuild: introduce blacklisting in modpost
... -
This function is used by the ext4 multi block allocator patches.
Also add generic_find_next_le_bit
Signed-off-by: Aneesh Kumar K.V
Cc:
Signed-off-by: Andrew Morton -
Before pushing pcounter to Linus tree, I would like to make some adjustments.
Goal is to reduce kernel text size, by unlining too big functions.
When a pcounter is bound to a statically defined per_cpu variable,
we define two small helpers functions. (No more folding function
using the fat for_each_possible_cpu(cpu) ... )static DEFINE_PER_CPU(int, NAME##_pcounter_values);
static void NAME##_pcounter_add(struct pcounter *self, int val)
{
__get_cpu_var(NAME##_pcounter_values) += val;
}
static int NAME##_pcounter_getval(const struct pcounter *self, int cpu)
{
return per_cpu(NAME##_pcounter_values, cpu);
}Fast path is therefore unchanged, while folding/alloc/free is now unlined.
This saves 228 bytes on i386
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
This just generalises what was introduced by Eric Dumazet for the struct proto
inuse field in 286ab3d46058840d68e5d7d52e316c1f7e98c59f:[NET]: Define infrastructure to keep 'inuse' changes in an efficent SMP/NUMA way.
Please look at the comment in there to see the rationale.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
If the config option CONFIG_SECTION_MISMATCH is not set and
we see a Section mismatch present the following to the user:modpost: Found 1 section mismatch(es).
To see additional details select "Enable full Section mismatch analysis"
in the Kernel Hacking menu (CONFIG_SECTION_MISMATCH).If the option CONFIG_SECTION_MISMATCH is selected
then be verbose in the Section mismatch reporting from mdopost.
Sample outputs:WARNING: o-x86_64/vmlinux.o(.text+0x7396): Section mismatch in reference from the function discover_ebda() to the variable .init.data:ebda_addr
The function discover_ebda() references
the variable __initdata ebda_addr.
This is often because discover_ebda lacks a __initdata
annotation or the annotation of ebda_addr is wrong.WARNING: o-x86_64/vmlinux.o(.data+0x74d58): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
The variable pci_serial_quirks references
the function __devexit pci_plx9050_exit()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,WARNING: o-x86_64/vmlinux.o(__ksymtab+0x630): Section mismatch in reference from the variable __ksymtab_arch_register_cpu to the function .cpuinit.text:arch_register_cpu()
The symbol arch_register_cpu is exported and annotated __cpuinit
Fix this by removing the __cpuinit annotation of arch_register_cpu or drop the export.Signed-off-by: Sam Ravnborg
-
Setting the option DEBUG_SECTION_MISMATCH will
report additional section mismatch'es but this
should in the end makes it possible to get rid of
all of them.See help text in lib/Kconfig.debug for details.
Signed-off-by: Sam Ravnborg
28 Jan, 2008
2 commits
-
SCSI sg table allocation has a maximum size (of SCSI_MAX_SG_SEGMENTS,
currently 128) and this will cause a BUG_ON() in SCSI if something
tries an allocation over it. This patch adds a size limit to the
chaining allocator to allow the specification of the maximum
allocation size for chaining, so we always chain in units of the
maximum SCSI allocation size.Signed-off-by: James Bottomley
Signed-off-by: Jens Axboe -
Manually doing chained sg lists is not trivial, so add some helpers
to make sure that drivers get it right.Signed-off-by: Jens Axboe
26 Jan, 2008
2 commits
-
LatencyTOP kernel infrastructure; it measures latencies in the
scheduler and tracks it system wide and per process.Signed-off-by: Arjan van de Ven
Signed-off-by: Ingo Molnar -
remove the !PREEMPT_BKL code.
this removes 160 lines of legacy code.
Signed-off-by: Ingo Molnar
25 Jan, 2008
29 commits
-
Clean up the kobject.c and kobject_uevent.c files to follow the
proper coding style rules.Signed-off-by: Greg Kroah-Hartman
-
All kobjects require a dynamically allocated name now. We no longer
need to keep track if the name is statically assigned, we can just
unconditionally free() all kobject names on cleanup.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
There are no in-kernel users of kobject_unregister() so it should be
removed.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
There is no need for kobject_unregister() anymore, thanks to Kay's
kobject cleanup changes, so replace all instances of it with
kobject_put().Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
We save the current state in the object itself, so we can do proper
cleanup when the last reference is dropped.If the initial reference is dropped, the object will be removed from
sysfs if needed, if an "add" event was sent, "remove" will be send, and
the allocated resources are released.This allows us to clean up some driver core usage as well as allowing us
to do other such changes to the rest of the kernel.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
No one is calling this anymore, so just remove it and hard-code the one
internal-use of it.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
The function is no longer used by anyone in the kernel, and it prevents
the proper sending of the kobject uevent after the needed files are set
up by the caller. kobject_init_and_add() can be used in its place.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Now that the old kobject_init() function is gone, rename
kobject_init_ng() to kobject_init() to clean up the namespace.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
The old kobject_init() function is on longer in use, so let us remove it
from the public scope (kset mess in the kobject.c file still uses it,
but that can be cleaned up later very simply.)Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Now that the old kobject_add() function is gone, rename kobject_add_ng()
to kobject_add() to clean up the namespace.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
The old kobject_add() function is on longer in use, so let us remove it
from the public scope (kset mess in the kobject.c file still uses it,
but that can be cleaned up later very simply.)Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This patch (as1015) reverts changes that were made to the driver core
about four years ago. The intent back then was to avoid certain kinds
of invalid memory accesses by leaving kernel objects allocated as long
as any of their children were still allocated. The original and
correct approach was to wait only as long as any children were still
_registered_; that's what this patch reinstates.This fixes a problem in the SCSI core made visible by the class_device
to regular device conversion: A reference loop (scsi_device holds
reference to request_queue, which is the child of a gendisk, which is
the child of the scsi_device) prevents the data structures from being
released, even though they are deregistered okay.It's possible that this change will cause a few bugs to surface,
things that have been hidden for several years. They can be fixed
easily enough by having the child device take an explicit reference to
the parent whenever needed.Signed-off-by: Alan Stern
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
The kobject debugging messages are a mess. This provides a unified
message that makes them actually useful.The format for new kobject debug messages should be:
kobject: 'KOBJECT_NAME' (ADDRESS): FUNCTION_NAME: message.\nCc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
kobject_init should not be grabing any references, but only initializing
the object. This patch fixes this, and makes the lock hold-time shorter
for when a kset is present in the kobject.The current kernel tree has been audited to verify that this change
should be safe.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
These functions are no longer used and are the last remants of the old
subsystem crap. So delete them for good.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Remove the no longer needed subsys_attributes, they are all converted to
the more sensical kobj_attributes.There is no longer a magic fallback in sysfs attribute operations, all
kobjects which create simple attributes need explicitely a ktype
assigned, which tells the core what was intended here.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Switch all dynamically created ksets, that export simple attributes,
to kobj_attribute from subsys_attribute. Struct subsys_attribute will
be removed.Signed-off-by: Kay Sievers
Cc: Mike Halcrow
Cc: Phillip Hellewell
Signed-off-by: Greg Kroah-Hartman -
Add kobj_sysfs_ops to replace subsys_sysfs_ops. There is no
need for special kset operations, we want to be able to use
simple attribute operations at any kobject, not only ksets.The whole concept of any default sysfs attribute operations
will go away with the upcoming removal of subsys_sysfs_ops.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
kobject_kset_add_dir is only called in one place so remove it and use
kobject_create() instead.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
kobject_create_and_add is the same as kobject_add_dir, so drop
kobject_add_dir.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This lets users create dynamic kobjects much easier.
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Now ksets can be dynamically created on the fly, no static definitions
are required. Thanks to Miklos for hints on how to make this work
better for the callers.And thanks to Kay for finding some stupid bugs in my original version
and pointing out that we need to handle the fact that kobject's can have
a kset as a parent and to handle that properly in kobject_add().Cc: Kay Sievers
Cc: Miklos Szeredi
Signed-off-by: Greg Kroah-Hartman -
Also add a kobject_init_and_add function which bundles up what a lot of
the current callers want to do all at once, and it properly handles the
memory usages, unlike kobject_register();Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This is what the kobject_add function is going to become.
Add this to the kernel and then we can convert the tree over to use it.
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This is what the kobject_init function is going to become.
Add this to the kernel and then we can convert the tree over to use it.
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
No one except the kobject core calls it so make the function static.
Signed-off-by: Greg Kroah-Hartman
-
Kay pointed out that kobject_set_name was being very stupid, doing two
allocations for every call, when it should just be using the kernel
function kvasprintf() instead.This change adds the internal kobject_set_name_vargs() function, which
other follow-on patches will be using.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This adds kref_set() to the kref api for future use by people who really
know what they are doing with krefs...From: Evgeniy Polyakov
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
As pointed out by Kay.
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman