···635635 and the Battery Powered Linux mini-HOWTO, available from636636 <http://www.tldp.org/docs.html#howto>.637637638638- Note that, even if you say N here, Linux on the x86 architecture639639- will issue the hlt instruction if nothing is to be done, thereby640640- sending the processor to sleep and saving power.641641-642638config APM643639 tristate "Advanced Power Management Emulation"644640 depends on PM···646650 battery status information, and user-space programs will receive647651 notification of APM "events" (e.g. battery status change).648652649649- If you select "Y" here, you can disable actual use of the APM650650- BIOS by passing the "apm=off" option to the kernel at boot time.651651-652652- Note that the APM support is almost completely disabled for653653- machines with more than one CPU.654654-655653 In order to use APM, you will need supporting software. For location656654 and more information, read <file:Documentation/pm.txt> and the657655 Battery Powered Linux mini-HOWTO, available from···655665 manpage ("man 8 hdparm") for that), and it doesn't turn off656666 VESA-compliant "green" monitors.657667658658- This driver does not support the TI 4000M TravelMate and the ACER659659- 486/DX4/75 because they don't have compliant BIOSes. Many "green"660660- desktop machines also don't have compliant BIOSes, and this driver661661- may cause those machines to panic during the boot phase.662662-663668 Generally, if you don't have a battery in your machine, there isn't664669 much point in using this driver and you should say N. If you get665670 random kernel OOPSes or reboots that don't seem to be related to666671 anything, try disabling/enabling this option (or disabling/enabling667672 APM in your BIOS).668668-669669- Some other things you should try when experiencing seemingly random,670670- "weird" problems:671671-672672- 1) make sure that you have enough swap space and that it is673673- enabled.674674- 2) pass the "no-hlt" option to the kernel675675- 3) switch on floating point emulation in the kernel and pass676676- the "no387" option to the kernel677677- 4) pass the "floppy=nodma" option to the kernel678678- 5) pass the "mem=4M" option to the kernel (thereby disabling679679- all but the first 4 MB of RAM)680680- 6) make sure that the CPU is not over clocked.681681- 7) read the sig11 FAQ at <http://www.bitwizard.nl/sig11/>682682- 8) disable the cache from your BIOS settings683683- 9) install a fan for the video card or exchange video RAM684684- 10) install a better fan for the CPU685685- 11) exchange RAM chips686686- 12) exchange the motherboard.687687-688688- To compile this driver as a module, choose M here: the689689- module will be called apm.690673691674endmenu692675
···11+/*22+ * linux/arch/arm/common/gic.c33+ *44+ * Copyright (C) 2002 ARM Limited, All Rights Reserved.55+ *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+ * Interrupt architecture for the GIC:1111+ *1212+ * o There is one Interrupt Distributor, which receives interrupts1313+ * from system devices and sends them to the Interrupt Controllers.1414+ *1515+ * o There is one CPU Interface per CPU, which sends interrupts sent1616+ * by the Distributor, and interrupts generated locally, to the1717+ * associated CPU.1818+ *1919+ * Note that IRQs 0-31 are special - they are local to each CPU.2020+ * As such, the enable set/clear, pending set/clear and active bit2121+ * registers are banked per-cpu for these sources.2222+ */2323+#include <linux/init.h>2424+#include <linux/kernel.h>2525+#include <linux/list.h>2626+#include <linux/smp.h>2727+2828+#include <asm/irq.h>2929+#include <asm/io.h>3030+#include <asm/mach/irq.h>3131+#include <asm/hardware/gic.h>3232+3333+static void __iomem *gic_dist_base;3434+static void __iomem *gic_cpu_base;3535+3636+/*3737+ * Routines to acknowledge, disable and enable interrupts3838+ *3939+ * Linux assumes that when we're done with an interrupt we need to4040+ * unmask it, in the same way we need to unmask an interrupt when4141+ * we first enable it.4242+ *4343+ * The GIC has a seperate notion of "end of interrupt" to re-enable4444+ * an interrupt after handling, in order to support hardware4545+ * prioritisation.4646+ *4747+ * We can make the GIC behave in the way that Linux expects by making4848+ * our "acknowledge" routine disable the interrupt, then mark it as4949+ * complete.5050+ */5151+static void gic_ack_irq(unsigned int irq)5252+{5353+ u32 mask = 1 << (irq % 32);5454+ writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4);5555+ writel(irq, gic_cpu_base + GIC_CPU_EOI);5656+}5757+5858+static void gic_mask_irq(unsigned int irq)5959+{6060+ u32 mask = 1 << (irq % 32);6161+ writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4);6262+}6363+6464+static void gic_unmask_irq(unsigned int irq)6565+{6666+ u32 mask = 1 << (irq % 32);6767+ writel(mask, gic_dist_base + GIC_DIST_ENABLE_SET + (irq / 32) * 4);6868+}6969+7070+static void gic_set_cpu(struct irqdesc *desc, unsigned int irq, unsigned int cpu)7171+{7272+ void __iomem *reg = gic_dist_base + GIC_DIST_TARGET + (irq & ~3);7373+ unsigned int shift = (irq % 4) * 8;7474+ u32 val;7575+7676+ val = readl(reg) & ~(0xff << shift);7777+ val |= 1 << (cpu + shift);7878+ writel(val, reg);7979+}8080+8181+static struct irqchip gic_chip = {8282+ .ack = gic_ack_irq,8383+ .mask = gic_mask_irq,8484+ .unmask = gic_unmask_irq,8585+#ifdef CONFIG_SMP8686+ .set_cpu = gic_set_cpu,8787+#endif8888+};8989+9090+void __init gic_dist_init(void __iomem *base)9191+{9292+ unsigned int max_irq, i;9393+ u32 cpumask = 1 << smp_processor_id();9494+9595+ cpumask |= cpumask << 8;9696+ cpumask |= cpumask << 16;9797+9898+ gic_dist_base = base;9999+100100+ writel(0, base + GIC_DIST_CTRL);101101+102102+ /*103103+ * Find out how many interrupts are supported.104104+ */105105+ max_irq = readl(base + GIC_DIST_CTR) & 0x1f;106106+ max_irq = (max_irq + 1) * 32;107107+108108+ /*109109+ * The GIC only supports up to 1020 interrupt sources.110110+ * Limit this to either the architected maximum, or the111111+ * platform maximum.112112+ */113113+ if (max_irq > max(1020, NR_IRQS))114114+ max_irq = max(1020, NR_IRQS);115115+116116+ /*117117+ * Set all global interrupts to be level triggered, active low.118118+ */119119+ for (i = 32; i < max_irq; i += 16)120120+ writel(0, base + GIC_DIST_CONFIG + i * 4 / 16);121121+122122+ /*123123+ * Set all global interrupts to this CPU only.124124+ */125125+ for (i = 32; i < max_irq; i += 4)126126+ writel(cpumask, base + GIC_DIST_TARGET + i * 4 / 4);127127+128128+ /*129129+ * Set priority on all interrupts.130130+ */131131+ for (i = 0; i < max_irq; i += 4)132132+ writel(0xa0a0a0a0, base + GIC_DIST_PRI + i * 4 / 4);133133+134134+ /*135135+ * Disable all interrupts.136136+ */137137+ for (i = 0; i < max_irq; i += 32)138138+ writel(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4 / 32);139139+140140+ /*141141+ * Setup the Linux IRQ subsystem.142142+ */143143+ for (i = 29; i < max_irq; i++) {144144+ set_irq_chip(i, &gic_chip);145145+ set_irq_handler(i, do_level_IRQ);146146+ set_irq_flags(i, IRQF_VALID | IRQF_PROBE);147147+ }148148+149149+ writel(1, base + GIC_DIST_CTRL);150150+}151151+152152+void __cpuinit gic_cpu_init(void __iomem *base)153153+{154154+ gic_cpu_base = base;155155+ writel(0xf0, base + GIC_CPU_PRIMASK);156156+ writel(1, base + GIC_CPU_CTRL);157157+}158158+159159+#ifdef CONFIG_SMP160160+void gic_raise_softirq(cpumask_t cpumask, unsigned int irq)161161+{162162+ unsigned long map = *cpus_addr(cpumask);163163+164164+ writel(map << 16 | irq, gic_dist_base + GIC_DIST_SOFTINT);165165+}166166+#endif
+2-2
fs/adfs/adfs.h
···9797extern struct inode_operations adfs_file_inode_operations;9898extern struct file_operations adfs_file_operations;9999100100-extern inline __u32 signed_asl(__u32 val, signed int shift)100100+static inline __u32 signed_asl(__u32 val, signed int shift)101101{102102 if (shift >= 0)103103 val <<= shift;···112112 *113113 * The root directory ID should always be looked up in the map [3.4]114114 */115115-extern inline int115115+static inline int116116__adfs_block_map(struct super_block *sb, unsigned int object_id,117117 unsigned int block)118118{
+41
include/asm-arm/hardware/gic.h
···11+/*22+ * linux/include/asm-arm/hardware/gic.h33+ *44+ * Copyright (C) 2002 ARM Limited, All Rights Reserved.55+ *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 __ASM_ARM_HARDWARE_GIC_H1111+#define __ASM_ARM_HARDWARE_GIC_H1212+1313+#include <linux/compiler.h>1414+1515+#define GIC_CPU_CTRL 0x001616+#define GIC_CPU_PRIMASK 0x041717+#define GIC_CPU_BINPOINT 0x081818+#define GIC_CPU_INTACK 0x0c1919+#define GIC_CPU_EOI 0x102020+#define GIC_CPU_RUNNINGPRI 0x142121+#define GIC_CPU_HIGHPRI 0x182222+2323+#define GIC_DIST_CTRL 0x0002424+#define GIC_DIST_CTR 0x0042525+#define GIC_DIST_ENABLE_SET 0x1002626+#define GIC_DIST_ENABLE_CLEAR 0x1802727+#define GIC_DIST_PENDING_SET 0x2002828+#define GIC_DIST_PENDING_CLEAR 0x2802929+#define GIC_DIST_ACTIVE_BIT 0x3003030+#define GIC_DIST_PRI 0x4003131+#define GIC_DIST_TARGET 0x8003232+#define GIC_DIST_CONFIG 0xc003333+#define GIC_DIST_SOFTINT 0xf003434+3535+#ifndef __ASSEMBLY__3636+void gic_dist_init(void __iomem *base);3737+void gic_cpu_init(void __iomem *base);3838+void gic_raise_softirq(cpumask_t cpumask, unsigned int irq);3939+#endif4040+4141+#endif