summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* block: implement and enforce request peek/start/fetchTejun Heo2009-05-112-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Till now block layer allowed two separate modes of request execution. A request is always acquired from the request queue via elv_next_request(). After that, drivers are free to either dequeue it or process it without dequeueing. Dequeue allows elv_next_request() to return the next request so that multiple requests can be in flight. Executing requests without dequeueing has its merits mostly in allowing drivers for simpler devices which can't do sg to deal with segments only without considering request boundary. However, the benefit this brings is dubious and declining while the cost of the API ambiguity is increasing. Segment based drivers are usually for very old or limited devices and as converting to dequeueing model isn't difficult, it doesn't justify the API overhead it puts on block layer and its more modern users. Previous patches converted all block low level drivers to dequeueing model. This patch completes the API transition by... * renaming elv_next_request() to blk_peek_request() * renaming blkdev_dequeue_request() to blk_start_request() * adding blk_fetch_request() which is combination of peek and start * disallowing completion of queued (not started) requests * applying new API to all LLDs Renamings are for consistency and to break out of tree code so that it's apparent that out of tree drivers need updating. [ Impact: block request issue API cleanup, no functional change ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Mike Miller <mike.miller@hp.com> Cc: unsik Kim <donari75@gmail.com> Cc: Paul Clements <paul.clements@steeleye.com> Cc: Tim Waugh <tim@cyberelk.net> Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: David S. Miller <davem@davemloft.net> Cc: Laurent Vivier <Laurent@lvivier.info> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Adrian McMenamin <adrian@mcmen.demon.co.uk> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Borislav Petkov <petkovbb@googlemail.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Alex Dubov <oakad@yahoo.com> Cc: Pierre Ossman <drzeus@drzeus.cx> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: Stefan Weinhuber <wein@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: convert to dequeueing model (easy ones)Tejun Heo2009-05-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | plat-omap/mailbox, floppy, viocd, mspro_block, i2o_block and mmc/card/queue are already pretty close to dequeueing model and can be converted with simple changes. Convert them. While at it, * xen-blkfront: !fs check moved downwards to share dequeue call with normal path. * mspro_block: __blk_end_request(..., blk_rq_cur_byte()) converted to __blk_end_request_cur() * mmc/card/queue: loop of __blk_end_request() converted to __blk_end_request_all() [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Alex Dubov <oakad@yahoo.com> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: convert to pos and nr_sectors accessorsTejun Heo2009-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With recent cleanups, there is no place where low level driver directly manipulates request fields. This means that the 'hard' request fields always equal the !hard fields. Convert all rq->sectors, nr_sectors and current_nr_sectors references to accessors. While at it, drop superflous blk_rq_pos() < 0 test in swim.c. [ Impact: use pos and nr_sectors accessors ] Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Tested-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Acked-by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Acked-by: Mike Miller <mike.miller@hp.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Borislav Petkov <petkovbb@googlemail.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Eric Moore <Eric.Moore@lsi.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Paul Clements <paul.clements@steeleye.com> Cc: Tim Waugh <tim@cyberelk.net> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Alex Dubov <oakad@yahoo.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Dario Ballabio <ballabio_dario@emc.com> Cc: David S. Miller <davem@davemloft.net> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: unsik Kim <donari75@gmail.com> Cc: Laurent Vivier <Laurent@lvivier.info> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* ubd: drop unnecessary rq->sector manipulationTejun Heo2009-04-281-5/+5
| | | | | | | | | | | ubd curiously updates rq->sector while issuing the request in multiple pieces. Don't do it and simply use local copy of sector. [ Impact: cleanup ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* ubd: cleanup completion pathTejun Heo2009-04-281-22/+1
| | | | | | | | | | | | | ubd had its own block request partial completion mechanism, which is unnecessary as block layer already does it. Kill ubd_end_request() and ubd_finish() and replace them with direct call to blk_end_request(). [ Impact: cleanup ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* arm-omap: don't abuse rq->dataTejun Heo2009-04-281-12/+31
| | | | | | | | | | | | | omap mailbox uses rq->data as the second opaque pointer to carry mbox_msg_t and rq->special message argument which is needed only for tx. Add and use omap_msg_tx_data struct for tx and use rq->special for mbox_msg_t for rx such that only rq->special is used as opaque pointer. [ Impact: cleanup rq->data usage, extra kmalloc in msg_send ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Russell King <rmk@arm.linux.org.uk>
* block: implement and use [__]blk_end_request_all()Tejun Heo2009-04-281-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many [__]blk_end_request() call sites which call it with full request length and expect full completion. Many of them ensure that the request actually completes by doing BUG_ON() the return value, which is awkward and error-prone. This patch adds [__]blk_end_request_all() which takes @rq and @error and fully completes the request. BUG_ON() is added to to ensure that this actually happens. Most conversions are simple but there are a few noteworthy ones. * cdrom/viocd: viocd_end_request() replaced with direct calls to __blk_end_request_all(). * s390/block/dasd: dasd_end_request() replaced with direct calls to __blk_end_request_all(). * s390/char/tape_block: tapeblock_end_request() replaced with direct calls to blk_end_request_all(). [ Impact: cleanup ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Mike Miller <mike.miller@hp.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Alex Dubov <oakad@yahoo.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
* sparc: convert to use __HEAD and HEAD_TEXT macros.Tim Abbott2009-04-262-2/+2
| | | | | | | | | | | This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: David S. Miller <davem@davemloft.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sh: convert to use __HEAD and HEAD_TEXT macros.Tim Abbott2009-04-264-4/+8
| | | | | | | | | | | This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Paul Mundt <lethal@linux-sh.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* s390: convert to use __HEAD and HEAD_TEXT macros.Tim Abbott2009-04-262-3/+4
| | | | | | | | | | | | This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* powerpc: convert to use __HEAD and HEAD_TEXT macros.Tim Abbott2009-04-266-6/+11
| | | | | | | | | | | This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mn10300: convert to use __HEAD and HEAD_TEXT macros.Tim Abbott2009-04-262-5/+3
| | | | | | | | | | | This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: David Howells <dhowells@redhat.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* m68k: convert to use __HEAD and HEAD_TEXT macros.Tim Abbott2009-04-264-4/+4
| | | | | | | | | | | | This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* m32r: convert to use __HEAD and HEAD_TEXT macros.Tim Abbott2009-04-262-2/+2
| | | | | | | | | | | This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Hirokazu Takata <takata@linux-m32r.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* frv: convert frv to use __HEAD and HEAD_TEXT macros.Tim Abbott2009-04-262-2/+3
| | | | | | | | | | | This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: David Howells <dhowells@redhat.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* alpha: convert to use __HEAD and HEAD_TEXT macros.Tim Abbott2009-04-262-2/+3
| | | | | | | | | | | This has the consequence of changing the section name use for head code from ".text.head" to ".head.text". Since this commit changes all users in the architecture, this change should be harmless. Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Richard Henderson <rth@twiddle.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* xtensa: convert to use __HEAD and HEAD_TEXT macros.Tim Abbott2009-04-262-3/+4
| | | | | | | Signed-off-by: Tim Abbott <tabbott@mit.edu> Cc: Chris Zankel <chris@zankel.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds2009-04-2418-51/+60
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: add parameter to microblaze_read() microblaze: Use CFLAGS_KERNEL instead of CFLAGS microblaze: Add STATE_SAVE_ARG_SPACE for noMMU kernel too microblaze: Do not check use_dcache microblaze: Do not use PVR configuration for broken MB version microblaze: Fix USR1/2 pvr printing message microblaze: iowrite upon timeout microblaze: Correspond CONFIG...PCMP in Makefile/Kconfig microblaze: Remove redundant variable microblaze: Move start_thread to process.c microblaze: Add missing preadv and pwritev syscalls microblaze: Add missing declaration for die and _exception func microblaze: Remove sparse error in traps.c microblaze: Move task_pt_regs up microblaze: Rename kernel_mode to pt_mode in pt_regs microblaze: Remove uncache shadow condition microblaze: Remove while(1) loop from show_regs function microblaze: Remove unneded per cpu SYSCALL_SAVE variable
| * microblaze: add parameter to microblaze_read()Coly Li2009-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | This patch modifies parameter of microblaze_read() from 'void' to 'struct clocksource *cs', which fixes compile warning for incompatible parameter type. Signed-off-by: Coly Li <coly.li@suse.de> Cc: Michal Simek <monstr@monstr.eu> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Use CFLAGS_KERNEL instead of CFLAGSMichal Simek2009-04-231-4/+2
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Add STATE_SAVE_ARG_SPACE for noMMU kernel tooMichal Simek2009-04-233-4/+15
| | | | | | | | | | | | | | For noMMU kernel this change nothing bring but this change helps with MMU synchronization. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Do not check use_dcacheMichal Simek2009-04-231-3/+0
| | | | | | | | | | | | | | It is not necessary to check cpuinfo.use_dcache because this checking is done in function which call that functions Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Do not use PVR configuration for broken MB versionMichal Simek2009-04-232-3/+8
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Fix USR1/2 pvr printing messageMichal Simek2009-04-231-2/+2
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: iowrite upon timeoutRoel Kluin2009-04-231-1/+1
| | | | | | | | | | | | | | | | retries reaches -1, so the iowrite occurrs upon timeout. Acked-by: John Williams <john.williams@petalogix.com> Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Correspond CONFIG...PCMP in Makefile/KconfigMichal Simek2009-04-231-1/+1
| | | | | | | | | | | | | | Makefile contained different cpu config flag than is in Kconfig.auto in platform folder Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Remove redundant variableMichal Simek2009-04-231-4/+1
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Move start_thread to process.cMichal Simek2009-04-232-10/+12
| | | | | | | | | | | | This change is due to upcomming MMU merge Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Add missing preadv and pwritev syscallsMichal Simek2009-04-232-1/+5
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Add missing declaration for die and _exception funcMichal Simek2009-04-231-0/+3
| | | | | | | | | | | | This change remove sparse errors. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Remove sparse error in traps.cMichal Simek2009-04-231-1/+1
| | | | | | | | | | | | | | | | CHECK arch/microblaze/kernel/traps.c arch/microblaze/kernel/traps.c:37:47: warning: Using plain integer as NULL pointer CC arch/microblaze/kernel/traps.o Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Move task_pt_regs upMichal Simek2009-04-231-3/+3
| | | | | | | | | | | | This change is important for easier merge with Microblaze MMU code. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Rename kernel_mode to pt_mode in pt_regsMichal Simek2009-04-234-6/+6
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Remove uncache shadow conditionMichal Simek2009-04-231-5/+0
| | | | | | | | | | | | | | Uncached shadow feature is not supported in current kernel code that's why I removed it. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Remove while(1) loop from show_regs functionMichal Simek2009-04-231-2/+0
| | | | | | | | | | | | | | I removed it because of show_regs can't break die function. If process/kernel failed, die (do_exit) function resolve it. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * microblaze: Remove unneded per cpu SYSCALL_SAVE variableMichal Simek2009-04-231-1/+0
| | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* | Merge branch 'release' of ↵Linus Torvalds2009-04-241-14/+16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (34 commits) ACPI, i915: Register ACPI video even when not modesetting Revert "ACPICA: delete check for AML access to port 0x81-83" I/O port protection: update for windows compatibility. sony-laptop: always try to unblock rfkill on load sony-laptop: fix bogus error message display on resume ACPI: EC: Fix ACPI EC resume non-query interrupt message sony-laptop: SNC input event 38 fix sony-laptop: SNC 127 Initialization Fix sony-laptop: Duplicate SNC 127 Event Fix ACPI: prevent processor.max_cstate=0 boot crash ACPI/hpet: prevent boot hang when hpet=force used on ICH-4M ACPI: delete obsolete "bus master activity" proc field ACPI: idle: mark_tsc_unstable() at init-time, not run-time ACPI: add /sys/firmware/acpi/interrupts/sci_not counter ACPI video: fix an error when the brightness levels on AC and on Battery are same acpi-cpufreq: Do not let get_measured perf depend on internal variable acpi-cpufreq: style-only: add parens to math expression acpi-cpufreq: Cleanup: Use printk_once x86, acpi_cpufreq: Fix the NULL pointer dereference in get_measured_perf thinkpad-acpi: bump up version to 0.23 ...
| * \ Merge branch 'cpufreq' into releaseLen Brown2009-04-241-14/+16
| |\ \ | | |/ | |/|
| | * acpi-cpufreq: Do not let get_measured perf depend on internal variableThomas Renninger2009-04-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take already available policy->cpuinfo.max_freq and get rid of acpi-cpufreq specific max_freq variable. This implies that P0 is always the highest frequency which should always be true as ACPI spec says: As a result, the zeroth entry describes the highest performance state Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
| | * acpi-cpufreq: style-only: add parens to math expressionThomas Renninger2009-04-191-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
| | * acpi-cpufreq: Cleanup: Use printk_onceThomas Renninger2009-04-191-6/+2
| | | | | | | | | | | | | | | Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
| | * x86, acpi_cpufreq: Fix the NULL pointer dereference in get_measured_perfPallipadi, Venkatesh2009-04-191-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for a regression that was introduced by earlier commit 18b2646fe3babeb40b34a0c1751e0bf5adfdc64c on Mon Apr 6 11:26:08 2009 Regression resulted in the below error happened on systems with software coordination where per_cpu acpi data will not be initiated for secondary CPUs in a P-state domain. On Tue, 2009-04-14 at 23:01 -0700, Zhang, Yanmin wrote: My machine hanged with kernel 2.6.30-rc2 when script read > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor. > > opps happens in get_measured_perf: > > cur.aperf.whole = readin.aperf.whole - > per_cpu(drv_data, cpu)->saved_aperf; > > Because per_cpu(drv_data, cpu)=NULL. > > So function get_measured_perf should check if (per_cpu(drv_data, > cpu)==NULL) > and return 0 if it's NULL. --------------sys log------------------ BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 IP: [<ffffffff8021af75>] get_measured_perf+0x4a/0xf9 PGD a7dd88067 PUD a7ccf5067 PMD 0 Oops: 0000 [#1] SMP last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor CPU 0 Modules linked in: video output Pid: 2091, comm: kondemand/0 Not tainted 2.6.30-rc2 #1 MP Server RIP: 0010:[<ffffffff8021af75>] [<ffffffff8021af75>] get_measured_perf+0x4a/0xf9 RSP: 0018:ffff880a7d56de20 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000046241a42b6 RCX: ffff88004d219000 RDX: 000000000000b660 RSI: 0000000000000020 RDI: 0000000000000001 RBP: ffff880a7f052000 R08: 00000046241a42b6 R09: ffffffff807639f0 R10: 00000000ffffffea R11: ffffffff802207f4 R12: ffff880a7f052000 R13: ffff88004d20e460 R14: 0000000000ddd5a6 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff88004d200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 0000000000000020 CR3: 0000000a7f1bf000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process kondemand/0 (pid: 2091, threadinfo ffff880a7d56c000, task ffff880a7d4d18c0) Stack: ffff880a7f052078 ffffffff803efd54 00000046241a42b6 000000462ffa9e95 0000000000000001 0000000000000001 00000000ffffffea ffffffff8064f41a 0000000000000012 0000000000000012 ffff880a7f052000 ffffffff80650547 Call Trace: [<ffffffff803efd54>] ? kobject_get+0x12/0x17 [<ffffffff8064f41a>] ? __cpufreq_driver_getavg+0x42/0x57 [<ffffffff80650547>] ? do_dbs_timer+0x147/0x272 [<ffffffff80650400>] ? do_dbs_timer+0x0/0x272 [<ffffffff802474ca>] ? worker_thread+0x15b/0x1f5 [<ffffffff8024a02c>] ? autoremove_wake_function+0x0/0x2e [<ffffffff8024736f>] ? worker_thread+0x0/0x1f5 [<ffffffff80249f0d>] ? kthread+0x54/0x83 [<ffffffff8020c87a>] ? child_rip+0xa/0x20 [<ffffffff80249eb9>] ? kthread+0x0/0x83 [<ffffffff8020c870>] ? child_rip+0x0/0x20 Code: 99 a6 03 00 31 c9 85 c0 0f 85 c3 00 00 00 89 df 4c 8b 44 24 10 48 c7 c2 60 b6 00 00 48 8b 0c fd e0 30 a5 80 4c 89 c3 48 8b 04 0a <48> 2b 58 20 48 8b 44 24 18 48 89 1c 24 48 8b 34 0a 48 2b 46 28 RIP [<ffffffff8021af75>] get_measured_perf+0x4a/0xf9 RSP <ffff880a7d56de20> CR2: 0000000000000020 ---[ end trace 2b8fac9a49e19ad4 ]--- Tested-by: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | | Merge branch 'for-linus' of ↵Linus Torvalds2009-04-2411-358/+1346
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: update the default config for the ColdFire 5407C3 board m68knommu: update the default config for the ColdFire 5307C3 board m68knommu: update the default config for the ColdFire 5257EVB board m68knommu: update the default config for the ColdFire 5249EVB. m68knommu: add a defconfig for the ColdFire M5272C3 board m68knommu: update the defconfig for the ColdFire 5208evb board m68knommu: fix DMA support for ColdFire m68knommu: remove unused kernel stats offsets m68knommu: fix missing .data.cacheline_aligned section m68knommu: Fixed GPIO pin initialization for CONFIG_M5271 FEC.
| * | | m68knommu: update the default config for the ColdFire 5407C3 boardGreg Ungerer2009-04-231-81/+98
| | | | | | | | | | | | | | | | Signed-off-by: Greg Ungerer <gerg@uclinux.org>
| * | | m68knommu: update the default config for the ColdFire 5307C3 boardGreg Ungerer2009-04-231-68/+163
| | | | | | | | | | | | | | | | Signed-off-by: Greg Ungerer <gerg@uclinux.org>
| * | | m68knommu: update the default config for the ColdFire 5257EVB boardGreg Ungerer2009-04-221-71/+96
| | | | | | | | | | | | | | | | Signed-off-by: Greg Ungerer <gerg@uclinux.org>
| * | | m68knommu: update the default config for the ColdFire 5249EVB.Greg Ungerer2009-04-221-59/+209
| | | | | | | | | | | | | | | | Signed-off-by: Greg Ungerer <gerg@uclinux.org>
| * | | m68knommu: add a defconfig for the ColdFire M5272C3 boardGreg Ungerer2009-04-221-0/+645
| | | | | | | | | | | | | | | | Signed-off-by: Greg Ungerer <gerg@uclinux.org>
| * | | m68knommu: update the defconfig for the ColdFire 5208evb boardGreg Ungerer2009-04-221-70/+93
| | | | | | | | | | | | | | | | Signed-off-by: Greg Ungerer <gerg@uclinux.org>
| * | | m68knommu: fix DMA support for ColdFireGreg Ungerer2009-04-222-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ColdFire CPU family members support DMA (all those with the FEC ethernet core use it, the rest have dedicated DMA engines). The code support is just missing a handful of routines for it to be usable by drivers. Add the missing dma_ functions. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
OpenPOWER on IntegriCloud