···11-Victor is known as a "digital talking book player" manufactured by22-VisuAide, Inc. to be used by blind people.33-44-For more information related to Victor, see:55-66- http://www.humanware.com/en-usa/products77-88-Of course Victor is using Linux as its main operating system.99-The Victor implementation for Linux is maintained by Nicolas Pitre:1010-1111- nico@visuaide.com1212- nico@fluxnic.net1313-1414-For any comments, please feel free to contact me through the above1515-addresses.1616-
+1-1
Documentation/arm/memory.txt
···5454 located here through iotable_init().5555 VMALLOC_START is based upon the value5656 of the high_memory variable, and VMALLOC_END5757- is equal to 0xff000000.5757+ is equal to 0xff800000.58585959PAGE_OFFSET high_memory-1 Kernel direct-mapped RAM region.6060 This maps the platforms RAM, and typically
+5
Documentation/devicetree/bindings/arm/twd.txt
···1919- reg : Specify the base address and the size of the TWD timer2020 register window.21212222+Optional2323+2424+- always-on : a boolean property. If present, the timer is powered through2525+ an always-on power domain, therefore it never loses context.2626+2227Example:23282429 twd-timer@2c000600 {
+6-2
arch/arm/Kconfig
···645645646646config ARCH_RPC647647 bool "RiscPC"648648+ depends on MMU648649 select ARCH_ACORN649650 select ARCH_MAY_HAVE_PC_FDC650651 select ARCH_SPARSEMEM_ENABLE···1411141014121411config HAVE_ARM_TWD14131412 bool14141414- depends on SMP14151413 select CLKSRC_OF if OF14161414 help14171415 This options enables support for the ARM timer and watchdog unit···1470147014711471 config VMSPLIT_3G14721472 bool "3G/1G user/kernel split"14731473+ config VMSPLIT_3G_OPT14741474+ bool "3G/1G user/kernel split (for full 1G low memory)"14731475 config VMSPLIT_2G14741476 bool "2G/2G user/kernel split"14751477 config VMSPLIT_1G···14831481 default PHYS_OFFSET if !MMU14841482 default 0x40000000 if VMSPLIT_1G14851483 default 0x80000000 if VMSPLIT_2G14841484+ default 0xB0000000 if VMSPLIT_3G_OPT14861485 default 0xC00000001487148614881487config NR_CPUS···16981695 If unsure, say n.1699169617001697config HIGHPTE17011701- bool "Allocate 2nd-level pagetables from highmem"16981698+ bool "Allocate 2nd-level pagetables from highmem" if EXPERT17021699 depends on HIGHMEM17001700+ default y17031701 help17041702 The VM uses one page of physical memory for each page table.17051703 For systems with a lot of processes, this can use a lot of
···2121 */2222#define __NR_syscalls (392)23232424-/*2525- * *NOTE*: This is a ghost syscall private to the kernel. Only the2626- * __kuser_cmpxchg code in entry-armv.S should be aware of its2727- * existence. Don't ever use this from user code.2828- */2929-#define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0)3030-3124#define __ARCH_WANT_STAT643225#define __ARCH_WANT_SYS_GETHOSTNAME3326#define __ARCH_WANT_SYS_PAUSE
+9-3
arch/arm/kernel/devtree.c
···101101 if (of_property_read_u32(cpu, "reg", &hwid)) {102102 pr_debug(" * %s missing reg property\n",103103 cpu->full_name);104104+ of_node_put(cpu);104105 return;105106 }106107···109108 * 8 MSBs must be set to 0 in the DT since the reg property110109 * defines the MPIDR[23:0].111110 */112112- if (hwid & ~MPIDR_HWID_BITMASK)111111+ if (hwid & ~MPIDR_HWID_BITMASK) {112112+ of_node_put(cpu);113113 return;114114+ }114115115116 /*116117 * Duplicate MPIDRs are a recipe for disaster.···122119 * to avoid matching valid MPIDR[23:0] values.123120 */124121 for (j = 0; j < cpuidx; j++)125125- if (WARN(tmp_map[j] == hwid, "Duplicate /cpu reg "126126- "properties in the DT\n"))122122+ if (WARN(tmp_map[j] == hwid,123123+ "Duplicate /cpu reg properties in the DT\n")) {124124+ of_node_put(cpu);127125 return;126126+ }128127129128 /*130129 * Build a stashed array of MPIDR values. Numbering scheme···148143 "max cores %u, capping them\n",149144 cpuidx, nr_cpu_ids)) {150145 cpuidx = nr_cpu_ids;146146+ of_node_put(cpu);151147 break;152148 }153149
+3-30
arch/arm/kernel/entry-armv.S
···427427 .endm428428429429 .macro kuser_cmpxchg_check430430-#if !defined(CONFIG_CPU_32v6K) && defined(CONFIG_KUSER_HELPERS) && \431431- !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)430430+#if !defined(CONFIG_CPU_32v6K) && defined(CONFIG_KUSER_HELPERS)432431#ifndef CONFIG_MMU433432#warning "NPTL on non MMU needs fixing"434433#else···858859859860__kuser_cmpxchg64: @ 0xffff0f60860861861861-#if defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)862862-863863- /*864864- * Poor you. No fast solution possible...865865- * The kernel itself must perform the operation.866866- * A special ghost syscall is used for that (see traps.c).867867- */868868- stmfd sp!, {r7, lr}869869- ldr r7, 1f @ it's 20 bits870870- swi __ARM_NR_cmpxchg64871871- ldmfd sp!, {r7, pc}872872-1: .word __ARM_NR_cmpxchg64873873-874874-#elif defined(CONFIG_CPU_32v6K)862862+#if defined(CONFIG_CPU_32v6K)875863876864 stmfd sp!, {r4, r5, r6, r7}877865 ldrd r4, r5, [r0] @ load old val···934948935949__kuser_cmpxchg: @ 0xffff0fc0936950937937-#if defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)938938-939939- /*940940- * Poor you. No fast solution possible...941941- * The kernel itself must perform the operation.942942- * A special ghost syscall is used for that (see traps.c).943943- */944944- stmfd sp!, {r7, lr}945945- ldr r7, 1f @ it's 20 bits946946- swi __ARM_NR_cmpxchg947947- ldmfd sp!, {r7, pc}948948-1: .word __ARM_NR_cmpxchg949949-950950-#elif __LINUX_ARM_ARCH__ < 6951951+#if __LINUX_ARM_ARCH__ < 6951952952953#ifdef CONFIG_MMU953954
-1
arch/arm/kernel/hw_breakpoint.c
···3535#include <asm/cputype.h>3636#include <asm/current.h>3737#include <asm/hw_breakpoint.h>3838-#include <asm/kdebug.h>3938#include <asm/traps.h>40394140/* Breakpoint currently in use for each BRP. */
···80808181static struct smp_operations smp_ops;82828383-void __init smp_set_ops(struct smp_operations *ops)8383+void __init smp_set_ops(const struct smp_operations *ops)8484{8585 if (ops)8686 smp_ops = *ops;···400400401401 local_irq_enable();402402 local_fiq_enable();403403+ local_abt_enable();403404404405 /*405406 * OK, it's off to the idle thread for us···749748750749static void raise_nmi(cpumask_t *mask)751750{751751+ /*752752+ * Generate the backtrace directly if we are running in a calling753753+ * context that is not preemptible by the backtrace IPI. Note754754+ * that nmi_cpu_backtrace() automatically removes the current cpu755755+ * from mask.756756+ */757757+ if (cpumask_test_cpu(smp_processor_id(), mask) && irqs_disabled())758758+ nmi_cpu_backtrace(NULL);759759+752760 smp_cross_call(mask, IPI_CPU_BACKTRACE);753761}754762
+5-6
arch/arm/kernel/smp_twd.c
···2323#include <linux/of_irq.h>2424#include <linux/of_address.h>25252626-#include <asm/smp_plat.h>2726#include <asm/smp_twd.h>28272928/* set up by the platform code */···3334static DEFINE_PER_CPU(bool, percpu_setup_called);34353536static struct clock_event_device __percpu *twd_evt;3737+static unsigned int twd_features =3838+ CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;3639static int twd_ppi;37403841static int twd_shutdown(struct clock_event_device *clk)···295294 writel_relaxed(0, twd_base + TWD_TIMER_CONTROL);296295297296 clk->name = "local_timer";298298- clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT |299299- CLOCK_EVT_FEAT_C3STOP;297297+ clk->features = twd_features;300298 clk->rating = 350;301299 clk->set_state_shutdown = twd_shutdown;302300 clk->set_state_periodic = twd_set_periodic;···350350 goto out_irq;351351352352 twd_get_clock(np);353353+ if (!of_property_read_bool(np, "always-on"))354354+ twd_features |= CLOCK_EVT_FEAT_C3STOP;353355354356 /*355357 * Immediately configure the timer on the boot CPU, unless we need···393391static void __init twd_local_timer_of_register(struct device_node *np)394392{395393 int err;396396-397397- if (!is_smp() || !setup_max_cpus)398398- return;399394400395 twd_ppi = irq_of_parse_and_map(np, 0);401396 if (!twd_ppi) {
-52
arch/arm/kernel/traps.c
···625625 set_tls(regs->ARM_r0);626626 return 0;627627628628-#ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG629629- /*630630- * Atomically store r1 in *r2 if *r2 is equal to r0 for user space.631631- * Return zero in r0 if *MEM was changed or non-zero if no exchange632632- * happened. Also set the user C flag accordingly.633633- * If access permissions have to be fixed up then non-zero is634634- * returned and the operation has to be re-attempted.635635- *636636- * *NOTE*: This is a ghost syscall private to the kernel. Only the637637- * __kuser_cmpxchg code in entry-armv.S should be aware of its638638- * existence. Don't ever use this from user code.639639- */640640- case NR(cmpxchg):641641- for (;;) {642642- extern void do_DataAbort(unsigned long addr, unsigned int fsr,643643- struct pt_regs *regs);644644- unsigned long val;645645- unsigned long addr = regs->ARM_r2;646646- struct mm_struct *mm = current->mm;647647- pgd_t *pgd; pmd_t *pmd; pte_t *pte;648648- spinlock_t *ptl;649649-650650- regs->ARM_cpsr &= ~PSR_C_BIT;651651- down_read(&mm->mmap_sem);652652- pgd = pgd_offset(mm, addr);653653- if (!pgd_present(*pgd))654654- goto bad_access;655655- pmd = pmd_offset(pgd, addr);656656- if (!pmd_present(*pmd))657657- goto bad_access;658658- pte = pte_offset_map_lock(mm, pmd, addr, &ptl);659659- if (!pte_present(*pte) || !pte_write(*pte) || !pte_dirty(*pte)) {660660- pte_unmap_unlock(pte, ptl);661661- goto bad_access;662662- }663663- val = *(unsigned long *)addr;664664- val -= regs->ARM_r0;665665- if (val == 0) {666666- *(unsigned long *)addr = regs->ARM_r1;667667- regs->ARM_cpsr |= PSR_C_BIT;668668- }669669- pte_unmap_unlock(pte, ptl);670670- up_read(&mm->mmap_sem);671671- return val;672672-673673- bad_access:674674- up_read(&mm->mmap_sem);675675- /* simulate a write access fault */676676- do_DataAbort(addr, 15 + (1 << 11), regs);677677- }678678-#endif679679-680628 default:681629 /* Calls 9f00xx..9f07ff are defined to return -ENOSYS682630 if not implemented, rather than raising SIGILL. This
···419419config CPU_32v3420420 bool421421 select CPU_USE_DOMAINS if MMU422422- select NEEDS_SYSCALL_FOR_CMPXCHG if SMP423422 select NEED_KUSER_HELPERS424423 select TLS_REG_EMUL if SMP || !MMU425424426425config CPU_32v4427426 bool428427 select CPU_USE_DOMAINS if MMU429429- select NEEDS_SYSCALL_FOR_CMPXCHG if SMP430428 select NEED_KUSER_HELPERS431429 select TLS_REG_EMUL if SMP || !MMU432430433431config CPU_32v4T434432 bool435433 select CPU_USE_DOMAINS if MMU436436- select NEEDS_SYSCALL_FOR_CMPXCHG if SMP437434 select NEED_KUSER_HELPERS438435 select TLS_REG_EMUL if SMP || !MMU439436440437config CPU_32v5441438 bool442439 select CPU_USE_DOMAINS if MMU443443- select NEEDS_SYSCALL_FOR_CMPXCHG if SMP444440 select NEED_KUSER_HELPERS445441 select TLS_REG_EMUL if SMP || !MMU446442···800804 An SMP system using a pre-ARMv6 processor (there are apparently801805 a few prototypes like that in existence) and therefore access to802806 that required register must be emulated.803803-804804-config NEEDS_SYSCALL_FOR_CMPXCHG805805- bool806806- select NEED_KUSER_HELPERS807807- help808808- SMP on a pre-ARMv6 processor? Well OK then.809809- Forget about fast user space cmpxchg support.810810- It is just not possible.811807812808config NEED_KUSER_HELPERS813809 bool
+7
arch/arm/mm/dma-mapping.c
···14071407 unsigned long uaddr = vma->vm_start;14081408 unsigned long usize = vma->vm_end - vma->vm_start;14091409 struct page **pages = __iommu_get_pages(cpu_addr, attrs);14101410+ unsigned long nr_pages = PAGE_ALIGN(size) >> PAGE_SHIFT;14111411+ unsigned long off = vma->vm_pgoff;1410141214111413 vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot);1412141414131415 if (!pages)14141416 return -ENXIO;14171417+14181418+ if (off >= nr_pages || (usize >> PAGE_SHIFT) > nr_pages - off)14191419+ return -ENXIO;14201420+14211421+ pages += off;1415142214161423 do {14171424 int ret = vm_insert_page(vma, uaddr, *pages++);
+22
arch/arm/mm/fault.c
···593593 arm_notify_die("", regs, &info, ifsr, 0);594594}595595596596+/*597597+ * Abort handler to be used only during first unmasking of asynchronous aborts598598+ * on the boot CPU. This makes sure that the machine will not die if the599599+ * firmware/bootloader left an imprecise abort pending for us to trip over.600600+ */601601+static int __init early_abort_handler(unsigned long addr, unsigned int fsr,602602+ struct pt_regs *regs)603603+{604604+ pr_warn("Hit pending asynchronous external abort (FSR=0x%08x) during "605605+ "first unmask, this is most likely caused by a "606606+ "firmware/bootloader bug.\n", fsr);607607+608608+ return 0;609609+}610610+611611+void __init early_abt_enable(void)612612+{613613+ fsr_info[22].fn = early_abort_handler;614614+ local_abt_enable();615615+ fsr_info[22].fn = do_bad;616616+}617617+596618#ifndef CONFIG_ARM_LPAE597619static int __init exceptions_init(void)598620{
+1
arch/arm/mm/fault.h
···24242525void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs);2626unsigned long search_exception_table(unsigned long addr);2727+void early_abt_enable(void);27282829#endif /* __ARCH_ARM_FAULT_H */
···333333 if (IS_ERR(r))334334 return PTR_ERR(r);335335336336- l = clkdev_create(r, alias, "%s", alias_dev_name);336336+ l = clkdev_create(r, alias, alias_dev_name ? "%s" : NULL,337337+ alias_dev_name);337338 clk_put(r);338339339340 return l ? 0 : -ENODEV;
-2
include/linux/amba/bus.h
···4141 int (*probe)(struct amba_device *, const struct amba_id *);4242 int (*remove)(struct amba_device *);4343 void (*shutdown)(struct amba_device *);4444- int (*suspend)(struct amba_device *, pm_message_t);4545- int (*resume)(struct amba_device *);4644 const struct amba_id *id_table;4745};4846
+10-1
lib/nmi_backtrace.c
···4343 printk("%.*s", (end - start) + 1, buf);4444}45454646+/*4747+ * When raise() is called it will be is passed a pointer to the4848+ * backtrace_mask. Architectures that call nmi_cpu_backtrace()4949+ * directly from their raise() functions may rely on the mask5050+ * they are passed being updated as a side effect of this call.5151+ */4652void nmi_trigger_all_cpu_backtrace(bool include_self,4753 void (*raise)(cpumask_t *mask))4854{···155149 /* Replace printk to write into the NMI seq */156150 this_cpu_write(printk_func, nmi_vprintk);157151 pr_warn("NMI backtrace for cpu %d\n", cpu);158158- show_regs(regs);152152+ if (regs)153153+ show_regs(regs);154154+ else155155+ dump_stack();159156 this_cpu_write(printk_func, printk_func_save);160157161158 cpumask_clear_cpu(cpu, to_cpumask(backtrace_mask));