02 Aug, 2008
1 commit
-
…/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
locking: fix mutex @key parameter kernel-doc notation
29 Jul, 2008
1 commit
-
Fix @key parameter to mutex_init() and one of its callers.
Warning(linux-2.6.26-git11//drivers/base/class.c:210): No description found for parameter 'key'
Signed-off-by: Randy Dunlap
Acked-by: Greg Kroah-Hartman
Signed-off-by: Ingo Molnar
28 Jul, 2008
1 commit
-
Noticed because of this warning:
drivers/base/memory.c:279: warning: initialization from incompatible pointer type
Signed-off-by: Stephen Rothwell
Signed-off-by: Linus Torvalds
27 Jul, 2008
2 commits
-
Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.Signed-off-by: Arjan van de Ven
Cc: Greg KH
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
dma_alloc_coherent() on x86 currently takes a passed in NULL device
pointer to mean that it should allocate an ISA compatible (24-bit) buffer
which is a bit of a hack.The ALSA ISA drivers are the main consumers of this but have a struct
device in fact readily available.For the legacy drivers, this sets the device dma_mask in preparation for
using the actual device with the DMA API so as to eventually not need the
NULL hack in dma_alloc_coherent().This does not fix a current bug -- 2.6.26-rc1 stumbled over the NULL hack
in dma_alloc_coherent() but this has already been fixed in commit
4a367f3a9dbf2e7ffcee4702203479809236ee6e by Takashi Iwai.Signed-off-by: Rene Herman
Cc: Bjorn Helgaas
Acked-by: Takashi Iwai
Cc: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jul, 2008
1 commit
-
Signed-off-by: Akinobu Mita
Cc: Greg Kroah-Hartman
Cc: Markus Rechberger
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Jul, 2008
1 commit
-
Memory may be hot-removed on a per-memory-block basis, particularly on
POWER where the SPARSEMEM section size often matches the memory-block
size. A user-level agent must be able to identify which sections of
memory are likely to be removable before attempting the potentially
expensive operation. This patch adds a file called "removable" to the
memory directory in sysfs to help such an agent. In this patch, a memory
block is considered removable if;o It contains only MOVABLE pageblocks
o It contains only pageblocks with free pages regardless of pageblock typeOn the other hand, a memory block starting with a PageReserved() page will
never be considered removable. Without this patch, the user-agent is
forced to choose a memory block to remove randomly.Sample output of the sysfs files:
./memory/memory0/removable: 0
./memory/memory1/removable: 0
./memory/memory2/removable: 0
./memory/memory3/removable: 0
./memory/memory4/removable: 0
./memory/memory5/removable: 0
./memory/memory6/removable: 0
./memory/memory7/removable: 1
./memory/memory8/removable: 0
./memory/memory9/removable: 0
./memory/memory10/removable: 0
./memory/memory11/removable: 0
./memory/memory12/removable: 0
./memory/memory13/removable: 0
./memory/memory14/removable: 0
./memory/memory15/removable: 0
./memory/memory16/removable: 0
./memory/memory17/removable: 1
./memory/memory18/removable: 1
./memory/memory19/removable: 1
./memory/memory20/removable: 1
./memory/memory21/removable: 1
./memory/memory22/removable: 1Signed-off-by: Badari Pulavarty
Signed-off-by: Mel Gorman
Acked-by: KAMEZAWA Hiroyuki
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Jul, 2008
1 commit
-
* 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits)
NR_CPUS: Replace NR_CPUS in speedstep-centrino.c
cpumask: Provide a generic set of CPUMASK_ALLOC macros, FIXUP
NR_CPUS: Replace NR_CPUS in cpufreq userspace routines
NR_CPUS: Replace per_cpu(..., smp_processor_id()) with __get_cpu_var
NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genapic_flat_64.c
NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genx2apic_uv_x.c
NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c
NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/mcheck/mce_64.c
cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c, fix
cpumask: Use optimized CPUMASK_ALLOC macros in the centrino_target
cpumask: Provide a generic set of CPUMASK_ALLOC macros
cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c
cpumask: Optimize cpumask_of_cpu in kernel/time/tick-common.c
cpumask: Optimize cpumask_of_cpu in drivers/misc/sgi-xp/xpc_main.c
cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/ldt.c
cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/io_apic_64.c
cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr
Revert "cpumask: introduce new APIs"
cpumask: make for_each_cpu_mask a bit smaller
net: Pass reference to cpumask variable in net/sunrpc/svc.c
...Fix up trivial conflicts in drivers/cpufreq/cpufreq.c manually
22 Jul, 2008
19 commits
-
This adds a new sysdev_ext_attribute that stores a pointer to the variable
it manages and some utility functions/macro to easily use them.Previously all users wrote custom macros to generate show/store
functions for each variable, with this it is possible to avoid
that in many cases.Signed-off-by: Andi Kleen
Signed-off-by: Greg Kroah-Hartman -
This allow to dynamically generate attributes and share show/store
functions between attributes. Right now most attributes are generated
by special macros and lots of duplicated code. With the attribute
passed it's instead possible to attach some data to the attribute
and then use that in shared low level functions to do different things.I need this for the dynamically generated bank attributes in the x86
machine check code, but it'll allow some further cleanups.I converted all users in tree to the new show/store prototype. It's a single
huge patch to avoid unbisectable sections.Runtime tested: x86-32, x86-64
Compiled only: ia64, powerpc
Not compile tested/only grep converted: sh, arm, avr32Signed-off-by: Andi Kleen
Signed-off-by: Greg Kroah-Hartman -
driver core: Suppress sysfs warnings for device_rename().
Renaming network devices to an already existing name is not
something we want sysfs to print a scary warning for, since the
callers can deal with this correctly. So let's introduce
sysfs_create_link_nowarn() which gets rid of the common warning.Signed-off-by: Cornelia Huck
Signed-off-by: Greg Kroah-Hartman -
James Bottomley recently discovered that we have
{request,release}_firmware() dummies for the case of the actual
functions not being available and has a fix for the bug that was
actually causing build errors for built-in users with
CONFIG_FW_LOADER=m.But now missing selects on FW_LOADER are no longer visible at
compile-time at all and can become runtime problems.FW_LOADER is infrastructure with relatively small codesize we can safely
enable for everyone, and only for people who really need small kernels
(and can be expected to know what they are doing) it matters being able
to disable it.This patch therefore always sets FW_LOADER=y and allows users only to
disable it with EMBEDDED=y.As a bonus, we can then get rid of all "select FW_LOADER" plus the due
to it required "depends on HOTPLUG" which removes some complexity from
our Kconfig files.Signed-off-by: Adrian Bunk
Signed-off-by: Greg Kroah-Hartman -
The systdev_class_register() and sysdev_register() functions have
pr_debug() statements which are enabled when the user selects the
driver core debug. Both of these routines do not produce the
correct output, as they make assumptions about data which has not
been initialised.In sysdev_class_register() the code uses the kobject_name(&cls->kset.kobj)
at the start of the function, but this is not setup until later in the
same call. Change this to use cls->name which is passed in from the caller.The sysdev_register() function tries to get the name of the sysdev by
kobject_name(&sysdev->kobj), but that isn't setup until later in the same
function so change this message to use the name of the sysdev's class and
add another message once the name is initialised.Signed-off-by: Ben Dooks
Signed-off-by: Greg Kroah-Hartman -
We have the dev_printk() variants for this kind of thing, use them
instead of directly trying to access the bus_id field of struct device.This is done in order to remove bus_id entirely.
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Now that the lockdep infrastructure in the class core is in place, we
should be able to properly change the internal class semaphore to be a
mutex.David wrote the original patch, and Greg fixed it up to apply properly
due to all of the recent changes in this area.From: Dave Young
Cc: Matthew Wilcox
Cc: Kay Sievers
Cc: Andrew Morton
Cc: James Bottomley
Signed-off-by: Greg Kroah-Hartman -
This adds the infrastructure to properly handle lockdep issues when the
internal class semaphore is changed to a mutex.Matthew wrote the original patch, and Greg fixed it up to work properly
with the class_create() function.From: Matthew Wilcox
Cc: Kay Sievers
Cc: Dave Young
Cc: Andrew Morton
Cc: James Bottomley
Cc: Peter Zijlstra
Cc: Ingo Molnar
Signed-off-by: Greg Kroah-Hartman -
Removes a field that has been deleted, and adds a description fo the
class_dirs field which was previously undocumented.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This renames the struct class "sem" field to be "class_sem" to make
things easier when struct bus_type and struct class merge in the future.
It also makes grepping for fields easier as well.Based on an idea from Kay.
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This renames the struct class "subsys" field to be "class_subsys" to
make things easier when struct bus_type and struct class merge in the
future. It also makes grepping for fields easier as well.Based on an idea from Kay.
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This renames the struct class "interfaces" field to be
"class_interfaces" to make things easier when struct bus_type and struct
class merge in the future. It also makes grepping for fields easier as
well.Based on an idea from Kay.
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This renames the struct class "devices" field to be "class_devices" to
make things easier when struct bus_type and struct class merge in the
future. It also makes grepping for fields easier as well.Based on an idea from Kay.
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This moves the portions of struct class that are dynamic (kobject and
lock and lists) out of the main structure and into a dynamic, private,
structure.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This mirrors the functionality that driver_find_device has as well.
We add a start variable, and all callers of the function are fixed up at
the same time.The block layer will be using this new functionality in a follow-on
patch.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This mirrors the functionality that driver_for_each_device has as well.
We add a start variable, and all callers of the function are fixed up at
the same time.The block layer will be using this new functionality in a follow-on
patch.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Now that device_create() has been audited, rename things back to the
original call to be sane.Keep the device_create_drvdata macro around to make merges easier.
Signed-off-by: Greg Kroah-Hartman
-
There are no more users of this, and it is racy. Use
device_create_drvdata() or device_create_vargs() instead.Signed-off-by: Greg Kroah-Hartman
-
Why?:
There are occasions where userspace would like to access sysfs
attributes for a device but it may not know how sysfs has named the
device or the path. For example what is the sysfs path for
/dev/disk/by-id/ata-ST3160827AS_5MT004CK? With this change a call to
stat(2) returns the major:minor then userspace can see that
/sys/dev/block/8:32 links to /sys/block/sdc.What are the alternatives?:
1/ Add an ioctl to return the path: Doable, but sysfs is meant to reduce
the need to proliferate ioctl interfaces into the kernel, so this
seems counter productive.2/ Use udev to create these symlinks: Also doable, but it adds a
udev dependency to utilities that might be running in a limited
environment like an initramfs.3/ Do a full-tree search of sysfs.
[kay.sievers@vrfy.org: fix duplicate registrations]
[kay.sievers@vrfy.org: cleanup suggestions]Cc: Neil Brown
Cc: Tejun Heo
Acked-by: Kay Sievers
Reviewed-by: SL Baur
Acked-by: Kay Sievers
Acked-by: Mark Lord
Acked-by: H. Peter Anvin
Signed-off-by: Dan Williams
Signed-off-by: Greg Kroah-Hartman
19 Jul, 2008
1 commit
-
Conflicts:
drivers/acpi/processor_throttling.c
Signed-off-by: Ingo Molnar
17 Jul, 2008
1 commit
-
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (72 commits)
Revert "x86/PCI: ACPI based PCI gap calculation"
PCI: remove unnecessary volatile in PCIe hotplug struct controller
x86/PCI: ACPI based PCI gap calculation
PCI: include linux/pm_wakeup.h for device_set_wakeup_capable
PCI PM: Fix pci_prepare_to_sleep
x86/PCI: Fix PCI config space for domains > 0
Fix acpi_pm_device_sleep_wake() by providing a stub for CONFIG_PM_SLEEP=n
PCI: Simplify PCI device PM code
PCI PM: Introduce pci_prepare_to_sleep and pci_back_from_sleep
PCI ACPI: Rework PCI handling of wake-up
ACPI: Introduce new device wakeup flag 'prepared'
ACPI: Introduce acpi_device_sleep_wake function
PCI: rework pci_set_power_state function to call platform first
PCI: Introduce platform_pci_power_manageable function
ACPI: Introduce acpi_bus_power_manageable function
PCI: make pci_name use dev_name
PCI: handle pci_name() being const
PCI: add stub for pci_set_consistent_dma_mask()
PCI: remove unused arch pcibios_update_resource() functions
PCI: fix pci_setup_device()'s sprinting into a const buffer
...Fixed up conflicts in various files (arch/x86/kernel/setup_64.c,
arch/x86/pci/irq.c, arch/x86/pci/pci.h, drivers/acpi/sleep/main.c,
drivers/pci/pci.c, drivers/pci/pci.h, include/acpi/acpi_bus.h) from x86
and ACPI updates manually.
16 Jul, 2008
2 commits
-
Conflicts:
arch/x86/xen/smp.c
kernel/sched_rt.c
net/iucv/iucv.cSigned-off-by: Ingo Molnar
-
* 'core/topology' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
cputopology: always define CPU topology information, clean up
cpu topology: always define CPU topology information
15 Jul, 2008
1 commit
-
Conflicts:
sound/pci/Kconfig
10 Jul, 2008
4 commits
-
This will control whether we build firmware into the kernel image for
_every_ driver which we convert to request_firmware(), to avoid a
proliferation of 'CONFIG_XXX_FIRMWARE' options for each one.Default to 'y' for now, which is the wrong thing to do but people seem
to be insisting on it and refusing to even review patches until it's
done. And it does preserve the existing behaviour for built-in drivers.Signed-off-by: David Woodhouse
-
This allows arbitrary firmware files to be included in the static kernel
where the firmware loader can find them without requiring userspace to
be alive.(Updated and CONFIG_EXTRA_FIRMWARE_DIR added with lots of help from
Johannes Berg).Signed-off-by: David Woodhouse
Signed-off-by: Johannes Berg -
Some drivers have their own hacks to bypass the kernel's firmware loader
and build their firmware into the kernel; this renders those unnecessary.Other drivers don't use the firmware loader at all, because they always
want the firmware to be available. This allows them to start using the
firmware loader.A third set of drivers already use the firmware loader, but can't be
used without help from userspace, which sometimes requires an initrd.
This allows them to work in a static kernel.Signed-off-by: David Woodhouse
-
In preparation for supporting firmware files linked into the static
kernel, make fw->data const to ensure that users aren't modifying it (so
that we can pass a pointer to the original in-kernel copy, rather than
having to copy it).Signed-off-by: David Woodhouse
08 Jul, 2008
4 commits
-
Conflicts:
arch/x86/Kconfig
arch/x86/kernel/e820.c
arch/x86/kernel/efi_64.c
arch/x86/kernel/mpparse.c
arch/x86/kernel/setup.c
arch/x86/kernel/setup_32.c
arch/x86/mm/init_64.c
include/asm-x86/proto.hSigned-off-by: Ingo Molnar
-
* Introduce a new PER_CPU macro called "EARLY_PER_CPU". This is
used by some per_cpu variables that are initialized and accessed
before there are per_cpu areas allocated.["Early" in respect to per_cpu variables is "earlier than the per_cpu
areas have been setup".]This patchset adds these new macros:
DEFINE_EARLY_PER_CPU(_type, _name, _initvalue)
EXPORT_EARLY_PER_CPU_SYMBOL(_name)
DECLARE_EARLY_PER_CPU(_type, _name)early_per_cpu_ptr(_name)
early_per_cpu_map(_name, _idx)
early_per_cpu(_name, _cpu)The DEFINE macro defines the per_cpu variable as well as the early
map and pointer. It also initializes the per_cpu variable and map
elements to "_initvalue". The early_* macros provide access to
the initial map (usually setup during system init) and the early
pointer. This pointer is initialized to point to the early map
but is then NULL'ed when the actual per_cpu areas are setup. After
that the per_cpu variable is the correct access to the variable.The early_per_cpu() macro is not very efficient but does show how to
access the variable if you have a function that can be called both
"early" and "late". It tests the early ptr to be NULL, and if not
then it's still valid. Otherwise, the per_cpu variable is used
instead:#define early_per_cpu(_name, _cpu) \
(early_per_cpu_ptr(_name) ? \
early_per_cpu_ptr(_name)[_cpu] : \
per_cpu(_name, _cpu))A better method is to actually check the pointer manually. In the
case below, numa_set_node can be called both "early" and "late":void __cpuinit numa_set_node(int cpu, int node)
{
int *cpu_to_node_map = early_per_cpu_ptr(x86_cpu_to_node_map);if (cpu_to_node_map)
cpu_to_node_map[cpu] = node;
else
per_cpu(x86_cpu_to_node_map, cpu) = node;
}* Add a flag "arch_provides_topology_pointers" that indicates pointers
to topology cpumask_t maps are available. Otherwise, use the function
returning the cpumask_t value. This is useful if cpumask_t set size
is very large to avoid copying data on to/off of the stack.* The coverage of CONFIG_DEBUG_PER_CPU_MAPS has been increased while
the non-debug case has been optimized a bit.* Remove an unreferenced compiler warning in drivers/base/topology.c
* Clean up #ifdef in setup.c
For inclusion into sched-devel/latest tree.
Based on:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ sched-devel/latest .../mingo/linux-2.6-sched-devel.gitSigned-off-by: Mike Travis
Signed-off-by: Ingo Molnar
Signed-off-by: Thomas Gleixner -
…', 'x86/cleanups', 'x86/cpa', 'x86/cpu', 'x86/defconfig', 'x86/gart', 'x86/i8259', 'x86/intel', 'x86/irqstats', 'x86/kconfig', 'x86/ldt', 'x86/mce', 'x86/memtest', 'x86/pat', 'x86/ptemask', 'x86/resumetrace', 'x86/threadinfo', 'x86/timers', 'x86/vdso' and 'x86/xen' into x86/devel
-
* Introduce function acpi_pm_device_sleep_wake() for enabling and
disabling the system wake-up capability of devices that are power
manageable by ACPI.* Introduce function acpi_bus_can_wakeup() allowing other (dependent)
subsystems to check if ACPI is able to enable the system wake-up
capability of given device.* Introduce callback .sleep_wake() in struct pci_platform_pm_ops and
for the ACPI PCI 'driver' make it use acpi_pm_device_sleep_wake().* Introduce callback .can_wakeup() in struct pci_platform_pm_ops and
for the ACPI 'driver' make it use acpi_bus_can_wakeup().* Move the PME# handlig code out of pci_enable_wake() and split it
into two functions, pci_pme_capable() and pci_pme_active(),
allowing the caller to check if given device is capable of
generating PME# from given power state and to enable/disable the
device's PME# functionality, respectively.* Modify pci_enable_wake() to use the new ACPI callbacks and the new
PME#-related functions.* Drop the generic .platform_enable_wakeup() callback that is not
used any more.* Introduce device_set_wakeup_capable() that will set the
power.can_wakeup flag of given device.* Rework PCI device PM initialization so that, if given device is
capable of generating wake-up events, either natively through the
PME# mechanism, or with the help of the platform, its
power.can_wakeup flag is set and its power.should_wakeup flag is
unset as appropriate.* Make ACPI set the power.can_wakeup flag for devices found to be
wake-up capable by it.* Make the ACPI wake-up code enable/disable GPEs for devices that
have the wakeup.flags.prepared flag set (which means that their
wake-up power has been enabled).Signed-off-by: Rafael J. Wysocki
Signed-off-by: Jesse Barnes