···11+/*22+ * ATSTK1000 setup code: Daughterboard interface33+ *44+ * Copyright (C) 2007 Atmel Corporation55+ *66+ * This program is free software; you can redistribute it and/or modify77+ * it under the terms of the GNU General Public License version 2 as88+ * published by the Free Software Foundation.99+ */1010+#ifndef __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H1111+#define __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H1212+1313+extern struct atmel_lcdfb_info atstk1000_lcdc_data;1414+1515+#endif /* __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H */
···77 * This program is free software; you can redistribute it and/or modify88 * it under the terms of the GNU General Public License version 2 as99 * published by the Free Software Foundation.1010- *1111- * This file contains the code used by various IRQ handling routines:1212- * asking for different IRQ's should be done through these routines1313- * instead of just grabbing them. Thus setups with different IRQ numbers1414- * shouldn't result in any weird surprises, and installing new handlers1515- * should be easier.1616- *1717- * IRQ's are in fact implemented a bit like signal handlers for the kernel.1818- * Naturally it's not a 1:1 relation, but there are similarities.1910 */20112112#include <linux/interrupt.h>
+1-6
arch/avr32/kernel/kprobes.c
···179179 return 1;180180}181181182182-static int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)182182+int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr)183183{184184 struct kprobe *cur = kprobe_running();185185···214214 break;215215 case DIE_SSTEP:216216 if (post_kprobe_handler(args->regs))217217- ret = NOTIFY_STOP;218218- break;219219- case DIE_FAULT:220220- if (kprobe_running()221221- && kprobe_fault_handler(args->regs, args->trapnr))222217 ret = NOTIFY_STOP;223218 break;224219 default:
···66 * published by the Free Software Foundation.77 */88#include <linux/clk.h>99+#include <linux/fb.h>910#include <linux/init.h>1011#include <linux/platform_device.h>1112#include <linux/spi/spi.h>···1716#include <asm/arch/board.h>1817#include <asm/arch/portmux.h>1918#include <asm/arch/sm.h>1919+2020+#include <video/atmel_lcdc.h>20212122#include "clock.h"2223#include "hmatrix.h"···884881/* --------------------------------------------------------------------885882 * LCDC886883 * -------------------------------------------------------------------- */887887-static struct lcdc_platform_data lcdc0_data;888888-static struct resource lcdc0_resource[] = {884884+static struct atmel_lcdfb_info atmel_lcdfb0_data;885885+static struct resource atmel_lcdfb0_resource[] = {889886 {890887 .start = 0xff000000,891888 .end = 0xff000fff,892889 .flags = IORESOURCE_MEM,893890 },894891 IRQ(1),892892+ {893893+ /* Placeholder for pre-allocated fb memory */894894+ .start = 0x00000000,895895+ .end = 0x00000000,896896+ .flags = 0,897897+ },895898};896896-DEFINE_DEV_DATA(lcdc, 0);897897-DEV_CLK(hclk, lcdc0, hsb, 7);898898-static struct clk lcdc0_pixclk = {899899- .name = "pixclk",900900- .dev = &lcdc0_device.dev,899899+DEFINE_DEV_DATA(atmel_lcdfb, 0);900900+DEV_CLK(hck1, atmel_lcdfb0, hsb, 7);901901+static struct clk atmel_lcdfb0_pixclk = {902902+ .name = "lcdc_clk",903903+ .dev = &atmel_lcdfb0_device.dev,901904 .mode = genclk_mode,902905 .get_rate = genclk_get_rate,903906 .set_rate = genclk_set_rate,···912903};913904914905struct platform_device *__init915915-at32_add_device_lcdc(unsigned int id, struct lcdc_platform_data *data)906906+at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,907907+ unsigned long fbmem_start, unsigned long fbmem_len)916908{917909 struct platform_device *pdev;910910+ struct atmel_lcdfb_info *info;911911+ struct fb_monspecs *monspecs;912912+ struct fb_videomode *modedb;913913+ unsigned int modedb_size;914914+915915+ /*916916+ * Do a deep copy of the fb data, monspecs and modedb. Make917917+ * sure all allocations are done before setting up the918918+ * portmux.919919+ */920920+ monspecs = kmemdup(data->default_monspecs,921921+ sizeof(struct fb_monspecs), GFP_KERNEL);922922+ if (!monspecs)923923+ return NULL;924924+925925+ modedb_size = sizeof(struct fb_videomode) * monspecs->modedb_len;926926+ modedb = kmemdup(monspecs->modedb, modedb_size, GFP_KERNEL);927927+ if (!modedb)928928+ goto err_dup_modedb;929929+ monspecs->modedb = modedb;918930919931 switch (id) {920932 case 0:921921- pdev = &lcdc0_device;933933+ pdev = &atmel_lcdfb0_device;922934 select_peripheral(PC(19), PERIPH_A, 0); /* CC */923935 select_peripheral(PC(20), PERIPH_A, 0); /* HSYNC */924936 select_peripheral(PC(21), PERIPH_A, 0); /* PCLK */···972942 select_peripheral(PD(16), PERIPH_A, 0); /* DATA22 */973943 select_peripheral(PD(17), PERIPH_A, 0); /* DATA23 */974944975975- clk_set_parent(&lcdc0_pixclk, &pll0);976976- clk_set_rate(&lcdc0_pixclk, clk_get_rate(&pll0));945945+ clk_set_parent(&atmel_lcdfb0_pixclk, &pll0);946946+ clk_set_rate(&atmel_lcdfb0_pixclk, clk_get_rate(&pll0));977947 break;978948979949 default:980980- return NULL;950950+ goto err_invalid_id;981951 }982952983983- memcpy(pdev->dev.platform_data, data,984984- sizeof(struct lcdc_platform_data));953953+ if (fbmem_len) {954954+ pdev->resource[2].start = fbmem_start;955955+ pdev->resource[2].end = fbmem_start + fbmem_len - 1;956956+ pdev->resource[2].flags = IORESOURCE_MEM;957957+ }958958+959959+ info = pdev->dev.platform_data;960960+ memcpy(info, data, sizeof(struct atmel_lcdfb_info));961961+ info->default_monspecs = monspecs;985962986963 platform_device_register(pdev);987964 return pdev;965965+966966+err_invalid_id:967967+ kfree(modedb);968968+err_dup_modedb:969969+ kfree(monspecs);970970+ return NULL;988971}989972990973/* --------------------------------------------------------------------···10801037 &macb1_pclk,10811038 &atmel_spi0_spi_clk,10821039 &atmel_spi1_spi_clk,10831083- &lcdc0_hclk,10841084- &lcdc0_pixclk,10401040+ &atmel_lcdfb0_hck1,10411041+ &atmel_lcdfb0_pixclk,10851042 &gclk0,10861043 &gclk1,10871044 &gclk2,···11201077 genclk_init_parent(&gclk2);11211078 genclk_init_parent(&gclk3);11221079 genclk_init_parent(&gclk4);11231123- genclk_init_parent(&lcdc0_pixclk);10801080+ genclk_init_parent(&atmel_lcdfb0_pixclk);1124108111251082 /*11261083 * Turn on all clocks that have at least one user already, and
+12-24
arch/avr32/mm/fault.c
···1212#include <linux/mm.h>1313#include <linux/module.h>1414#include <linux/pagemap.h>1515-1615#include <linux/kdebug.h>1616+#include <linux/kprobes.h>1717+1718#include <asm/mmu_context.h>1819#include <asm/sysreg.h>1920#include <asm/tlb.h>2021#include <asm/uaccess.h>21222223#ifdef CONFIG_KPROBES2323-ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain);2424-2525-/* Hook to register for page fault notifications */2626-int register_page_fault_notifier(struct notifier_block *nb)2424+static inline int notify_page_fault(struct pt_regs *regs, int trap)2725{2828- return atomic_notifier_chain_register(¬ify_page_fault_chain, nb);2929-}2626+ int ret = 0;30273131-int unregister_page_fault_notifier(struct notifier_block *nb)3232-{3333- return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb);3434-}2828+ if (!user_mode(regs)) {2929+ if (kprobe_running() && kprobe_fault_handler(regs, trap))3030+ ret = 1;3131+ }35323636-static inline int notify_page_fault(enum die_val val, struct pt_regs *regs,3737- int trap, int sig)3838-{3939- struct die_args args = {4040- .regs = regs,4141- .trapnr = trap,4242- };4343- return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args);3333+ return ret;4434}4535#else4646-static inline int notify_page_fault(enum die_val val, struct pt_regs *regs,4747- int trap, int sig)3636+static inline int notify_page_fault(struct pt_regs *regs, int trap)4837{4949- return NOTIFY_DONE;3838+ return 0;5039}5140#endif5241···6576 long signr;6677 int code;67786868- if (notify_page_fault(DIE_PAGE_FAULT, regs,6969- ecr, SIGSEGV) == NOTIFY_STOP)7979+ if (notify_page_fault(regs, ecr))7080 return;71817282 address = sysreg_read(TLBEAR);
+1-1
arch/ia64/kernel/acpi.c
···791791early_param("additional_cpus", setup_additional_cpus);792792793793/*794794- * cpu_possible_map should be static, it cannot change as cpu's794794+ * cpu_possible_map should be static, it cannot change as CPUs795795 * are onlined, or offlined. The reason is per-cpu data-structures796796 * are allocated by some modules at init time, and dont expect to797797 * do this dynamically on cpu arrival/departure.
+16-8
arch/ia64/kernel/crash.c
···156156 if (!kdump_on_init)157157 return NOTIFY_DONE;158158159159- if (val != DIE_INIT_MONARCH_ENTER &&160160- val != DIE_INIT_SLAVE_ENTER &&159159+ if (val != DIE_INIT_MONARCH_LEAVE &&160160+ val != DIE_INIT_SLAVE_LEAVE &&161161+ val != DIE_INIT_MONARCH_PROCESS &&161162 val != DIE_MCA_RENDZVOUS_LEAVE &&162163 val != DIE_MCA_MONARCH_LEAVE)163164 return NOTIFY_DONE;164165165166 nd = (struct ia64_mca_notify_die *)args->err;166166- /* Reason code 1 means machine check rendezous*/167167- if ((val == DIE_INIT_MONARCH_ENTER || val == DIE_INIT_SLAVE_ENTER) &&168168- nd->sos->rv_rc == 1)167167+ /* Reason code 1 means machine check rendezvous*/168168+ if ((val == DIE_INIT_MONARCH_LEAVE || val == DIE_INIT_SLAVE_LEAVE169169+ || val == DIE_INIT_MONARCH_PROCESS) && nd->sos->rv_rc == 1)169170 return NOTIFY_DONE;170171171172 switch (val) {172172- case DIE_INIT_MONARCH_ENTER:173173+ case DIE_INIT_MONARCH_PROCESS:174174+ atomic_set(&kdump_in_progress, 1);175175+ *(nd->monarch_cpu) = -1;176176+ break;177177+ case DIE_INIT_MONARCH_LEAVE:173178 machine_kdump_on_init();174179 break;175175- case DIE_INIT_SLAVE_ENTER:176176- unw_init_running(kdump_cpu_freeze, NULL);180180+ case DIE_INIT_SLAVE_LEAVE:181181+ if (atomic_read(&kdump_in_progress))182182+ unw_init_running(kdump_cpu_freeze, NULL);177183 break;178184 case DIE_MCA_RENDZVOUS_LEAVE:179185 if (atomic_read(&kdump_in_progress))···221215static int222216machine_crash_setup(void)223217{218218+ /* be notified before default_monarch_init_process */224219 static struct notifier_block kdump_init_notifier_nb = {225220 .notifier_call = kdump_init_notifier,221221+ .priority = 1,226222 };227223 int ret;228224 if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)
···44 * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar55 *66 * This file contains the code used by various IRQ handling routines:77- * asking for different IRQ's should be done through these routines77+ * asking for different IRQs should be done through these routines88 * instead of just grabbing them. Thus setups with different IRQ numbers99 * shouldn't result in any weird surprises, and installing new handlers1010 * should be easier.···1212 * Copyright (C) Ashok Raj<ashok.raj@intel.com>, Intel Corporation 20041313 *1414 * 4/14/2004: Added code to handle cpu migration and do safe irq1515- * migration without lossing interrupts for iosapic1515+ * migration without losing interrupts for iosapic1616 * architecture.1717 */1818···190190 }191191192192 /*193193- * Phase 1: Locate irq's bound to this cpu and193193+ * Phase 1: Locate IRQs bound to this cpu and194194 * relocate them for cpu removal.195195 */196196 migrate_irqs();
+1-1
arch/ia64/kernel/irq_lsapic.c
···2323static void2424lsapic_noop (unsigned int irq)2525{2626- /* nuthing to do... */2626+ /* nothing to do... */2727}28282929static int lsapic_retrigger(unsigned int irq)
+4-11
arch/ia64/kernel/kprobes.c
···151151152152 cmp_inst.l = kprobe_inst;153153 if ((cmp_inst.f.x2 == 0) || (cmp_inst.f.x2 == 1)) {154154- /* Integere compare - Register Register (A6 type)*/154154+ /* Integer compare - Register Register (A6 type)*/155155 if ((cmp_inst.f.tb == 0) && (cmp_inst.f.ta == 0)156156 &&(cmp_inst.f.c == 1))157157 ctype_unc = 1;158158 } else if ((cmp_inst.f.x2 == 2)||(cmp_inst.f.x2 == 3)) {159159- /* Integere compare - Immediate Register (A8 type)*/159159+ /* Integer compare - Immediate Register (A8 type)*/160160 if ((cmp_inst.f.ta == 0) &&(cmp_inst.f.c == 1))161161 ctype_unc = 1;162162 }···820820 return 1;821821}822822823823-static int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr)823823+int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr)824824{825825 struct kprobe *cur = kprobe_running();826826 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();···904904 if (post_kprobes_handler(args->regs))905905 ret = NOTIFY_STOP;906906 break;907907- case DIE_PAGE_FAULT:908908- /* kprobe_running() needs smp_processor_id() */909909- preempt_disable();910910- if (kprobe_running() &&911911- kprobes_fault_handler(args->regs, args->trapnr))912912- ret = NOTIFY_STOP;913913- preempt_enable();914907 default:915908 break;916909 }···947954 /*948955 * Callee owns the argument space and could overwrite it, eg949956 * tail call optimization. So to be absolutely safe950950- * we save the argument space before transfering the control957957+ * we save the argument space before transferring the control951958 * to instrumented jprobe function which runs in952959 * the process context953960 */
+4-1
arch/ia64/kernel/mca.c
···273273274274 mlogbuf_finished = 1;275275}276276-EXPORT_SYMBOL(ia64_mlogbuf_finish);277276278277/*279278 * Print buffered messages from INIT context.···14761477 struct task_struct *g, *t;14771478 if (val != DIE_INIT_MONARCH_PROCESS)14781479 return NOTIFY_DONE;14801480+#ifdef CONFIG_KEXEC14811481+ if (atomic_read(&kdump_in_progress))14821482+ return NOTIFY_DONE;14831483+#endif1479148414801485 /*14811486 * FIXME: mlogbuf will brim over with INIT stack dumps.
+2-2
arch/ia64/kernel/mca_drv.c
···438438 * @peidx: pointer of index of processor error section439439 *440440 * Return value:441441- * target address on Success / 0 on Failue441441+ * target address on Success / 0 on Failure442442 */443443static u64444444get_target_identifier(peidx_table_t *peidx)···701701 return fatal_mca("External bus check fatal status");702702703703 /*704704- * This is a local MCA and estimated as a recoverble error.704704+ * This is a local MCA and estimated as a recoverable error.705705 */706706 if (platform)707707 return recover_from_platform_error(slidx, peidx, pbci, sos);
+1-1
arch/ia64/kernel/module.c
···861861/*862862 * Modules contain a single unwind table which covers both the core and the init text863863 * sections but since the two are not contiguous, we need to split this table up such that864864- * we can register (and unregister) each "segment" seperately. Fortunately, this sounds864864+ * we can register (and unregister) each "segment" separately. Fortunately, this sounds865865 * more complicated than it really is.866866 */867867static void
+9-9
arch/ia64/kernel/perfmon.c
···13181318{13191319 unsigned long flags;13201320 /*13211321- * validy checks on cpu_mask have been done upstream13211321+ * validity checks on cpu_mask have been done upstream13221322 */13231323 LOCK_PFS(flags);13241324···13841384{13851385 unsigned long flags;13861386 /*13871387- * validy checks on cpu_mask have been done upstream13871387+ * validity checks on cpu_mask have been done upstream13881388 */13891389 LOCK_PFS(flags);13901390···18351835 /*18361836 * remove our file from the async queue, if we use this mode.18371837 * This can be done without the context being protected. We come18381838- * here when the context has become unreacheable by other tasks.18381838+ * here when the context has become unreachable by other tasks.18391839 *18401840 * We may still have active monitoring at this point and we may18411841 * end up in pfm_overflow_handler(). However, fasync_helper()···21322132 filp->private_data = NULL;2133213321342134 /*21352135- * if we free on the spot, the context is now completely unreacheable21352135+ * if we free on the spot, the context is now completely unreachable21362136 * from the callers side. The monitored task side is also cut, so we21372137 * can freely cut.21382138 *···25622562 ctx->ctx_all_pmcs[0] = pmu_conf->impl_pmcs[0] & ~0x1;2563256325642564 /*25652565- * bitmask of all PMDs that are accesible to this context25652565+ * bitmask of all PMDs that are accessible to this context25662566 */25672567 ctx->ctx_all_pmds[0] = pmu_conf->impl_pmds[0];25682568···33953395 if (unlikely(!PMD_IS_IMPL(cnum))) goto error;33963396 /*33973397 * we can only read the register that we use. That includes33983398- * the one we explicitely initialize AND the one we want included33983398+ * the one we explicitly initialize AND the one we want included33993399 * in the sampling buffer (smpl_regs).34003400 *34013401 * Having this restriction allows optimization in the ctxsw routine···37153715 * if non-blocking, then we ensure that the task will go into37163716 * pfm_handle_work() before returning to user mode.37173717 *37183718- * We cannot explicitely reset another task, it MUST always37183718+ * We cannot explicitly reset another task, it MUST always37193719 * be done by the task itself. This works for system wide because37203720 * the tool that is controlling the session is logically doing 37213721 * "self-monitoring".···46444644 switch(state) {46454645 case PFM_CTX_UNLOADED:46464646 /*46474647- * only comes to thios function if pfm_context is not NULL, i.e., cannot46474647+ * only comes to this function if pfm_context is not NULL, i.e., cannot46484648 * be in unloaded state46494649 */46504650 printk(KERN_ERR "perfmon: pfm_exit_thread [%d] ctx unloaded\n", task->pid);···5247524752485248/*52495249 * main overflow processing routine.52505250- * it can be called from the interrupt path or explicitely during the context switch code52505250+ * it can be called from the interrupt path or explicitly during the context switch code52515251 */52525252static void52535253pfm_overflow_handler(struct task_struct *task, pfm_context_t *ctx, u64 pmc0, struct pt_regs *regs)
+1-1
arch/ia64/kernel/perfmon_mckinley.h
···181181 .pmc_desc = pfm_mck_pmc_desc,182182 .num_ibrs = 8,183183 .num_dbrs = 8,184184- .use_rr_dbregs = 1 /* debug register are use for range retrictions */184184+ .use_rr_dbregs = 1 /* debug register are use for range restrictions */185185};186186187187
+1-1
arch/ia64/kernel/sal.c
···134134 * interrupt redirection. The reason is this would require that135135 * All interrupts be stopped and hard bind the irq to a cpu.136136 * Later when the interrupt is fired we need to set the redir hint137137- * on again in the vector. This is combersome for something that the137137+ * on again in the vector. This is cumbersome for something that the138138 * user mode irq balancer will solve anyways.139139 */140140 no_int_routing=1;
+1-1
arch/ia64/kernel/salinfo.c
···162162/** salinfo_platform_oemdata - optional callback to decode oemdata from an error163163 * record.164164 * @sect_header: pointer to the start of the section to decode.165165- * @oemdata: returns vmalloc area containing the decded output.165165+ * @oemdata: returns vmalloc area containing the decoded output.166166 * @oemdata_size: returns length of decoded output (strlen).167167 *168168 * Description: If user space asks for oem data to be decoded by the kernel
+3-3
arch/ia64/kernel/setup.c
···576576}577577578578/*579579- * Display cpu info for all cpu's.579579+ * Display cpu info for all CPUs.580580 */581581static int582582show_cpuinfo (struct seq_file *m, void *v)···761761 c->cpu = smp_processor_id();762762763763 /* below default values will be overwritten by identify_siblings() 764764- * for Multi-Threading/Multi-Core capable cpu's764764+ * for Multi-Threading/Multi-Core capable CPUs765765 */766766 c->threads_per_core = c->cores_per_socket = c->num_log = 1;767767 c->socket_id = -1;···947947 ia32_cpu_init();948948#endif949949950950- /* Clear ITC to eliminiate sched_clock() overflows in human time. */950950+ /* Clear ITC to eliminate sched_clock() overflows in human time. */951951 ia64_set_itc(0);952952953953 /* disable all local interrupt sources: */
+6-6
arch/ia64/kernel/smp.c
···186186}187187188188/*189189- * Called with preeemption disabled.189189+ * Called with preemption disabled.190190 */191191static inline void192192send_IPI_single (int dest_cpu, int op)···196196}197197198198/*199199- * Called with preeemption disabled.199199+ * Called with preemption disabled.200200 */201201static inline void202202send_IPI_allbutself (int op)···210210}211211212212/*213213- * Called with preeemption disabled.213213+ * Called with preemption disabled.214214 */215215static inline void216216send_IPI_all (int op)···223223}224224225225/*226226- * Called with preeemption disabled.226226+ * Called with preemption disabled.227227 */228228static inline void229229send_IPI_self (int op)···252252}253253#endif254254/*255255- * Called with preeemption disabled.255255+ * Called with preemption disabled.256256 */257257void258258smp_send_reschedule (int cpu)···261261}262262263263/*264264- * Called with preeemption disabled.264264+ * Called with preemption disabled.265265 */266266static void267267smp_send_local_flush_tlb (int cpu)
+3-3
arch/ia64/kernel/smpboot.c
···694694 set_cpei_target_cpu(new_cpei_cpu);695695 desc = irq_desc + ia64_cpe_irq;696696 /*697697- * Switch for now, immediatly, we need to do fake intr697697+ * Switch for now, immediately, we need to do fake intr698698 * as other interrupts, but need to study CPEI behaviour with699699 * polling before making changes.700700 */···840840}841841842842/*843843- * Assume that CPU's have been discovered by some platform-dependent interface. For843843+ * Assume that CPUs have been discovered by some platform-dependent interface. For844844 * SoftSDV/Lion, that would be ACPI.845845 *846846 * Setup of the IPI irq handler is done in irq.c:init_IRQ_SMP().···854854 } *ap_startup;855855 long sal_ret;856856857857- /* Tell SAL where to drop the AP's. */857857+ /* Tell SAL where to drop the APs. */858858 ap_startup = (struct fptr *) start_ap;859859 sal_ret = ia64_sal_set_vectors(SAL_VECTOR_OS_BOOT_RENDEZ,860860 ia64_tpa(ap_startup->fp), ia64_tpa(ap_startup->gp), 0, 0, 0, 0);
+1-1
arch/ia64/kernel/traps.c
···304304 * Lower 4 bits are used as a count. Upper bits are a sequence305305 * number that is updated when count is reset. The cmpxchg will306306 * fail is seqno has changed. This minimizes mutiple cpus307307- * reseting the count.307307+ * resetting the count.308308 */309309 if (current_jiffies > last.time)310310 (void) cmpxchg_acq(&last.count, count, 16 + (count & ~15));
+1-1
arch/ia64/kernel/unwind.c
···22 * Copyright (C) 1999-2004 Hewlett-Packard Co33 * David Mosberger-Tang <davidm@hpl.hp.com>44 * Copyright (C) 2003 Fenghua Yu <fenghua.yu@intel.com>55- * - Change pt_regs_off() to make it less dependant on pt_regs structure.55+ * - Change pt_regs_off() to make it less dependent on pt_regs structure.66 */77/*88 * This file implements call frame unwind support for the Linux
+1-1
arch/ia64/mm/discontig.c
···317317 * node_online_map is not set for hot-added nodes at this time,318318 * because we are halfway through initialization of the new node's319319 * structures. If for_each_online_node() is used, a new node's320320- * pg_data_ptrs will be not initialized. Insted of using it,320320+ * pg_data_ptrs will be not initialized. Instead of using it,321321 * pgdat_list[] is checked.322322 */323323 for_each_node(node) {
+13-26
arch/ia64/mm/fault.c
···1919extern void die (char *, struct pt_regs *, long);20202121#ifdef CONFIG_KPROBES2222-ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain);2323-2424-/* Hook to register for page fault notifications */2525-int register_page_fault_notifier(struct notifier_block *nb)2222+static inline int notify_page_fault(struct pt_regs *regs, int trap)2623{2727- return atomic_notifier_chain_register(¬ify_page_fault_chain, nb);2828-}2424+ int ret = 0;29253030-int unregister_page_fault_notifier(struct notifier_block *nb)3131-{3232- return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb);3333-}2626+ if (!user_mode(regs)) {2727+ /* kprobe_running() needs smp_processor_id() */2828+ preempt_disable();2929+ if (kprobe_running() && kprobes_fault_handler(regs, trap))3030+ ret = 1;3131+ preempt_enable();3232+ }34333535-static inline int notify_page_fault(enum die_val val, const char *str,3636- struct pt_regs *regs, long err, int trap, int sig)3737-{3838- struct die_args args = {3939- .regs = regs,4040- .str = str,4141- .err = err,4242- .trapnr = trap,4343- .signr = sig4444- };4545- return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args);3434+ return ret;4635}4736#else4848-static inline int notify_page_fault(enum die_val val, const char *str,4949- struct pt_regs *regs, long err, int trap, int sig)3737+static inline int notify_page_fault(struct pt_regs *regs, int trap)5038{5151- return NOTIFY_DONE;3939+ return 0;5240}5341#endif5442···105117 /*106118 * This is to handle the kprobes on user space access instructions107119 */108108- if (notify_page_fault(DIE_PAGE_FAULT, "page fault", regs, code, TRAP_BRKPT,109109- SIGSEGV) == NOTIFY_STOP)120120+ if (notify_page_fault(regs, TRAP_BRKPT))110121 return;111122112123 down_read(&mm->mmap_sem);
+6-6
arch/ia64/sn/kernel/bte.c
···6363 * Use the block transfer engine to move kernel memory from src to dest6464 * using the assigned mode.6565 *6666- * Paramaters:6666+ * Parameters:6767 * src - physical address of the transfer source.6868 * dest - physical address of the transfer destination.6969 * len - number of bytes to transfer from source to dest.···247247 * use the block transfer engine to move kernel248248 * memory from src to dest using the assigned mode.249249 *250250- * Paramaters:250250+ * Parameters:251251 * src - physical address of the transfer source.252252 * dest - physical address of the transfer destination.253253 * len - number of bytes to transfer from source to dest.···255255 * for IBCT0/1 in the SGI documentation.256256 *257257 * NOTE: If the source, dest, and len are all cache line aligned,258258- * then it would be _FAR_ preferrable to use bte_copy instead.258258+ * then it would be _FAR_ preferable to use bte_copy instead.259259 */260260bte_result_t bte_unaligned_copy(u64 src, u64 dest, u64 len, u64 mode)261261{···300300 * a standard bte copy.301301 *302302 * One nasty exception to the above rule is when the303303- * source and destination are not symetrically303303+ * source and destination are not symmetrically304304 * mis-aligned. If the source offset from the first305305 * cache line is different from the destination offset,306306 * we make the first section be the entire transfer···337337338338 if (footBcopyDest == (headBcopyDest + headBcopyLen)) {339339 /*340340- * We have two contigous bcopy340340+ * We have two contiguous bcopy341341 * blocks. Merge them.342342 */343343 headBcopyLen += footBcopyLen;···375375 } else {376376377377 /*378378- * The transfer is not symetric, we will378378+ * The transfer is not symmetric, we will379379 * allocate a buffer large enough for all the380380 * data, bte_copy into that buffer and then381381 * bcopy to the destination.
+2-2
arch/ia64/sn/kernel/bte_error.c
···105105 }106106107107 BTE_PRINTK(("eh:%p:%d Cleaning up\n", err_nodepda, smp_processor_id()));108108- /* Reenable both bte interfaces */108108+ /* Re-enable both bte interfaces */109109 imem.ii_imem_regval = REMOTE_HUB_L(nasid, IIO_IMEM);110110 imem.ii_imem_fld_s.i_b0_esd = imem.ii_imem_fld_s.i_b1_esd = 1;111111 REMOTE_HUB_S(nasid, IIO_IMEM, imem.ii_imem_regval);···243243244244 /*245245 * The caller has already figured out the error type, we save that246246- * in the bte handle structure for the thread excercising the246246+ * in the bte handle structure for the thread exercising the247247 * interface to consume.248248 */249249 bte->bh_error = ioe->ie_errortype + BTEFAIL_OFFSET;
+1-1
arch/ia64/sn/kernel/io_common.c
···479479 }480480481481 /*482482- * prime sn_pci_provider[]. Individial provider init routines will482482+ * prime sn_pci_provider[]. Individual provider init routines will483483 * override their respective default entries.484484 */485485
+1-1
arch/ia64/sn/kernel/setup.c
···167167 * IO on SN2 is done via SAL calls, early_printk won't work without this.168168 *169169 * This code duplicates some of the ACPI table parsing that is in efi.c & sal.c.170170- * Any changes to those file may have to be made hereas well.170170+ * Any changes to those file may have to be made here as well.171171 */172172 efi_systab = (efi_system_table_t *) __va(ia64_boot_param->efi_systab);173173 config_tables = __va(efi_systab->tables);
+1-1
arch/ia64/sn/kernel/sn2/sn2_smp.c
···104104 *105105 * SN2 PIO writes from separate CPUs are not guaranteed to arrive in order.106106 * Context switching user threads which have memory-mapped MMIO may cause107107- * PIOs to issue from seperate CPUs, thus the PIO writes must be drained107107+ * PIOs to issue from separate CPUs, thus the PIO writes must be drained108108 * from the previous CPU's Shub before execution resumes on the new CPU.109109 */110110void sn_migrate(struct task_struct *task)
+4-4
arch/ia64/sn/kernel/xpc_channel.c
···293293294294295295/*296296- * Pull the remote per partititon specific variables from the specified296296+ * Pull the remote per partition specific variables from the specified297297 * partition.298298 */299299enum xpc_retval···461461 // >>> may want to check for ch->flags & XPC_C_DISCONNECTING between462462 // >>> iterations of the for-loop, bail if set?463463464464- // >>> should we impose a minumum #of entries? like 4 or 8?464464+ // >>> should we impose a minimum #of entries? like 4 or 8?465465 for (nentries = ch->local_nentries; nentries > 0; nentries--) {466466467467 nbytes = nentries * ch->msg_size;···514514 // >>> may want to check for ch->flags & XPC_C_DISCONNECTING between515515 // >>> iterations of the for-loop, bail if set?516516517517- // >>> should we impose a minumum #of entries? like 4 or 8?517517+ // >>> should we impose a minimum #of entries? like 4 or 8?518518 for (nentries = ch->remote_nentries; nentries > 0; nentries--) {519519520520 nbytes = nentries * ch->msg_size;···147814781479147914801480 /*14811481- * Before proceding with the teardown we have to wait until all14811481+ * Before proceeding with the teardown we have to wait until all14821482 * existing references cease.14831483 */14841484 wait_event(part->teardown_wq, (atomic_read(&part->references) == 0));
+1-1
arch/ia64/sn/kernel/xpnet.c
···531531 dev_dbg(xpnet, "destination Partitions mask (dp) = 0x%lx\n", dp);532532533533 /*534534- * If we wanted to allow promiscous mode to work like an534534+ * If we wanted to allow promiscuous mode to work like an535535 * unswitched network, this would be a good point to OR in a536536 * mask of partitions which should be receiving all packets.537537 */
+4-4
arch/ia64/sn/pci/pci_dma.c
···333333 /*334334 * First, try the SN_SAL_IOIF_PCI_SAFE SAL call which can work335335 * around hw issues at the pci bus level. SGI proms older than336336- * 4.10 don't implment this.336336+ * 4.10 don't implement this.337337 */338338339339 SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE,···348348 /*349349 * If the above failed, retry using the SAL_PROBE call which should350350 * be present in all proms (but which cannot work round PCI chipset351351- * bugs). This code is retained for compatability with old351351+ * bugs). This code is retained for compatibility with old352352 * pre-4.10 proms, and should be removed at some point in the future.353353 */354354···379379 /*380380 * First, try the SN_SAL_IOIF_PCI_SAFE SAL call which can work381381 * around hw issues at the pci bus level. SGI proms older than382382- * 4.10 don't implment this.382382+ * 4.10 don't implement this.383383 */384384385385 SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE,···394394 /*395395 * If the above failed, retry using the SAL_PROBE call which should396396 * be present in all proms (but which cannot work round PCI chipset397397- * bugs). This code is retained for compatability with old397397+ * bugs). This code is retained for compatibility with old398398 * pre-4.10 proms, and should be removed at some point in the future.399399 */400400
+3-3
arch/ia64/sn/pci/pcibr/pcibr_ate.c
···30303131/*3232 * find_free_ate: Find the first free ate index starting from the given3333- * index for the desired consequtive count.3333+ * index for the desired consecutive count.3434 */3535static int find_free_ate(struct ate_resource *ate_resource, int start,3636 int count)···8888 return -1;89899090 /*9191- * Find the required number of free consequtive ates.9191+ * Find the required number of free consecutive ates.9292 */9393 start_index =9494 find_free_ate(ate_resource, ate_resource->lowest_free_index,···105105/*106106 * Allocate "count" contiguous Bridge Address Translation Entries107107 * on the specified bridge to be used for PCI to XTALK mappings.108108- * Indices in rm map range from 1..num_entries. Indicies returned108108+ * Indices in rm map range from 1..num_entries. Indices returned109109 * to caller range from 0..num_entries-1.110110 *111111 * Return the start index on success, -1 on failure.
+1-1
arch/ia64/sn/pci/pcibr/pcibr_dma.c
···201201}202202203203/*204204- * Wrapper routine for free'ing DMA maps204204+ * Wrapper routine for freeing DMA maps205205 * DMA mappings for Direct 64 and 32 do not have any DMA maps.206206 */207207void
+3-3
arch/ia64/sn/pci/tioca_provider.c
···223223224224 /*225225 * Scan all vga controllers on this bus making sure they all226226- * suport FW. If not, return.226226+ * support FW. If not, return.227227 */228228229229 list_for_each_entry(pdev, tioca_kern->ca_devices, bus_list) {···364364 * @req_size: len (bytes) to map365365 *366366 * Map @paddr into CA address space using the GART mechanism. The mapped367367- * dma_addr_t is guarenteed to be contiguous in CA bus space.367367+ * dma_addr_t is guaranteed to be contiguous in CA bus space.368368 */369369static dma_addr_t370370tioca_dma_mapped(struct pci_dev *pdev, u64 paddr, size_t req_size)···526526 return 0;527527528528 /*529529- * If card is 64 or 48 bit addresable, use a direct mapping. 32529529+ * If card is 64 or 48 bit addressable, use a direct mapping. 32530530 * bit direct is so restrictive w.r.t. where the memory resides that531531 * we don't use it even though CA has some support.532532 */
+8-8
arch/ia64/sn/pci/tioce_provider.c
···256256 * @ct_addr: the coretalk address to map257257 * @len: number of bytes to map258258 *259259- * Given the addressing type, set up various paramaters that define the259259+ * Given the addressing type, set up various parameters that define the260260 * ATE pool to use. Search for a contiguous block of entries to cover the261261- * length, and if enough resources exist, fill in the ATE's and construct a261261+ * length, and if enough resources exist, fill in the ATEs and construct a262262 * tioce_dmamap struct to track the mapping.263263 */264264static u64···581581 */582582 if (!mapaddr && !barrier && dma_mask >= 0xffffffffffUL) {583583 /*584584- * We have two options for 40-bit mappings: 16GB "super" ATE's585585- * and 64MB "regular" ATE's. We'll try both if needed for a584584+ * We have two options for 40-bit mappings: 16GB "super" ATEs585585+ * and 64MB "regular" ATEs. We'll try both if needed for a586586 * given mapping but which one we try first depends on the587587 * size. For requests >64MB, prefer to use a super page with588588 * regular as the fallback. Otherwise, try in the reverse order.···687687}688688689689/**690690- * tioce_reserve_m32 - reserve M32 ate's for the indicated address range691691- * @tioce_kernel: TIOCE context to reserve ate's for690690+ * tioce_reserve_m32 - reserve M32 ATEs for the indicated address range691691+ * @tioce_kernel: TIOCE context to reserve ATEs for692692 * @base: starting bus address to reserve693693 * @limit: last bus address to reserve694694 *···763763764764 /*765765 * Set PMU pagesize to the largest size available, and zero out766766- * the ate's.766766+ * the ATEs.767767 */768768769769 tioce_mmr = (struct tioce __iomem *)tioce_common->ce_pcibus.bs_base;···784784 }785785786786 /*787787- * Reserve ATE's corresponding to reserved address ranges. These787787+ * Reserve ATEs corresponding to reserved address ranges. These788788 * include:789789 *790790 * Memory space covered by each PPB mem base/limit register
···18431843 mov %o1, %o0184418441: retl18451845 nop18461846+18471847+ /* %o0: API group number18481848+ * %o1: pointer to unsigned long major number storage18491849+ * %o2: pointer to unsigned long minor number storage18501850+ *18511851+ * returns %o0: status18521852+ */18531853+ .globl sun4v_get_version18541854+sun4v_get_version:18551855+ mov HV_CORE_GET_VER, %o518561856+ mov %o1, %o318571857+ mov %o2, %o418581858+ ta HV_CORE_TRAP18591859+ stx %o1, [%o3]18601860+ retl18611861+ stx %o2, [%o4]18621862+18631863+ /* %o0: API group number18641864+ * %o1: desired major number18651865+ * %o2: desired minor number18661866+ * %o3: pointer to unsigned long actual minor number storage18671867+ *18681868+ * returns %o0: status18691869+ */18701870+ .globl sun4v_set_version18711871+sun4v_set_version:18721872+ mov HV_CORE_SET_VER, %o518731873+ mov %o3, %o418741874+ ta HV_CORE_TRAP18751875+ retl18761876+ stx %o1, [%o4]18771877+18781878+ /* %o0: pointer to unsigned long status18791879+ *18801880+ * returns %o0: signed character18811881+ */18821882+ .globl sun4v_con_getchar18831883+sun4v_con_getchar:18841884+ mov %o0, %o418851885+ mov HV_FAST_CONS_GETCHAR, %o518861886+ clr %o018871887+ clr %o118881888+ ta HV_FAST_TRAP18891889+ stx %o0, [%o4]18901890+ retl18911891+ sra %o1, 0, %o018921892+18931893+ /* %o0: signed long character18941894+ *18951895+ * returns %o0: status18961896+ */18971897+ .globl sun4v_con_putchar18981898+sun4v_con_putchar:18991899+ mov HV_FAST_CONS_PUTCHAR, %o519001900+ ta HV_FAST_TRAP19011901+ retl19021902+ sra %o0, 0, %o019031903+19041904+ /* %o0: buffer real address19051905+ * %o1: buffer size19061906+ * %o2: pointer to unsigned long bytes_read19071907+ *19081908+ * returns %o0: status19091909+ */19101910+ .globl sun4v_con_read19111911+sun4v_con_read:19121912+ mov %o2, %o419131913+ mov HV_FAST_CONS_READ, %o519141914+ ta HV_FAST_TRAP19151915+ brnz %o0, 1f19161916+ cmp %o1, -1 /* break */19171917+ be,a,pn %icc, 1f19181918+ mov %o1, %o019191919+ cmp %o1, -2 /* hup */19201920+ be,a,pn %icc, 1f19211921+ mov %o1, %o019221922+ stx %o1, [%o4]19231923+1: retl19241924+ nop19251925+19261926+ /* %o0: buffer real address19271927+ * %o1: buffer size19281928+ * %o2: pointer to unsigned long bytes_written19291929+ *19301930+ * returns %o0: status19311931+ */19321932+ .globl sun4v_con_write19331933+sun4v_con_write:19341934+ mov %o2, %o419351935+ mov HV_FAST_CONS_WRITE, %o519361936+ ta HV_FAST_TRAP19371937+ stx %o1, [%o4]19381938+ retl19391939+ nop
+189
arch/sparc64/kernel/hvapi.c
···11+/* hvapi.c: Hypervisor API management.22+ *33+ * Copyright (C) 2007 David S. Miller <davem@davemloft.net>44+ */55+#include <linux/kernel.h>66+#include <linux/module.h>77+#include <linux/init.h>88+#include <linux/slab.h>99+1010+#include <asm/hypervisor.h>1111+#include <asm/oplib.h>1212+1313+/* If the hypervisor indicates that the API setting1414+ * calls are unsupported, by returning HV_EBADTRAP or1515+ * HV_ENOTSUPPORTED, we assume that API groups with the1616+ * PRE_API flag set are major 1 minor 0.1717+ */1818+struct api_info {1919+ unsigned long group;2020+ unsigned long major;2121+ unsigned long minor;2222+ unsigned int refcnt;2323+ unsigned int flags;2424+#define FLAG_PRE_API 0x000000012525+};2626+2727+static struct api_info api_table[] = {2828+ { .group = HV_GRP_SUN4V, .flags = FLAG_PRE_API },2929+ { .group = HV_GRP_CORE, .flags = FLAG_PRE_API },3030+ { .group = HV_GRP_INTR, },3131+ { .group = HV_GRP_SOFT_STATE, },3232+ { .group = HV_GRP_PCI, .flags = FLAG_PRE_API },3333+ { .group = HV_GRP_LDOM, },3434+ { .group = HV_GRP_SVC_CHAN, .flags = FLAG_PRE_API },3535+ { .group = HV_GRP_NCS, .flags = FLAG_PRE_API },3636+ { .group = HV_GRP_NIAG_PERF, .flags = FLAG_PRE_API },3737+ { .group = HV_GRP_FIRE_PERF, },3838+ { .group = HV_GRP_DIAG, .flags = FLAG_PRE_API },3939+};4040+4141+static DEFINE_SPINLOCK(hvapi_lock);4242+4343+static struct api_info *__get_info(unsigned long group)4444+{4545+ int i;4646+4747+ for (i = 0; i < ARRAY_SIZE(api_table); i++) {4848+ if (api_table[i].group == group)4949+ return &api_table[i];5050+ }5151+ return NULL;5252+}5353+5454+static void __get_ref(struct api_info *p)5555+{5656+ p->refcnt++;5757+}5858+5959+static void __put_ref(struct api_info *p)6060+{6161+ if (--p->refcnt == 0) {6262+ unsigned long ignore;6363+6464+ sun4v_set_version(p->group, 0, 0, &ignore);6565+ p->major = p->minor = 0;6666+ }6767+}6868+6969+/* Register a hypervisor API specification. It indicates the7070+ * API group and desired major+minor.7171+ *7272+ * If an existing API registration exists '0' (success) will7373+ * be returned if it is compatible with the one being registered.7474+ * Otherwise a negative error code will be returned.7575+ *7676+ * Otherwise an attempt will be made to negotiate the requested7777+ * API group/major/minor with the hypervisor, and errors returned7878+ * if that does not succeed.7979+ */8080+int sun4v_hvapi_register(unsigned long group, unsigned long major,8181+ unsigned long *minor)8282+{8383+ struct api_info *p;8484+ unsigned long flags;8585+ int ret;8686+8787+ spin_lock_irqsave(&hvapi_lock, flags);8888+ p = __get_info(group);8989+ ret = -EINVAL;9090+ if (p) {9191+ if (p->refcnt) {9292+ ret = -EINVAL;9393+ if (p->major == major) {9494+ *minor = p->minor;9595+ ret = 0;9696+ }9797+ } else {9898+ unsigned long actual_minor;9999+ unsigned long hv_ret;100100+101101+ hv_ret = sun4v_set_version(group, major, *minor,102102+ &actual_minor);103103+ ret = -EINVAL;104104+ if (hv_ret == HV_EOK) {105105+ *minor = actual_minor;106106+ p->major = major;107107+ p->minor = actual_minor;108108+ ret = 0;109109+ } else if (hv_ret == HV_EBADTRAP ||110110+ HV_ENOTSUPPORTED) {111111+ if (p->flags & FLAG_PRE_API) {112112+ if (major == 1) {113113+ p->major = 1;114114+ p->minor = 0;115115+ *minor = 0;116116+ ret = 0;117117+ }118118+ }119119+ }120120+ }121121+122122+ if (ret == 0)123123+ __get_ref(p);124124+ }125125+ spin_unlock_irqrestore(&hvapi_lock, flags);126126+127127+ return ret;128128+}129129+EXPORT_SYMBOL(sun4v_hvapi_register);130130+131131+void sun4v_hvapi_unregister(unsigned long group)132132+{133133+ struct api_info *p;134134+ unsigned long flags;135135+136136+ spin_lock_irqsave(&hvapi_lock, flags);137137+ p = __get_info(group);138138+ if (p)139139+ __put_ref(p);140140+ spin_unlock_irqrestore(&hvapi_lock, flags);141141+}142142+EXPORT_SYMBOL(sun4v_hvapi_unregister);143143+144144+int sun4v_hvapi_get(unsigned long group,145145+ unsigned long *major,146146+ unsigned long *minor)147147+{148148+ struct api_info *p;149149+ unsigned long flags;150150+ int ret;151151+152152+ spin_lock_irqsave(&hvapi_lock, flags);153153+ ret = -EINVAL;154154+ p = __get_info(group);155155+ if (p && p->refcnt) {156156+ *major = p->major;157157+ *minor = p->minor;158158+ ret = 0;159159+ }160160+ spin_unlock_irqrestore(&hvapi_lock, flags);161161+162162+ return ret;163163+}164164+EXPORT_SYMBOL(sun4v_hvapi_get);165165+166166+void __init sun4v_hvapi_init(void)167167+{168168+ unsigned long group, major, minor;169169+170170+ group = HV_GRP_SUN4V;171171+ major = 1;172172+ minor = 0;173173+ if (sun4v_hvapi_register(group, major, &minor))174174+ goto bad;175175+176176+ group = HV_GRP_CORE;177177+ major = 1;178178+ minor = 1;179179+ if (sun4v_hvapi_register(group, major, &minor))180180+ goto bad;181181+182182+ return;183183+184184+bad:185185+ prom_printf("HVAPI: Cannot register API group "186186+ "%lx with major(%u) minor(%u)\n",187187+ group, major, minor);188188+ prom_halt();189189+}
···321321322322 /* Don't continue if device has no _ADR method.323323 * _GTF is intended for known motherboard devices. */324324- if (!(ap->cbl == ATA_CBL_SATA)) {324324+ if (!(ap->flags & ATA_FLAG_ACPI_SATA)) {325325 err = pata_get_dev_handle(gdev, &dev_handle, &pcidevfn);326326 if (err < 0) {327327 if (ata_msg_probe(ap))···343343344344 /* Get this drive's _ADR info. if not already known. */345345 if (!dev->obj_handle) {346346- if (!(ap->cbl == ATA_CBL_SATA)) {346346+ if (!(ap->flags & ATA_FLAG_ACPI_SATA)) {347347 /* get child objects of dev_handle == channel objects,348348 * + _their_ children == drive objects */349349 /* channel is ap->port_no */···528528 ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER: port#: %d\n",529529 __FUNCTION__, ap->port_no);530530531531- if (libata_noacpi || !(ap->cbl == ATA_CBL_SATA))531531+ if (libata_noacpi || !(ap->flags & ATA_FLAG_ACPI_SATA))532532 return 0;533533534534 if (!ata_dev_enabled(dev) || (ap->flags & ATA_FLAG_DISABLED))···578578 * we should not run GTF on PATA devices since some579579 * PATA require execution of GTM/STM before GTF.580580 */581581- if (!(ap->cbl == ATA_CBL_SATA))581581+ if (!(ap->flags & ATA_FLAG_ACPI_SATA))582582 return 0;583583584584 for (ix = 0; ix < ATA_MAX_DEVICES; ix++) {···641641 __FUNCTION__, dev->devno, ap->port_no);642642643643 /* Don't continue if not a SATA device. */644644- if (!(ap->cbl == ATA_CBL_SATA)) {644644+ if (!(ap->flags & ATA_FLAG_ACPI_SATA)) {645645 if (ata_msg_probe(ap))646646 ata_dev_printk(dev, KERN_DEBUG,647647 "%s: Not a SATA device\n", __FUNCTION__);
+50-32
drivers/ata/libata-core.c
···19191919 snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id));1920192019211921 dev->n_sectors = ata_id_n_sectors(id);19221922- dev->n_sectors_boot = dev->n_sectors;1923192219241923 /* SCSI only uses 4-char revisions, dump full 8 chars from ATA */19251924 ata_id_c_string(dev->id, fwrevbuf, ATA_ID_FW_REV,···36313632 const u16 *old_id = dev->id;36323633 unsigned char model[2][ATA_ID_PROD_LEN + 1];36333634 unsigned char serial[2][ATA_ID_SERNO_LEN + 1];36343634- u64 new_n_sectors;3635363536363636 if (dev->class != new_class) {36373637 ata_dev_printk(dev, KERN_INFO, "class mismatch %d != %d\n",···36423644 ata_id_c_string(new_id, model[1], ATA_ID_PROD, sizeof(model[1]));36433645 ata_id_c_string(old_id, serial[0], ATA_ID_SERNO, sizeof(serial[0]));36443646 ata_id_c_string(new_id, serial[1], ATA_ID_SERNO, sizeof(serial[1]));36453645- new_n_sectors = ata_id_n_sectors(new_id);3646364736473648 if (strcmp(model[0], model[1])) {36483649 ata_dev_printk(dev, KERN_INFO, "model number mismatch "···36553658 return 0;36563659 }3657366036583658- if (dev->class == ATA_DEV_ATA && dev->n_sectors != new_n_sectors) {36593659- ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch "36603660- "%llu != %llu\n",36613661- (unsigned long long)dev->n_sectors,36623662- (unsigned long long)new_n_sectors);36633663- /* Are we the boot time size - if so we appear to be the36643664- same disk at this point and our HPA got reapplied */36653665- if (ata_ignore_hpa && dev->n_sectors_boot == new_n_sectors 36663666- && ata_id_hpa_enabled(new_id))36673667- return 1;36683668- return 0;36693669- }36703670-36713661 return 1;36723662}3673366336743664/**36753675- * ata_dev_revalidate - Revalidate ATA device36763676- * @dev: device to revalidate36653665+ * ata_dev_reread_id - Re-read IDENTIFY data36663666+ * @adev: target ATA device36773667 * @readid_flags: read ID flags36783668 *36793669 * Re-read IDENTIFY page and make sure @dev is still attached to···36723688 * RETURNS:36733689 * 0 on success, negative errno otherwise36743690 */36753675-int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags)36913691+int ata_dev_reread_id(struct ata_device *dev, unsigned int readid_flags)36763692{36773693 unsigned int class = dev->class;36783694 u16 *id = (void *)dev->ap->sector_buf;36793695 int rc;3680369636813681- if (!ata_dev_enabled(dev)) {36823682- rc = -ENODEV;36833683- goto fail;36843684- }36853685-36863697 /* read ID data */36873698 rc = ata_dev_read_id(dev, &class, readid_flags, id);36883699 if (rc)36893689- goto fail;37003700+ return rc;3690370136913702 /* is the device still there? */36923692- if (!ata_dev_same_device(dev, class, id)) {37033703+ if (!ata_dev_same_device(dev, class, id))37043704+ return -ENODEV;37053705+37063706+ memcpy(dev->id, id, sizeof(id[0]) * ATA_ID_WORDS);37073707+ return 0;37083708+}37093709+37103710+/**37113711+ * ata_dev_revalidate - Revalidate ATA device37123712+ * @dev: device to revalidate37133713+ * @readid_flags: read ID flags37143714+ *37153715+ * Re-read IDENTIFY page, make sure @dev is still attached to the37163716+ * port and reconfigure it according to the new IDENTIFY page.37173717+ *37183718+ * LOCKING:37193719+ * Kernel thread context (may sleep)37203720+ *37213721+ * RETURNS:37223722+ * 0 on success, negative errno otherwise37233723+ */37243724+int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags)37253725+{37263726+ u64 n_sectors = dev->n_sectors;37273727+ int rc;37283728+37293729+ if (!ata_dev_enabled(dev))37303730+ return -ENODEV;37313731+37323732+ /* re-read ID */37333733+ rc = ata_dev_reread_id(dev, readid_flags);37343734+ if (rc)37353735+ goto fail;37363736+37373737+ /* configure device according to the new ID */37383738+ rc = ata_dev_configure(dev);37393739+ if (rc)37403740+ goto fail;37413741+37423742+ /* verify n_sectors hasn't changed */37433743+ if (dev->class == ATA_DEV_ATA && dev->n_sectors != n_sectors) {37443744+ ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch "37453745+ "%llu != %llu\n",37463746+ (unsigned long long)n_sectors,37473747+ (unsigned long long)dev->n_sectors);36933748 rc = -ENODEV;36943749 goto fail;36953750 }3696375136973697- memcpy(dev->id, id, sizeof(id[0]) * ATA_ID_WORDS);36983698-36993699- /* configure device according to the new ID */37003700- rc = ata_dev_configure(dev);37013701- if (rc == 0)37023702- return 0;37523752+ return 0;3703375337043754 fail:37053755 ata_dev_printk(dev, KERN_ERR, "revalidation failed (errno=%d)\n", rc);
+36-8
drivers/ata/libata-scsi.c
···893893 return queue_depth;894894}895895896896+/* XXX: for ata_spindown_compat */897897+static void ata_delayed_done_timerfn(unsigned long arg)898898+{899899+ struct scsi_cmnd *scmd = (void *)arg;900900+901901+ scmd->scsi_done(scmd);902902+}903903+904904+/* XXX: for ata_spindown_compat */905905+static void ata_delayed_done(struct scsi_cmnd *scmd)906906+{907907+ static struct timer_list timer;908908+909909+ setup_timer(&timer, ata_delayed_done_timerfn, (unsigned long)scmd);910910+ mod_timer(&timer, jiffies + 5 * HZ);911911+}912912+896913/**897914 * ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command898915 * @qc: Storage for translated ATA taskfile···967950 * for more info.968951 */969952 if (ata_spindown_compat &&953953+ (qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&970954 (system_state == SYSTEM_HALT ||971955 system_state == SYSTEM_POWER_OFF)) {972972- static int warned = 0;956956+ static unsigned long warned = 0;973957974974- if (!warned) {975975- spin_unlock_irq(qc->ap->lock);958958+ if (!test_and_set_bit(0, &warned)) {976959 ata_dev_printk(qc->dev, KERN_WARNING,977960 "DISK MIGHT NOT BE SPUN DOWN PROPERLY. "978961 "UPDATE SHUTDOWN UTILITY\n");979962 ata_dev_printk(qc->dev, KERN_WARNING,980963 "For more info, visit "981964 "http://linux-ata.org/shutdown.html\n");982982- warned = 1;983983- ssleep(5);984984- spin_lock_irq(qc->ap->lock);965965+966966+ /* ->scsi_done is not used, use it for967967+ * delayed completion.968968+ */969969+ scmd->scsi_done = qc->scsidone;970970+ qc->scsidone = ata_delayed_done;985971 }986972 scmd->result = SAM_STAT_GOOD;987973 return 1;···13951375 }13961376 }1397137713781378+ /* XXX: track spindown state for spindown_compat */13791379+ if (unlikely(qc->tf.command == ATA_CMD_STANDBY ||13801380+ qc->tf.command == ATA_CMD_STANDBYNOW1))13811381+ qc->dev->flags |= ATA_DFLAG_SPUNDOWN;13821382+ else if (likely(system_state != SYSTEM_HALT &&13831383+ system_state != SYSTEM_POWER_OFF))13841384+ qc->dev->flags &= ~ATA_DFLAG_SPUNDOWN;13851385+13981386 if (need_sense && !ap->ops->error_handler)13991387 ata_dump_status(ap->print_id, &qc->result_tf);14001388···1516148815171489early_finish:15181490 ata_qc_free(qc);15191519- done(cmd);14911491+ qc->scsidone(cmd);15201492 DPRINTK("EXIT - early finish (good or error)\n");15211493 return 0;1522149415231495err_did:15241496 ata_qc_free(qc);15251497 cmd->result = (DID_ERROR << 16);15261526- done(cmd);14981498+ qc->scsidone(cmd);15271499err_mem:15281500 DPRINTK("EXIT - internal\n");15291501 return 0;
+2-1
drivers/ata/libata.h
···7676extern unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd);7777extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,7878 unsigned int flags, u16 *id);7979-extern int ata_dev_revalidate(struct ata_device *dev, unsigned int flags);7979+extern int ata_dev_reread_id(struct ata_device *dev, unsigned int readid_flags);8080+extern int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags);8081extern int ata_dev_configure(struct ata_device *dev);8182extern int sata_down_spd_limit(struct ata_port *ap);8283extern int sata_set_spd_needed(struct ata_port *ap);
+2-2
drivers/ata/pata_scc.c
···864864 * @ap: ATA port to be reset865865 */866866867867-static int scc_pata_prereset (struct ata_port *ap)867867+static int scc_pata_prereset (struct ata_port *ap, unsigned long deadline)868868{869869 ap->cbl = ATA_CBL_PATA80;870870- return ata_std_prereset(ap);870870+ return ata_std_prereset(ap, deadline);871871}872872873873/**
···11/* sunhv.c: Serial driver for SUN4V hypervisor console.22 *33- * Copyright (C) 2006 David S. Miller (davem@davemloft.net)33+ * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)44 */5566#include <linux/module.h>···3535#define CON_BREAK ((long)-1)3636#define CON_HUP ((long)-2)37373838-static inline long hypervisor_con_getchar(long *status)3939-{4040- register unsigned long func asm("%o5");4141- register unsigned long arg0 asm("%o0");4242- register unsigned long arg1 asm("%o1");4343-4444- func = HV_FAST_CONS_GETCHAR;4545- arg0 = 0;4646- arg1 = 0;4747- __asm__ __volatile__("ta %6"4848- : "=&r" (func), "=&r" (arg0), "=&r" (arg1)4949- : "0" (func), "1" (arg0), "2" (arg1),5050- "i" (HV_FAST_TRAP));5151-5252- *status = arg0;5353-5454- return (long) arg1;5555-}5656-5757-static inline long hypervisor_con_putchar(long ch)5858-{5959- register unsigned long func asm("%o5");6060- register unsigned long arg0 asm("%o0");6161-6262- func = HV_FAST_CONS_PUTCHAR;6363- arg0 = ch;6464- __asm__ __volatile__("ta %4"6565- : "=&r" (func), "=&r" (arg0)6666- : "0" (func), "1" (arg0), "i" (HV_FAST_TRAP));6767-6868- return (long) arg0;6969-}7070-7138#define IGNORE_BREAK 0x17239#define IGNORE_ALL 0x273404141+static char *con_write_page;4242+static char *con_read_page;4343+7444static int hung_up = 0;75457676-static struct tty_struct *receive_chars(struct uart_port *port)4646+static void transmit_chars_putchar(struct uart_port *port, struct circ_buf *xmit)7747{7878- struct tty_struct *tty = NULL;4848+ while (!uart_circ_empty(xmit)) {4949+ long status = sun4v_con_putchar(xmit->buf[xmit->tail]);5050+5151+ if (status != HV_EOK)5252+ break;5353+5454+ xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);5555+ port->icount.tx++;5656+ }5757+}5858+5959+static void transmit_chars_write(struct uart_port *port, struct circ_buf *xmit)6060+{6161+ while (!uart_circ_empty(xmit)) {6262+ unsigned long ra = __pa(xmit->buf + xmit->tail);6363+ unsigned long len, status, sent;6464+6565+ len = CIRC_CNT_TO_END(xmit->head, xmit->tail,6666+ UART_XMIT_SIZE);6767+ status = sun4v_con_write(ra, len, &sent);6868+ if (status != HV_EOK)6969+ break;7070+ xmit->tail = (xmit->tail + sent) & (UART_XMIT_SIZE - 1);7171+ port->icount.tx += sent;7272+ }7373+}7474+7575+static int receive_chars_getchar(struct uart_port *port, struct tty_struct *tty)7676+{7977 int saw_console_brk = 0;8078 int limit = 10000;81798282- if (port->info != NULL) /* Unopened serial console */8383- tty = port->info->tty;8484-8580 while (limit-- > 0) {8681 long status;8787- long c = hypervisor_con_getchar(&status);8888- unsigned char flag;8282+ long c = sun4v_con_getchar(&status);89839084 if (status == HV_EWOULDBLOCK)9185 break;···104110 continue;105111 }106112107107- flag = TTY_NORMAL;108113 port->icount.rx++;109109- if (c == CON_BREAK) {110110- port->icount.brk++;111111- if (uart_handle_break(port))112112- continue;113113- flag = TTY_BREAK;114114- }115114116115 if (uart_handle_sysrq_char(port, c))117116 continue;118117119119- if ((port->ignore_status_mask & IGNORE_ALL) ||120120- ((port->ignore_status_mask & IGNORE_BREAK) &&121121- (c == CON_BREAK)))122122- continue;123123-124124- tty_insert_flip_char(tty, c, flag);118118+ tty_insert_flip_char(tty, c, TTY_NORMAL);125119 }126120127127- if (saw_console_brk)121121+ return saw_console_brk;122122+}123123+124124+static int receive_chars_read(struct uart_port *port, struct tty_struct *tty)125125+{126126+ int saw_console_brk = 0;127127+ int limit = 10000;128128+129129+ while (limit-- > 0) {130130+ unsigned long ra = __pa(con_read_page);131131+ unsigned long bytes_read, i;132132+ long stat = sun4v_con_read(ra, PAGE_SIZE, &bytes_read);133133+134134+ if (stat != HV_EOK) {135135+ bytes_read = 0;136136+137137+ if (stat == CON_BREAK) {138138+ if (uart_handle_break(port))139139+ continue;140140+ saw_console_brk = 1;141141+ *con_read_page = 0;142142+ bytes_read = 1;143143+ } else if (stat == CON_HUP) {144144+ hung_up = 1;145145+ uart_handle_dcd_change(port, 0);146146+ continue;147147+ } else {148148+ /* HV_EWOULDBLOCK, etc. */149149+ break;150150+ }151151+ }152152+153153+ if (hung_up) {154154+ hung_up = 0;155155+ uart_handle_dcd_change(port, 1);156156+ }157157+158158+ for (i = 0; i < bytes_read; i++)159159+ uart_handle_sysrq_char(port, con_read_page[i]);160160+161161+ if (tty == NULL)162162+ continue;163163+164164+ port->icount.rx += bytes_read;165165+166166+ tty_insert_flip_string(tty, con_read_page, bytes_read);167167+ }168168+169169+ return saw_console_brk;170170+}171171+172172+struct sunhv_ops {173173+ void (*transmit_chars)(struct uart_port *port, struct circ_buf *xmit);174174+ int (*receive_chars)(struct uart_port *port, struct tty_struct *tty);175175+};176176+177177+static struct sunhv_ops bychar_ops = {178178+ .transmit_chars = transmit_chars_putchar,179179+ .receive_chars = receive_chars_getchar,180180+};181181+182182+static struct sunhv_ops bywrite_ops = {183183+ .transmit_chars = transmit_chars_write,184184+ .receive_chars = receive_chars_read,185185+};186186+187187+static struct sunhv_ops *sunhv_ops = &bychar_ops;188188+189189+static struct tty_struct *receive_chars(struct uart_port *port)190190+{191191+ struct tty_struct *tty = NULL;192192+193193+ if (port->info != NULL) /* Unopened serial console */194194+ tty = port->info->tty;195195+196196+ if (sunhv_ops->receive_chars(port, tty))128197 sun_do_break();129198130199 return tty;···204147 if (uart_circ_empty(xmit) || uart_tx_stopped(port))205148 return;206149207207- while (!uart_circ_empty(xmit)) {208208- long status = hypervisor_con_putchar(xmit->buf[xmit->tail]);209209-210210- if (status != HV_EOK)211211- break;212212-213213- xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);214214- port->icount.tx++;215215- }150150+ sunhv_ops->transmit_chars(port, xmit);216151217152 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)218153 uart_write_wakeup(port);···261212 struct circ_buf *xmit = &port->info->xmit;262213263214 while (!uart_circ_empty(xmit)) {264264- long status = hypervisor_con_putchar(xmit->buf[xmit->tail]);215215+ long status = sun4v_con_putchar(xmit->buf[xmit->tail]);265216266217 if (status != HV_EOK)267218 break;···280231 spin_lock_irqsave(&port->lock, flags);281232282233 while (limit-- > 0) {283283- long status = hypervisor_con_putchar(ch);234234+ long status = sun4v_con_putchar(ch);284235 if (status == HV_EOK)285236 break;237237+ udelay(1);286238 }287239288240 spin_unlock_irqrestore(&port->lock, flags);···304254{305255 if (break_state) {306256 unsigned long flags;307307- int limit = 1000000;257257+ int limit = 10000;308258309259 spin_lock_irqsave(&port->lock, flags);310260311261 while (limit-- > 0) {312312- long status = hypervisor_con_putchar(CON_BREAK);262262+ long status = sun4v_con_putchar(CON_BREAK);313263 if (status == HV_EOK)314264 break;315315- udelay(2);265265+ udelay(1);316266 }317267318268 spin_unlock_irqrestore(&port->lock, flags);···409359410360static struct uart_port *sunhv_port;411361412412-static inline void sunhv_console_putchar(struct uart_port *port, char c)362362+/* Copy 's' into the con_write_page, decoding "\n" into363363+ * "\r\n" along the way. We have to return two lengths364364+ * because the caller needs to know how much to advance365365+ * 's' and also how many bytes to output via con_write_page.366366+ */367367+static int fill_con_write_page(const char *s, unsigned int n,368368+ unsigned long *page_bytes)413369{370370+ const char *orig_s = s;371371+ char *p = con_write_page;372372+ int left = PAGE_SIZE;373373+374374+ while (n--) {375375+ if (*s == '\n') {376376+ if (left < 2)377377+ break;378378+ *p++ = '\r';379379+ left--;380380+ } else if (left < 1)381381+ break;382382+ *p++ = *s++;383383+ left--;384384+ }385385+ *page_bytes = p - con_write_page;386386+ return s - orig_s;387387+}388388+389389+static void sunhv_console_write_paged(struct console *con, const char *s, unsigned n)390390+{391391+ struct uart_port *port = sunhv_port;414392 unsigned long flags;415415- int limit = 1000000;416393417394 spin_lock_irqsave(&port->lock, flags);395395+ while (n > 0) {396396+ unsigned long ra = __pa(con_write_page);397397+ unsigned long page_bytes;398398+ unsigned int cpy = fill_con_write_page(s, n,399399+ &page_bytes);418400419419- while (limit-- > 0) {420420- long status = hypervisor_con_putchar(c);421421- if (status == HV_EOK)422422- break;423423- udelay(2);401401+ n -= cpy;402402+ s += cpy;403403+ while (page_bytes > 0) {404404+ unsigned long written;405405+ int limit = 1000000;406406+407407+ while (limit--) {408408+ unsigned long stat;409409+410410+ stat = sun4v_con_write(ra, page_bytes,411411+ &written);412412+ if (stat == HV_EOK)413413+ break;414414+ udelay(1);415415+ }416416+ if (limit <= 0)417417+ break;418418+ page_bytes -= written;419419+ ra += written;420420+ }424421 }425425-426422 spin_unlock_irqrestore(&port->lock, flags);427423}428424429429-static void sunhv_console_write(struct console *con, const char *s, unsigned n)425425+static inline void sunhv_console_putchar(struct uart_port *port, char c)426426+{427427+ int limit = 1000000;428428+429429+ while (limit-- > 0) {430430+ long status = sun4v_con_putchar(c);431431+ if (status == HV_EOK)432432+ break;433433+ udelay(1);434434+ }435435+}436436+437437+static void sunhv_console_write_bychar(struct console *con, const char *s, unsigned n)430438{431439 struct uart_port *port = sunhv_port;440440+ unsigned long flags;432441 int i;433442443443+ spin_lock_irqsave(&port->lock, flags);434444 for (i = 0; i < n; i++) {435445 if (*s == '\n')436446 sunhv_console_putchar(port, '\r');437447 sunhv_console_putchar(port, *s++);438448 }449449+ spin_unlock_irqrestore(&port->lock, flags);439450}440451441452static struct console sunhv_console = {442453 .name = "ttyHV",443443- .write = sunhv_console_write,454454+ .write = sunhv_console_write_bychar,444455 .device = uart_console_device,445456 .flags = CON_PRINTBUFFER,446457 .index = -1,···521410static int __devinit hv_probe(struct of_device *op, const struct of_device_id *match)522411{523412 struct uart_port *port;413413+ unsigned long minor;524414 int err;525415526416 if (op->irqs[0] == 0xffffffff)···530418 port = kzalloc(sizeof(struct uart_port), GFP_KERNEL);531419 if (unlikely(!port))532420 return -ENOMEM;421421+422422+ minor = 1;423423+ if (sun4v_hvapi_register(HV_GRP_CORE, 1, &minor) == 0 &&424424+ minor >= 1) {425425+ err = -ENOMEM;426426+ con_write_page = kzalloc(PAGE_SIZE, GFP_KERNEL);427427+ if (!con_write_page)428428+ goto out_free_port;429429+430430+ con_read_page = kzalloc(PAGE_SIZE, GFP_KERNEL);431431+ if (!con_read_page)432432+ goto out_free_con_write_page;433433+434434+ sunhv_console.write = sunhv_console_write_paged;435435+ sunhv_ops = &bywrite_ops;436436+ }533437534438 sunhv_port = port;535439···565437566438 err = uart_register_driver(&sunhv_reg);567439 if (err)568568- goto out_free_port;440440+ goto out_free_con_read_page;569441570442 sunhv_reg.tty_driver->name_base = sunhv_reg.minor - 64;571443 sunserial_current_minor += 1;···590462out_unregister_driver:591463 sunserial_current_minor -= 1;592464 uart_unregister_driver(&sunhv_reg);465465+466466+out_free_con_read_page:467467+ kfree(con_read_page);468468+469469+out_free_con_write_page:470470+ kfree(con_write_page);593471594472out_free_port:595473 kfree(port);
+1-1
drivers/spi/spidev.c
···484484 * Reusing minors is fine so long as udev or mdev is working.485485 */486486 mutex_lock(&device_list_lock);487487- minor = find_first_zero_bit(minors, ARRAY_SIZE(minors));487487+ minor = find_first_zero_bit(minors, N_SPI_MINORS);488488 if (minor < N_SPI_MINORS) {489489 spidev->dev.parent = &spi->dev;490490 spidev->dev.class = &spidev_class;
···3030struct platform_device *3131at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n);32323333-struct lcdc_platform_data {3434- unsigned long fbmem_start;3535- unsigned long fbmem_size;3636-};3333+struct atmel_lcdfb_info;3734struct platform_device *3838-at32_add_device_lcdc(unsigned int id, struct lcdc_platform_data *data);3535+at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,3636+ unsigned long fbmem_start, unsigned long fbmem_len);39374038#endif /* __ASM_ARCH_BOARD_H */
+13-4
include/asm-avr32/kdebug.h
···5566/* Grossly misnamed. */77enum die_val {88- DIE_FAULT,98 DIE_BREAKPOINT,109 DIE_SSTEP,1111- DIE_PAGE_FAULT,1210};13111414-int register_page_fault_notifier(struct notifier_block *nb);1515-int unregister_page_fault_notifier(struct notifier_block *nb);1212+/*1313+ * These are only here because kprobes.c wants them to implement a1414+ * blatant layering violation. Will hopefully go away soon once all1515+ * architectures are updated.1616+ */1717+static inline int register_page_fault_notifier(struct notifier_block *nb)1818+{1919+ return 0;2020+}2121+static inline int unregister_page_fault_notifier(struct notifier_block *nb)2222+{2323+ return 0;2424+}16251726#endif /* __ASM_AVR32_KDEBUG_H */
+1
include/asm-avr32/kprobes.h
···2626 kprobe_opcode_t insn[MAX_INSN_SIZE];2727};28282929+extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);2930extern int kprobe_exceptions_notify(struct notifier_block *self,3031 unsigned long val, void *data);3132
···2828 */2929#include <linux/notifier.h>30303131-extern int register_page_fault_notifier(struct notifier_block *);3232-extern int unregister_page_fault_notifier(struct notifier_block *);3131+/*3232+ * These are only here because kprobes.c wants them to implement a3333+ * blatant layering violation. Will hopefully go away soon once all3434+ * architectures are updated.3535+ */3636+static inline int register_page_fault_notifier(struct notifier_block *nb)3737+{3838+ return 0;3939+}4040+static inline int unregister_page_fault_notifier(struct notifier_block *nb)4141+{4242+ return 0;4343+}33443445enum die_val {3546 DIE_BREAK = 1,3647 DIE_FAULT,3748 DIE_OOPS,3838- DIE_PAGE_FAULT,3949 DIE_MACHINE_HALT,4050 DIE_MACHINE_RESTART,4151 DIE_MCA_MONARCH_ENTER,
+1
include/asm-ia64/kprobes.h
···120120 unsigned short slot;121121};122122123123+extern int kprobes_fault_handler(struct pt_regs *regs, int trapnr);123124extern int kprobe_exceptions_notify(struct notifier_block *self,124125 unsigned long val, void *data);125126
···940940 */941941#define HV_FAST_CONS_PUTCHAR 0x61942942943943+/* con_read()944944+ * TRAP: HV_FAST_TRAP945945+ * FUNCTION: HV_FAST_CONS_READ946946+ * ARG0: buffer real address947947+ * ARG1: buffer size in bytes948948+ * RET0: status949949+ * RET1: bytes read or BREAK or HUP950950+ * ERRORS: EWOULDBLOCK No character available.951951+ *952952+ * Reads characters into a buffer from the console device. If no953953+ * character is available then an EWOULDBLOCK error is returned.954954+ * If a character is available, then the returned status is EOK955955+ * and the number of bytes read into the given buffer is provided956956+ * in RET1.957957+ *958958+ * A virtual BREAK is represented by the 64-bit RET1 value -1.959959+ *960960+ * A virtual HUP signal is represented by the 64-bit RET1 value -2.961961+ *962962+ * If BREAK or HUP are indicated, no bytes were read into buffer.963963+ */964964+#define HV_FAST_CONS_READ 0x62965965+966966+/* con_write()967967+ * TRAP: HV_FAST_TRAP968968+ * FUNCTION: HV_FAST_CONS_WRITE969969+ * ARG0: buffer real address970970+ * ARG1: buffer size in bytes971971+ * RET0: status972972+ * RET1: bytes written973973+ * ERRORS: EWOULDBLOCK Output buffer currently full, would block974974+ *975975+ * Send a characters in buffer to the console device. Breaks must be976976+ * sent using con_putchar().977977+ */978978+#define HV_FAST_CONS_WRITE 0x63979979+980980+#ifndef __ASSEMBLY__981981+extern long sun4v_con_getchar(long *status);982982+extern long sun4v_con_putchar(long c);983983+extern long sun4v_con_read(unsigned long buffer,984984+ unsigned long size,985985+ unsigned long *bytes_read);986986+extern unsigned long sun4v_con_write(unsigned long buffer,987987+ unsigned long size,988988+ unsigned long *bytes_written);989989+#endif990990+943991/* Trap trace services.944992 *945993 * The hypervisor provides a trap tracing capability for privileged···21692121#define HV_FAST_MMUSTAT_INFO 0x1032170212221712123/* Function numbers for HV_CORE_TRAP. */21722172-#define HV_CORE_VER 0x0021242124+#define HV_CORE_SET_VER 0x0021732125#define HV_CORE_PUTCHAR 0x0121742126#define HV_CORE_EXIT 0x0221272127+#define HV_CORE_GET_VER 0x0321282128+21292129+/* Hypervisor API groups for use with HV_CORE_SET_VER and21302130+ * HV_CORE_GET_VER.21312131+ */21322132+#define HV_GRP_SUN4V 0x000021332133+#define HV_GRP_CORE 0x000121342134+#define HV_GRP_INTR 0x000221352135+#define HV_GRP_SOFT_STATE 0x000321362136+#define HV_GRP_PCI 0x010021372137+#define HV_GRP_LDOM 0x010121382138+#define HV_GRP_SVC_CHAN 0x010221392139+#define HV_GRP_NCS 0x010321402140+#define HV_GRP_NIAG_PERF 0x020021412141+#define HV_GRP_FIRE_PERF 0x020121422142+#define HV_GRP_DIAG 0x030021432143+21442144+#ifndef __ASSEMBLY__21452145+extern unsigned long sun4v_get_version(unsigned long group,21462146+ unsigned long *major,21472147+ unsigned long *minor);21482148+extern unsigned long sun4v_set_version(unsigned long group,21492149+ unsigned long major,21502150+ unsigned long minor,21512151+ unsigned long *actual_minor);21522152+21532153+extern int sun4v_hvapi_register(unsigned long group, unsigned long major,21542154+ unsigned long *minor);21552155+extern void sun4v_hvapi_unregister(unsigned long group);21562156+extern int sun4v_hvapi_get(unsigned long group,21572157+ unsigned long *major,21582158+ unsigned long *minor);21592159+#endif2175216021762161#endif /* !(_SPARC64_HYPERVISOR_H) */
+2-1
include/linux/libata.h
···140140141141 ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */142142 ATA_DFLAG_NCQ_OFF = (1 << 9), /* device limited to non-NCQ mode */143143+ ATA_DFLAG_SPUNDOWN = (1 << 10), /* XXX: for spindown_compat */143144 ATA_DFLAG_INIT_MASK = (1 << 16) - 1,144145145146 ATA_DFLAG_DETACH = (1 << 16),···174173 ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */175174 ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */176175 ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */176176+ ATA_FLAG_ACPI_SATA = (1 << 17), /* need native SATA ACPI layout */177177178178 /* The following flag belongs to ap->pflags but is kept in179179 * ap->flags because it's referenced in many LLDs and will be···433431 struct scsi_device *sdev; /* attached SCSI device */434432 /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */435433 u64 n_sectors; /* size of device, if ATA */436436- u64 n_sectors_boot; /* size of ATA device at startup */437434 unsigned int class; /* ATA_DEV_xxx */438435 u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */439436 u8 pio_mode;
+1-1
include/linux/slub_def.h
···8888 */8989 WARN_ON_ONCE(size == 0);90909191- if (size >= (1 << KMALLOC_SHIFT_HIGH))9191+ if (size > (1 << KMALLOC_SHIFT_HIGH))9292 return -1;93939494 if (size > 64 && size <= 96)
+3-1
include/sound/soc.h
···2222#include <sound/control.h>2323#include <sound/ac97_codec.h>24242525-#define SND_SOC_VERSION "0.13.0"2525+#define SND_SOC_VERSION "0.13.1"26262727/*2828 * Convenience kcontrol builders···8383#define SND_SOC_DAI_AC97 0x18484#define SND_SOC_DAI_I2S 0x28585#define SND_SOC_DAI_PCM 0x48686+#define SND_SOC_DAI_AC97_BUS 0x8 /* for custom i.e. non ac97_codec.c */86878788/*8889 * DAI hardware audio formats···279278struct snd_soc_codec_dai {280279 char *name;281280 int id;281281+ unsigned char type;282282283283 /* DAI capabilities */284284 struct snd_soc_pcm_stream playback;
+1-1
include/sound/version.h
···11/* include/version.h. Generated by alsa/ksync script. */22#define CONFIG_SND_VERSION "1.0.14rc4"33-#define CONFIG_SND_DATE " (Wed May 09 09:51:39 2007 UTC)"33+#define CONFIG_SND_DATE " (Wed May 16 09:45:46 2007 UTC)"
+8-7
kernel/power/main.c
···9797 }9898 }9999100100- if (pm_ops->prepare) {101101- if ((error = pm_ops->prepare(state)))102102- goto Thaw;103103- }104104-105100 suspend_console();106101 error = device_suspend(PMSG_SUSPEND);107102 if (error) {108103 printk(KERN_ERR "Some devices failed to suspend\n");109109- goto Resume_devices;104104+ goto Resume_console;110105 }106106+ if (pm_ops->prepare) {107107+ if ((error = pm_ops->prepare(state)))108108+ goto Resume_devices;109109+ }110110+111111 error = disable_nonboot_cpus();112112 if (!error)113113 return 0;114114115115 enable_nonboot_cpus();116116- Resume_devices:117116 pm_finish(state);117117+ Resume_devices:118118 device_resume();119119+ Resume_console:119120 resume_console();120121 Thaw:121122 thaw_processes();
+2-1
mm/filemap.c
···670670 page = find_lock_page(mapping, index);671671 if (!page) {672672 if (!cached_page) {673673- cached_page = alloc_page(gfp_mask);673673+ cached_page =674674+ __page_cache_alloc(gfp_mask);674675 if (!cached_page)675676 return NULL;676677 }
+1-1
mm/slub.c
···25222522 struct kmem_cache *s;2523252325242524 down_write(&slub_lock);25252525- s = find_mergeable(size, align, flags, dtor, ctor);25252525+ s = find_mergeable(size, align, flags, ctor, dtor);25262526 if (s) {25272527 s->refcount++;25282528 /*
+11-4
sound/isa/cmi8330.c
···109109MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver.");110110111111#ifdef CONFIG_PNP112112+static int isa_registered;112113static int pnp_registered;113114#endif114115···687686 int err;688687689688 err = isa_register_driver(&snd_cmi8330_driver, SNDRV_CARDS);690690- if (err < 0)691691- return err;692689#ifdef CONFIG_PNP690690+ if (!err)691691+ isa_registered = 1;692692+693693 err = pnp_register_card_driver(&cmi8330_pnpc_driver);694694 if (!err)695695 pnp_registered = 1;696696+697697+ if (isa_registered)698698+ err = 0;696699#endif697697- return 0;700700+ return err;698701}699702700703static void __exit alsa_card_cmi8330_exit(void)···706701#ifdef CONFIG_PNP707702 if (pnp_registered)708703 pnp_unregister_card_driver(&cmi8330_pnpc_driver);704704+705705+ if (isa_registered)709706#endif710710- isa_unregister_driver(&snd_cmi8330_driver);707707+ isa_unregister_driver(&snd_cmi8330_driver);711708}712709713710module_init(alsa_card_cmi8330_init)
+14-6
sound/isa/cs423x/cs4236.c
···127127MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver.");128128129129#ifdef CONFIG_PNP130130+static int isa_registered;130131static int pnpc_registered;131132#ifdef CS4232132133static int pnp_registered;···771770 int err;772771773772 err = isa_register_driver(&cs423x_isa_driver, SNDRV_CARDS);774774- if (err < 0)775775- return err;776773#ifdef CONFIG_PNP774774+ if (!err)775775+ isa_registered = 1;777776#ifdef CS4232778777 err = pnp_register_driver(&cs4232_pnp_driver);779778 if (!err)···782781 err = pnp_register_card_driver(&cs423x_pnpc_driver);783782 if (!err)784783 pnpc_registered = 1;785785-#endif /* CONFIG_PNP */786786- return 0;784784+#ifdef CS4232785785+ if (pnp_registered)786786+ err = 0;787787+#endif788788+ if (isa_registered)789789+ err = 0;790790+#endif791791+ return err;787792}788793789794static void __exit alsa_card_cs423x_exit(void)···801794 if (pnp_registered)802795 pnp_unregister_driver(&cs4232_pnp_driver);803796#endif804804-#endif /* CONFIG_PNP */805805- isa_unregister_driver(&cs423x_isa_driver);797797+ if (isa_registered)798798+#endif799799+ isa_unregister_driver(&cs423x_isa_driver);806800}807801808802module_init(alsa_card_cs423x_init)
+13-6
sound/isa/es18xx.c
···20362036MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver.");2037203720382038#ifdef CONFIG_PNP20392039-static int pnp_registered, pnpc_registered;20392039+static int isa_registered;20402040+static int pnp_registered;20412041+static int pnpc_registered;2040204220412043static struct pnp_device_id snd_audiodrive_pnpbiosids[] = {20422044 { .id = "ESS1869" },···24682466 int err;2469246724702468 err = isa_register_driver(&snd_es18xx_isa_driver, SNDRV_CARDS);24712471- if (err < 0)24722472- return err;24732473-24742469#ifdef CONFIG_PNP24702470+ if (!err)24712471+ isa_registered = 1;24722472+24752473 err = pnp_register_driver(&es18xx_pnp_driver);24762474 if (!err)24772475 pnp_registered = 1;24762476+24782477 err = pnp_register_card_driver(&es18xx_pnpc_driver);24792478 if (!err)24802479 pnpc_registered = 1;24802480+24812481+ if (isa_registered || pnp_registered)24822482+ err = 0;24812483#endif24822482- return 0;24842484+ return err;24832485}2484248624852487static void __exit alsa_card_es18xx_exit(void)···24932487 pnp_unregister_card_driver(&es18xx_pnpc_driver);24942488 if (pnp_registered)24952489 pnp_unregister_driver(&es18xx_pnp_driver);24902490+ if (isa_registered)24962491#endif24972497- isa_unregister_driver(&snd_es18xx_isa_driver);24922492+ isa_unregister_driver(&snd_es18xx_isa_driver);24982493}2499249425002495module_init(alsa_card_es18xx_init)
+10-5
sound/isa/gus/interwave.c
···135135136136137137#ifdef CONFIG_PNP138138+static int isa_registered;138139static int pnp_registered;139140140141static struct pnp_card_device_id snd_interwave_pnpids[] = {···935934 int err;936935937936 err = isa_register_driver(&snd_interwave_driver, SNDRV_CARDS);938938- if (err < 0)939939- return err;940937#ifdef CONFIG_PNP941941- /* ISA PnP cards */938938+ if (!err)939939+ isa_registered = 1;940940+942941 err = pnp_register_card_driver(&interwave_pnpc_driver);943942 if (!err)944943 pnp_registered = 1;944944+945945+ if (isa_registered)946946+ err = 0;945947#endif946946- return 0;948948+ return err;947949}948950949951static void __exit alsa_card_interwave_exit(void)···954950#ifdef CONFIG_PNP955951 if (pnp_registered)956952 pnp_unregister_card_driver(&interwave_pnpc_driver);953953+ if (isa_registered)957954#endif958958- isa_unregister_driver(&snd_interwave_driver);955955+ isa_unregister_driver(&snd_interwave_driver);959956}960957961958module_init(alsa_card_interwave_init)
+11-4
sound/isa/opl3sa2.c
···9292MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi.");93939494#ifdef CONFIG_PNP9595+static int isa_registered;9596static int pnp_registered;9697static int pnpc_registered;9798#endif···968967 int err;969968970969 err = isa_register_driver(&snd_opl3sa2_isa_driver, SNDRV_CARDS);971971- if (err < 0)972972- return err;973970#ifdef CONFIG_PNP971971+ if (!err)972972+ isa_registered = 1;973973+974974 err = pnp_register_driver(&opl3sa2_pnp_driver);975975 if (!err)976976 pnp_registered = 1;977977+977978 err = pnp_register_card_driver(&opl3sa2_pnpc_driver);978979 if (!err)979980 pnpc_registered = 1;981981+982982+ if (isa_registered || pnp_registered)983983+ err = 0;980984#endif981981- return 0;985985+ return err;982986}983987984988static void __exit alsa_card_opl3sa2_exit(void)···993987 pnp_unregister_card_driver(&opl3sa2_pnpc_driver);994988 if (pnp_registered)995989 pnp_unregister_driver(&opl3sa2_pnp_driver);990990+ if (isa_registered)996991#endif997997- isa_unregister_driver(&snd_opl3sa2_isa_driver);992992+ isa_unregister_driver(&snd_opl3sa2_isa_driver);998993}9999941000995module_init(alsa_card_opl3sa2_init)
+10-5
sound/isa/sb/sb16.c
···129129#endif130130131131#ifdef CONFIG_PNP132132+static int isa_registered;132133static int pnp_registered;133134#endif134135···703702 int err;704703705704 err = isa_register_driver(&snd_sb16_isa_driver, SNDRV_CARDS);706706- if (err < 0)707707- return err;708705#ifdef CONFIG_PNP709709- /* PnP cards at last */706706+ if (!err)707707+ isa_registered = 1;708708+710709 err = pnp_register_card_driver(&sb16_pnpc_driver);711710 if (!err)712711 pnp_registered = 1;712712+713713+ if (isa_registered)714714+ err = 0;713715#endif714714- return 0;716716+ return err;715717}716718717719static void __exit alsa_card_sb16_exit(void)···722718#ifdef CONFIG_PNP723719 if (pnp_registered)724720 pnp_unregister_card_driver(&sb16_pnpc_driver);721721+ if (isa_registered)725722#endif726726- isa_unregister_driver(&snd_sb16_isa_driver);723723+ isa_unregister_driver(&snd_sb16_isa_driver);727724}728725729726module_init(alsa_card_sb16_init)
+15-13
sound/isa/sscape.c
···6969MODULE_PARM_DESC(dma, "DMA # for SoundScape driver.");70707171#ifdef CONFIG_PNP7272+static int isa_registered;7273static int pnp_registered;7474+7375static struct pnp_card_device_id sscape_pnpids[] = {7476 { .id = "ENS3081", .devs = { { "ENS0000" } } },7577 { .id = "" } /* end */···1407140514081406static int __init sscape_init(void)14091407{14101410- int ret;14081408+ int err;1411140914121412- /*14131413- * First check whether we were passed any parameters.14141414- * These MUST take precedence over ANY automatic way14151415- * of allocating cards, because the operator is14161416- * S-P-E-L-L-I-N-G it out for us...14171417- */14181418- ret = isa_register_driver(&snd_sscape_driver, SNDRV_CARDS);14191419- if (ret < 0)14201420- return ret;14101410+ err = isa_register_driver(&snd_sscape_driver, SNDRV_CARDS);14211411#ifdef CONFIG_PNP14221422- if (pnp_register_card_driver(&sscape_pnpc_driver) == 0)14121412+ if (!err)14131413+ isa_registered = 1;14141414+14151415+ err = pnp_register_card_driver(&sscape_pnpc_driver);14161416+ if (!err)14231417 pnp_registered = 1;14181418+14191419+ if (isa_registered)14201420+ err = 0;14241421#endif14251425- return 0;14221422+ return err;14261423}1427142414281425static void __exit sscape_exit(void)···14291428#ifdef CONFIG_PNP14301429 if (pnp_registered)14311430 pnp_unregister_card_driver(&sscape_pnpc_driver);14311431+ if (isa_registered)14321432#endif14331433- isa_unregister_driver(&snd_sscape_driver);14331433+ isa_unregister_driver(&snd_sscape_driver);14341434}1435143514361436module_init(sscape_init);
+10-4
sound/isa/wavefront/wavefront.c
···8686MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)");87878888#ifdef CONFIG_PNP8989+static int isa_registered;8990static int pnp_registered;90919192static struct pnp_card_device_id snd_wavefront_pnpids[] = {···707706 int err;708707709708 err = isa_register_driver(&snd_wavefront_driver, SNDRV_CARDS);710710- if (err < 0)711711- return err;712709#ifdef CONFIG_PNP710710+ if (!err)711711+ isa_registered = 1;712712+713713 err = pnp_register_card_driver(&wavefront_pnpc_driver);714714 if (!err)715715 pnp_registered = 1;716716+717717+ if (isa_registered)718718+ err = 0;716719#endif717717- return 0;720720+ return err;718721}719722720723static void __exit alsa_card_wavefront_exit(void)···726721#ifdef CONFIG_PNP727722 if (pnp_registered)728723 pnp_unregister_card_driver(&wavefront_pnpc_driver);724724+ if (isa_registered)729725#endif730730- isa_unregister_driver(&snd_wavefront_driver);726726+ isa_unregister_driver(&snd_wavefront_driver);731727}732728733729module_init(alsa_card_wavefront_init)