aboutsummaryrefslogtreecommitdiffstats
path: root/mm (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2008-07-17sparc: add -m64 when building vmlinux.ldsSam Ravnborg1-1/+3
David Miller noticed that the build of vmlinux.lds failed to use the -m64 specifier. This caused the build to break with a bi-arch gcc with unified headers. Add the -m64 option to CPPFLAGS_vmlinux.lds so we have the correct defines available when building vmliux.lds. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-17sparc64 Kbuild: apb.h and bbc.h should not be exported to userspaceDavid S. Miller1-2/+0
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17sparc: Merge include/asm-sparc{,64}/perfctr.hSam Ravnborg1-173/+1
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17sparc: Merge include/asm-sparc{,64}/openpromio.hSam Ravnborg1-69/+1
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17sparc: remove PROM_AP1000Adrian Bunk1-1/+0
This seems to be left from the long gone AP1000 support. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17drivers/sbus/: cleanupsAdrian Bunk5-40/+33
This patch contains the following cleanups: - make the following needlessly global code static: - char/uctrl.c: uctrl_get_event_status() - char/uctrl.c: uctrl_get_external_status() - char/vfc_dev.c: struct vfc_dev_lst - char/vfc_dev.c: vfc_lock_device() - char/vfc_dev.c: vfc_unlock_device() - char/vfc_dev.c: vfc_captstat_reset() - char/vfc_dev.c: vfc_memptr_reset() - char/vfc_dev.c: vfc_csr_init() - char/vfc_dev.c: vfc_saa9051_init() - char/vfc_dev.c: init_vfc_hw() - char/vfc_dev.c: init_vfc_devstruct() - char/vfc_dev.c: init_vfc_device() - char/vfc_dev.c: vfc_get_dev_ptr() - char/vfc_dev.c: vfc_capture_start() - char/vfc_dev.c: vfc_capture_poll() - char/vfc_dev.c: vfc_port_change_ioctl() - char/vfc_dev.c: vfc_set_video_ioctl() - char/vfc_dev.c: vfc_get_video_ioctl() - char/vfc_i2c.c: vfc_i2c_wait_for_bus() - char/vfc_i2c.c: vfc_i2c_wait_for_pin() - char/vfc_i2c.c: vfc_i2c_xmit_addr() - char/vfc_i2c.c: vfc_i2c_xmit_byte() - char/vfc_i2c.c: vfc_i2c_recv_byte() - dvma.c: init_one_dvma() - remove an unused variable from a function: - char/uctrl.c: ts102_uctrl_init() - remove the following unused and empty function: - char/uctrl.c: uctrl_set_video() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17sparc64/kernel/: make code staticAdrian Bunk6-25/+16
This patch makes the following needlessly global code static: - central.c: struct central_bus - central.c: struct fhc_list - central.c: apply_fhc_ranges() - central.c: apply_central_ranges() - ds.c: struct ds_states_template[] - pci_msi.c: sparc64_setup_msi_irq() - pci_msi.c: sparc64_teardown_msi_irq() - pci_sun4v.c: struct sun4v_dma_ops - sys_sparc32.c: cp_compat_stat64() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17sparc/mm/: possible cleanupsAdrian Bunk6-28/+25
This patch contains the following possible cleanups: - make the following needlessly global code static: - fault.c: force_user_fault() - init.c: calc_max_low_pfn() - init.c: pgt_cache_water[] - init.c: map_high_region() - srmmu.c: hwbug_bitmask - srmmu.c: srmmu_swapper_pg_dir - srmmu.c: srmmu_context_table - srmmu.c: is_hypersparc - srmmu.c: srmmu_cache_pagetables - srmmu.c: srmmu_nocache_size - srmmu.c: srmmu_nocache_end - srmmu.c: srmmu_get_nocache() - srmmu.c: srmmu_free_nocache() - srmmu.c: srmmu_early_allocate_ptable_skeleton() - srmmu.c: srmmu_nocache_calcsize() - srmmu.c: srmmu_nocache_init() - srmmu.c: srmmu_alloc_thread_info() - srmmu.c: early_pgtable_allocfail() - srmmu.c: srmmu_early_allocate_ptable_skeleton() - srmmu.c: srmmu_allocate_ptable_skeleton() - srmmu.c: srmmu_inherit_prom_mappings() - sunami.S: tsunami_copy_1page - remove the following unused code: - init.c: struct sparc_aliases Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17sparc/kernel/: possible cleanupsAdrian Bunk23-60/+38
This patch contains the following possible cleanups: - make the following needlessly global code static: - apc.c: apc_swift_idle() - ebus.c: ebus_blacklist_irq() - ebus.c: fill_ebus_child() - ebus.c: fill_ebus_device() - entry.S: syscall_is_too_hard - etra: tsetup_sun4c_stackchk - head.S: cputyp - head.S: prom_vector_p - idprom.c: Sun_Machines[] - ioport.c: _sparc_find_resource() - ioport.c: create_proc_read_entry() - irq.c: struct sparc_irq[] - rtrap.S: sun4c_rett_stackchk - setup.c: prom_sync_me() - setup.c: boot_flags - sun4c_irq.c: sun4c_sbint_to_irq() - sun4d_irq.c: sbus_tid[] - sun4d_irq.c: struct sbus_actions - sun4d_irq.c: sun4d_sbint_to_irq() - sun4m_irq.c: sun4m_sbint_to_irq() - sun4m_irq.c: sun4m_get_irqmask() - sun4m_irq.c: sun4m_timers - sun4m_smp.c: smp4m_cross_call() - sun4m_smp.c: smp4m_blackbox_id() - sun4m_smp.c: smp4m_blackbox_current() - time.c: sp_clock_typ - time.c: sbus_time_init() - traps.c: instruction_dump() - wof.S: spwin_sun4c_stackchk - wuf.S: sun4c_fwin_stackchk - #if 0 the following unused code: - process.c: sparc_backtrace_lock - process.c: __show_backtrace() - process.c: show_backtrace() - process.c: smp_show_backtrace_all_cpus() - remove the following unused code: - entry.S: __handle_exception - smp.c: smp_num_cpus - smp.c: smp_activated - smp.c: __cpu_number_map[] - smp.c: __cpu_logical_map[] - smp.c: bitops_spinlock - traps.c: trap_curbuf - traps.c: trapbuf[] - traps.c: linux_smp_still_initting - traps.c: thiscpus_tbr - traps.c: thiscpus_mid Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17x86: fix asm/e820.h for userspace inclusionRusty Russell1-1/+2
asm-x86/e820.h is included from userspace. 'x86: make e820.c to have common functions' (b79cd8f1268bab57ff85b19d131f7f23deab2dee) broke it: make -C Documentation/lguest cc -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include lguest.c -lz -o lguest In file included from ../../include/asm-x86/bootparam.h:8, from lguest.c:45: ../../include/asm/e820.h:66: error: expected ‘)’ before ‘start’ ../../include/asm/e820.h:67: error: expected ‘)’ before ‘start’ ../../include/asm/e820.h:68: error: expected ‘)’ before ‘start’ ../../include/asm/e820.h:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘e820_update_range’ ... Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-17x86: fix numaq_tsc_disableYinghai Lu1-1/+1
fix: arch/x86/kernel/numaq_32.c: In function ‘numaq_tsc_disable’: arch/x86/kernel/numaq_32.c:99: warning: ‘return’ with a value, in function returning void Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-17fix build error of arch/ia64/kvm/*Takashi Iwai2-3/+3
Fix calls of smp_call_function*() in arch/ia64/kvm for recent API changes. CC [M] arch/ia64/kvm/kvm-ia64.o arch/ia64/kvm/kvm-ia64.c: In function 'handle_global_purge': arch/ia64/kvm/kvm-ia64.c:398: error: too many arguments to function 'smp_call_function_single' arch/ia64/kvm/kvm-ia64.c: In function 'kvm_vcpu_kick': arch/ia64/kvm/kvm-ia64.c:1696: error: too many arguments to function 'smp_call_function_single' Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-17Update scripts/Makefile.fwinst to cope with older makeDavid Woodhouse1-2/+23
Also fix unwanted rebuilds of the firmware/ihex2fw tool by including the .ihex2fw.cmd file when present. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Reported-and-tested-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-17Fix collateral damage to top level MakefileGrant Likely1-1/+0
The patch named "powerpc/mpc5121: Add clock driver", also contained an unrelated and bogus change to the top-level makefile. This patch backs out the bad bit. SHA1 of offending patch: 137e95906e294913fab02162e8a1948ade49acb5) Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Repented-by: John Rigby <jrigby@freescale.com> [ Heh. Normally I pick these out from the diffstats, but I guess I've grown to trust the ppc tree too much ;) - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-17ftrace: do not trace library functionsIngo Molnar1-12/+5
make function tracing more robust: do not trace library functions. We've already got a sizable list of exceptions: ifdef CONFIG_FTRACE # Do not profile string.o, since it may be used in early boot or vdso CFLAGS_REMOVE_string.o = -pg # Also do not profile any debug utilities CFLAGS_REMOVE_spinlock_debug.o = -pg CFLAGS_REMOVE_list_debug.o = -pg CFLAGS_REMOVE_debugobjects.o = -pg CFLAGS_REMOVE_find_next_bit.o = -pg CFLAGS_REMOVE_cpumask.o = -pg CFLAGS_REMOVE_bitmap.o = -pg endif ... and the pattern has been that random library functionality showed up in ftrace's critical path (outside of its recursion check), causing hard to debug lockups. So be a bit defensive about it and exclude all lib/*.o functions by default. It's not that they are overly interesting for tracing purposes anyway. Specific ones can still be traced, in an opt-in manner. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-17ftrace: do not trace scheduler functionsIngo Molnar1-2/+1
do not trace scheduler functions - it's still a bit fragile and can lock up with: http://redhat.com/~mingo/misc/config-Thu_Jul_17_13_34_52_CEST_2008 Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-17ftrace: fix lockup with MAXSMPIngo Molnar1-0/+3
MAXSMP brings in lots of use of various bitops in smp_processor_id() and friends - causing ftrace to lock up during bootup: calling anon_inode_init+0x0/0x130 initcall anon_inode_init+0x0/0x130 returned 0 after 0 msecs calling acpi_event_init+0x0/0x57 [ hard hang ] So exclude the bitops facilities from tracing. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-17[S390] dasd: use -EOPNOTSUPP instead of -ENOTSUPPStefan Haberland1-2/+2
return value -ENOTSUPP is not valid in userspace context, use -EOPNOTSUPP instead Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-07-17[S390] qdio: new qdio driver.Jan Glauber20-4943/+3874
List of major changes: - split qdio driver into several files - seperation of thin interrupt code - improved handling for multiple thin interrupt devices - inbound and outbound processing now always runs in tasklet context - significant less tasklet schedules per interrupt needed - merged qebsm with non-qebsm handling - cleanup qdio interface and added kerneldoc - coding style Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Utz Bacher <utz.bacher@de.ibm.com> Reviewed-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-07-17[S390] cio: Export chsc_error_from_response().Cornelia Huck2-1/+10
Make chsc_error_from_response() available to chsc callers outside of chsc.c (namely qdio) to avoid duplicating error checking code. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-07-17[S390] vmur: Fix return code handling.Frank Munzert1-5/+5
Use -EOPNOTSUPP instead of -ENOTSUPP. Signed-off-by: Frank Munzert <munzert@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17[S390] Fix stacktrace compile bug.Heiko Carstens1-0/+1
Add missing module.h include to fix this: CC arch/s390/kernel/stacktrace.o arch/s390/kernel/stacktrace.c:84: warning: data definition has no type or storage class arch/s390/kernel/stacktrace.c:84: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/s390/kernel/stacktrace.c:84: warning: parameter names (without types) in function declaration arch/s390/kernel/stacktrace.c:97: warning: data definition has no type or storage class arch/s390/kernel/stacktrace.c:97: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/s390/kernel/stacktrace.c:97: warning: parameter names (without types) in function declaration Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17[S390] Increase default warning stacksize.Heiko Carstens1-1/+1
Compiling a kernel with allmodconfig or allyesconfig results in tons of gcc warnings, because the default maximum stacksize from which on gcc will emit a warning is just 256 bytes. Increase this to 2048, so these warnings don't distract from the real warnings that we need to watch at. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17[S390] dasd: Fix cleanup in dasd_{fba,diag}_check_characteristics().Cornelia Huck2-8/+24
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17[S390] chsc headers userspace cleanupAdrian Bunk3-4/+7
Kernel headers shouldn't expose functions to userspace. Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17[S390] dasd: fix unsolicited SIM handling.Stefan Haberland1-1/+3
Add missing schedule_bh and check that there is 32 bit sense data. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17[S390] zfcpdump: Make SCSI disk dump tool recognize storage holesFrank Munzert1-7/+94
The kernel part of zfcpdump establishes a new debugfs file zcore/memmap which exports information on memory layout (start address and length of each memory chunk) to its userspace counterpart. Signed-off-by: Frank Munzert <munzert@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-07-17ftrace: fix merge bugletIngo Molnar1-2/+1
-tip testing found a bootup hang here: initcall anon_inode_init+0x0/0x130 returned 0 after 0 msecs calling acpi_event_init+0x0/0x57 the bootup should have continued with: initcall acpi_event_init+0x0/0x57 returned 0 after 45 msecs but it hung hard there instead. bisection led to this commit: | commit 5806b81ac1c0c52665b91723fd4146a4f86e386b | Merge: d14c8a6... 6712e29... | Author: Ingo Molnar <mingo@elte.hu> | Date: Mon Jul 14 16:11:52 2008 +0200 | Merge branch 'auto-ftrace-next' into tracing/for-linus turns out that i made this mistake in the merge: ifdef CONFIG_FTRACE # Do not profile debug utilities CFLAGS_REMOVE_tsc_64.o = -pg CFLAGS_REMOVE_tsc_32.o = -pg those two files got unified meanwhile - so the dont-profile annotation got lost. The proper rule is: CFLAGS_REMOVE_tsc.o = -pg i guess this could have been caught sooner if the CFLAGS_REMOVE* kbuild rule aborted the build if it met a target that does not exist anymore? Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-16fix dangling zombie when new parent ignores childrenRoland McGrath1-0/+26
This fixes an arcane bug that we think was a regression introduced by commit b2b2cbc4b2a2f389442549399a993a8306420baf. When a parent ignores SIGCHLD (or uses SA_NOCLDWAIT), its children would self-reap but they don't if it's using ptrace on them. When the parent thread later exits and ceases to ptrace a child but leaves other live threads in the parent's thread group, any zombie children are left dangling. The fix makes them self-reap then, as they would have done earlier if ptrace had not been in use. Signed-off-by: Roland McGrath <roland@redhat.com>
2008-07-16do_wait: return security_task_wait() error code in place of -ECHILDRoland McGrath1-10/+20
This reverts the effect of commit f2cc3eb133baa2e9dc8efd40f417106b2ee520f3 "do_wait: fix security checks". That change reverted the effect of commit 73243284463a761e04d69d22c7516b2be7de096c. The rationale for the original commit still stands. The inconsistent treatment of children hidden by ptrace was an unintended omission in the original change and in no way invalidates its purpose. This makes do_wait return the error returned by security_task_wait() (usually -EACCES) in place of -ECHILD when there are some children the caller would be able to wait for if not for the permission failure. A permission error will give the user a clue to look for security policy problems, rather than for mysterious wait bugs. Signed-off-by: Roland McGrath <roland@redhat.com>
2008-07-16ptrace children revampRoland McGrath5-139/+160
ptrace no longer fiddles with the children/sibling links, and the old ptrace_children list is gone. Now ptrace, whether of one's own children or another's via PTRACE_ATTACH, just uses the new ptraced list instead. There should be no user-visible difference that matters. The only change is the order in which do_wait() sees multiple stopped children and stopped ptrace attachees. Since wait_task_stopped() was changed earlier so it no longer reorders the children list, we already know this won't cause any new problems. Signed-off-by: Roland McGrath <roland@redhat.com>
2008-07-16do_wait reorganizationRoland McGrath1-80/+135
This breaks out the guts of do_wait into three subfunctions. The control flow is less nonobvious without so much goto. do_wait_thread and ptrace_do_wait contain the main work of the outer loop. wait_consider_task contains the main work of the inner loop. Signed-off-by: Roland McGrath <roland@redhat.com>
2008-07-16scsi_dh: Verify "dev" is a sdev before accessing it.Chandra Seetharaman3-3/+18
Before accessing the device data structure in hardware handlers, make sure it is a indeed a sdev device. Yinghai Lu <yhlu.kernel@gmail.com> found the bug on Jul 16, 2008, and later tested/verified the following fix. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-16Revert "x86/PCI: ACPI based PCI gap calculation"Jesse Barnes1-80/+0
This reverts commit 809d9a8f93bd8504dcc34b16bbfdfd1a8c9bb1ed. This one isn't quite ready for prime time. It needs more testing and additional feedback from the ACPI guys.
2008-07-16[PATCH] ocfs2: fix oops in mmap_truncate testingColy Li1-3/+10
This patch fixes a mmap_truncate bug which was found by ocfs2 test suite. In an ocfs2 cluster more than 1 node, run program mmap_truncate, which races mmap writes and truncates from multiple processes. While the test is running, a stat from another node forces writeout, causing an oops in ocfs2_get_block() because it sees a buffer to write which isn't allocated. This patch fixed the bug by clear dirty and uptodate bits in buffer, leave the buffer unmapped and return. Fix is suggested by Mark Fasheh, and I code up the patch. Signed-off-by: Coly Li <coyli@suse.de> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
2008-07-16block: Trivial fix for blk_integrity_rq()Martin K. Petersen1-0/+3
Fail integrity check gracefully when request does not have a bio attached (BLOCK_PC). Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-16Fix FADT parsingJan Beulich1-6/+11
The (1.0 inherited) separate length fields in the FADT are byte granular. Further, PM1a/b may have distinct lengths and live in distinct address spaces. acpi_tb_convert_fadt() should account for all of these conditions. Apart from these changes I'm puzzled by the fact that, not just for acpi_gbl_xpm1{a,b}_enable, acpi_hw_low_level_{read,write}() get an explicit size passed rather than using the size found in the passed GAS. What happens on a platform that defines PM1{a,b} wider than 16 bits? Of course, acpi_hw_low_level_{read,write}() at present are entirely un-prepared to deal with sizes other than 8, 16, or 32, not to speak of a non-zero bit_offset or access_width... Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-16Add the ability to reset the machine using the RESET_REG in ACPI's FADT table.Aaron Durbin3-7/+59
Signed-off-by: Aaron Durbin <adurbin@google.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Len Brown <lenb@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-16ACPI: use dev_printk when possibleBjorn Helgaas1-21/+17
Convert printks to use dev_printk(). The most obvious change will be messages like this: -ACPI: PCI Interrupt 0000:00:04.0[A] -> GSI 31 (level, low) -> IRQ 31 +cciss 0000:00:04.0: PCI INT A -> GSI 31 (level, low) -> IRQ 31 Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-07-16PNPACPI: add support for HP vendor-specific CCSR descriptorsBjorn Helgaas1-0/+60
The HP CCSR descriptor describes MMIO address space that should appear as a MEM resource. This patch adds support for parsing these descriptors in the _CRS data. The visible effect of this is that these MEM resources will appear in /sys/devices/pnp0/.../resources, which means that "lspnp -v" will report it, user applications can use this to locate device CSR space, and kernel drivers can use the normal PNP resource accessors to locate them. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-07-16PNP: avoid legacy IDE IRQsBjorn Helgaas1-11/+57
If an IDE controller is in compatibility mode, it expects to use IRQs 14 and 15, so PNP should avoid them. This patch should resolve this problem report: parallel driver grabs IRQ14 preventing legacy SFF ATA controller from working https://bugzilla.novell.com/show_bug.cgi?id=375836 Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-07-16PNP: convert resource options to single linked listBjorn Helgaas11-634/+571
ISAPNP, PNPBIOS, and ACPI describe the "possible resource settings" of a device, i.e., the possibilities an OS bus driver has when it assigns I/O port, MMIO, and other resources to the device. PNP used to maintain this "possible resource setting" information in one independent option structure and a list of dependent option structures for each device. Each of these option structures had lists of I/O, memory, IRQ, and DMA resources, for example: dev independent options ind-io0 -> ind-io1 ... ind-mem0 -> ind-mem1 ... ... dependent option set 0 dep0-io0 -> dep0-io1 ... dep0-mem0 -> dep0-mem1 ... ... dependent option set 1 dep1-io0 -> dep1-io1 ... dep1-mem0 -> dep1-mem1 ... ... ... This data structure was designed for ISAPNP, where the OS configures device resource settings by writing directly to configuration registers. The OS can write the registers in arbitrary order much like it writes PCI BARs. However, for PNPBIOS and ACPI devices, the OS uses firmware interfaces that perform device configuration, and it is important to pass the desired settings to those interfaces in the correct order. The OS learns the correct order by using firmware interfaces that return the "current resource settings" and "possible resource settings," but the option structures above doesn't store the ordering information. This patch replaces the independent and dependent lists with a single list of options. For example, a device might have possible resource settings like this: dev options ind-io0 -> dep0-io0 -> dep1->io0 -> ind-io1 ... All the possible settings are in the same list, in the order they come from the firmware "possible resource settings" list. Each entry is tagged with an independent/dependent flag. Dependent entries also have a "set number" and an optional priority value. All dependent entries must be assigned from the same set. For example, the OS can use all the entries from dependent set 0, or all the entries from dependent set 1, but it cannot mix entries from set 0 with entries from set 1. Prior to this patch PNP didn't keep track of the order of this list, and it assigned all independent options first, then all dependent ones. Using the example above, that resulted in a "desired configuration" list like this: ind->io0 -> ind->io1 -> depN-io0 ... instead of the list the firmware expects, which looks like this: ind->io0 -> depN-io0 -> ind-io1 ... Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-07-16ISAPNP: handle independent options following dependent onesBjorn Helgaas1-2/+7
The ISAPNP spec recommends that independent options precede dependent ones, but this is not actually required. The current ISAPNP code incorrectly puts such trailing independent options at the end of the last dependent option list. This patch fixes that bug by resetting the current option list to the independent list when we see an "End Dependent Functions" tag. PNPBIOS and PNPACPI handle this the same way. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-07-16PNP: remove extra 0x100 bit from option priorityBjorn Helgaas3-9/+7
When building resource options, ISAPNP and PNPBIOS set the priority to something like "0x100 | PNP_RES_PRIORITY_ACCEPTABLE", but we immediately mask off the 0x100 again in pnp_build_option(), so that bit looks superfluous. Thanks to Rene Herman <rene.herman@gmail.com> for pointing this out. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-07-16PNP: support optional IRQ resourcesBjorn Helgaas4-44/+39
This patch adds an IORESOURCE_IRQ_OPTIONAL flag for use when assigning resources to a device. If the flag is set and we are unable to assign an IRQ to the device, we can leave the IRQ disabled but allow the overall resource allocation to succeed. Some devices request an IRQ, but can run without an IRQ (possibly with degraded performance). This flag lets us run the device without the IRQ instead of just leaving the device disabled. This is a reimplementation of this previous change by Rene Herman <rene.herman@gmail.com>: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b73a223661ed137c5d3d2635f954382e94f5a43 I reimplemented this for two reasons: - to prepare for converting all resource options into a single linked list, as opposed to the per-resource-type lists we have now, and - to preserve the order and number of resource options. In PNPBIOS and ACPI, we configure a device by giving firmware a list of resource assignments. It is important that this list has exactly the same number of resources, in the same order, as the "template" list we got from the firmware in the first place. The problem of a sound card MPU401 being left disabled for want of an IRQ was reported by Uwe Bugla <uwe.bugla@gmx.de>. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-07-16PNP: rename pnp_register_*_resource() local variablesBjorn Helgaas1-47/+47
No functional change; just rename "data" to something more descriptive. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-07-16PNPACPI: ignore _PRS interrupt numbers larger than PNP_IRQ_NRBjorn Helgaas1-3/+10
ACPI Extended Interrupt Descriptors can encode 32-bit interrupt numbers, so an interrupt number may exceed the size of the bitmap we use to track possible IRQ settings. To avoid corrupting memory, complain and ignore too-large interrupt numbers. There's similar code in pnpacpi_parse_irq_option(), but I didn't change that because the small IRQ descriptor can only encode IRQs 0-15, which do not exceed bitmap size. In the future, we could handle IRQ numbers greater than PNP_IRQ_NR by replacing the bitmap with a table or list. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-07-16PNP: centralize resource option allocationsBjorn Helgaas5-249/+198
This patch moves all the option allocations (pnp_mem, pnp_port, etc) into the pnp_register_{mem,port,irq,dma}_resource() functions. This will make it easier to rework the option data structures. The non-trivial part of this patch is the IRQ handling. The backends have to allocate a local pnp_irq_mask_t bitmap, populate it, and pass a pointer to pnp_register_irq_resource(). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-07-16PNP: remove redundant pnp_can_configure() checkBjorn Helgaas1-3/+0
pnp_assign_resources() is static and the only caller checks pnp_can_configure() before calling it, so no need to do it again. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-07-16PNP: make resource assignment functions return 0 (success) or -EBUSY (failure)Bjorn Helgaas1-19/+22
This patch doesn't change any behavior; it just makes the return values more conventional. This changes pnp_assign_dma() from a void function to one that returns an int, just like the other assignment functions. For now, at least, pnp_assign_dma() always returns 0 (success), so it appears to never fail, just like before. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>