03 Apr, 2007
1 commit
-
Change PnP resource handling code to use proper type for resource start and
length. Fixes bogus regions reported in /proc/iomem.I've also made some pointer constant, as they are constant...
Signed-off-by: Petr Vandrovec
Cc: Bjorn Helgaas
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Mar, 2007
1 commit
-
Make some normal code paths in PNP stop issuing syslog spam. Since PNP
issues calls regardless of device capablities, it's no surprise when some
of those devices don't support those calls!Signed-off-by: David Brownell
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Mar, 2007
1 commit
-
The PNPACPI resource flags were broken.
This would apply to re-enabling a device any-time after boot,
not just after resume from S3.http://bugzilla.kernel.org/show_bug.cgi?id=6316
Acked-by: Shaohua Li
Signed-off-by: Len Brown
17 Feb, 2007
1 commit
-
Conflicts:
drivers/usb/misc/appledisplay.c
Signed-off-by: Len Brown
16 Feb, 2007
1 commit
-
We removed the ACPI motherboard driver which handled
the ACPI=y, PNP=n case, so now we need to enforce that
PNP & PNPACPI are always enabled for ACPI kernels.Most major distros ship this way this already.
Cc: Bjorn Helgaas
Signed-off-by: Len Brown
13 Feb, 2007
1 commit
-
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Feb, 2007
2 commits
-
Delete the few remaining unnecessary calls to memset(0) after a call to
kzalloc().Signed-off-by: Robert P. J. Day
Cc: Andi Kleen
Cc: Dmitry Torokhov
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The PNP framework doesn't export "pnp_bus_type", which is an unfortunate
exception to the policy followed by pretty much every other bus. I noticed
this when I had to find a device in order to provide its platform_data.Note that per advice from Arjan, the "export" scope has been been minimized to
avoid the hundred-plus bytes needed to support access from modules. In this
case, the symbol is only needed by statically linked kernel code that lives
outside the drivers/pnp directory.Signed-off-by: David Brownell
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jan, 2007
3 commits
-
PNPACPI is pretty widely used and seems fairly stable, so remove the
dependency on EXPERIMENTAL.Signed-off-by: Bjorn Helgaas
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Len Brown -
No functional change.
Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
Most x86 boxes have no iomem system board resources, but some ia64
boxes do.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown
14 Dec, 2006
2 commits
-
Run this:
#!/bin/sh
for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
echo "De-casting $f..."
perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
doneAnd then go through and reinstate those cases where code is casting pointers
to non-pointers.And then drop a few hunks which conflicted with outstanding work.
Cc: Russell King , Ian Molton
Cc: Mikael Starvik
Cc: Yoshinori Sato
Cc: Roman Zippel
Cc: Geert Uytterhoeven
Cc: Ralf Baechle
Cc: Paul Mackerras
Cc: Kyle McMartin
Cc: Benjamin Herrenschmidt
Cc: Martin Schwidefsky
Cc: "David S. Miller"
Cc: Jeff Dike
Cc: Greg KH
Cc: Jens Axboe
Cc: Paul Fulghum
Cc: Alan Cox
Cc: Karsten Keil
Cc: Mauro Carvalho Chehab
Cc: Jeff Garzik
Cc: James Bottomley
Cc: Ian Kent
Cc: Steven French
Cc: David Woodhouse
Cc: Neil Brown
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
All kcalloc() calls of the form "kcalloc(1,...)" are converted to the
equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect
ordering of the first two arguments are fixed.Signed-off-by: Robert P. J. Day
Cc: Jeff Garzik
Cc: Alan Cox
Cc: Dominik Brodowski
Cc: Adam Belay
Cc: James Bottomley
Cc: Greg KH
Cc: Mark Fasheh
Cc: Trond Myklebust
Cc: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Dec, 2006
1 commit
-
Signed-off-by: Josef Sipek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Dec, 2006
3 commits
-
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (156 commits)
[PATCH] x86-64: Export smp_call_function_single
[PATCH] i386: Clean up smp_tune_scheduling()
[PATCH] unwinder: move .eh_frame to RODATA
[PATCH] unwinder: fully support linker generated .eh_frame_hdr section
[PATCH] x86-64: don't use set_irq_regs()
[PATCH] x86-64: check vector in setup_ioapic_dest to verify if need setup_IO_APIC_irq
[PATCH] x86-64: Make ix86 default to HIGHMEM4G instead of NOHIGHMEM
[PATCH] i386: replace kmalloc+memset with kzalloc
[PATCH] x86-64: remove remaining pc98 code
[PATCH] x86-64: remove unused variable
[PATCH] x86-64: Fix constraints in atomic_add_return()
[PATCH] x86-64: fix asm constraints in i386 atomic_add_return
[PATCH] x86-64: Correct documentation for bzImage protocol v2.05
[PATCH] x86-64: replace kmalloc+memset with kzalloc in MTRR code
[PATCH] x86-64: Fix numaq build error
[PATCH] x86-64: include/asm-x86_64/cpufeature.h isn't a userspace header
[PATCH] unwinder: Add debugging output to the Dwarf2 unwinder
[PATCH] x86-64: Clarify error message in GART code
[PATCH] x86-64: Fix interrupt race in idle callback (3rd try)
[PATCH] x86-64: Remove unwind stack pointer alignment forcing again
...Fixed conflict in include/linux/uaccess.h manually
Signed-off-by: Linus Torvalds
-
Signed-off-by: Jeff Garzik
Cc: Adam Belay
Cc: Bjorn Helgaas
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Move process freezing functions from include/linux/sched.h to freezer.h, so
that modifications to the freezer or the kernel configuration don't require
recompiling just about everything.[akpm@osdl.org: fix ueagle driver]
Signed-off-by: Nigel Cunningham
Cc: "Rafael J. Wysocki"
Cc: Pavel Machek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Dec, 2006
1 commit
-
Two legacy power management modes are much easier to just explicitly disable
when running in paravirtualized mode - neither APM nor PnP is still relevant.
The status of ACPI is still debatable, and noacpi is still a common enough
boot parameter that it is not necessary to explicitly disable ACPI.Signed-off-by: Zachary Amsden
Signed-off-by: Chris Wright
Signed-off-by: Andi Kleen
Cc: Rusty Russell
Cc: Jeremy Fitzhardinge
Signed-off-by: Andrew Morton
19 Oct, 2006
1 commit
-
The ACPIPnP implementation had the understanding of Linux resource flags very
wrong, resulting in a nonfunctional implementation of DMA resource
allocation.This was usually not a problem, since almost no on-board PnP devices use ISA
DMA, with the exception of ECP parallel ports. Even with that, parallel port
DMA is preconfigured by the BIOS, so this routine isn't normally called.Except in the case where somebody does 'rmmod parport_pc; modprobe
parport_pc', where the rmmod case disables the ECP parallel port resources,
and they need to be enabled again to initialize the module. This didn't
work, resulting in a non-printing printer.The application doing exactly the above to force reprobing of printers is
the YaST printer module. Thus without this fix YaST wedged the printer when
configuring it, and was not able to print a test page.Reported-by: Ralf Flaxa
Reproduced-by: Jiri Dluhos
Signed-off-by: Vojtech Pavlik
Signed-off-by: Greg Kroah-Hartman
05 Oct, 2006
1 commit
-
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.Signed-Off-By: David Howells
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
03 Oct, 2006
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (29 commits)
[POWERPC] Fix rheap alignment problem
[POWERPC] Use check_legacy_ioport() for ISAPnP
[POWERPC] Avoid NULL pointer in gpio1_interrupt
[POWERPC] Enable generic rtc hook for the MPC8349 mITX
[POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class
[POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot
[POWERPC] fix spin lock nesting in hvc_iseries
[POWERPC] EEH failure to mark pci slot as frozen.
[POWERPC] update powerpc defconfig files after libata kconfig breakage
[POWERPC] enable sysrq in pmac32_defconfig
[POWERPC] UPIO_TSI cleanup
[POWERPC] rewrite mkprep and mkbugboot in sane C
[POWERPC] maple/pci iomem annotations
[POWERPC] powerpc oprofile __user annotations
[POWERPC] cell spufs iomem annotations
[POWERPC] NULL noise removal: spufs
[POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c
[POWERPC] update mpc8349_itx_defconfig and remove some debug settings
[POWERPC] Always call cede in pseries dedicated idle loop
[POWERPC] Fix loop logic in irq_alloc_virt()
...
02 Oct, 2006
1 commit
-
Signed-off-by: David Woodhouse
Signed-off-by: Paul Mackerras
01 Oct, 2006
1 commit
-
ppc can boot one single binary on prep, chrp and pmac boards. ppc64 can
boot one single binary on pseries and G5 boards. pmac has no legacy io,
probing for PC style legacy hardware (or accessing the legacy io area
regulary) may lead to a hard crash:* add check for parport_pc, exit on pmac. 32bit chrp has no
->check_legacy_ioport, the probe is always called. 64bit chrp has
check_legacy_ioport, check for a "parallel" node* add check for isapnp, only PReP boards may have real ISA slots. 32bit
PReP will have no ->check_legacy_ioport, the probe is always called.* update code in i8042_platform_init. Run ->check_legacy_ioport first,
always call request_region. No functional change. Remove whitespace
before i8042_reset init.Signed-off-by: Olaf Hering
Acked-by: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Adam Belay
Cc: Dmitry Torokhov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
06 Aug, 2006
1 commit
-
A patch in -mm kernel correct the parsing of "address resources" of pnpacpi.
Before we assumed it was memory only, but it could be also IO.But this change show an hidden bug : some resources could be producer type
that are not handled by pnp layer. So we should ignore the producer
resources.This patch fixes bug 6292 (http://bugzilla.kernel.org/show_bug.cgi?id=6292).
Some devices like PNP0A03 have 0xd00-0xffff and 0x0-0xcf7 as IO producer
resources.Before correcting "address resources" parsing, it was seen as memory and was
harmless, because nobody tried to reserve this memory range as it should be
IO.With the correction it become IO resources, and make failed all others device
that want to register IO in this range and use pnp layer (like a ISA sound
card).The solution is to ignore producer resources
Signed-off-by: Matthieu CASTET
Signed-off-by: Uwe Bugla
Cc: Bjorn Helgaas
Cc: Adam Belay
Cc: "Brown, Len"
Acked-by: Shaohua Li
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Aug, 2006
1 commit
-
Some resource_size_t values are fed to printk() without handling the fact
that they can have different size depending on your .config.Signed-off-by: Pierre Ossman
Signed-off-by: Greg Kroah-Hartman
01 Aug, 2006
1 commit
-
swsusp is unable to suspend my machine (DTK FortisPro TOP-5A notebook) with
kernel 2.6.17.5 because it's unable to suspend PNP device 00:16 (mouse).The problem is in PNP BIOS. pnp_bus_suspend() calls pnp_stop_dev() for the
device if the device can be disabled according to pnp_can_disable(). The
problem is that pnpbios_disable_resources() returns -EPERM if the device is
not dynamic (!pnpbios_is_dynamic()) but insert_device() happily sets
PNP_DISABLE capability/flag even if the device is not dynamic. So we try
to disable non-dynamic devices which will fail. This patch prevents
insert_device() from setting PNP_DISABLE if the device is not dynamic and
fixes suspend on my system.Signed-off-by: Ondrej Zary
Cc: Pavel Machek
Cc: "Rafael J. Wysocki"
Cc: Bjorn Helgaas
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Jul, 2006
1 commit
-
ACPI supplies a "shareable" indication, but PNPACPI ignores it. If a PNP
device uses a shared interrupt, request_irq() fails because the PNP driver
can't tell whether to supply SA_SHIRQ.This patch allows PNP drivers to test
(pnp_irq_flags(dev, 0) & IORESOURCE_IRQ_SHAREABLE)Signed-off-by: Bjorn Helgaas
Cc: Adam Belay
Cc: Matthieu Castet
Cc: Li Shaohua
Cc: Len Brown
Cc: Russell King
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Jul, 2006
1 commit
-
Signed-off-by: Thomas Gleixner
Cc: Ingo Molnar
Cc: "David S. Miller"
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
02 Jul, 2006
1 commit
-
Suppress the "setup_irq: irq handler mismatch" coming out of pnp_check_irq():
failures are expected here.Cc:
Cc: Santiago Garcia Mantinan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Jul, 2006
1 commit
-
Signed-off-by: Jörn Engel
Signed-off-by: Adrian Bunk
28 Jun, 2006
1 commit
-
Based on a patch series originally from Vivek Goyal
Cc: Vivek Goyal
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman
26 Jun, 2006
1 commit
-
We can leak `clink' if drv->probe == 0.
Signed-off-by: Jesper Juhl
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
16 Jun, 2006
1 commit
20 Apr, 2006
1 commit
-
The wording of two messages in drivers/pnp/manager.c is incorrect. Fix that.
Signed-off-by: Jan Engelhardt
Acked-by: Pavel Machek
Signed-off-by: Rafael J. Wysocki
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
02 Apr, 2006
3 commits
-
Tidy up whitespace. No functional change.
Signed-off-by: Bjorn Helgaas
Signed-off-by: Andrew Morton
Signed-off-by: Len Brown -
Factor out the duplicated switch from pnpacpi_count_resources() and
pnpacpi_type_resources(). Remove the unnecessary re-initialization of
resource->type and length from all the encode functions (id and length are
originally set in the pnpacpi_build_resource_template() ->
pnpacpi_type_resources() path).Signed-off-by: Bjorn Helgaas
Signed-off-by: Andrew Morton
Signed-off-by: Len Brown -
Fix resource_type handling for QWORD, DWORD, and WORD Address Space
Descriptors. Previously we ignored the resource_type, so I/O ports and bus
number ranges were incorrectly parsed as memory ranges.Sample PCI root bridge resources from HP rx2600 before this patch:
# cat /sys/bus/pnp/devices/00:02/resources
state = active
mem 0x0-0x1f
mem 0x0-0x3af
mem 0x3e0-0x1fff
mem 0x80000000-0x8fffffffWith this patch:
# cat /sys/bus/pnp/devices/00:02/resources
state = active
io 0x0-0x3af
io 0x3e0-0x1fff
mem 0x80000000-0x8fffffff
mem 0x80004000000-0x80103fffffeChanges:
0x0-0x1f PCI bus number range was incorrectly reported as memory, now
not reported at all
0x0-0x3af I/O port range was incorrectly reported as memory
0x3e0-0x1fff I/O port range was incorrectly reported as memory
0x80004000000-0x80103fffffe memory range wasn't reported at all because
we only support PNP_MAX_MEM (4) memory resourcesSigned-off-by: Bjorn Helgaas
Signed-off-by: Andrew Morton
Signed-off-by: Len Brown
28 Mar, 2006
1 commit
-
Remove the assumption that pnp_register_driver() returns the number of devices
claimed. Returning the count is unreliable because devices may be hot-plugged
in the future.This changes the convention to "zero for success, or a negative error value,"
which matches pci_register_driver(), acpi_bus_register_driver(), and
platform_driver_register().Signed-off-by: Bjorn Helgaas
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Mar, 2006
1 commit
-
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.Signed-off-by: Ingo Molnar
Cc: Dave Jones
Cc: Paul Mackerras
Cc: Ralf Baechle
Cc: Jens Axboe
Cc: Neil Brown
Acked-by: Alasdair G Kergon
Cc: Greg KH
Cc: Dominik Brodowski
Cc: Adam Belay
Cc: Martin Schwidefsky
Cc: "David S. Miller"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Mar, 2006
1 commit
-
Spotted by the Coverity checker as bug #666
akpm; there are several other `return 1;'s in there which aren't freeing
`dev'. (A fix which converts this function to single-exit would be
preferred..)Signed-off-by: Jesper Juhl
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds