···2166216621672167N: Pavel Machek21682168E: pavel@ucw.cz21692169-E: pavel@suse.cz21702169D: Softcursor for vga, hypertech cdrom support, vcsa bugfix, nbd21712170D: sun4/330 port, capabilities for elf, speedup for rm on ext2, USB,21722171D: work on suspend-to-ram/disk, killing duplicates from ioctl32
+1-1
Documentation/ABI/testing/sysfs-firmware-memmap
···11What: /sys/firmware/memmap/22Date: June 200833-Contact: Bernhard Walle <bwalle@suse.de>33+Contact: Bernhard Walle <bernhard.walle@gmx.de>44Description:55 On all platforms, the firmware provides a memory map which the66 kernel reads. The resources from that memory map are registered
+1-1
Documentation/PCI/PCIEBUS-HOWTO.txt
···93939494int pcie_port_service_register(struct pcie_port_service_driver *new)95959696-This API replaces the Linux Driver Model's pci_module_init API. A9696+This API replaces the Linux Driver Model's pci_register_driver API. A9797service driver should always calls pcie_port_service_register at9898module init. Note that after service driver being loaded, calls9999such as pci_enable_device(dev) and pci_set_master(dev) are no longer
+2-4
Documentation/cgroups/cgroups.txt
···252252When a task is moved from one cgroup to another, it gets a new253253css_set pointer - if there's an already existing css_set with the254254desired collection of cgroups then that group is reused, else a new255255-css_set is allocated. Note that the current implementation uses a256256-linear search to locate an appropriate existing css_set, so isn't257257-very efficient. A future version will use a hash table for better258258-performance.255255+css_set is allocated. The appropriate existing css_set is located by256256+looking into a hash table.259257260258To allow access from a cgroup to the css_sets (and hence tasks)261259that comprise it, a set of cg_cgroup_link objects form a lattice;
+36-27
Documentation/cgroups/cpusets.txt
···142142 - in fork and exit, to attach and detach a task from its cpuset.143143 - in sched_setaffinity, to mask the requested CPUs by what's144144 allowed in that tasks cpuset.145145- - in sched.c migrate_all_tasks(), to keep migrating tasks within145145+ - in sched.c migrate_live_tasks(), to keep migrating tasks within146146 the CPUs allowed by their cpuset, if possible.147147 - in the mbind and set_mempolicy system calls, to mask the requested148148 Memory Nodes by what's allowed in that tasks cpuset.···175175 - mem_exclusive flag: is memory placement exclusive?176176 - mem_hardwall flag: is memory allocation hardwalled177177 - memory_pressure: measure of how much paging pressure in cpuset178178+ - memory_spread_page flag: if set, spread page cache evenly on allowed nodes179179+ - memory_spread_slab flag: if set, spread slab cache evenly on allowed nodes180180+ - sched_load_balance flag: if set, load balance within CPUs on that cpuset181181+ - sched_relax_domain_level: the searching range when migrating tasks178182179183In addition, the root cpuset only has the following file:180184 - memory_pressure_enabled flag: compute memory_pressure?···256252257253This is useful both on tightly managed systems running a wide mix of258254submitted jobs, which may choose to terminate or re-prioritize jobs that259259-are trying to use more memory than allowed on the nodes assigned them,255255+are trying to use more memory than allowed on the nodes assigned to them,260256and with tightly coupled, long running, massively parallel scientific261257computing jobs that will dramatically fail to meet required performance262258goals if they start to use more memory than allowed to them.···382378The algorithmic cost of load balancing and its impact on key shared383379kernel data structures such as the task list increases more than384380linearly with the number of CPUs being balanced. So the scheduler385385-has support to partition the systems CPUs into a number of sched381381+has support to partition the systems CPUs into a number of sched386382domains such that it only load balances within each sched domain.387383Each sched domain covers some subset of the CPUs in the system;388384no two sched domains overlap; some CPUs might not be in any sched···489485The internal kernel cpuset to scheduler interface passes from the490486cpuset code to the scheduler code a partition of the load balanced491487CPUs in the system. This partition is a set of subsets (represented492492-as an array of cpumask_t) of CPUs, pairwise disjoint, that cover all493493-the CPUs that must be load balanced.488488+as an array of struct cpumask) of CPUs, pairwise disjoint, that cover489489+all the CPUs that must be load balanced.494490495495-Whenever the 'sched_load_balance' flag changes, or CPUs come or go496496-from a cpuset with this flag enabled, or a cpuset with this flag497497-enabled is removed, the cpuset code builds a new such partition and498498-passes it to the scheduler sched domain setup code, to have the sched499499-domains rebuilt as necessary.491491+The cpuset code builds a new such partition and passes it to the492492+scheduler sched domain setup code, to have the sched domains rebuilt493493+as necessary, whenever:494494+ - the 'sched_load_balance' flag of a cpuset with non-empty CPUs changes,495495+ - or CPUs come or go from a cpuset with this flag enabled,496496+ - or 'sched_relax_domain_level' value of a cpuset with non-empty CPUs497497+ and with this flag enabled changes,498498+ - or a cpuset with non-empty CPUs and with this flag enabled is removed,499499+ - or a cpu is offlined/onlined.500500501501This partition exactly defines what sched domains the scheduler should502502-setup - one sched domain for each element (cpumask_t) in the partition.502502+setup - one sched domain for each element (struct cpumask) in the503503+partition.503504504505The scheduler remembers the currently active sched domain partitions.505506When the scheduler routine partition_sched_domains() is invoked from···568559requests 0 and others are -1 then 0 is used.569560570561Note that modifying this file will have both good and bad effects,571571-and whether it is acceptable or not will be depend on your situation.562562+and whether it is acceptable or not depends on your situation.572563Don't modify this file if you are not sure.573564574565If your situation is:···609600610601If a cpuset has its 'cpus' modified, then each task in that cpuset611602will have its allowed CPU placement changed immediately. Similarly,612612-if a tasks pid is written to a cpusets 'tasks' file, in either its613613-current cpuset or another cpuset, then its allowed CPU placement is614614-changed immediately. If such a task had been bound to some subset615615-of its cpuset using the sched_setaffinity() call, the task will be616616-allowed to run on any CPU allowed in its new cpuset, negating the617617-affect of the prior sched_setaffinity() call.603603+if a tasks pid is written to another cpusets 'tasks' file, then its604604+allowed CPU placement is changed immediately. If such a task had been605605+bound to some subset of its cpuset using the sched_setaffinity() call,606606+the task will be allowed to run on any CPU allowed in its new cpuset,607607+negating the effect of the prior sched_setaffinity() call.618608619609In summary, the memory placement of a task whose cpuset is changed is620610updated by the kernel, on the next allocation of a page for that task,621621-but the processor placement is not updated, until that tasks pid is622622-rewritten to the 'tasks' file of its cpuset. This is done to avoid623623-impacting the scheduler code in the kernel with a check for changes624624-in a tasks processor placement.611611+and the processor placement is updated immediately.625612626613Normally, once a page is allocated (given a physical page627614of main memory) then that page stays on whatever node it···686681 # The next line should display '/Charlie'687682 cat /proc/self/cpuset688683689689-In the future, a C library interface to cpusets will likely be690690-available. For now, the only way to query or modify cpusets is691691-via the cpuset file system, using the various cd, mkdir, echo, cat,692692-rmdir commands from the shell, or their equivalent from C.684684+There are ways to query or modify cpusets:685685+ - via the cpuset file system directly, using the various cd, mkdir, echo,686686+ cat, rmdir commands from the shell, or their equivalent from C.687687+ - via the C library libcpuset.688688+ - via the C library libcgroup.689689+ (http://sourceforge.net/proects/libcg/)690690+ - via the python application cset.691691+ (http://developer.novell.com/wiki/index.php/Cpuset)693692694693The sched_setaffinity calls can also be done at the shell prompt using695694SGI's runon or Robert Love's taskset. The mbind and set_mempolicy···765756766757is equivalent to767758768768-mount -t cgroup -ocpuset X /dev/cpuset759759+mount -t cgroup -ocpuset,noprefix X /dev/cpuset769760echo "/sbin/cpuset_release_agent" > /dev/cpuset/release_agent7707617717622.2 Adding/removing cpus
+101
Documentation/hwmon/hpfall.c
···11+/* Disk protection for HP machines.22+ *33+ * Copyright 2008 Eric Piel44+ * Copyright 2009 Pavel Machek <pavel@suse.cz>55+ *66+ * GPLv2.77+ */88+99+#include <stdio.h>1010+#include <stdlib.h>1111+#include <unistd.h>1212+#include <fcntl.h>1313+#include <sys/stat.h>1414+#include <sys/types.h>1515+#include <string.h>1616+#include <stdint.h>1717+#include <errno.h>1818+#include <signal.h>1919+2020+void write_int(char *path, int i)2121+{2222+ char buf[1024];2323+ int fd = open(path, O_RDWR);2424+ if (fd < 0) {2525+ perror("open");2626+ exit(1);2727+ }2828+ sprintf(buf, "%d", i);2929+ if (write(fd, buf, strlen(buf)) != strlen(buf)) {3030+ perror("write");3131+ exit(1);3232+ }3333+ close(fd);3434+}3535+3636+void set_led(int on)3737+{3838+ write_int("/sys/class/leds/hp::hddprotect/brightness", on);3939+}4040+4141+void protect(int seconds)4242+{4343+ write_int("/sys/block/sda/device/unload_heads", seconds*1000);4444+}4545+4646+int on_ac(void)4747+{4848+// /sys/class/power_supply/AC0/online4949+}5050+5151+int lid_open(void)5252+{5353+// /proc/acpi/button/lid/LID/state5454+}5555+5656+void ignore_me(void)5757+{5858+ protect(0);5959+ set_led(0);6060+6161+}6262+6363+int main(int argc, char* argv[])6464+{6565+ int fd, ret;6666+6767+ fd = open("/dev/freefall", O_RDONLY);6868+ if (fd < 0) {6969+ perror("open");7070+ return EXIT_FAILURE;7171+ }7272+7373+ signal(SIGALRM, ignore_me);7474+7575+ for (;;) {7676+ unsigned char count;7777+7878+ ret = read(fd, &count, sizeof(count));7979+ alarm(0);8080+ if ((ret == -1) && (errno == EINTR)) {8181+ /* Alarm expired, time to unpark the heads */8282+ continue;8383+ }8484+8585+ if (ret != sizeof(count)) {8686+ perror("read");8787+ break;8888+ }8989+9090+ protect(21);9191+ set_led(1);9292+ if (1 || on_ac() || lid_open()) {9393+ alarm(2);9494+ } else {9595+ alarm(20);9696+ }9797+ }9898+9999+ close(fd);100100+ return EXIT_SUCCESS;101101+}
+8
Documentation/hwmon/lis3lv02d
···3333This driver also provides an absolute input class device, allowing3434the laptop to act as a pinball machine-esque joystick.35353636+Another feature of the driver is misc device called "freefall" that3737+acts similar to /dev/rtc and reacts on free-fall interrupts received3838+from the device. It supports blocking operations, poll/select and3939+fasync operation modes. You must read 1 bytes from the device. The4040+result is number of free-fall interrupts since the last successful4141+read (or 255 if number of interrupts would not fit).4242+4343+3644Axes orientation3745----------------3846
+2-4
Documentation/tracers/mmiotrace.txt
···7878events were lost, the trace is incomplete. You should enlarge the buffers and7979try again. Buffers are enlarged by first seeing how large the current buffers8080are:8181-$ cat /debug/tracing/trace_entries8181+$ cat /debug/tracing/buffer_size_kb8282gives you a number. Approximately double this number and write it back, for8383instance:8484-$ echo 0 > /debug/tracing/tracing_enabled8585-$ echo 128000 > /debug/tracing/trace_entries8686-$ echo 1 > /debug/tracing/tracing_enabled8484+$ echo 128000 > /debug/tracing/buffer_size_kb8785Then start again from the top.88868987If you are doing a trace for a driver project, e.g. Nouveau, you should also
+18-11
MAINTAINERS
···692692L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)693693S: Maintained694694695695+ARM/NUVOTON W90X900 ARM ARCHITECTURE696696+P: Wan ZongShun697697+M: mcuos.com@gmail.com698698+L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)699699+W: http://www.mcuos.com700700+S: Maintained701701+695702ARPD SUPPORT696703P: Jonathan Layes697704L: netdev@vger.kernel.org···19121905S: Maintained1913190619141907HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER19151915-P: Robert Love19161916-M: rlove@rlove.org19171917-M: linux-kernel@vger.kernel.org19181918-W: http://www.kernel.org/pub/linux/kernel/people/rml/hdaps/19081908+P: Frank Seidel19091909+M: frank@f-seidel.de19101910+L: lm-sensors@lm-sensors.org19111911+W: http://www.kernel.org/pub/linux/kernel/people/fseidel/hdaps/19191912S: Maintained1920191319211914GSPCA FINEPIX SUBDRIVER···2008200120092002HIBERNATION (aka Software Suspend, aka swsusp)20102003P: Pavel Machek20112011-M: pavel@suse.cz20042004+M: pavel@ucw.cz20122005P: Rafael J. Wysocki20132006M: rjw@sisk.pl20142007L: linux-pm@lists.linux-foundation.org···33343327M: jeremy@xensource.com33353328P: Chris Wright33363329M: chrisw@sous-sol.org33373337-P: Zachary Amsden33383338-M: zach@vmware.com33303330+P: Alok Kataria33313331+M: akataria@vmware.com33393332P: Rusty Russell33403333M: rusty@rustcorp.com.au33413334L: virtualization@lists.osdl.org···41794172P: Len Brown41804173M: len.brown@intel.com41814174P: Pavel Machek41824182-M: pavel@suse.cz41754175+M: pavel@ucw.cz41834176P: Rafael J. Wysocki41844177M: rjw@sisk.pl41854178L: linux-pm@lists.linux-foundation.org···49314924S: Maintained4932492549334926ZR36067 VIDEO FOR LINUX DRIVER49344934-P: Ronald Bultje49354935-M: rbultje@ronald.bitfreak.net49364927L: mjpeg-users@lists.sourceforge.net49284928+L: linux-media@vger.kernel.org49374929W: http://mjpeg.sourceforge.net/driver-zoran/49384938-S: Maintained49304930+T: Mercurial http://linuxtv.org/hg/v4l-dvb49314931+S: Odd Fixes4939493249404933ZS DECSTATION Z85C30 SERIAL DRIVER49414934P: Maciej W. Rozycki
+1-1
Makefile
···389389# output directory.390390outputmakefile:391391ifneq ($(KBUILD_SRC),)392392+ $(Q)ln -fsn $(srctree) source392393 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \393394 $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)394395endif···947946 mkdir -p include2; \948947 ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \949948 fi950950- ln -fsn $(srctree) source951949endif952950953951# prepare2 creates a makefile if using a separate output directory
+1-1
README
···188188 values to random values.189189190190 You can find more information on using the Linux kernel config tools191191- in Documentation/kbuild/make-configs.txt.191191+ in Documentation/kbuild/kconfig.txt.192192193193 NOTES on "make config":194194 - having unnecessary drivers will make the kernel bigger, and can
+4-4
arch/alpha/kernel/process.c
···9393 if (cpuid != boot_cpuid) {9494 flags |= 0x00040000UL; /* "remain halted" */9595 *pflags = flags;9696- cpu_clear(cpuid, cpu_present_map);9797- cpu_clear(cpuid, cpu_possible_map);9696+ set_cpu_present(cpuid, false);9797+ set_cpu_possible(cpuid, false);9898 halt();9999 }100100#endif···120120121121#ifdef CONFIG_SMP122122 /* Wait for the secondaries to halt. */123123- cpu_clear(boot_cpuid, cpu_present_map);124124- cpu_clear(boot_cpuid, cpu_possible_map);123123+ set_cpu_present(boot_cpuid, false);124124+ set_cpu_possible(boot_cpuid, false);125125 while (cpus_weight(cpu_present_map))126126 barrier();127127#endif
+6-6
arch/alpha/kernel/smp.c
···120120smp_callin(void)121121{122122 int cpuid = hard_smp_processor_id();123123- cpumask_t mask = cpu_online_map;124123125125- if (cpu_test_and_set(cpuid, mask)) {124124+ if (cpu_online(cpuid)) {126125 printk("??, cpu 0x%x already present??\n", cpuid);127126 BUG();128127 }128128+ set_cpu_online(cpuid, true);129129130130 /* Turn on machine checks. */131131 wrmces(7);···436436 ((char *)cpubase + i*hwrpb->processor_size);437437 if ((cpu->flags & 0x1cc) == 0x1cc) {438438 smp_num_probed++;439439- cpu_set(i, cpu_possible_map);440440- cpu_set(i, cpu_present_map);439439+ set_cpu_possible(i, true);440440+ set_cpu_present(i, true);441441 cpu->pal_revision = boot_cpu_palrev;442442 }443443···470470471471 /* Nothing to do on a UP box, or when told not to. */472472 if (smp_num_probed == 1 || max_cpus == 0) {473473- cpu_possible_map = cpumask_of_cpu(boot_cpuid);474474- cpu_present_map = cpumask_of_cpu(boot_cpuid);473473+ init_cpu_possible(cpumask_of(boot_cpuid));474474+ init_cpu_present(cpumask_of(boot_cpuid));475475 printk(KERN_INFO "SMP mode deactivated.\n");476476 return;477477 }
+1-1
arch/arm/configs/at91sam9260ek_defconfig
···608608# Watchdog Device Drivers609609#610610# CONFIG_SOFT_WATCHDOG is not set611611-CONFIG_AT91SAM9_WATCHDOG=y611611+CONFIG_AT91SAM9X_WATCHDOG=y612612613613#614614# USB-based Watchdog Cards
+1-1
arch/arm/configs/at91sam9261ek_defconfig
···700700# Watchdog Device Drivers701701#702702# CONFIG_SOFT_WATCHDOG is not set703703-CONFIG_AT91SAM9_WATCHDOG=y703703+CONFIG_AT91SAM9X_WATCHDOG=y704704705705#706706# USB-based Watchdog Cards
+1-1
arch/arm/configs/at91sam9263ek_defconfig
···710710# Watchdog Device Drivers711711#712712# CONFIG_SOFT_WATCHDOG is not set713713-CONFIG_AT91SAM9_WATCHDOG=y713713+CONFIG_AT91SAM9X_WATCHDOG=y714714715715#716716# USB-based Watchdog Cards
+1-1
arch/arm/configs/at91sam9rlek_defconfig
···606606# Watchdog Device Drivers607607#608608# CONFIG_SOFT_WATCHDOG is not set609609-CONFIG_AT91SAM9_WATCHDOG=y609609+CONFIG_AT91SAM9X_WATCHDOG=y610610611611#612612# Sonics Silicon Backplane
+1-1
arch/arm/configs/qil-a9260_defconfig
···727727# Watchdog Device Drivers728728#729729# CONFIG_SOFT_WATCHDOG is not set730730-# CONFIG_AT91SAM9_WATCHDOG is not set730730+# CONFIG_AT91SAM9X_WATCHDOG is not set731731732732#733733# USB-based Watchdog Cards
+2-2
arch/arm/kernel/elf.c
···7474 */7575int arm_elf_read_implies_exec(const struct elf32_hdr *x, int executable_stack)7676{7777- if (executable_stack != EXSTACK_ENABLE_X)7777+ if (executable_stack != EXSTACK_DISABLE_X)7878 return 1;7979- if (cpu_architecture() <= CPU_ARCH_ARMv6)7979+ if (cpu_architecture() < CPU_ARCH_ARMv6)8080 return 1;8181 return 0;8282}
···490490491491/*--------------------------------------------------------------------------*/492492493493-/* This lock class tells lockdep that GPIO irqs are in a different493493+/*494494+ * This lock class tells lockdep that GPIO irqs are in a different494495 * category than their parents, so it won't report false recursion.495496 */496497static struct lock_class_key gpio_lock_class;···509508 prev = this, this++) {510509 unsigned id = this->id;511510 unsigned i;512512-513513- /* enable PIO controller's clock */514514- clk_enable(this->clock);515511516512 __raw_writel(~0, this->regbase + PIO_IDR);517513···554556 data->chipbase = PIN_BASE + i * 32;555557 data->regbase = data->offset + (void __iomem *)AT91_VA_BASE_SYS;556558557557- /* AT91SAM9263_ID_PIOCDE groups PIOC, PIOD, PIOE */559559+ /* enable PIO controller's clock */560560+ clk_enable(data->clock);561561+562562+ /*563563+ * Some processors share peripheral ID between multiple GPIO banks.564564+ * SAM9263 (PIOC, PIOD, PIOE)565565+ * CAP9 (PIOA, PIOB, PIOC, PIOD)566566+ */558567 if (last && last->id == data->id)559568 last->next = data;560569 }
+1
arch/arm/mach-at91/include/mach/board.h
···9393 u8 enable_pin; /* chip enable */9494 u8 det_pin; /* card detect */9595 u8 rdy_pin; /* ready/busy */9696+ u8 rdy_pin_active_low; /* rdy_pin value is inverted */9697 u8 ale; /* address line number connected to ALE */9798 u8 cle; /* address line number connected to CLE */9899 u8 bus_width_16; /* buswidth is 16 bit */
···4242 writel(0, GPIO_EDGE_CAUSE(32));43434444 for (i = IRQ_KIRKWOOD_GPIO_START; i < NR_IRQS; i++) {4545- set_irq_chip(i, &orion_gpio_irq_level_chip);4545+ set_irq_chip(i, &orion_gpio_irq_chip);4646 set_irq_handler(i, handle_level_irq);4747 irq_desc[i].status |= IRQ_LEVEL;4848 set_irq_flags(i, IRQF_VALID);
+1-1
arch/arm/mach-mv78xx0/irq.c
···4040 writel(0, GPIO_EDGE_CAUSE(0));41414242 for (i = IRQ_MV78XX0_GPIO_START; i < NR_IRQS; i++) {4343- set_irq_chip(i, &orion_gpio_irq_level_chip);4343+ set_irq_chip(i, &orion_gpio_irq_chip);4444 set_irq_handler(i, handle_level_irq);4545 irq_desc[i].status |= IRQ_LEVEL;4646 set_irq_flags(i, IRQF_VALID);
+8-8
arch/arm/mach-omap2/clock.c
···565565 *566566 * Given a struct clk of a rate-selectable clksel clock, and a clock divisor,567567 * find the corresponding register field value. The return register value is568568- * the value before left-shifting. Returns 0xffffffff on error568568+ * the value before left-shifting. Returns ~0 on error569569 */570570u32 omap2_divisor_to_clksel(struct clk *clk, u32 div)571571{···577577578578 clks = omap2_get_clksel_by_parent(clk, clk->parent);579579 if (clks == NULL)580580- return 0;580580+ return ~0;581581582582 for (clkr = clks->rates; clkr->div; clkr++) {583583 if ((clkr->flags & cpu_mask) && (clkr->div == div))···588588 printk(KERN_ERR "clock: Could not find divisor %d for "589589 "clock %s parent %s\n", div, clk->name,590590 clk->parent->name);591591- return 0;591591+ return ~0;592592 }593593594594 return clkr->val;···708708 return 0;709709710710 for (clkr = clks->rates; clkr->div; clkr++) {711711- if (clkr->flags & (cpu_mask | DEFAULT_RATE))711711+ if (clkr->flags & cpu_mask && clkr->flags & DEFAULT_RATE)712712 break; /* Found the default rate for this platform */713713 }714714···746746 return -EINVAL;747747748748 if (clk->usecount > 0)749749- _omap2_clk_disable(clk);749749+ omap2_clk_disable(clk);750750751751 /* Set new source value (previous dividers if any in effect) */752752 reg_val = __raw_readl(src_addr) & ~field_mask;···759759 wmb();760760 }761761762762- if (clk->usecount > 0)763763- _omap2_clk_enable(clk);764764-765762 clk->parent = new_parent;763763+764764+ if (clk->usecount > 0)765765+ omap2_clk_enable(clk);766766767767 /* CLKSEL clocks follow their parents' rates, divided by a divisor */768768 clk->rate = new_parent->rate;
+1-1
arch/arm/mach-orion5x/irq.c
···4444 * User can use set_type() if he wants to use edge types handlers.4545 */4646 for (i = IRQ_ORION5X_GPIO_START; i < NR_IRQS; i++) {4747- set_irq_chip(i, &orion_gpio_irq_level_chip);4747+ set_irq_chip(i, &orion_gpio_irq_chip);4848 set_irq_handler(i, handle_level_irq);4949 irq_desc[i].status |= IRQ_LEVEL;5050 set_irq_flags(i, IRQF_VALID);
+2-1
arch/arm/mm/mmu.c
···693693 * Check whether this memory bank would entirely overlap694694 * the vmalloc area.695695 */696696- if (__va(bank->start) >= VMALLOC_MIN) {696696+ if (__va(bank->start) >= VMALLOC_MIN ||697697+ __va(bank->start) < PAGE_OFFSET) {697698 printk(KERN_NOTICE "Ignoring RAM at %.8lx-%.8lx "698699 "(vmalloc region overlap).\n",699700 bank->start, bank->start + bank->size - 1);
···116116 int enable_pin; /* chip enable */117117 int det_pin; /* card detect */118118 int rdy_pin; /* ready/busy */119119+ u8 rdy_pin_active_low; /* rdy_pin value is inverted */119120 u8 ale; /* address line number connected to ALE */120121 u8 cle; /* address line number connected to CLE */121122 u8 bus_width_16; /* buswidth is 16 bit */
+5-2
arch/ia64/Kconfig
···221221222222config IA64_XEN_GUEST223223 bool "Xen guest"224224+ select SWIOTLB224225 depends on XEN226226+ help227227+ Build a kernel that runs on Xen guest domain. At this moment only228228+ 16KB page size in supported.225229226230endchoice227231···483479 default y if VIRTUAL_MEM_MAP484480485481config HAVE_ARCH_EARLY_PFN_TO_NID486486- def_bool y487487- depends on NEED_MULTIPLE_NODES482482+ def_bool NUMA && SPARSEMEM488483489484config HAVE_ARCH_NODEDATA_EXTENSION490485 def_bool y
+1601
arch/ia64/configs/xen_domu_defconfig
···11+#22+# Automatically generated make config: don't edit33+# Linux kernel version: 2.6.29-rc144+# Fri Jan 16 11:49:59 200955+#66+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"77+88+#99+# General setup1010+#1111+CONFIG_EXPERIMENTAL=y1212+CONFIG_LOCK_KERNEL=y1313+CONFIG_INIT_ENV_ARG_LIMIT=321414+CONFIG_LOCALVERSION=""1515+CONFIG_LOCALVERSION_AUTO=y1616+CONFIG_SWAP=y1717+CONFIG_SYSVIPC=y1818+CONFIG_SYSVIPC_SYSCTL=y1919+CONFIG_POSIX_MQUEUE=y2020+# CONFIG_BSD_PROCESS_ACCT is not set2121+# CONFIG_TASKSTATS is not set2222+# CONFIG_AUDIT is not set2323+CONFIG_IKCONFIG=y2424+CONFIG_IKCONFIG_PROC=y2525+CONFIG_LOG_BUF_SHIFT=202626+CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y2727+# CONFIG_GROUP_SCHED is not set2828+2929+#3030+# Control Group support3131+#3232+# CONFIG_CGROUPS is not set3333+CONFIG_SYSFS_DEPRECATED=y3434+CONFIG_SYSFS_DEPRECATED_V2=y3535+# CONFIG_RELAY is not set3636+CONFIG_NAMESPACES=y3737+# CONFIG_UTS_NS is not set3838+# CONFIG_IPC_NS is not set3939+# CONFIG_USER_NS is not set4040+# CONFIG_PID_NS is not set4141+CONFIG_BLK_DEV_INITRD=y4242+CONFIG_INITRAMFS_SOURCE=""4343+CONFIG_CC_OPTIMIZE_FOR_SIZE=y4444+CONFIG_SYSCTL=y4545+# CONFIG_EMBEDDED is not set4646+CONFIG_SYSCTL_SYSCALL=y4747+CONFIG_KALLSYMS=y4848+CONFIG_KALLSYMS_ALL=y4949+CONFIG_KALLSYMS_STRIP_GENERATED=y5050+# CONFIG_KALLSYMS_EXTRA_PASS is not set5151+CONFIG_HOTPLUG=y5252+CONFIG_PRINTK=y5353+CONFIG_BUG=y5454+CONFIG_ELF_CORE=y5555+CONFIG_COMPAT_BRK=y5656+CONFIG_BASE_FULL=y5757+CONFIG_FUTEX=y5858+CONFIG_ANON_INODES=y5959+CONFIG_EPOLL=y6060+CONFIG_SIGNALFD=y6161+CONFIG_TIMERFD=y6262+CONFIG_EVENTFD=y6363+CONFIG_SHMEM=y6464+CONFIG_AIO=y6565+CONFIG_VM_EVENT_COUNTERS=y6666+CONFIG_PCI_QUIRKS=y6767+CONFIG_SLUB_DEBUG=y6868+# CONFIG_SLAB is not set6969+CONFIG_SLUB=y7070+# CONFIG_SLOB is not set7171+# CONFIG_PROFILING is not set7272+CONFIG_HAVE_OPROFILE=y7373+# CONFIG_KPROBES is not set7474+CONFIG_HAVE_KPROBES=y7575+CONFIG_HAVE_KRETPROBES=y7676+CONFIG_HAVE_ARCH_TRACEHOOK=y7777+CONFIG_HAVE_DMA_ATTRS=y7878+CONFIG_USE_GENERIC_SMP_HELPERS=y7979+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set8080+CONFIG_SLABINFO=y8181+CONFIG_RT_MUTEXES=y8282+CONFIG_BASE_SMALL=08383+CONFIG_MODULES=y8484+# CONFIG_MODULE_FORCE_LOAD is not set8585+CONFIG_MODULE_UNLOAD=y8686+# CONFIG_MODULE_FORCE_UNLOAD is not set8787+CONFIG_MODVERSIONS=y8888+CONFIG_MODULE_SRCVERSION_ALL=y8989+CONFIG_STOP_MACHINE=y9090+CONFIG_BLOCK=y9191+# CONFIG_BLK_DEV_IO_TRACE is not set9292+# CONFIG_BLK_DEV_BSG is not set9393+# CONFIG_BLK_DEV_INTEGRITY is not set9494+9595+#9696+# IO Schedulers9797+#9898+CONFIG_IOSCHED_NOOP=y9999+CONFIG_IOSCHED_AS=y100100+CONFIG_IOSCHED_DEADLINE=y101101+CONFIG_IOSCHED_CFQ=y102102+CONFIG_DEFAULT_AS=y103103+# CONFIG_DEFAULT_DEADLINE is not set104104+# CONFIG_DEFAULT_CFQ is not set105105+# CONFIG_DEFAULT_NOOP is not set106106+CONFIG_DEFAULT_IOSCHED="anticipatory"107107+CONFIG_CLASSIC_RCU=y108108+# CONFIG_TREE_RCU is not set109109+# CONFIG_PREEMPT_RCU is not set110110+# CONFIG_TREE_RCU_TRACE is not set111111+# CONFIG_PREEMPT_RCU_TRACE is not set112112+CONFIG_FREEZER=y113113+114114+#115115+# Processor type and features116116+#117117+CONFIG_IA64=y118118+CONFIG_64BIT=y119119+CONFIG_ZONE_DMA=y120120+CONFIG_QUICKLIST=y121121+CONFIG_MMU=y122122+CONFIG_SWIOTLB=y123123+CONFIG_IOMMU_HELPER=y124124+CONFIG_RWSEM_XCHGADD_ALGORITHM=y125125+CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y126126+CONFIG_GENERIC_FIND_NEXT_BIT=y127127+CONFIG_GENERIC_CALIBRATE_DELAY=y128128+CONFIG_GENERIC_TIME=y129129+CONFIG_GENERIC_TIME_VSYSCALL=y130130+CONFIG_HAVE_SETUP_PER_CPU_AREA=y131131+CONFIG_DMI=y132132+CONFIG_EFI=y133133+CONFIG_GENERIC_IOMAP=y134134+CONFIG_SCHED_OMIT_FRAME_POINTER=y135135+CONFIG_AUDIT_ARCH=y136136+CONFIG_PARAVIRT_GUEST=y137137+CONFIG_PARAVIRT=y138138+CONFIG_XEN=y139139+CONFIG_XEN_XENCOMM=y140140+CONFIG_NO_IDLE_HZ=y141141+# CONFIG_IA64_GENERIC is not set142142+# CONFIG_IA64_DIG is not set143143+# CONFIG_IA64_DIG_VTD is not set144144+# CONFIG_IA64_HP_ZX1 is not set145145+# CONFIG_IA64_HP_ZX1_SWIOTLB is not set146146+# CONFIG_IA64_SGI_SN2 is not set147147+# CONFIG_IA64_SGI_UV is not set148148+# CONFIG_IA64_HP_SIM is not set149149+CONFIG_IA64_XEN_GUEST=y150150+# CONFIG_ITANIUM is not set151151+CONFIG_MCKINLEY=y152152+# CONFIG_IA64_PAGE_SIZE_4KB is not set153153+# CONFIG_IA64_PAGE_SIZE_8KB is not set154154+CONFIG_IA64_PAGE_SIZE_16KB=y155155+# CONFIG_IA64_PAGE_SIZE_64KB is not set156156+CONFIG_PGTABLE_3=y157157+# CONFIG_PGTABLE_4 is not set158158+CONFIG_HZ=250159159+# CONFIG_HZ_100 is not set160160+CONFIG_HZ_250=y161161+# CONFIG_HZ_300 is not set162162+# CONFIG_HZ_1000 is not set163163+# CONFIG_SCHED_HRTICK is not set164164+CONFIG_IA64_L1_CACHE_SHIFT=7165165+CONFIG_IA64_CYCLONE=y166166+CONFIG_IOSAPIC=y167167+CONFIG_FORCE_MAX_ZONEORDER=17168168+# CONFIG_VIRT_CPU_ACCOUNTING is not set169169+CONFIG_SMP=y170170+CONFIG_NR_CPUS=16171171+CONFIG_HOTPLUG_CPU=y172172+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y173173+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y174174+# CONFIG_SCHED_SMT is not set175175+CONFIG_PERMIT_BSP_REMOVE=y176176+CONFIG_FORCE_CPEI_RETARGET=y177177+CONFIG_PREEMPT_NONE=y178178+# CONFIG_PREEMPT_VOLUNTARY is not set179179+# CONFIG_PREEMPT is not set180180+CONFIG_SELECT_MEMORY_MODEL=y181181+CONFIG_FLATMEM_MANUAL=y182182+# CONFIG_DISCONTIGMEM_MANUAL is not set183183+# CONFIG_SPARSEMEM_MANUAL is not set184184+CONFIG_FLATMEM=y185185+CONFIG_FLAT_NODE_MEM_MAP=y186186+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y187187+CONFIG_PAGEFLAGS_EXTENDED=y188188+CONFIG_SPLIT_PTLOCK_CPUS=4189189+CONFIG_MIGRATION=y190190+CONFIG_PHYS_ADDR_T_64BIT=y191191+CONFIG_ZONE_DMA_FLAG=1192192+CONFIG_BOUNCE=y193193+CONFIG_NR_QUICK=1194194+CONFIG_VIRT_TO_BUS=y195195+CONFIG_UNEVICTABLE_LRU=y196196+CONFIG_ARCH_SELECT_MEMORY_MODEL=y197197+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y198198+CONFIG_ARCH_FLATMEM_ENABLE=y199199+CONFIG_ARCH_SPARSEMEM_ENABLE=y200200+CONFIG_ARCH_POPULATES_NODE_MAP=y201201+CONFIG_VIRTUAL_MEM_MAP=y202202+CONFIG_HOLES_IN_ZONE=y203203+# CONFIG_IA32_SUPPORT is not set204204+# CONFIG_COMPAT_FOR_U64_ALIGNMENT is not set205205+CONFIG_IA64_MCA_RECOVERY=y206206+CONFIG_PERFMON=y207207+CONFIG_IA64_PALINFO=y208208+# CONFIG_IA64_MC_ERR_INJECT is not set209209+# CONFIG_IA64_ESI is not set210210+# CONFIG_IA64_HP_AML_NFW is not set211211+CONFIG_KEXEC=y212212+# CONFIG_CRASH_DUMP is not set213213+214214+#215215+# Firmware Drivers216216+#217217+# CONFIG_FIRMWARE_MEMMAP is not set218218+CONFIG_EFI_VARS=y219219+CONFIG_EFI_PCDP=y220220+CONFIG_DMIID=y221221+CONFIG_BINFMT_ELF=y222222+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set223223+# CONFIG_HAVE_AOUT is not set224224+CONFIG_BINFMT_MISC=m225225+226226+#227227+# Power management and ACPI options228228+#229229+CONFIG_PM=y230230+# CONFIG_PM_DEBUG is not set231231+CONFIG_PM_SLEEP=y232232+CONFIG_SUSPEND=y233233+CONFIG_SUSPEND_FREEZER=y234234+CONFIG_ACPI=y235235+CONFIG_ACPI_SLEEP=y236236+CONFIG_ACPI_PROCFS=y237237+CONFIG_ACPI_PROCFS_POWER=y238238+CONFIG_ACPI_SYSFS_POWER=y239239+CONFIG_ACPI_PROC_EVENT=y240240+CONFIG_ACPI_BUTTON=m241241+CONFIG_ACPI_FAN=m242242+# CONFIG_ACPI_DOCK is not set243243+CONFIG_ACPI_PROCESSOR=m244244+CONFIG_ACPI_HOTPLUG_CPU=y245245+CONFIG_ACPI_THERMAL=m246246+# CONFIG_ACPI_CUSTOM_DSDT is not set247247+CONFIG_ACPI_BLACKLIST_YEAR=0248248+# CONFIG_ACPI_DEBUG is not set249249+# CONFIG_ACPI_PCI_SLOT is not set250250+CONFIG_ACPI_SYSTEM=y251251+CONFIG_ACPI_CONTAINER=m252252+253253+#254254+# CPU Frequency scaling255255+#256256+# CONFIG_CPU_FREQ is not set257257+258258+#259259+# Bus options (PCI, PCMCIA)260260+#261261+CONFIG_PCI=y262262+CONFIG_PCI_DOMAINS=y263263+CONFIG_PCI_SYSCALL=y264264+# CONFIG_PCIEPORTBUS is not set265265+CONFIG_ARCH_SUPPORTS_MSI=y266266+# CONFIG_PCI_MSI is not set267267+CONFIG_PCI_LEGACY=y268268+# CONFIG_PCI_DEBUG is not set269269+# CONFIG_PCI_STUB is not set270270+CONFIG_HOTPLUG_PCI=m271271+# CONFIG_HOTPLUG_PCI_FAKE is not set272272+CONFIG_HOTPLUG_PCI_ACPI=m273273+# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set274274+# CONFIG_HOTPLUG_PCI_CPCI is not set275275+# CONFIG_HOTPLUG_PCI_SHPC is not set276276+# CONFIG_PCCARD is not set277277+CONFIG_NET=y278278+279279+#280280+# Networking options281281+#282282+# CONFIG_NET_NS is not set283283+CONFIG_COMPAT_NET_DEV_OPS=y284284+CONFIG_PACKET=y285285+# CONFIG_PACKET_MMAP is not set286286+CONFIG_UNIX=y287287+CONFIG_XFRM=y288288+# CONFIG_XFRM_USER is not set289289+# CONFIG_XFRM_SUB_POLICY is not set290290+# CONFIG_XFRM_MIGRATE is not set291291+# CONFIG_XFRM_STATISTICS is not set292292+# CONFIG_NET_KEY is not set293293+CONFIG_INET=y294294+CONFIG_IP_MULTICAST=y295295+# CONFIG_IP_ADVANCED_ROUTER is not set296296+CONFIG_IP_FIB_HASH=y297297+# CONFIG_IP_PNP is not set298298+# CONFIG_NET_IPIP is not set299299+# CONFIG_NET_IPGRE is not set300300+# CONFIG_IP_MROUTE is not set301301+CONFIG_ARPD=y302302+CONFIG_SYN_COOKIES=y303303+# CONFIG_INET_AH is not set304304+# CONFIG_INET_ESP is not set305305+# CONFIG_INET_IPCOMP is not set306306+# CONFIG_INET_XFRM_TUNNEL is not set307307+# CONFIG_INET_TUNNEL is not set308308+CONFIG_INET_XFRM_MODE_TRANSPORT=y309309+CONFIG_INET_XFRM_MODE_TUNNEL=y310310+CONFIG_INET_XFRM_MODE_BEET=y311311+# CONFIG_INET_LRO is not set312312+CONFIG_INET_DIAG=y313313+CONFIG_INET_TCP_DIAG=y314314+# CONFIG_TCP_CONG_ADVANCED is not set315315+CONFIG_TCP_CONG_CUBIC=y316316+CONFIG_DEFAULT_TCP_CONG="cubic"317317+# CONFIG_TCP_MD5SIG is not set318318+# CONFIG_IPV6 is not set319319+# CONFIG_NETWORK_SECMARK is not set320320+# CONFIG_NETFILTER is not set321321+# CONFIG_IP_DCCP is not set322322+# CONFIG_IP_SCTP is not set323323+# CONFIG_TIPC is not set324324+# CONFIG_ATM is not set325325+# CONFIG_BRIDGE is not set326326+# CONFIG_NET_DSA is not set327327+# CONFIG_VLAN_8021Q is not set328328+# CONFIG_DECNET is not set329329+# CONFIG_LLC2 is not set330330+# CONFIG_IPX is not set331331+# CONFIG_ATALK is not set332332+# CONFIG_X25 is not set333333+# CONFIG_LAPB is not set334334+# CONFIG_ECONET is not set335335+# CONFIG_WAN_ROUTER is not set336336+# CONFIG_NET_SCHED is not set337337+# CONFIG_DCB is not set338338+339339+#340340+# Network testing341341+#342342+# CONFIG_NET_PKTGEN is not set343343+# CONFIG_HAMRADIO is not set344344+# CONFIG_CAN is not set345345+# CONFIG_IRDA is not set346346+# CONFIG_BT is not set347347+# CONFIG_AF_RXRPC is not set348348+# CONFIG_PHONET is not set349349+# CONFIG_WIRELESS is not set350350+# CONFIG_WIMAX is not set351351+# CONFIG_RFKILL is not set352352+# CONFIG_NET_9P is not set353353+354354+#355355+# Device Drivers356356+#357357+358358+#359359+# Generic Driver Options360360+#361361+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"362362+CONFIG_STANDALONE=y363363+CONFIG_PREVENT_FIRMWARE_BUILD=y364364+CONFIG_FW_LOADER=y365365+CONFIG_FIRMWARE_IN_KERNEL=y366366+CONFIG_EXTRA_FIRMWARE=""367367+# CONFIG_DEBUG_DRIVER is not set368368+# CONFIG_DEBUG_DEVRES is not set369369+# CONFIG_SYS_HYPERVISOR is not set370370+# CONFIG_CONNECTOR is not set371371+# CONFIG_MTD is not set372372+# CONFIG_PARPORT is not set373373+CONFIG_PNP=y374374+CONFIG_PNP_DEBUG_MESSAGES=y375375+376376+#377377+# Protocols378378+#379379+CONFIG_PNPACPI=y380380+CONFIG_BLK_DEV=y381381+# CONFIG_BLK_CPQ_DA is not set382382+# CONFIG_BLK_CPQ_CISS_DA is not set383383+# CONFIG_BLK_DEV_DAC960 is not set384384+# CONFIG_BLK_DEV_UMEM is not set385385+# CONFIG_BLK_DEV_COW_COMMON is not set386386+CONFIG_BLK_DEV_LOOP=m387387+CONFIG_BLK_DEV_CRYPTOLOOP=m388388+CONFIG_BLK_DEV_NBD=m389389+# CONFIG_BLK_DEV_SX8 is not set390390+# CONFIG_BLK_DEV_UB is not set391391+CONFIG_BLK_DEV_RAM=y392392+CONFIG_BLK_DEV_RAM_COUNT=16393393+CONFIG_BLK_DEV_RAM_SIZE=4096394394+# CONFIG_BLK_DEV_XIP is not set395395+# CONFIG_CDROM_PKTCDVD is not set396396+# CONFIG_ATA_OVER_ETH is not set397397+CONFIG_XEN_BLKDEV_FRONTEND=y398398+# CONFIG_BLK_DEV_HD is not set399399+CONFIG_MISC_DEVICES=y400400+# CONFIG_PHANTOM is not set401401+# CONFIG_EEPROM_93CX6 is not set402402+# CONFIG_SGI_IOC4 is not set403403+# CONFIG_TIFM_CORE is not set404404+# CONFIG_ICS932S401 is not set405405+# CONFIG_ENCLOSURE_SERVICES is not set406406+# CONFIG_HP_ILO is not set407407+# CONFIG_C2PORT is not set408408+CONFIG_HAVE_IDE=y409409+CONFIG_IDE=y410410+411411+#412412+# Please see Documentation/ide/ide.txt for help/info on IDE drives413413+#414414+CONFIG_IDE_TIMINGS=y415415+CONFIG_IDE_ATAPI=y416416+# CONFIG_BLK_DEV_IDE_SATA is not set417417+CONFIG_IDE_GD=y418418+CONFIG_IDE_GD_ATA=y419419+# CONFIG_IDE_GD_ATAPI is not set420420+CONFIG_BLK_DEV_IDECD=y421421+CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y422422+# CONFIG_BLK_DEV_IDETAPE is not set423423+# CONFIG_BLK_DEV_IDEACPI is not set424424+# CONFIG_IDE_TASK_IOCTL is not set425425+CONFIG_IDE_PROC_FS=y426426+427427+#428428+# IDE chipset support/bugfixes429429+#430430+# CONFIG_IDE_GENERIC is not set431431+# CONFIG_BLK_DEV_PLATFORM is not set432432+# CONFIG_BLK_DEV_IDEPNP is not set433433+CONFIG_BLK_DEV_IDEDMA_SFF=y434434+435435+#436436+# PCI IDE chipsets support437437+#438438+CONFIG_BLK_DEV_IDEPCI=y439439+CONFIG_IDEPCI_PCIBUS_ORDER=y440440+# CONFIG_BLK_DEV_OFFBOARD is not set441441+CONFIG_BLK_DEV_GENERIC=y442442+# CONFIG_BLK_DEV_OPTI621 is not set443443+CONFIG_BLK_DEV_IDEDMA_PCI=y444444+# CONFIG_BLK_DEV_AEC62XX is not set445445+# CONFIG_BLK_DEV_ALI15X3 is not set446446+# CONFIG_BLK_DEV_AMD74XX is not set447447+CONFIG_BLK_DEV_CMD64X=y448448+# CONFIG_BLK_DEV_TRIFLEX is not set449449+# CONFIG_BLK_DEV_CS5520 is not set450450+# CONFIG_BLK_DEV_CS5530 is not set451451+# CONFIG_BLK_DEV_HPT366 is not set452452+# CONFIG_BLK_DEV_JMICRON is not set453453+# CONFIG_BLK_DEV_SC1200 is not set454454+CONFIG_BLK_DEV_PIIX=y455455+# CONFIG_BLK_DEV_IT8172 is not set456456+# CONFIG_BLK_DEV_IT8213 is not set457457+# CONFIG_BLK_DEV_IT821X is not set458458+# CONFIG_BLK_DEV_NS87415 is not set459459+# CONFIG_BLK_DEV_PDC202XX_OLD is not set460460+# CONFIG_BLK_DEV_PDC202XX_NEW is not set461461+# CONFIG_BLK_DEV_SVWKS is not set462462+# CONFIG_BLK_DEV_SIIMAGE is not set463463+# CONFIG_BLK_DEV_SLC90E66 is not set464464+# CONFIG_BLK_DEV_TRM290 is not set465465+# CONFIG_BLK_DEV_VIA82CXXX is not set466466+# CONFIG_BLK_DEV_TC86C001 is not set467467+CONFIG_BLK_DEV_IDEDMA=y468468+469469+#470470+# SCSI device support471471+#472472+# CONFIG_RAID_ATTRS is not set473473+CONFIG_SCSI=y474474+CONFIG_SCSI_DMA=y475475+# CONFIG_SCSI_TGT is not set476476+CONFIG_SCSI_NETLINK=y477477+CONFIG_SCSI_PROC_FS=y478478+479479+#480480+# SCSI support type (disk, tape, CD-ROM)481481+#482482+CONFIG_BLK_DEV_SD=y483483+CONFIG_CHR_DEV_ST=m484484+# CONFIG_CHR_DEV_OSST is not set485485+CONFIG_BLK_DEV_SR=m486486+# CONFIG_BLK_DEV_SR_VENDOR is not set487487+CONFIG_CHR_DEV_SG=m488488+# CONFIG_CHR_DEV_SCH is not set489489+490490+#491491+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs492492+#493493+# CONFIG_SCSI_MULTI_LUN is not set494494+# CONFIG_SCSI_CONSTANTS is not set495495+# CONFIG_SCSI_LOGGING is not set496496+# CONFIG_SCSI_SCAN_ASYNC is not set497497+CONFIG_SCSI_WAIT_SCAN=m498498+499499+#500500+# SCSI Transports501501+#502502+CONFIG_SCSI_SPI_ATTRS=y503503+CONFIG_SCSI_FC_ATTRS=y504504+# CONFIG_SCSI_ISCSI_ATTRS is not set505505+# CONFIG_SCSI_SAS_LIBSAS is not set506506+# CONFIG_SCSI_SRP_ATTRS is not set507507+CONFIG_SCSI_LOWLEVEL=y508508+# CONFIG_ISCSI_TCP is not set509509+# CONFIG_SCSI_CXGB3_ISCSI is not set510510+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set511511+# CONFIG_SCSI_3W_9XXX is not set512512+# CONFIG_SCSI_ACARD is not set513513+# CONFIG_SCSI_AACRAID is not set514514+# CONFIG_SCSI_AIC7XXX is not set515515+# CONFIG_SCSI_AIC7XXX_OLD is not set516516+# CONFIG_SCSI_AIC79XX is not set517517+# CONFIG_SCSI_AIC94XX is not set518518+# CONFIG_SCSI_DPT_I2O is not set519519+# CONFIG_SCSI_ADVANSYS is not set520520+# CONFIG_SCSI_ARCMSR is not set521521+# CONFIG_MEGARAID_NEWGEN is not set522522+# CONFIG_MEGARAID_LEGACY is not set523523+# CONFIG_MEGARAID_SAS is not set524524+# CONFIG_SCSI_HPTIOP is not set525525+# CONFIG_LIBFC is not set526526+# CONFIG_FCOE is not set527527+# CONFIG_SCSI_DMX3191D is not set528528+# CONFIG_SCSI_FUTURE_DOMAIN is not set529529+# CONFIG_SCSI_IPS is not set530530+# CONFIG_SCSI_INITIO is not set531531+# CONFIG_SCSI_INIA100 is not set532532+# CONFIG_SCSI_MVSAS is not set533533+# CONFIG_SCSI_STEX is not set534534+CONFIG_SCSI_SYM53C8XX_2=y535535+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1536536+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16537537+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64538538+CONFIG_SCSI_SYM53C8XX_MMIO=y539539+CONFIG_SCSI_QLOGIC_1280=y540540+# CONFIG_SCSI_QLA_FC is not set541541+# CONFIG_SCSI_QLA_ISCSI is not set542542+# CONFIG_SCSI_LPFC is not set543543+# CONFIG_SCSI_DC395x is not set544544+# CONFIG_SCSI_DC390T is not set545545+# CONFIG_SCSI_DEBUG is not set546546+# CONFIG_SCSI_SRP is not set547547+# CONFIG_SCSI_DH is not set548548+# CONFIG_ATA is not set549549+CONFIG_MD=y550550+CONFIG_BLK_DEV_MD=m551551+CONFIG_MD_LINEAR=m552552+CONFIG_MD_RAID0=m553553+CONFIG_MD_RAID1=m554554+# CONFIG_MD_RAID10 is not set555555+# CONFIG_MD_RAID456 is not set556556+CONFIG_MD_MULTIPATH=m557557+# CONFIG_MD_FAULTY is not set558558+CONFIG_BLK_DEV_DM=m559559+# CONFIG_DM_DEBUG is not set560560+CONFIG_DM_CRYPT=m561561+CONFIG_DM_SNAPSHOT=m562562+CONFIG_DM_MIRROR=m563563+CONFIG_DM_ZERO=m564564+# CONFIG_DM_MULTIPATH is not set565565+# CONFIG_DM_DELAY is not set566566+# CONFIG_DM_UEVENT is not set567567+CONFIG_FUSION=y568568+CONFIG_FUSION_SPI=y569569+CONFIG_FUSION_FC=y570570+# CONFIG_FUSION_SAS is not set571571+CONFIG_FUSION_MAX_SGE=128572572+CONFIG_FUSION_CTL=y573573+# CONFIG_FUSION_LOGGING is not set574574+575575+#576576+# IEEE 1394 (FireWire) support577577+#578578+579579+#580580+# Enable only one of the two stacks, unless you know what you are doing581581+#582582+# CONFIG_FIREWIRE is not set583583+# CONFIG_IEEE1394 is not set584584+# CONFIG_I2O is not set585585+CONFIG_NETDEVICES=y586586+CONFIG_DUMMY=m587587+# CONFIG_BONDING is not set588588+# CONFIG_MACVLAN is not set589589+# CONFIG_EQUALIZER is not set590590+# CONFIG_TUN is not set591591+# CONFIG_VETH is not set592592+# CONFIG_NET_SB1000 is not set593593+# CONFIG_ARCNET is not set594594+CONFIG_PHYLIB=y595595+596596+#597597+# MII PHY device drivers598598+#599599+# CONFIG_MARVELL_PHY is not set600600+# CONFIG_DAVICOM_PHY is not set601601+# CONFIG_QSEMI_PHY is not set602602+# CONFIG_LXT_PHY is not set603603+# CONFIG_CICADA_PHY is not set604604+# CONFIG_VITESSE_PHY is not set605605+# CONFIG_SMSC_PHY is not set606606+# CONFIG_BROADCOM_PHY is not set607607+# CONFIG_ICPLUS_PHY is not set608608+# CONFIG_REALTEK_PHY is not set609609+# CONFIG_NATIONAL_PHY is not set610610+# CONFIG_STE10XP is not set611611+# CONFIG_LSI_ET1011C_PHY is not set612612+# CONFIG_FIXED_PHY is not set613613+# CONFIG_MDIO_BITBANG is not set614614+CONFIG_NET_ETHERNET=y615615+CONFIG_MII=m616616+# CONFIG_HAPPYMEAL is not set617617+# CONFIG_SUNGEM is not set618618+# CONFIG_CASSINI is not set619619+# CONFIG_NET_VENDOR_3COM is not set620620+CONFIG_NET_TULIP=y621621+# CONFIG_DE2104X is not set622622+CONFIG_TULIP=m623623+# CONFIG_TULIP_MWI is not set624624+# CONFIG_TULIP_MMIO is not set625625+# CONFIG_TULIP_NAPI is not set626626+# CONFIG_DE4X5 is not set627627+# CONFIG_WINBOND_840 is not set628628+# CONFIG_DM9102 is not set629629+# CONFIG_ULI526X is not set630630+# CONFIG_HP100 is not set631631+# CONFIG_IBM_NEW_EMAC_ZMII is not set632632+# CONFIG_IBM_NEW_EMAC_RGMII is not set633633+# CONFIG_IBM_NEW_EMAC_TAH is not set634634+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set635635+# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set636636+# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set637637+# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set638638+CONFIG_NET_PCI=y639639+# CONFIG_PCNET32 is not set640640+# CONFIG_AMD8111_ETH is not set641641+# CONFIG_ADAPTEC_STARFIRE is not set642642+# CONFIG_B44 is not set643643+# CONFIG_FORCEDETH is not set644644+CONFIG_E100=m645645+# CONFIG_FEALNX is not set646646+# CONFIG_NATSEMI is not set647647+# CONFIG_NE2K_PCI is not set648648+# CONFIG_8139CP is not set649649+# CONFIG_8139TOO is not set650650+# CONFIG_R6040 is not set651651+# CONFIG_SIS900 is not set652652+# CONFIG_EPIC100 is not set653653+# CONFIG_SMSC9420 is not set654654+# CONFIG_SUNDANCE is not set655655+# CONFIG_TLAN is not set656656+# CONFIG_VIA_RHINE is not set657657+# CONFIG_SC92031 is not set658658+# CONFIG_ATL2 is not set659659+CONFIG_NETDEV_1000=y660660+# CONFIG_ACENIC is not set661661+# CONFIG_DL2K is not set662662+CONFIG_E1000=y663663+# CONFIG_E1000E is not set664664+# CONFIG_IP1000 is not set665665+# CONFIG_IGB is not set666666+# CONFIG_NS83820 is not set667667+# CONFIG_HAMACHI is not set668668+# CONFIG_YELLOWFIN is not set669669+# CONFIG_R8169 is not set670670+# CONFIG_SIS190 is not set671671+# CONFIG_SKGE is not set672672+# CONFIG_SKY2 is not set673673+# CONFIG_VIA_VELOCITY is not set674674+CONFIG_TIGON3=y675675+# CONFIG_BNX2 is not set676676+# CONFIG_QLA3XXX is not set677677+# CONFIG_ATL1 is not set678678+# CONFIG_ATL1E is not set679679+# CONFIG_JME is not set680680+CONFIG_NETDEV_10000=y681681+# CONFIG_CHELSIO_T1 is not set682682+CONFIG_CHELSIO_T3_DEPENDS=y683683+# CONFIG_CHELSIO_T3 is not set684684+# CONFIG_ENIC is not set685685+# CONFIG_IXGBE is not set686686+# CONFIG_IXGB is not set687687+# CONFIG_S2IO is not set688688+# CONFIG_MYRI10GE is not set689689+# CONFIG_NETXEN_NIC is not set690690+# CONFIG_NIU is not set691691+# CONFIG_MLX4_EN is not set692692+# CONFIG_MLX4_CORE is not set693693+# CONFIG_TEHUTI is not set694694+# CONFIG_BNX2X is not set695695+# CONFIG_QLGE is not set696696+# CONFIG_SFC is not set697697+# CONFIG_TR is not set698698+699699+#700700+# Wireless LAN701701+#702702+# CONFIG_WLAN_PRE80211 is not set703703+# CONFIG_WLAN_80211 is not set704704+# CONFIG_IWLWIFI_LEDS is not set705705+706706+#707707+# Enable WiMAX (Networking options) to see the WiMAX drivers708708+#709709+710710+#711711+# USB Network Adapters712712+#713713+# CONFIG_USB_CATC is not set714714+# CONFIG_USB_KAWETH is not set715715+# CONFIG_USB_PEGASUS is not set716716+# CONFIG_USB_RTL8150 is not set717717+# CONFIG_USB_USBNET is not set718718+# CONFIG_WAN is not set719719+CONFIG_XEN_NETDEV_FRONTEND=y720720+# CONFIG_FDDI is not set721721+# CONFIG_HIPPI is not set722722+# CONFIG_PPP is not set723723+# CONFIG_SLIP is not set724724+# CONFIG_NET_FC is not set725725+CONFIG_NETCONSOLE=y726726+# CONFIG_NETCONSOLE_DYNAMIC is not set727727+CONFIG_NETPOLL=y728728+# CONFIG_NETPOLL_TRAP is not set729729+CONFIG_NET_POLL_CONTROLLER=y730730+# CONFIG_ISDN is not set731731+# CONFIG_PHONE is not set732732+733733+#734734+# Input device support735735+#736736+CONFIG_INPUT=y737737+# CONFIG_INPUT_FF_MEMLESS is not set738738+# CONFIG_INPUT_POLLDEV is not set739739+740740+#741741+# Userland interfaces742742+#743743+CONFIG_INPUT_MOUSEDEV=y744744+CONFIG_INPUT_MOUSEDEV_PSAUX=y745745+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024746746+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768747747+# CONFIG_INPUT_JOYDEV is not set748748+# CONFIG_INPUT_EVDEV is not set749749+# CONFIG_INPUT_EVBUG is not set750750+751751+#752752+# Input Device Drivers753753+#754754+CONFIG_INPUT_KEYBOARD=y755755+CONFIG_KEYBOARD_ATKBD=y756756+# CONFIG_KEYBOARD_SUNKBD is not set757757+# CONFIG_KEYBOARD_LKKBD is not set758758+# CONFIG_KEYBOARD_XTKBD is not set759759+# CONFIG_KEYBOARD_NEWTON is not set760760+# CONFIG_KEYBOARD_STOWAWAY is not set761761+CONFIG_INPUT_MOUSE=y762762+CONFIG_MOUSE_PS2=y763763+CONFIG_MOUSE_PS2_ALPS=y764764+CONFIG_MOUSE_PS2_LOGIPS2PP=y765765+CONFIG_MOUSE_PS2_SYNAPTICS=y766766+CONFIG_MOUSE_PS2_LIFEBOOK=y767767+CONFIG_MOUSE_PS2_TRACKPOINT=y768768+# CONFIG_MOUSE_PS2_ELANTECH is not set769769+# CONFIG_MOUSE_PS2_TOUCHKIT is not set770770+# CONFIG_MOUSE_SERIAL is not set771771+# CONFIG_MOUSE_APPLETOUCH is not set772772+# CONFIG_MOUSE_BCM5974 is not set773773+# CONFIG_MOUSE_VSXXXAA is not set774774+# CONFIG_INPUT_JOYSTICK is not set775775+# CONFIG_INPUT_TABLET is not set776776+# CONFIG_INPUT_TOUCHSCREEN is not set777777+# CONFIG_INPUT_MISC is not set778778+779779+#780780+# Hardware I/O ports781781+#782782+CONFIG_SERIO=y783783+CONFIG_SERIO_I8042=y784784+# CONFIG_SERIO_SERPORT is not set785785+# CONFIG_SERIO_PCIPS2 is not set786786+CONFIG_SERIO_LIBPS2=y787787+# CONFIG_SERIO_RAW is not set788788+CONFIG_GAMEPORT=m789789+# CONFIG_GAMEPORT_NS558 is not set790790+# CONFIG_GAMEPORT_L4 is not set791791+# CONFIG_GAMEPORT_EMU10K1 is not set792792+# CONFIG_GAMEPORT_FM801 is not set793793+794794+#795795+# Character devices796796+#797797+CONFIG_VT=y798798+CONFIG_CONSOLE_TRANSLATIONS=y799799+CONFIG_VT_CONSOLE=y800800+CONFIG_HW_CONSOLE=y801801+# CONFIG_VT_HW_CONSOLE_BINDING is not set802802+CONFIG_DEVKMEM=y803803+CONFIG_SERIAL_NONSTANDARD=y804804+# CONFIG_COMPUTONE is not set805805+# CONFIG_ROCKETPORT is not set806806+# CONFIG_CYCLADES is not set807807+# CONFIG_DIGIEPCA is not set808808+# CONFIG_MOXA_INTELLIO is not set809809+# CONFIG_MOXA_SMARTIO is not set810810+# CONFIG_ISI is not set811811+# CONFIG_SYNCLINKMP is not set812812+# CONFIG_SYNCLINK_GT is not set813813+# CONFIG_N_HDLC is not set814814+# CONFIG_RISCOM8 is not set815815+# CONFIG_SPECIALIX is not set816816+# CONFIG_SX is not set817817+# CONFIG_RIO is not set818818+# CONFIG_STALDRV is not set819819+# CONFIG_NOZOMI is not set820820+821821+#822822+# Serial drivers823823+#824824+CONFIG_SERIAL_8250=y825825+CONFIG_SERIAL_8250_CONSOLE=y826826+CONFIG_SERIAL_8250_PCI=y827827+CONFIG_SERIAL_8250_PNP=y828828+CONFIG_SERIAL_8250_NR_UARTS=6829829+CONFIG_SERIAL_8250_RUNTIME_UARTS=4830830+CONFIG_SERIAL_8250_EXTENDED=y831831+CONFIG_SERIAL_8250_SHARE_IRQ=y832832+# CONFIG_SERIAL_8250_DETECT_IRQ is not set833833+# CONFIG_SERIAL_8250_RSA is not set834834+835835+#836836+# Non-8250 serial port support837837+#838838+CONFIG_SERIAL_CORE=y839839+CONFIG_SERIAL_CORE_CONSOLE=y840840+# CONFIG_SERIAL_JSM is not set841841+CONFIG_UNIX98_PTYS=y842842+# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set843843+CONFIG_LEGACY_PTYS=y844844+CONFIG_LEGACY_PTY_COUNT=256845845+CONFIG_HVC_DRIVER=y846846+CONFIG_HVC_IRQ=y847847+CONFIG_HVC_XEN=y848848+# CONFIG_IPMI_HANDLER is not set849849+# CONFIG_HW_RANDOM is not set850850+CONFIG_EFI_RTC=y851851+# CONFIG_R3964 is not set852852+# CONFIG_APPLICOM is not set853853+CONFIG_RAW_DRIVER=m854854+CONFIG_MAX_RAW_DEVS=256855855+CONFIG_HPET=y856856+CONFIG_HPET_MMAP=y857857+# CONFIG_HANGCHECK_TIMER is not set858858+# CONFIG_TCG_TPM is not set859859+CONFIG_DEVPORT=y860860+CONFIG_I2C=m861861+CONFIG_I2C_BOARDINFO=y862862+# CONFIG_I2C_CHARDEV is not set863863+CONFIG_I2C_HELPER_AUTO=y864864+CONFIG_I2C_ALGOBIT=m865865+866866+#867867+# I2C Hardware Bus support868868+#869869+870870+#871871+# PC SMBus host controller drivers872872+#873873+# CONFIG_I2C_ALI1535 is not set874874+# CONFIG_I2C_ALI1563 is not set875875+# CONFIG_I2C_ALI15X3 is not set876876+# CONFIG_I2C_AMD756 is not set877877+# CONFIG_I2C_AMD8111 is not set878878+# CONFIG_I2C_I801 is not set879879+# CONFIG_I2C_ISCH is not set880880+# CONFIG_I2C_PIIX4 is not set881881+# CONFIG_I2C_NFORCE2 is not set882882+# CONFIG_I2C_SIS5595 is not set883883+# CONFIG_I2C_SIS630 is not set884884+# CONFIG_I2C_SIS96X is not set885885+# CONFIG_I2C_VIA is not set886886+# CONFIG_I2C_VIAPRO is not set887887+888888+#889889+# I2C system bus drivers (mostly embedded / system-on-chip)890890+#891891+# CONFIG_I2C_OCORES is not set892892+# CONFIG_I2C_SIMTEC is not set893893+894894+#895895+# External I2C/SMBus adapter drivers896896+#897897+# CONFIG_I2C_PARPORT_LIGHT is not set898898+# CONFIG_I2C_TAOS_EVM is not set899899+# CONFIG_I2C_TINY_USB is not set900900+901901+#902902+# Graphics adapter I2C/DDC channel drivers903903+#904904+# CONFIG_I2C_VOODOO3 is not set905905+906906+#907907+# Other I2C/SMBus bus drivers908908+#909909+# CONFIG_I2C_PCA_PLATFORM is not set910910+# CONFIG_I2C_STUB is not set911911+912912+#913913+# Miscellaneous I2C Chip support914914+#915915+# CONFIG_DS1682 is not set916916+# CONFIG_AT24 is not set917917+# CONFIG_SENSORS_EEPROM is not set918918+# CONFIG_SENSORS_PCF8574 is not set919919+# CONFIG_PCF8575 is not set920920+# CONFIG_SENSORS_PCA9539 is not set921921+# CONFIG_SENSORS_PCF8591 is not set922922+# CONFIG_SENSORS_MAX6875 is not set923923+# CONFIG_SENSORS_TSL2550 is not set924924+# CONFIG_I2C_DEBUG_CORE is not set925925+# CONFIG_I2C_DEBUG_ALGO is not set926926+# CONFIG_I2C_DEBUG_BUS is not set927927+# CONFIG_I2C_DEBUG_CHIP is not set928928+# CONFIG_SPI is not set929929+# CONFIG_W1 is not set930930+CONFIG_POWER_SUPPLY=y931931+# CONFIG_POWER_SUPPLY_DEBUG is not set932932+# CONFIG_PDA_POWER is not set933933+# CONFIG_BATTERY_DS2760 is not set934934+# CONFIG_BATTERY_BQ27x00 is not set935935+CONFIG_HWMON=y936936+# CONFIG_HWMON_VID is not set937937+# CONFIG_SENSORS_AD7414 is not set938938+# CONFIG_SENSORS_AD7418 is not set939939+# CONFIG_SENSORS_ADM1021 is not set940940+# CONFIG_SENSORS_ADM1025 is not set941941+# CONFIG_SENSORS_ADM1026 is not set942942+# CONFIG_SENSORS_ADM1029 is not set943943+# CONFIG_SENSORS_ADM1031 is not set944944+# CONFIG_SENSORS_ADM9240 is not set945945+# CONFIG_SENSORS_ADT7462 is not set946946+# CONFIG_SENSORS_ADT7470 is not set947947+# CONFIG_SENSORS_ADT7473 is not set948948+# CONFIG_SENSORS_ATXP1 is not set949949+# CONFIG_SENSORS_DS1621 is not set950950+# CONFIG_SENSORS_I5K_AMB is not set951951+# CONFIG_SENSORS_F71805F is not set952952+# CONFIG_SENSORS_F71882FG is not set953953+# CONFIG_SENSORS_F75375S is not set954954+# CONFIG_SENSORS_GL518SM is not set955955+# CONFIG_SENSORS_GL520SM is not set956956+# CONFIG_SENSORS_IT87 is not set957957+# CONFIG_SENSORS_LM63 is not set958958+# CONFIG_SENSORS_LM75 is not set959959+# CONFIG_SENSORS_LM77 is not set960960+# CONFIG_SENSORS_LM78 is not set961961+# CONFIG_SENSORS_LM80 is not set962962+# CONFIG_SENSORS_LM83 is not set963963+# CONFIG_SENSORS_LM85 is not set964964+# CONFIG_SENSORS_LM87 is not set965965+# CONFIG_SENSORS_LM90 is not set966966+# CONFIG_SENSORS_LM92 is not set967967+# CONFIG_SENSORS_LM93 is not set968968+# CONFIG_SENSORS_LTC4245 is not set969969+# CONFIG_SENSORS_MAX1619 is not set970970+# CONFIG_SENSORS_MAX6650 is not set971971+# CONFIG_SENSORS_PC87360 is not set972972+# CONFIG_SENSORS_PC87427 is not set973973+# CONFIG_SENSORS_SIS5595 is not set974974+# CONFIG_SENSORS_DME1737 is not set975975+# CONFIG_SENSORS_SMSC47M1 is not set976976+# CONFIG_SENSORS_SMSC47M192 is not set977977+# CONFIG_SENSORS_SMSC47B397 is not set978978+# CONFIG_SENSORS_ADS7828 is not set979979+# CONFIG_SENSORS_THMC50 is not set980980+# CONFIG_SENSORS_VIA686A is not set981981+# CONFIG_SENSORS_VT1211 is not set982982+# CONFIG_SENSORS_VT8231 is not set983983+# CONFIG_SENSORS_W83781D is not set984984+# CONFIG_SENSORS_W83791D is not set985985+# CONFIG_SENSORS_W83792D is not set986986+# CONFIG_SENSORS_W83793 is not set987987+# CONFIG_SENSORS_W83L785TS is not set988988+# CONFIG_SENSORS_W83L786NG is not set989989+# CONFIG_SENSORS_W83627HF is not set990990+# CONFIG_SENSORS_W83627EHF is not set991991+# CONFIG_SENSORS_LIS3LV02D is not set992992+# CONFIG_HWMON_DEBUG_CHIP is not set993993+CONFIG_THERMAL=m994994+# CONFIG_THERMAL_HWMON is not set995995+# CONFIG_WATCHDOG is not set996996+CONFIG_SSB_POSSIBLE=y997997+998998+#999999+# Sonics Silicon Backplane10001000+#10011001+# CONFIG_SSB is not set10021002+10031003+#10041004+# Multifunction device drivers10051005+#10061006+# CONFIG_MFD_CORE is not set10071007+# CONFIG_MFD_SM501 is not set10081008+# CONFIG_HTC_PASIC3 is not set10091009+# CONFIG_MFD_TMIO is not set10101010+# CONFIG_MFD_WM8400 is not set10111011+# CONFIG_MFD_WM8350_I2C is not set10121012+# CONFIG_MFD_PCF50633 is not set10131013+# CONFIG_REGULATOR is not set10141014+10151015+#10161016+# Multimedia devices10171017+#10181018+10191019+#10201020+# Multimedia core support10211021+#10221022+# CONFIG_VIDEO_DEV is not set10231023+# CONFIG_DVB_CORE is not set10241024+# CONFIG_VIDEO_MEDIA is not set10251025+10261026+#10271027+# Multimedia drivers10281028+#10291029+CONFIG_DAB=y10301030+# CONFIG_USB_DABUSB is not set10311031+10321032+#10331033+# Graphics support10341034+#10351035+CONFIG_AGP=m10361036+CONFIG_DRM=m10371037+CONFIG_DRM_TDFX=m10381038+CONFIG_DRM_R128=m10391039+CONFIG_DRM_RADEON=m10401040+CONFIG_DRM_MGA=m10411041+CONFIG_DRM_SIS=m10421042+# CONFIG_DRM_VIA is not set10431043+# CONFIG_DRM_SAVAGE is not set10441044+# CONFIG_VGASTATE is not set10451045+# CONFIG_VIDEO_OUTPUT_CONTROL is not set10461046+# CONFIG_FB is not set10471047+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set10481048+10491049+#10501050+# Display device support10511051+#10521052+# CONFIG_DISPLAY_SUPPORT is not set10531053+10541054+#10551055+# Console display driver support10561056+#10571057+CONFIG_VGA_CONSOLE=y10581058+# CONFIG_VGACON_SOFT_SCROLLBACK is not set10591059+CONFIG_DUMMY_CONSOLE=y10601060+# CONFIG_SOUND is not set10611061+CONFIG_HID_SUPPORT=y10621062+CONFIG_HID=y10631063+# CONFIG_HID_DEBUG is not set10641064+# CONFIG_HIDRAW is not set10651065+10661066+#10671067+# USB Input Devices10681068+#10691069+CONFIG_USB_HID=y10701070+# CONFIG_HID_PID is not set10711071+# CONFIG_USB_HIDDEV is not set10721072+10731073+#10741074+# Special HID drivers10751075+#10761076+CONFIG_HID_COMPAT=y10771077+CONFIG_HID_A4TECH=y10781078+CONFIG_HID_APPLE=y10791079+CONFIG_HID_BELKIN=y10801080+CONFIG_HID_CHERRY=y10811081+CONFIG_HID_CHICONY=y10821082+CONFIG_HID_CYPRESS=y10831083+CONFIG_HID_EZKEY=y10841084+CONFIG_HID_GYRATION=y10851085+CONFIG_HID_LOGITECH=y10861086+# CONFIG_LOGITECH_FF is not set10871087+# CONFIG_LOGIRUMBLEPAD2_FF is not set10881088+CONFIG_HID_MICROSOFT=y10891089+CONFIG_HID_MONTEREY=y10901090+CONFIG_HID_NTRIG=y10911091+CONFIG_HID_PANTHERLORD=y10921092+# CONFIG_PANTHERLORD_FF is not set10931093+CONFIG_HID_PETALYNX=y10941094+CONFIG_HID_SAMSUNG=y10951095+CONFIG_HID_SONY=y10961096+CONFIG_HID_SUNPLUS=y10971097+# CONFIG_GREENASIA_FF is not set10981098+CONFIG_HID_TOPSEED=y10991099+# CONFIG_THRUSTMASTER_FF is not set11001100+# CONFIG_ZEROPLUS_FF is not set11011101+CONFIG_USB_SUPPORT=y11021102+CONFIG_USB_ARCH_HAS_HCD=y11031103+CONFIG_USB_ARCH_HAS_OHCI=y11041104+CONFIG_USB_ARCH_HAS_EHCI=y11051105+CONFIG_USB=y11061106+# CONFIG_USB_DEBUG is not set11071107+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set11081108+11091109+#11101110+# Miscellaneous USB options11111111+#11121112+CONFIG_USB_DEVICEFS=y11131113+CONFIG_USB_DEVICE_CLASS=y11141114+# CONFIG_USB_DYNAMIC_MINORS is not set11151115+# CONFIG_USB_SUSPEND is not set11161116+# CONFIG_USB_OTG is not set11171117+# CONFIG_USB_MON is not set11181118+# CONFIG_USB_WUSB is not set11191119+# CONFIG_USB_WUSB_CBAF is not set11201120+11211121+#11221122+# USB Host Controller Drivers11231123+#11241124+# CONFIG_USB_C67X00_HCD is not set11251125+CONFIG_USB_EHCI_HCD=m11261126+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set11271127+# CONFIG_USB_EHCI_TT_NEWSCHED is not set11281128+# CONFIG_USB_OXU210HP_HCD is not set11291129+# CONFIG_USB_ISP116X_HCD is not set11301130+# CONFIG_USB_ISP1760_HCD is not set11311131+CONFIG_USB_OHCI_HCD=m11321132+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set11331133+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set11341134+CONFIG_USB_OHCI_LITTLE_ENDIAN=y11351135+CONFIG_USB_UHCI_HCD=y11361136+# CONFIG_USB_SL811_HCD is not set11371137+# CONFIG_USB_R8A66597_HCD is not set11381138+# CONFIG_USB_WHCI_HCD is not set11391139+# CONFIG_USB_HWA_HCD is not set11401140+11411141+#11421142+# USB Device Class drivers11431143+#11441144+# CONFIG_USB_ACM is not set11451145+# CONFIG_USB_PRINTER is not set11461146+# CONFIG_USB_WDM is not set11471147+# CONFIG_USB_TMC is not set11481148+11491149+#11501150+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;11511151+#11521152+11531153+#11541154+# see USB_STORAGE Help for more information11551155+#11561156+CONFIG_USB_STORAGE=m11571157+# CONFIG_USB_STORAGE_DEBUG is not set11581158+# CONFIG_USB_STORAGE_DATAFAB is not set11591159+# CONFIG_USB_STORAGE_FREECOM is not set11601160+# CONFIG_USB_STORAGE_ISD200 is not set11611161+# CONFIG_USB_STORAGE_USBAT is not set11621162+# CONFIG_USB_STORAGE_SDDR09 is not set11631163+# CONFIG_USB_STORAGE_SDDR55 is not set11641164+# CONFIG_USB_STORAGE_JUMPSHOT is not set11651165+# CONFIG_USB_STORAGE_ALAUDA is not set11661166+# CONFIG_USB_STORAGE_ONETOUCH is not set11671167+# CONFIG_USB_STORAGE_KARMA is not set11681168+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set11691169+# CONFIG_USB_LIBUSUAL is not set11701170+11711171+#11721172+# USB Imaging devices11731173+#11741174+# CONFIG_USB_MDC800 is not set11751175+# CONFIG_USB_MICROTEK is not set11761176+11771177+#11781178+# USB port drivers11791179+#11801180+# CONFIG_USB_SERIAL is not set11811181+11821182+#11831183+# USB Miscellaneous drivers11841184+#11851185+# CONFIG_USB_EMI62 is not set11861186+# CONFIG_USB_EMI26 is not set11871187+# CONFIG_USB_ADUTUX is not set11881188+# CONFIG_USB_SEVSEG is not set11891189+# CONFIG_USB_RIO500 is not set11901190+# CONFIG_USB_LEGOTOWER is not set11911191+# CONFIG_USB_LCD is not set11921192+# CONFIG_USB_BERRY_CHARGE is not set11931193+# CONFIG_USB_LED is not set11941194+# CONFIG_USB_CYPRESS_CY7C63 is not set11951195+# CONFIG_USB_CYTHERM is not set11961196+# CONFIG_USB_PHIDGET is not set11971197+# CONFIG_USB_IDMOUSE is not set11981198+# CONFIG_USB_FTDI_ELAN is not set11991199+# CONFIG_USB_APPLEDISPLAY is not set12001200+# CONFIG_USB_SISUSBVGA is not set12011201+# CONFIG_USB_LD is not set12021202+# CONFIG_USB_TRANCEVIBRATOR is not set12031203+# CONFIG_USB_IOWARRIOR is not set12041204+# CONFIG_USB_TEST is not set12051205+# CONFIG_USB_ISIGHTFW is not set12061206+# CONFIG_USB_VST is not set12071207+# CONFIG_USB_GADGET is not set12081208+12091209+#12101210+# OTG and related infrastructure12111211+#12121212+# CONFIG_UWB is not set12131213+# CONFIG_MMC is not set12141214+# CONFIG_MEMSTICK is not set12151215+# CONFIG_NEW_LEDS is not set12161216+# CONFIG_ACCESSIBILITY is not set12171217+# CONFIG_INFINIBAND is not set12181218+# CONFIG_RTC_CLASS is not set12191219+# CONFIG_DMADEVICES is not set12201220+# CONFIG_UIO is not set12211221+CONFIG_XEN_BALLOON=y12221222+CONFIG_XEN_SCRUB_PAGES=y12231223+CONFIG_XENFS=y12241224+CONFIG_XEN_COMPAT_XENFS=y12251225+# CONFIG_STAGING is not set12261226+# CONFIG_MSPEC is not set12271227+12281228+#12291229+# File systems12301230+#12311231+CONFIG_EXT2_FS=y12321232+CONFIG_EXT2_FS_XATTR=y12331233+CONFIG_EXT2_FS_POSIX_ACL=y12341234+CONFIG_EXT2_FS_SECURITY=y12351235+# CONFIG_EXT2_FS_XIP is not set12361236+CONFIG_EXT3_FS=y12371237+CONFIG_EXT3_FS_XATTR=y12381238+CONFIG_EXT3_FS_POSIX_ACL=y12391239+CONFIG_EXT3_FS_SECURITY=y12401240+# CONFIG_EXT4_FS is not set12411241+CONFIG_JBD=y12421242+CONFIG_FS_MBCACHE=y12431243+CONFIG_REISERFS_FS=y12441244+# CONFIG_REISERFS_CHECK is not set12451245+# CONFIG_REISERFS_PROC_INFO is not set12461246+CONFIG_REISERFS_FS_XATTR=y12471247+CONFIG_REISERFS_FS_POSIX_ACL=y12481248+CONFIG_REISERFS_FS_SECURITY=y12491249+# CONFIG_JFS_FS is not set12501250+CONFIG_FS_POSIX_ACL=y12511251+CONFIG_FILE_LOCKING=y12521252+CONFIG_XFS_FS=y12531253+# CONFIG_XFS_QUOTA is not set12541254+# CONFIG_XFS_POSIX_ACL is not set12551255+# CONFIG_XFS_RT is not set12561256+# CONFIG_XFS_DEBUG is not set12571257+# CONFIG_GFS2_FS is not set12581258+# CONFIG_OCFS2_FS is not set12591259+# CONFIG_BTRFS_FS is not set12601260+CONFIG_DNOTIFY=y12611261+CONFIG_INOTIFY=y12621262+CONFIG_INOTIFY_USER=y12631263+# CONFIG_QUOTA is not set12641264+CONFIG_AUTOFS_FS=y12651265+CONFIG_AUTOFS4_FS=y12661266+# CONFIG_FUSE_FS is not set12671267+12681268+#12691269+# CD-ROM/DVD Filesystems12701270+#12711271+CONFIG_ISO9660_FS=m12721272+CONFIG_JOLIET=y12731273+# CONFIG_ZISOFS is not set12741274+CONFIG_UDF_FS=m12751275+CONFIG_UDF_NLS=y12761276+12771277+#12781278+# DOS/FAT/NT Filesystems12791279+#12801280+CONFIG_FAT_FS=y12811281+# CONFIG_MSDOS_FS is not set12821282+CONFIG_VFAT_FS=y12831283+CONFIG_FAT_DEFAULT_CODEPAGE=43712841284+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"12851285+CONFIG_NTFS_FS=m12861286+# CONFIG_NTFS_DEBUG is not set12871287+# CONFIG_NTFS_RW is not set12881288+12891289+#12901290+# Pseudo filesystems12911291+#12921292+CONFIG_PROC_FS=y12931293+CONFIG_PROC_KCORE=y12941294+CONFIG_PROC_SYSCTL=y12951295+CONFIG_PROC_PAGE_MONITOR=y12961296+CONFIG_SYSFS=y12971297+CONFIG_TMPFS=y12981298+# CONFIG_TMPFS_POSIX_ACL is not set12991299+CONFIG_HUGETLBFS=y13001300+CONFIG_HUGETLB_PAGE=y13011301+# CONFIG_CONFIGFS_FS is not set13021302+CONFIG_MISC_FILESYSTEMS=y13031303+# CONFIG_ADFS_FS is not set13041304+# CONFIG_AFFS_FS is not set13051305+# CONFIG_HFS_FS is not set13061306+# CONFIG_HFSPLUS_FS is not set13071307+# CONFIG_BEFS_FS is not set13081308+# CONFIG_BFS_FS is not set13091309+# CONFIG_EFS_FS is not set13101310+# CONFIG_CRAMFS is not set13111311+# CONFIG_SQUASHFS is not set13121312+# CONFIG_VXFS_FS is not set13131313+# CONFIG_MINIX_FS is not set13141314+# CONFIG_OMFS_FS is not set13151315+# CONFIG_HPFS_FS is not set13161316+# CONFIG_QNX4FS_FS is not set13171317+# CONFIG_ROMFS_FS is not set13181318+# CONFIG_SYSV_FS is not set13191319+# CONFIG_UFS_FS is not set13201320+CONFIG_NETWORK_FILESYSTEMS=y13211321+CONFIG_NFS_FS=m13221322+CONFIG_NFS_V3=y13231323+# CONFIG_NFS_V3_ACL is not set13241324+CONFIG_NFS_V4=y13251325+CONFIG_NFSD=m13261326+CONFIG_NFSD_V3=y13271327+# CONFIG_NFSD_V3_ACL is not set13281328+CONFIG_NFSD_V4=y13291329+CONFIG_LOCKD=m13301330+CONFIG_LOCKD_V4=y13311331+CONFIG_EXPORTFS=m13321332+CONFIG_NFS_COMMON=y13331333+CONFIG_SUNRPC=m13341334+CONFIG_SUNRPC_GSS=m13351335+# CONFIG_SUNRPC_REGISTER_V4 is not set13361336+CONFIG_RPCSEC_GSS_KRB5=m13371337+# CONFIG_RPCSEC_GSS_SPKM3 is not set13381338+CONFIG_SMB_FS=m13391339+CONFIG_SMB_NLS_DEFAULT=y13401340+CONFIG_SMB_NLS_REMOTE="cp437"13411341+CONFIG_CIFS=m13421342+# CONFIG_CIFS_STATS is not set13431343+# CONFIG_CIFS_WEAK_PW_HASH is not set13441344+# CONFIG_CIFS_XATTR is not set13451345+# CONFIG_CIFS_DEBUG2 is not set13461346+# CONFIG_CIFS_EXPERIMENTAL is not set13471347+# CONFIG_NCP_FS is not set13481348+# CONFIG_CODA_FS is not set13491349+# CONFIG_AFS_FS is not set13501350+13511351+#13521352+# Partition Types13531353+#13541354+CONFIG_PARTITION_ADVANCED=y13551355+# CONFIG_ACORN_PARTITION is not set13561356+# CONFIG_OSF_PARTITION is not set13571357+# CONFIG_AMIGA_PARTITION is not set13581358+# CONFIG_ATARI_PARTITION is not set13591359+# CONFIG_MAC_PARTITION is not set13601360+CONFIG_MSDOS_PARTITION=y13611361+# CONFIG_BSD_DISKLABEL is not set13621362+# CONFIG_MINIX_SUBPARTITION is not set13631363+# CONFIG_SOLARIS_X86_PARTITION is not set13641364+# CONFIG_UNIXWARE_DISKLABEL is not set13651365+# CONFIG_LDM_PARTITION is not set13661366+CONFIG_SGI_PARTITION=y13671367+# CONFIG_ULTRIX_PARTITION is not set13681368+# CONFIG_SUN_PARTITION is not set13691369+# CONFIG_KARMA_PARTITION is not set13701370+CONFIG_EFI_PARTITION=y13711371+# CONFIG_SYSV68_PARTITION is not set13721372+CONFIG_NLS=y13731373+CONFIG_NLS_DEFAULT="iso8859-1"13741374+CONFIG_NLS_CODEPAGE_437=y13751375+CONFIG_NLS_CODEPAGE_737=m13761376+CONFIG_NLS_CODEPAGE_775=m13771377+CONFIG_NLS_CODEPAGE_850=m13781378+CONFIG_NLS_CODEPAGE_852=m13791379+CONFIG_NLS_CODEPAGE_855=m13801380+CONFIG_NLS_CODEPAGE_857=m13811381+CONFIG_NLS_CODEPAGE_860=m13821382+CONFIG_NLS_CODEPAGE_861=m13831383+CONFIG_NLS_CODEPAGE_862=m13841384+CONFIG_NLS_CODEPAGE_863=m13851385+CONFIG_NLS_CODEPAGE_864=m13861386+CONFIG_NLS_CODEPAGE_865=m13871387+CONFIG_NLS_CODEPAGE_866=m13881388+CONFIG_NLS_CODEPAGE_869=m13891389+CONFIG_NLS_CODEPAGE_936=m13901390+CONFIG_NLS_CODEPAGE_950=m13911391+CONFIG_NLS_CODEPAGE_932=m13921392+CONFIG_NLS_CODEPAGE_949=m13931393+CONFIG_NLS_CODEPAGE_874=m13941394+CONFIG_NLS_ISO8859_8=m13951395+CONFIG_NLS_CODEPAGE_1250=m13961396+CONFIG_NLS_CODEPAGE_1251=m13971397+# CONFIG_NLS_ASCII is not set13981398+CONFIG_NLS_ISO8859_1=y13991399+CONFIG_NLS_ISO8859_2=m14001400+CONFIG_NLS_ISO8859_3=m14011401+CONFIG_NLS_ISO8859_4=m14021402+CONFIG_NLS_ISO8859_5=m14031403+CONFIG_NLS_ISO8859_6=m14041404+CONFIG_NLS_ISO8859_7=m14051405+CONFIG_NLS_ISO8859_9=m14061406+CONFIG_NLS_ISO8859_13=m14071407+CONFIG_NLS_ISO8859_14=m14081408+CONFIG_NLS_ISO8859_15=m14091409+CONFIG_NLS_KOI8_R=m14101410+CONFIG_NLS_KOI8_U=m14111411+CONFIG_NLS_UTF8=m14121412+# CONFIG_DLM is not set14131413+14141414+#14151415+# Kernel hacking14161416+#14171417+# CONFIG_PRINTK_TIME is not set14181418+CONFIG_ENABLE_WARN_DEPRECATED=y14191419+CONFIG_ENABLE_MUST_CHECK=y14201420+CONFIG_FRAME_WARN=204814211421+CONFIG_MAGIC_SYSRQ=y14221422+# CONFIG_UNUSED_SYMBOLS is not set14231423+# CONFIG_DEBUG_FS is not set14241424+# CONFIG_HEADERS_CHECK is not set14251425+CONFIG_DEBUG_KERNEL=y14261426+# CONFIG_DEBUG_SHIRQ is not set14271427+CONFIG_DETECT_SOFTLOCKUP=y14281428+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set14291429+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=014301430+CONFIG_SCHED_DEBUG=y14311431+# CONFIG_SCHEDSTATS is not set14321432+# CONFIG_TIMER_STATS is not set14331433+# CONFIG_DEBUG_OBJECTS is not set14341434+# CONFIG_SLUB_DEBUG_ON is not set14351435+# CONFIG_SLUB_STATS is not set14361436+# CONFIG_DEBUG_RT_MUTEXES is not set14371437+# CONFIG_RT_MUTEX_TESTER is not set14381438+# CONFIG_DEBUG_SPINLOCK is not set14391439+CONFIG_DEBUG_MUTEXES=y14401440+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set14411441+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set14421442+# CONFIG_DEBUG_KOBJECT is not set14431443+# CONFIG_DEBUG_INFO is not set14441444+# CONFIG_DEBUG_VM is not set14451445+# CONFIG_DEBUG_WRITECOUNT is not set14461446+CONFIG_DEBUG_MEMORY_INIT=y14471447+# CONFIG_DEBUG_LIST is not set14481448+# CONFIG_DEBUG_SG is not set14491449+# CONFIG_DEBUG_NOTIFIERS is not set14501450+# CONFIG_BOOT_PRINTK_DELAY is not set14511451+# CONFIG_RCU_TORTURE_TEST is not set14521452+# CONFIG_RCU_CPU_STALL_DETECTOR is not set14531453+# CONFIG_BACKTRACE_SELF_TEST is not set14541454+# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set14551455+# CONFIG_FAULT_INJECTION is not set14561456+# CONFIG_SYSCTL_SYSCALL_CHECK is not set14571457+14581458+#14591459+# Tracers14601460+#14611461+# CONFIG_SCHED_TRACER is not set14621462+# CONFIG_CONTEXT_SWITCH_TRACER is not set14631463+# CONFIG_BOOT_TRACER is not set14641464+# CONFIG_TRACE_BRANCH_PROFILING is not set14651465+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set14661466+# CONFIG_SAMPLES is not set14671467+CONFIG_IA64_GRANULE_16MB=y14681468+# CONFIG_IA64_GRANULE_64MB is not set14691469+# CONFIG_IA64_PRINT_HAZARDS is not set14701470+# CONFIG_DISABLE_VHPT is not set14711471+# CONFIG_IA64_DEBUG_CMPXCHG is not set14721472+# CONFIG_IA64_DEBUG_IRQ is not set14731473+14741474+#14751475+# Security options14761476+#14771477+# CONFIG_KEYS is not set14781478+# CONFIG_SECURITY is not set14791479+# CONFIG_SECURITYFS is not set14801480+# CONFIG_SECURITY_FILE_CAPABILITIES is not set14811481+CONFIG_CRYPTO=y14821482+14831483+#14841484+# Crypto core or helper14851485+#14861486+# CONFIG_CRYPTO_FIPS is not set14871487+CONFIG_CRYPTO_ALGAPI=y14881488+CONFIG_CRYPTO_ALGAPI2=y14891489+CONFIG_CRYPTO_AEAD2=y14901490+CONFIG_CRYPTO_BLKCIPHER=m14911491+CONFIG_CRYPTO_BLKCIPHER2=y14921492+CONFIG_CRYPTO_HASH=y14931493+CONFIG_CRYPTO_HASH2=y14941494+CONFIG_CRYPTO_RNG2=y14951495+CONFIG_CRYPTO_MANAGER=m14961496+CONFIG_CRYPTO_MANAGER2=y14971497+# CONFIG_CRYPTO_GF128MUL is not set14981498+# CONFIG_CRYPTO_NULL is not set14991499+# CONFIG_CRYPTO_CRYPTD is not set15001500+# CONFIG_CRYPTO_AUTHENC is not set15011501+# CONFIG_CRYPTO_TEST is not set15021502+15031503+#15041504+# Authenticated Encryption with Associated Data15051505+#15061506+# CONFIG_CRYPTO_CCM is not set15071507+# CONFIG_CRYPTO_GCM is not set15081508+# CONFIG_CRYPTO_SEQIV is not set15091509+15101510+#15111511+# Block modes15121512+#15131513+CONFIG_CRYPTO_CBC=m15141514+# CONFIG_CRYPTO_CTR is not set15151515+# CONFIG_CRYPTO_CTS is not set15161516+CONFIG_CRYPTO_ECB=m15171517+# CONFIG_CRYPTO_LRW is not set15181518+CONFIG_CRYPTO_PCBC=m15191519+# CONFIG_CRYPTO_XTS is not set15201520+15211521+#15221522+# Hash modes15231523+#15241524+# CONFIG_CRYPTO_HMAC is not set15251525+# CONFIG_CRYPTO_XCBC is not set15261526+15271527+#15281528+# Digest15291529+#15301530+# CONFIG_CRYPTO_CRC32C is not set15311531+# CONFIG_CRYPTO_MD4 is not set15321532+CONFIG_CRYPTO_MD5=y15331533+# CONFIG_CRYPTO_MICHAEL_MIC is not set15341534+# CONFIG_CRYPTO_RMD128 is not set15351535+# CONFIG_CRYPTO_RMD160 is not set15361536+# CONFIG_CRYPTO_RMD256 is not set15371537+# CONFIG_CRYPTO_RMD320 is not set15381538+# CONFIG_CRYPTO_SHA1 is not set15391539+# CONFIG_CRYPTO_SHA256 is not set15401540+# CONFIG_CRYPTO_SHA512 is not set15411541+# CONFIG_CRYPTO_TGR192 is not set15421542+# CONFIG_CRYPTO_WP512 is not set15431543+15441544+#15451545+# Ciphers15461546+#15471547+# CONFIG_CRYPTO_AES is not set15481548+# CONFIG_CRYPTO_ANUBIS is not set15491549+# CONFIG_CRYPTO_ARC4 is not set15501550+# CONFIG_CRYPTO_BLOWFISH is not set15511551+# CONFIG_CRYPTO_CAMELLIA is not set15521552+# CONFIG_CRYPTO_CAST5 is not set15531553+# CONFIG_CRYPTO_CAST6 is not set15541554+CONFIG_CRYPTO_DES=m15551555+# CONFIG_CRYPTO_FCRYPT is not set15561556+# CONFIG_CRYPTO_KHAZAD is not set15571557+# CONFIG_CRYPTO_SALSA20 is not set15581558+# CONFIG_CRYPTO_SEED is not set15591559+# CONFIG_CRYPTO_SERPENT is not set15601560+# CONFIG_CRYPTO_TEA is not set15611561+# CONFIG_CRYPTO_TWOFISH is not set15621562+15631563+#15641564+# Compression15651565+#15661566+# CONFIG_CRYPTO_DEFLATE is not set15671567+# CONFIG_CRYPTO_LZO is not set15681568+15691569+#15701570+# Random Number Generation15711571+#15721572+# CONFIG_CRYPTO_ANSI_CPRNG is not set15731573+CONFIG_CRYPTO_HW=y15741574+# CONFIG_CRYPTO_DEV_HIFN_795X is not set15751575+CONFIG_HAVE_KVM=y15761576+CONFIG_VIRTUALIZATION=y15771577+# CONFIG_KVM is not set15781578+# CONFIG_VIRTIO_PCI is not set15791579+# CONFIG_VIRTIO_BALLOON is not set15801580+15811581+#15821582+# Library routines15831583+#15841584+CONFIG_BITREVERSE=y15851585+CONFIG_GENERIC_FIND_LAST_BIT=y15861586+# CONFIG_CRC_CCITT is not set15871587+# CONFIG_CRC16 is not set15881588+# CONFIG_CRC_T10DIF is not set15891589+CONFIG_CRC_ITU_T=m15901590+CONFIG_CRC32=y15911591+# CONFIG_CRC7 is not set15921592+# CONFIG_LIBCRC32C is not set15931593+CONFIG_PLIST=y15941594+CONFIG_HAS_IOMEM=y15951595+CONFIG_HAS_IOPORT=y15961596+CONFIG_HAS_DMA=y15971597+CONFIG_GENERIC_HARDIRQS=y15981598+CONFIG_GENERIC_IRQ_PROBE=y15991599+CONFIG_GENERIC_PENDING_IRQ=y16001600+CONFIG_IRQ_PER_CPU=y16011601+# CONFIG_IOMMU_API is not set
+4
arch/ia64/include/asm/kvm.h
···25252626#include <linux/ioctl.h>27272828+/* Select x86 specific features in <linux/kvm.h> */2929+#define __KVM_HAVE_IOAPIC3030+#define __KVM_HAVE_DEVICE_ASSIGNMENT3131+2832/* Architectural interrupt line count. */2933#define KVM_NR_INTERRUPTS 2563034
-4
arch/ia64/include/asm/mmzone.h
···3131#endif3232}33333434-#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID3535-extern int early_pfn_to_nid(unsigned long pfn);3636-#endif3737-3834#ifdef CONFIG_IA64_DIG /* DIG systems are small */3935# define MAX_PHYSNODE_ID 84036# define NR_NODE_MEMBLKS (MAX_NUMNODES * 8)
+1-1
arch/ia64/include/asm/sn/bte.h
···3939/* BTE status register only supports 16 bits for length field */4040#define BTE_LEN_BITS (16)4141#define BTE_LEN_MASK ((1 << BTE_LEN_BITS) - 1)4242-#define BTE_MAX_XFER ((1 << BTE_LEN_BITS) * L1_CACHE_BYTES)4242+#define BTE_MAX_XFER (BTE_LEN_MASK << L1_CACHE_SHIFT)434344444545/* Define hardware */
···455455 if (!vmm_fpswa_interface)456456 return (fpswa_ret_t) {-1, 0, 0, 0};457457458458- /*459459- * Just let fpswa driver to use hardware fp registers.460460- * No fp register is valid in memory.461461- */462458 memset(&fp_state, 0, sizeof(fp_state_t));463459464460 /*461461+ * compute fp_state. only FP registers f6 - f11 are used by the462462+ * vmm, so set those bits in the mask and set the low volatile463463+ * pointer to point to these registers.464464+ */465465+ fp_state.bitmask_low64 = 0xfc0; /* bit6..bit11 */466466+467467+ fp_state.fp_state_low_volatile = (fp_state_low_volatile_t *) ®s->f6;468468+469469+ /*465470 * unsigned long (*EFI_FPSWA) (466471 * unsigned long trap_type,467472 * void *Bundle,···550545 status = vmm_handle_fpu_swa(0, regs, isr);551546 if (!status)552547 return ;553553- else if (-EAGAIN == status) {554554- vcpu_decrement_iip(vcpu);555555- return ;556556- }557548 break;558549 }559550
+2-2
arch/ia64/mm/numa.c
···5858 * SPARSEMEM to allocate the SPARSEMEM sectionmap on the NUMA node where5959 * the section resides.6060 */6161-int early_pfn_to_nid(unsigned long pfn)6161+int __meminit __early_pfn_to_nid(unsigned long pfn)6262{6363 int i, section = pfn >> PFN_SECTION_SHIFT, ssec, esec;6464···7070 return node_memblk[i].nid;7171 }72727373- return 0;7373+ return -1;7474}75757676#ifdef CONFIG_MEMORY_HOTPLUG
···6060/* It should be preserving the high 48 bits and then specifically */6161/* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */6262#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \6363- _PAGE_HPTEFLAGS)6363+ _PAGE_HPTEFLAGS | _PAGE_SPECIAL)64646565/* Bits to mask out from a PMD to get to the PTE page */6666#define PMD_MASKED_BITS 0
+1-1
arch/powerpc/include/asm/pgtable-64k.h
···114114 * pgprot changes115115 */116116#define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \117117- _PAGE_ACCESSED)117117+ _PAGE_ACCESSED | _PAGE_SPECIAL)118118119119/* Bits to mask out from a PMD to get to the PTE page */120120#define PMD_MASKED_BITS 0x1ff
···43434444extern struct mem_chunk memory_chunk[];4545extern unsigned long real_memory_size;4646+extern int memory_end_set;4747+extern unsigned long memory_end;46484749void detect_memory_layout(struct mem_chunk chunk[]);4850
+7-2
arch/s390/kernel/setup.c
···82828383struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS];8484volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */8585-static unsigned long __initdata memory_end;8585+8686+int __initdata memory_end_set;8787+unsigned long __initdata memory_end;86888789/*8890 * This is set up by the setup-routine at boot-time···283281static int __init early_parse_mem(char *p)284282{285283 memory_end = memparse(p, &p);284284+ memory_end_set = 1;286285 return 0;287286}288287early_param("mem", early_parse_mem);···511508 int i;512509513510#if defined(CONFIG_ZFCPDUMP) || defined(CONFIG_ZFCPDUMP_MODULE)514514- if (ipl_info.type == IPL_TYPE_FCP_DUMP)511511+ if (ipl_info.type == IPL_TYPE_FCP_DUMP) {515512 memory_end = ZFCPDUMP_HSA_SIZE;513513+ memory_end_set = 1;514514+ }516515#endif517516 memory_size = 0;518517 memory_end &= PAGE_MASK;
···174174 Add a simple leak tracer to the IOMMU code. This is useful when you175175 are debugging a buggy device driver that leaks IOMMU mappings.176176177177-config MMIOTRACE178178- bool "Memory mapped IO tracing"179179- depends on DEBUG_KERNEL && PCI180180- select TRACING181181- help182182- Mmiotrace traces Memory Mapped I/O access and is meant for183183- debugging and reverse engineering. It is called from the ioremap184184- implementation and works via page faults. Tracing is disabled by185185- default and can be enabled at run-time.186186-187187- See Documentation/tracers/mmiotrace.txt.188188- If you are not helping to develop drivers, say N.189189-190190-config MMIOTRACE_TEST191191- tristate "Test module for mmiotrace"192192- depends on MMIOTRACE && m193193- help194194- This is a dumb module for testing mmiotrace. It is very dangerous195195- as it will write garbage to IO memory starting at a given address.196196- However, it should be safe to use on e.g. unused portion of VRAM.197197-198198- Say N, unless you absolutely know what you are doing.177177+config HAVE_MMIOTRACE_SUPPORT178178+ def_bool y199179200180#201181# IO delay types:
+7
arch/x86/include/asm/kvm.h
···99#include <linux/types.h>1010#include <linux/ioctl.h>11111212+/* Select x86 specific features in <linux/kvm.h> */1313+#define __KVM_HAVE_PIT1414+#define __KVM_HAVE_IOAPIC1515+#define __KVM_HAVE_DEVICE_ASSIGNMENT1616+#define __KVM_HAVE_MSI1717+#define __KVM_HAVE_USER_NMI1818+1219/* Architectural interrupt line count. */1320#define KVM_NR_INTERRUPTS 2561421
-2
arch/x86/include/asm/mmzone_32.h
···3232 get_memcfg_numa_flat();3333}34343535-extern int early_pfn_to_nid(unsigned long pfn);3636-3735extern void resume_map_numa_kva(pgd_t *pgd);38363937#else /* !CONFIG_NUMA */
···5757typedef struct { pgprotval_t pgprot; } pgprot_t;58585959extern int page_is_ram(unsigned long pagenr);6060-extern int pagerange_is_ram(unsigned long start, unsigned long end);6160extern int devmem_is_allowed(unsigned long pagenr);6261extern void map_devmem(unsigned long pfn, unsigned long size,6362 pgprot_t vma_prot);
···1313 * Hooray, we are in Long 64-bit mode (but still running in low memory)1414 */1515ENTRY(wakeup_long64)1616-wakeup_long64:1716 movq saved_magic, %rax1817 movq $0x123456789abcdef0, %rdx1918 cmpq %rdx, %rax···33343435 movq saved_rip, %rax3536 jmp *%rax3737+ENDPROC(wakeup_long64)36383739bogus_64_magic:3840 jmp bogus_64_magic39414040- .align 24141- .p2align 4,,154242-.globl do_suspend_lowlevel4343- .type do_suspend_lowlevel,@function4444-do_suspend_lowlevel:4545-.LFB5:4242+ENTRY(do_suspend_lowlevel)4643 subq $8, %rsp4744 xorl %eax, %eax4845 call save_processor_state···6267 pushfq6368 popq pt_regs_flags(%rax)64696565- movq $.L97, saved_rip(%rip)7070+ movq $resume_point, saved_rip(%rip)66716772 movq %rsp, saved_rsp6873 movq %rbp, saved_rbp···7378 addq $8, %rsp7479 movl $3, %edi7580 xorl %eax, %eax7676- jmp acpi_enter_sleep_state7777-.L97:7878- .p2align 4,,77979-.L99:8080- .align 48181- movl $24, %eax8282- movw %ax, %ds8181+ call acpi_enter_sleep_state8282+ /* in case something went wrong, restore the machine status and go on */8383+ jmp resume_point83848585+ .align 48686+resume_point:8487 /* We don't restore %rax, it must be 0 anyway */8588 movq $saved_context, %rax8689 movq saved_context_cr4(%rax), %rbx···110117 xorl %eax, %eax111118 addq $8, %rsp112119 jmp restore_processor_state113113-.LFE5:114114-.Lfe5:115115- .size do_suspend_lowlevel, .Lfe5-do_suspend_lowlevel116116-120120+ENDPROC(do_suspend_lowlevel)121121+117122.data118118-ALIGN119123ENTRY(saved_rbp) .quad 0120124ENTRY(saved_rsi) .quad 0121125ENTRY(saved_rdi) .quad 0
+1-1
arch/x86/kernel/apic.c
···862862 }863863864864 /* lets not touch this if we didn't frob it */865865-#if defined(CONFIG_X86_MCE_P4THERMAL) || defined(X86_MCE_INTEL)865865+#if defined(CONFIG_X86_MCE_P4THERMAL) || defined(CONFIG_X86_MCE_INTEL)866866 if (maxlvt >= 5) {867867 v = apic_read(APIC_LVTTHMR);868868 apic_write(APIC_LVTTHMR, v | APIC_LVT_MASKED);
+7-5
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
···11571157 data->cpu = pol->cpu;11581158 data->currpstate = HW_PSTATE_INVALID;1159115911601160- rc = powernow_k8_cpu_init_acpi(data);11611161- if (rc) {11601160+ if (powernow_k8_cpu_init_acpi(data)) {11621161 /*11631162 * Use the PSB BIOS structure. This is only availabe on11641163 * an UP version, and is deprecated by AMD.···11751176 "ACPI maintainers and complain to your BIOS "11761177 "vendor.\n");11771178#endif11781178- goto err_out;11791179+ kfree(data);11801180+ return -ENODEV;11791181 }11801182 if (pol->cpu != 0) {11811183 printk(KERN_ERR FW_BUG PFX "No ACPI _PSS objects for "11821184 "CPU other than CPU0. Complain to your BIOS "11831185 "vendor.\n");11841184- goto err_out;11861186+ kfree(data);11871187+ return -ENODEV;11851188 }11861189 rc = find_psb_table(data);11871190 if (rc) {11881188- goto err_out;11911191+ kfree(data);11921192+ return -ENODEV;11891193 }11901194 /* Take a crude guess here.11911195 * That guess was in microseconds, so multiply with 1000 */
+4-3
arch/x86/kernel/cpu/mcheck/mce_64.c
···295295 * If we know that the error was in user space, send a296296 * SIGBUS. Otherwise, panic if tolerance is low.297297 *298298- * do_exit() takes an awful lot of locks and has a slight298298+ * force_sig() takes an awful lot of locks and has a slight299299 * risk of deadlocking.300300 */301301 if (user_space) {302302- do_exit(SIGBUS);302302+ force_sig(SIGBUS, current);303303 } else if (panic_on_oops || tolerant < 2) {304304 mce_panic("Uncorrected machine check",305305 &panicm, mcestart);···490490491491}492492493493-static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c)493493+static void mce_cpu_features(struct cpuinfo_x86 *c)494494{495495 switch (c->x86_vendor) {496496 case X86_VENDOR_INTEL:···734734static int mce_resume(struct sys_device *dev)735735{736736 mce_init(NULL);737737+ mce_cpu_features(¤t_cpu_data);737738 return 0;738739}739740
+1-1
arch/x86/kernel/cpu/mcheck/mce_amd_64.c
···121121}122122123123/* cpu init entry point, called from mce.c with preempt off */124124-void __cpuinit mce_amd_feature_init(struct cpuinfo_x86 *c)124124+void mce_amd_feature_init(struct cpuinfo_x86 *c)125125{126126 unsigned int bank, block;127127 unsigned int cpu = smp_processor_id();
···269269 now = hpet_readl(HPET_COUNTER);270270 cmp = now + (unsigned long) delta;271271 cfg = hpet_readl(HPET_Tn_CFG(timer));272272+ /* Make sure we use edge triggered interrupts */273273+ cfg &= ~HPET_TN_LEVEL;272274 cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |273275 HPET_TN_SETVAL | HPET_TN_32BIT;274276 hpet_writel(cfg, HPET_Tn_CFG(timer));
+1-1
arch/x86/kernel/olpc.c
···203203static void __init platform_detect(void)204204{205205 /* stopgap until OFW support is added to the kernel */206206- olpc_platform_info.boardrev = 0xc2;206206+ olpc_platform_info.boardrev = olpc_board(0xc2);207207}208208#endif209209
···810810811811static void ptrace_bts_detach(struct task_struct *child)812812{813813- if (unlikely(child->bts)) {814814- ds_release_bts(child->bts);815815- child->bts = NULL;816816-817817- ptrace_bts_free_buffer(child);818818- }813813+ /*814814+ * Ptrace_detach() races with ptrace_untrace() in case815815+ * the child dies and is reaped by another thread.816816+ *817817+ * We only do the memory accounting at this point and818818+ * leave the buffer deallocation and the bts tracer819819+ * release to ptrace_bts_untrace() which will be called820820+ * later on with tasklist_lock held.821821+ */822822+ release_locked_buffer(child->bts_buffer, child->bts_size);819823}820824#else821825static inline void ptrace_bts_fork(struct task_struct *tsk) {}
···16001600 /* Okay, we can deliver the interrupt: grab it and update PIC state. */16011601 intr_vector = kvm_cpu_get_interrupt(vcpu);16021602 svm_inject_irq(svm, intr_vector);16031603- kvm_timer_intr_post(vcpu, intr_vector);16041603out:16051604 update_cr8_intercept(vcpu);16061605}
+2-3
arch/x86/kvm/vmx.c
···903903 data = vmcs_readl(GUEST_SYSENTER_ESP);904904 break;905905 default:906906+ vmx_load_host_state(to_vmx(vcpu));906907 msr = find_msr_entry(to_vmx(vcpu), msr_index);907908 if (msr) {908909 data = msr->data;···32863285 }32873286 if (vcpu->arch.interrupt.pending) {32883287 vmx_inject_irq(vcpu, vcpu->arch.interrupt.nr);32893289- kvm_timer_intr_post(vcpu, vcpu->arch.interrupt.nr);32903288 if (kvm_cpu_has_interrupt(vcpu))32913289 enable_irq_window(vcpu);32923290 }···36873687 if (vm_need_ept()) {36883688 bypass_guest_pf = 0;36893689 kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK |36903690- VMX_EPT_WRITABLE_MASK |36913691- VMX_EPT_IGMT_BIT);36903690+ VMX_EPT_WRITABLE_MASK);36923691 kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull,36933692 VMX_EPT_EXECUTABLE_MASK,36943693 VMX_EPT_DEFAULT_MT << VMX_EPT_MT_EPTE_SHIFT);
+8-2
arch/x86/kvm/x86.c
···967967 case KVM_CAP_MMU_SHADOW_CACHE_CONTROL:968968 case KVM_CAP_SET_TSS_ADDR:969969 case KVM_CAP_EXT_CPUID:970970- case KVM_CAP_CLOCKSOURCE:971970 case KVM_CAP_PIT:972971 case KVM_CAP_NOP_IO_DELAY:973972 case KVM_CAP_MP_STATE:···990991 break;991992 case KVM_CAP_IOMMU:992993 r = iommu_found();994994+ break;995995+ case KVM_CAP_CLOCKSOURCE:996996+ r = boot_cpu_has(X86_FEATURE_CONSTANT_TSC);993997 break;994998 default:995999 r = 0;···4129412741304128}4131412941324132-void kvm_arch_destroy_vm(struct kvm *kvm)41304130+void kvm_arch_sync_events(struct kvm *kvm)41334131{41344132 kvm_free_all_assigned_devices(kvm);41334133+}41344134+41354135+void kvm_arch_destroy_vm(struct kvm *kvm)41364136+{41354137 kvm_iommu_unmap_guest(kvm);41364138 kvm_free_pit(kvm);41374139 kfree(kvm->arch.vpic);
-19
arch/x86/mm/ioremap.c
···134134 return 0;135135}136136137137-int pagerange_is_ram(unsigned long start, unsigned long end)138138-{139139- int ram_page = 0, not_rampage = 0;140140- unsigned long page_nr;141141-142142- for (page_nr = (start >> PAGE_SHIFT); page_nr < (end >> PAGE_SHIFT);143143- ++page_nr) {144144- if (page_is_ram(page_nr))145145- ram_page = 1;146146- else147147- not_rampage = 1;148148-149149- if (ram_page == not_rampage)150150- return -1;151151- }152152-153153- return ram_page;154154-}155155-156137/*157138 * Fix up the linear direct mapping of the kernel to avoid cache attribute158139 * conflicts.
+1-1
arch/x86/mm/numa_64.c
···145145 return shift;146146}147147148148-int early_pfn_to_nid(unsigned long pfn)148148+int __meminit __early_pfn_to_nid(unsigned long pfn)149149{150150 return phys_to_nid(pfn << PAGE_SHIFT);151151}
+19-11
arch/x86/mm/pageattr.c
···508508#endif509509510510 /*511511- * Install the new, split up pagetable. Important details here:511511+ * Install the new, split up pagetable.512512 *513513- * On Intel the NX bit of all levels must be cleared to make a514514- * page executable. See section 4.13.2 of Intel 64 and IA-32515515- * Architectures Software Developer's Manual).516516- *517517- * Mark the entry present. The current mapping might be518518- * set to not present, which we preserved above.513513+ * We use the standard kernel pagetable protections for the new514514+ * pagetable protections, the actual ptes set above control the515515+ * primary protection behavior:519516 */520520- ref_prot = pte_pgprot(pte_mkexec(pte_clrhuge(*kpte)));521521- pgprot_val(ref_prot) |= _PAGE_PRESENT;522522- __set_pmd_pte(kpte, address, mk_pte(base, ref_prot));517517+ __set_pmd_pte(kpte, address, mk_pte(base, __pgprot(_KERNPG_TABLE)));523518 base = NULL;524519525520out_unlock:···570575 address = cpa->vaddr[cpa->curpage];571576 else572577 address = *cpa->vaddr;573573-574578repeat:575579 kpte = lookup_address(address, &level);576580 if (!kpte)···806812807813 vm_unmap_aliases();808814815815+ /*816816+ * If we're called with lazy mmu updates enabled, the817817+ * in-memory pte state may be stale. Flush pending updates to818818+ * bring them up to date.819819+ */820820+ arch_flush_lazy_mmu_mode();821821+809822 cpa.vaddr = addr;810823 cpa.numpages = numpages;811824 cpa.mask_set = mask_set;···854853 cpa_flush_range(*addr, numpages, cache);855854 } else856855 cpa_flush_all(cache);856856+857857+ /*858858+ * If we've been called with lazy mmu updates enabled, then859859+ * make sure that everything gets flushed out before we860860+ * return.861861+ */862862+ arch_flush_lazy_mmu_mode();857863858864out:859865 return ret;
+45-38
arch/x86/mm/pat.c
···211211static struct memtype *cached_entry;212212static u64 cached_start;213213214214+static int pat_pagerange_is_ram(unsigned long start, unsigned long end)215215+{216216+ int ram_page = 0, not_rampage = 0;217217+ unsigned long page_nr;218218+219219+ for (page_nr = (start >> PAGE_SHIFT); page_nr < (end >> PAGE_SHIFT);220220+ ++page_nr) {221221+ /*222222+ * For legacy reasons, physical address range in the legacy ISA223223+ * region is tracked as non-RAM. This will allow users of224224+ * /dev/mem to map portions of legacy ISA region, even when225225+ * some of those portions are listed(or not even listed) with226226+ * different e820 types(RAM/reserved/..)227227+ */228228+ if (page_nr >= (ISA_END_ADDRESS >> PAGE_SHIFT) &&229229+ page_is_ram(page_nr))230230+ ram_page = 1;231231+ else232232+ not_rampage = 1;233233+234234+ if (ram_page == not_rampage)235235+ return -1;236236+ }237237+238238+ return ram_page;239239+}240240+214241/*215242 * For RAM pages, mark the pages as non WB memory type using216243 * PageNonWB (PG_arch_1). We allow only one set_memory_uc() or···363336 if (new_type)364337 *new_type = actual_type;365338366366- /*367367- * For legacy reasons, some parts of the physical address range in the368368- * legacy 1MB region is treated as non-RAM (even when listed as RAM in369369- * the e820 tables). So we will track the memory attributes of this370370- * legacy 1MB region using the linear memtype_list always.371371- */372372- if (end >= ISA_END_ADDRESS) {373373- is_range_ram = pagerange_is_ram(start, end);374374- if (is_range_ram == 1)375375- return reserve_ram_pages_type(start, end, req_type,376376- new_type);377377- else if (is_range_ram < 0)378378- return -EINVAL;379379- }339339+ is_range_ram = pat_pagerange_is_ram(start, end);340340+ if (is_range_ram == 1)341341+ return reserve_ram_pages_type(start, end, req_type,342342+ new_type);343343+ else if (is_range_ram < 0)344344+ return -EINVAL;380345381346 new = kmalloc(sizeof(struct memtype), GFP_KERNEL);382347 if (!new)···465446 if (is_ISA_range(start, end - 1))466447 return 0;467448468468- /*469469- * For legacy reasons, some parts of the physical address range in the470470- * legacy 1MB region is treated as non-RAM (even when listed as RAM in471471- * the e820 tables). So we will track the memory attributes of this472472- * legacy 1MB region using the linear memtype_list always.473473- */474474- if (end >= ISA_END_ADDRESS) {475475- is_range_ram = pagerange_is_ram(start, end);476476- if (is_range_ram == 1)477477- return free_ram_pages_type(start, end);478478- else if (is_range_ram < 0)479479- return -EINVAL;480480- }449449+ is_range_ram = pat_pagerange_is_ram(start, end);450450+ if (is_range_ram == 1)451451+ return free_ram_pages_type(start, end);452452+ else if (is_range_ram < 0)453453+ return -EINVAL;481454482455 spin_lock(&memtype_lock);483456 list_for_each_entry(entry, &memtype_list, nd) {···637626 unsigned long flags;638627 unsigned long want_flags = (pgprot_val(*vma_prot) & _PAGE_CACHE_MASK);639628640640- is_ram = pagerange_is_ram(paddr, paddr + size);629629+ is_ram = pat_pagerange_is_ram(paddr, paddr + size);641630642642- if (is_ram != 0) {643643- /*644644- * For mapping RAM pages, drivers need to call645645- * set_memory_[uc|wc|wb] directly, for reserve and free, before646646- * setting up the PTE.647647- */648648- WARN_ON_ONCE(1);649649- return 0;650650- }631631+ /*632632+ * reserve_pfn_range() doesn't support RAM pages.633633+ */634634+ if (is_ram != 0)635635+ return -EINVAL;651636652637 ret = reserve_memtype(paddr, paddr + size, want_flags, &flags);653638 if (ret)···700693{701694 int is_ram;702695703703- is_ram = pagerange_is_ram(paddr, paddr + size);696696+ is_ram = pat_pagerange_is_ram(paddr, paddr + size);704697 if (is_ram == 0)705698 free_memtype(paddr, paddr + size);706699}
+8-1
block/blk-timeout.c
···209209{210210 unsigned long flags;211211 struct request *rq, *tmp;212212+ LIST_HEAD(list);212213213214 spin_lock_irqsave(q->queue_lock, flags);214215215216 elv_abort_queue(q);216217217217- list_for_each_entry_safe(rq, tmp, &q->timeout_list, timeout_list)218218+ /*219219+ * Splice entries to local list, to avoid deadlocking if entries220220+ * get readded to the timeout list by error handling221221+ */222222+ list_splice_init(&q->timeout_list, &list);223223+224224+ list_for_each_entry_safe(rq, tmp, &list, timeout_list)218225 blk_abort_request(rq);219226220227 spin_unlock_irqrestore(q->queue_lock, flags);
+1-1
block/blktrace.c
···142142143143 what |= ddir_act[rw & WRITE];144144 what |= MASK_TC_BIT(rw, BARRIER);145145- what |= MASK_TC_BIT(rw, SYNC);145145+ what |= MASK_TC_BIT(rw, SYNCIO);146146 what |= MASK_TC_BIT(rw, AHEAD);147147 what |= MASK_TC_BIT(rw, META);148148 what |= MASK_TC_BIT(rw, DISCARD);
+10-7
block/bsg.c
···244244 * map sg_io_v4 to a request.245245 */246246static struct request *247247-bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm)247247+bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,248248+ u8 *sense)248249{249250 struct request_queue *q = bd->queue;250251 struct request *rq, *next_rq = NULL;···307306 if (ret)308307 goto out;309308 }309309+310310+ rq->sense = sense;311311+ rq->sense_len = 0;312312+310313 return rq;311314out:312315 if (rq->cmd != rq->__cmd)···353348static void bsg_add_command(struct bsg_device *bd, struct request_queue *q,354349 struct bsg_command *bc, struct request *rq)355350{356356- rq->sense = bc->sense;357357- rq->sense_len = 0;358358-359351 /*360352 * add bc command to busy queue and submit rq for io361353 */···421419{422420 int ret = 0;423421424424- dprintk("rq %p bio %p %u\n", rq, bio, rq->errors);422422+ dprintk("rq %p bio %p 0x%x\n", rq, bio, rq->errors);425423 /*426424 * fill in all the output members427425 */···637635 /*638636 * get a request, fill in the blanks, and add to request queue639637 */640640- rq = bsg_map_hdr(bd, &bc->hdr, has_write_perm);638638+ rq = bsg_map_hdr(bd, &bc->hdr, has_write_perm, bc->sense);641639 if (IS_ERR(rq)) {642640 ret = PTR_ERR(rq);643641 rq = NULL;···924922 struct request *rq;925923 struct bio *bio, *bidi_bio = NULL;926924 struct sg_io_v4 hdr;925925+ u8 sense[SCSI_SENSE_BUFFERSIZE];927926928927 if (copy_from_user(&hdr, uarg, sizeof(hdr)))929928 return -EFAULT;930929931931- rq = bsg_map_hdr(bd, &hdr, file->f_mode & FMODE_WRITE);930930+ rq = bsg_map_hdr(bd, &hdr, file->f_mode & FMODE_WRITE, sense);932931 if (IS_ERR(rq))933932 return PTR_ERR(rq);934933
+8
block/genhd.c
···10871087 if (strcmp(dev_name(dev), name))10881088 continue;1089108910901090+ if (partno < disk->minors) {10911091+ /* We need to return the right devno, even10921092+ * if the partition doesn't exist yet.10931093+ */10941094+ devt = MKDEV(MAJOR(dev->devt),10951095+ MINOR(dev->devt) + partno);10961096+ break;10971097+ }10901098 part = disk_get_part(disk, partno);10911099 if (part) {10921100 devt = part_devt(part);
···254254 help you correlate PCI bus addresses with the physical geography255255 of your slots. If you are unsure, say N.256256257257-config ACPI_SYSTEM258258- bool259259- default y260260- help261261- This driver will enable your system to shut down using ACPI, and262262- dump your ACPI DSDT table using /proc/acpi/dsdt.263263-264257config X86_PM_TIMER265258 bool "Power Management Timer Support" if EMBEDDED266259 depends on X86
···138138139139static int acpi_battery_get_state(struct acpi_battery *battery);140140141141+static int acpi_battery_is_charged(struct acpi_battery *battery)142142+{143143+ /* either charging or discharging */144144+ if (battery->state != 0)145145+ return 0;146146+147147+ /* battery not reporting charge */148148+ if (battery->capacity_now == ACPI_BATTERY_VALUE_UNKNOWN ||149149+ battery->capacity_now == 0)150150+ return 0;151151+152152+ /* good batteries update full_charge as the batteries degrade */153153+ if (battery->full_charge_capacity == battery->capacity_now)154154+ return 1;155155+156156+ /* fallback to using design values for broken batteries */157157+ if (battery->design_capacity == battery->capacity_now)158158+ return 1;159159+160160+ /* we don't do any sort of metric based on percentages */161161+ return 0;162162+}163163+141164static int acpi_battery_get_property(struct power_supply *psy,142165 enum power_supply_property psp,143166 union power_supply_propval *val)···178155 val->intval = POWER_SUPPLY_STATUS_DISCHARGING;179156 else if (battery->state & 0x02)180157 val->intval = POWER_SUPPLY_STATUS_CHARGING;181181- else if (battery->state == 0)158158+ else if (acpi_battery_is_charged(battery))182159 val->intval = POWER_SUPPLY_STATUS_FULL;183160 else184161 val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
+21-7
drivers/ata/libata-sff.c
···773773 else774774 iowrite32_rep(data_addr, buf, words);775775776776+ /* Transfer trailing bytes, if any */776777 if (unlikely(slop)) {777777- __le32 pad;778778+ unsigned char pad[4];779779+780780+ /* Point buf to the tail of buffer */781781+ buf += buflen - slop;782782+783783+ /*784784+ * Use io*_rep() accessors here as well to avoid pointlessly785785+ * swapping bytes to and fro on the big endian machines...786786+ */778787 if (rw == READ) {779779- pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr));780780- memcpy(buf + buflen - slop, &pad, slop);788788+ if (slop < 3)789789+ ioread16_rep(data_addr, pad, 1);790790+ else791791+ ioread32_rep(data_addr, pad, 1);792792+ memcpy(buf, pad, slop);781793 } else {782782- memcpy(&pad, buf + buflen - slop, slop);783783- iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr);794794+ memcpy(pad, buf, slop);795795+ if (slop < 3)796796+ iowrite16_rep(data_addr, pad, 1);797797+ else798798+ iowrite32_rep(data_addr, pad, 1);784799 }785785- words++;786800 }787787- return words << 2;801801+ return (buflen + 1) & ~1;788802}789803EXPORT_SYMBOL_GPL(ata_sff_data_xfer32);790804
···421421 .hardreset = ATA_OP_NULL,422422};423423424424-/* OSDL bz3352 reports that nf2/3 controllers can't determine device425425- * signature reliably. Also, the following thread reports detection426426- * failure on cold boot with the standard debouncing timing.424424+/* nf2 is ripe with hardreset related problems.425425+ *426426+ * kernel bz#3352 reports nf2/3 controllers can't determine device427427+ * signature reliably. The following thread reports detection failure428428+ * on cold boot with the standard debouncing timing.427429 *428430 * http://thread.gmane.org/gmane.linux.ide/34098429431 *430430- * Debounce with hotplug timing and request follow-up SRST.432432+ * And bz#12176 reports that hardreset simply doesn't work on nf2.433433+ * Give up on it and just don't do hardreset.431434 */432435static struct ata_port_operations nv_nf2_ops = {433433- .inherits = &nv_common_ops,436436+ .inherits = &nv_generic_ops,434437 .freeze = nv_nf2_freeze,435438 .thaw = nv_nf2_thaw,436436- .hardreset = nv_noclassify_hardreset,437439};438440439441/* For initial probing after boot and hot plugging, hardreset mostly
+17
drivers/base/dd.c
···1818 */19192020#include <linux/device.h>2121+#include <linux/delay.h>2122#include <linux/module.h>2223#include <linux/kthread.h>2324#include <linux/wait.h>2525+#include <linux/async.h>24262527#include "base.h"2628#include "power/power.h"···166164 atomic_read(&probe_count));167165 if (atomic_read(&probe_count))168166 return -EBUSY;167167+ return 0;168168+}169169+170170+/**171171+ * wait_for_device_probe172172+ * Wait for device probing to be completed.173173+ *174174+ * Note: this function polls at 100 msec intervals.175175+ */176176+int wait_for_device_probe(void)177177+{178178+ /* wait for the known devices to complete their probing */179179+ while (driver_probe_done() != 0)180180+ msleep(100);181181+ async_synchronize_full();169182 return 0;170183}171184
···33903390 kfree(p);33913391}3392339233933393+/* Send a message CDB to the firmware. */33943394+static __devinit int cciss_message(struct pci_dev *pdev, unsigned char opcode, unsigned char type)33953395+{33963396+ typedef struct {33973397+ CommandListHeader_struct CommandHeader;33983398+ RequestBlock_struct Request;33993399+ ErrDescriptor_struct ErrorDescriptor;34003400+ } Command;34013401+ static const size_t cmd_sz = sizeof(Command) + sizeof(ErrorInfo_struct);34023402+ Command *cmd;34033403+ dma_addr_t paddr64;34043404+ uint32_t paddr32, tag;34053405+ void __iomem *vaddr;34063406+ int i, err;34073407+34083408+ vaddr = ioremap_nocache(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0));34093409+ if (vaddr == NULL)34103410+ return -ENOMEM;34113411+34123412+ /* The Inbound Post Queue only accepts 32-bit physical addresses for the34133413+ CCISS commands, so they must be allocated from the lower 4GiB of34143414+ memory. */34153415+ err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);34163416+ if (err) {34173417+ iounmap(vaddr);34183418+ return -ENOMEM;34193419+ }34203420+34213421+ cmd = pci_alloc_consistent(pdev, cmd_sz, &paddr64);34223422+ if (cmd == NULL) {34233423+ iounmap(vaddr);34243424+ return -ENOMEM;34253425+ }34263426+34273427+ /* This must fit, because of the 32-bit consistent DMA mask. Also,34283428+ although there's no guarantee, we assume that the address is at34293429+ least 4-byte aligned (most likely, it's page-aligned). */34303430+ paddr32 = paddr64;34313431+34323432+ cmd->CommandHeader.ReplyQueue = 0;34333433+ cmd->CommandHeader.SGList = 0;34343434+ cmd->CommandHeader.SGTotal = 0;34353435+ cmd->CommandHeader.Tag.lower = paddr32;34363436+ cmd->CommandHeader.Tag.upper = 0;34373437+ memset(&cmd->CommandHeader.LUN.LunAddrBytes, 0, 8);34383438+34393439+ cmd->Request.CDBLen = 16;34403440+ cmd->Request.Type.Type = TYPE_MSG;34413441+ cmd->Request.Type.Attribute = ATTR_HEADOFQUEUE;34423442+ cmd->Request.Type.Direction = XFER_NONE;34433443+ cmd->Request.Timeout = 0; /* Don't time out */34443444+ cmd->Request.CDB[0] = opcode;34453445+ cmd->Request.CDB[1] = type;34463446+ memset(&cmd->Request.CDB[2], 0, 14); /* the rest of the CDB is reserved */34473447+34483448+ cmd->ErrorDescriptor.Addr.lower = paddr32 + sizeof(Command);34493449+ cmd->ErrorDescriptor.Addr.upper = 0;34503450+ cmd->ErrorDescriptor.Len = sizeof(ErrorInfo_struct);34513451+34523452+ writel(paddr32, vaddr + SA5_REQUEST_PORT_OFFSET);34533453+34543454+ for (i = 0; i < 10; i++) {34553455+ tag = readl(vaddr + SA5_REPLY_PORT_OFFSET);34563456+ if ((tag & ~3) == paddr32)34573457+ break;34583458+ schedule_timeout_uninterruptible(HZ);34593459+ }34603460+34613461+ iounmap(vaddr);34623462+34633463+ /* we leak the DMA buffer here ... no choice since the controller could34643464+ still complete the command. */34653465+ if (i == 10) {34663466+ printk(KERN_ERR "cciss: controller message %02x:%02x timed out\n",34673467+ opcode, type);34683468+ return -ETIMEDOUT;34693469+ }34703470+34713471+ pci_free_consistent(pdev, cmd_sz, cmd, paddr64);34723472+34733473+ if (tag & 2) {34743474+ printk(KERN_ERR "cciss: controller message %02x:%02x failed\n",34753475+ opcode, type);34763476+ return -EIO;34773477+ }34783478+34793479+ printk(KERN_INFO "cciss: controller message %02x:%02x succeeded\n",34803480+ opcode, type);34813481+ return 0;34823482+}34833483+34843484+#define cciss_soft_reset_controller(p) cciss_message(p, 1, 0)34853485+#define cciss_noop(p) cciss_message(p, 3, 0)34863486+34873487+static __devinit int cciss_reset_msi(struct pci_dev *pdev)34883488+{34893489+/* the #defines are stolen from drivers/pci/msi.h. */34903490+#define msi_control_reg(base) (base + PCI_MSI_FLAGS)34913491+#define PCI_MSIX_FLAGS_ENABLE (1 << 15)34923492+34933493+ int pos;34943494+ u16 control = 0;34953495+34963496+ pos = pci_find_capability(pdev, PCI_CAP_ID_MSI);34973497+ if (pos) {34983498+ pci_read_config_word(pdev, msi_control_reg(pos), &control);34993499+ if (control & PCI_MSI_FLAGS_ENABLE) {35003500+ printk(KERN_INFO "cciss: resetting MSI\n");35013501+ pci_write_config_word(pdev, msi_control_reg(pos), control & ~PCI_MSI_FLAGS_ENABLE);35023502+ }35033503+ }35043504+35053505+ pos = pci_find_capability(pdev, PCI_CAP_ID_MSIX);35063506+ if (pos) {35073507+ pci_read_config_word(pdev, msi_control_reg(pos), &control);35083508+ if (control & PCI_MSIX_FLAGS_ENABLE) {35093509+ printk(KERN_INFO "cciss: resetting MSI-X\n");35103510+ pci_write_config_word(pdev, msi_control_reg(pos), control & ~PCI_MSIX_FLAGS_ENABLE);35113511+ }35123512+ }35133513+35143514+ return 0;35153515+}35163516+35173517+/* This does a hard reset of the controller using PCI power management35183518+ * states. */35193519+static __devinit int cciss_hard_reset_controller(struct pci_dev *pdev)35203520+{35213521+ u16 pmcsr, saved_config_space[32];35223522+ int i, pos;35233523+35243524+ printk(KERN_INFO "cciss: using PCI PM to reset controller\n");35253525+35263526+ /* This is very nearly the same thing as35273527+35283528+ pci_save_state(pci_dev);35293529+ pci_set_power_state(pci_dev, PCI_D3hot);35303530+ pci_set_power_state(pci_dev, PCI_D0);35313531+ pci_restore_state(pci_dev);35323532+35333533+ but we can't use these nice canned kernel routines on35343534+ kexec, because they also check the MSI/MSI-X state in PCI35353535+ configuration space and do the wrong thing when it is35363536+ set/cleared. Also, the pci_save/restore_state functions35373537+ violate the ordering requirements for restoring the35383538+ configuration space from the CCISS document (see the35393539+ comment below). So we roll our own .... */35403540+35413541+ for (i = 0; i < 32; i++)35423542+ pci_read_config_word(pdev, 2*i, &saved_config_space[i]);35433543+35443544+ pos = pci_find_capability(pdev, PCI_CAP_ID_PM);35453545+ if (pos == 0) {35463546+ printk(KERN_ERR "cciss_reset_controller: PCI PM not supported\n");35473547+ return -ENODEV;35483548+ }35493549+35503550+ /* Quoting from the Open CISS Specification: "The Power35513551+ * Management Control/Status Register (CSR) controls the power35523552+ * state of the device. The normal operating state is D0,35533553+ * CSR=00h. The software off state is D3, CSR=03h. To reset35543554+ * the controller, place the interface device in D3 then to35553555+ * D0, this causes a secondary PCI reset which will reset the35563556+ * controller." */35573557+35583558+ /* enter the D3hot power management state */35593559+ pci_read_config_word(pdev, pos + PCI_PM_CTRL, &pmcsr);35603560+ pmcsr &= ~PCI_PM_CTRL_STATE_MASK;35613561+ pmcsr |= PCI_D3hot;35623562+ pci_write_config_word(pdev, pos + PCI_PM_CTRL, pmcsr);35633563+35643564+ schedule_timeout_uninterruptible(HZ >> 1);35653565+35663566+ /* enter the D0 power management state */35673567+ pmcsr &= ~PCI_PM_CTRL_STATE_MASK;35683568+ pmcsr |= PCI_D0;35693569+ pci_write_config_word(pdev, pos + PCI_PM_CTRL, pmcsr);35703570+35713571+ schedule_timeout_uninterruptible(HZ >> 1);35723572+35733573+ /* Restore the PCI configuration space. The Open CISS35743574+ * Specification says, "Restore the PCI Configuration35753575+ * Registers, offsets 00h through 60h. It is important to35763576+ * restore the command register, 16-bits at offset 04h,35773577+ * last. Do not restore the configuration status register,35783578+ * 16-bits at offset 06h." Note that the offset is 2*i. */35793579+ for (i = 0; i < 32; i++) {35803580+ if (i == 2 || i == 3)35813581+ continue;35823582+ pci_write_config_word(pdev, 2*i, saved_config_space[i]);35833583+ }35843584+ wmb();35853585+ pci_write_config_word(pdev, 4, saved_config_space[2]);35863586+35873587+ return 0;35883588+}35893589+33933590/*33943591 * This is it. Find all the controllers and register them. I really hate33953592 * stealing all these major device numbers.···36003403 int rc;36013404 int dac, return_code;36023405 InquiryData_struct *inq_buff = NULL;34063406+34073407+ if (reset_devices) {34083408+ /* Reset the controller with a PCI power-cycle */34093409+ if (cciss_hard_reset_controller(pdev) || cciss_reset_msi(pdev))34103410+ return -ENODEV;34113411+34123412+ /* Some devices (notably the HP Smart Array 5i Controller)34133413+ need a little pause here */34143414+ schedule_timeout_uninterruptible(30*HZ);34153415+34163416+ /* Now try to get the controller to respond to a no-op */34173417+ for (i=0; i<12; i++) {34183418+ if (cciss_noop(pdev) == 0)34193419+ break;34203420+ else34213421+ printk("cciss: no-op failed%s\n", (i < 11 ? "; re-trying" : ""));34223422+ }34233423+ }3603342436043425 i = alloc_cciss_hba();36053426 if (i < 0)
+52-27
drivers/block/floppy.c
···558558static void recalibrate_floppy(void);559559static void floppy_shutdown(unsigned long);560560561561+static int floppy_request_regions(int);562562+static void floppy_release_regions(int);561563static int floppy_grab_irq_and_dma(void);562564static void floppy_release_irq_and_dma(void);563565···42764274 FDCS->rawcmd = 2;42774275 if (user_reset_fdc(-1, FD_RESET_ALWAYS, 0)) {42784276 /* free ioports reserved by floppy_grab_irq_and_dma() */42794279- release_region(FDCS->address + 2, 4);42804280- release_region(FDCS->address + 7, 1);42774277+ floppy_release_regions(fdc);42814278 FDCS->address = -1;42824279 FDCS->version = FDC_NONE;42834280 continue;···42854284 FDCS->version = get_fdc_version();42864285 if (FDCS->version == FDC_NONE) {42874286 /* free ioports reserved by floppy_grab_irq_and_dma() */42884288- release_region(FDCS->address + 2, 4);42894289- release_region(FDCS->address + 7, 1);42874287+ floppy_release_regions(fdc);42904288 FDCS->address = -1;42914289 continue;42924290 }···4358435843594359static DEFINE_SPINLOCK(floppy_usage_lock);4360436043614361+static const struct io_region {43624362+ int offset;43634363+ int size;43644364+} io_regions[] = {43654365+ { 2, 1 },43664366+ /* address + 3 is sometimes reserved by pnp bios for motherboard */43674367+ { 4, 2 },43684368+ /* address + 6 is reserved, and may be taken by IDE.43694369+ * Unfortunately, Adaptec doesn't know this :-(, */43704370+ { 7, 1 },43714371+};43724372+43734373+static void floppy_release_allocated_regions(int fdc, const struct io_region *p)43744374+{43754375+ while (p != io_regions) {43764376+ p--;43774377+ release_region(FDCS->address + p->offset, p->size);43784378+ }43794379+}43804380+43814381+#define ARRAY_END(X) (&((X)[ARRAY_SIZE(X)]))43824382+43834383+static int floppy_request_regions(int fdc)43844384+{43854385+ const struct io_region *p;43864386+43874387+ for (p = io_regions; p < ARRAY_END(io_regions); p++) {43884388+ if (!request_region(FDCS->address + p->offset, p->size, "floppy")) {43894389+ DPRINT("Floppy io-port 0x%04lx in use\n", FDCS->address + p->offset);43904390+ floppy_release_allocated_regions(fdc, p);43914391+ return -EBUSY;43924392+ }43934393+ }43944394+ return 0;43954395+}43964396+43974397+static void floppy_release_regions(int fdc)43984398+{43994399+ floppy_release_allocated_regions(fdc, ARRAY_END(io_regions));44004400+}44014401+43614402static int floppy_grab_irq_and_dma(void)43624403{43634404 unsigned long flags;···4440439944414400 for (fdc = 0; fdc < N_FDC; fdc++) {44424401 if (FDCS->address != -1) {44434443- if (!request_region(FDCS->address + 2, 4, "floppy")) {44444444- DPRINT("Floppy io-port 0x%04lx in use\n",44454445- FDCS->address + 2);44464446- goto cleanup1;44474447- }44484448- if (!request_region(FDCS->address + 7, 1, "floppy DIR")) {44494449- DPRINT("Floppy io-port 0x%04lx in use\n",44504450- FDCS->address + 7);44514451- goto cleanup2;44524452- }44534453- /* address + 6 is reserved, and may be taken by IDE.44544454- * Unfortunately, Adaptec doesn't know this :-(, */44024402+ if (floppy_request_regions(fdc))44034403+ goto cleanup;44554404 }44564405 }44574406 for (fdc = 0; fdc < N_FDC; fdc++) {···44634432 fdc = 0;44644433 irqdma_allocated = 1;44654434 return 0;44664466-cleanup2:44674467- release_region(FDCS->address + 2, 4);44684468-cleanup1:44354435+cleanup:44694436 fd_free_irq();44704437 fd_free_dma();44714471- while (--fdc >= 0) {44724472- release_region(FDCS->address + 2, 4);44734473- release_region(FDCS->address + 7, 1);44744474- }44384438+ while (--fdc >= 0)44394439+ floppy_release_regions(fdc);44754440 spin_lock_irqsave(&floppy_usage_lock, flags);44764441 usage_count--;44774442 spin_unlock_irqrestore(&floppy_usage_lock, flags);···45284501#endif45294502 old_fdc = fdc;45304503 for (fdc = 0; fdc < N_FDC; fdc++)45314531- if (FDCS->address != -1) {45324532- release_region(FDCS->address + 2, 4);45334533- release_region(FDCS->address + 7, 1);45344534- }45044504+ if (FDCS->address != -1)45054505+ floppy_release_regions(fdc);45354506 fdc = old_fdc;45364507}45374508
+1-1
drivers/block/paride/pg.c
···422422423423 for (k = 0; k < len; k++) {424424 char c = *buf++;425425- if (c != ' ' || c != l)425425+ if (c != ' ' && c != l)426426 l = *targ++ = c;427427 }428428 if (l == ' ')
+3-2
drivers/char/sx.c
···17461746 sx_dprintk(SX_DEBUG_FIRMWARE, "returning type= %ld\n", rc);17471747 break;17481748 case SXIO_DO_RAMTEST:17491749- if (sx_initialized) /* Already initialized: better not ramtest the board. */17491749+ if (sx_initialized) { /* Already initialized: better not ramtest the board. */17501750 rc = -EPERM;17511751 break;17521752+ }17521753 if (IS_SX_BOARD(board)) {17531754 rc = do_memtest(board, 0, 0x7000);17541755 if (!rc)···17891788 nbytes - i : SX_CHUNK_SIZE)) {17901789 kfree(tmp);17911790 rc = -EFAULT;17921792- break;17911791+ goto out;17931792 }17941793 memcpy_toio(board->base2 + offset + i, tmp,17951794 (i + SX_CHUNK_SIZE > nbytes) ?
···11/*22 * linux/drivers/firmware/memmap.c33 * Copyright (C) 2008 SUSE LINUX Products GmbH44- * by Bernhard Walle <bwalle@suse.de>44+ * by Bernhard Walle <bernhard.walle@gmx.de>55 *66 * This program is free software; you can redistribute it and/or modify77 * it under the terms of the GNU General Public License v2.0 as published by
+6-7
drivers/gpu/drm/Kconfig
···8080 XFree86 4.4 and above. If unsure, build this and i830 as modules and8181 the X server will load the correct one.82828383-endchoice8484-8583config DRM_I915_KMS8684 bool "Enable modesetting on intel by default"8785 depends on DRM_I9158886 help8989- Choose this option if you want kernel modesetting enabled by default,9090- and you have a new enough userspace to support this. Running old9191- userspaces with this enabled will cause pain. Note that this causes9292- the driver to bind to PCI devices, which precludes loading things9393- like intelfb.8787+ Choose this option if you want kernel modesetting enabled by default,8888+ and you have a new enough userspace to support this. Running old8989+ userspaces with this enabled will cause pain. Note that this causes9090+ the driver to bind to PCI devices, which precludes loading things9191+ like intelfb.94929393+endchoice95949695config DRM_MGA9796 tristate "Matrox g200/g400"
···512512 if (drm_mode_equal(&saved_mode, &crtc->mode)) {513513 if (saved_x != crtc->x || saved_y != crtc->y ||514514 depth_changed || bpp_changed) {515515- crtc_funcs->mode_set_base(crtc, crtc->x, crtc->y,516516- old_fb);515515+ ret = !crtc_funcs->mode_set_base(crtc, crtc->x, crtc->y,516516+ old_fb);517517 goto done;518518 }519519 }···552552 /* Set up the DPLL and any encoders state that needs to adjust or depend553553 * on the DPLL.554554 */555555- crtc_funcs->mode_set(crtc, mode, adjusted_mode, x, y, old_fb);555555+ ret = !crtc_funcs->mode_set(crtc, mode, adjusted_mode, x, y, old_fb);556556+ if (!ret)557557+ goto done;556558557559 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {558560···754752 if (!drm_crtc_helper_set_mode(set->crtc, set->mode,755753 set->x, set->y,756754 old_fb)) {755755+ DRM_ERROR("failed to set mode on crtc %p\n",756756+ set->crtc);757757 ret = -EINVAL;758758 goto fail_set_mode;759759 }···769765 old_fb = set->crtc->fb;770766 if (set->crtc->fb != set->fb)771767 set->crtc->fb = set->fb;772772- crtc_funcs->mode_set_base(set->crtc, set->x, set->y, old_fb);768768+ ret = crtc_funcs->mode_set_base(set->crtc,769769+ set->x, set->y, old_fb);770770+ if (ret != 0)771771+ goto fail_set_mode;773772 }774773775774 kfree(save_encoders);···782775fail_set_mode:783776 set->crtc->enabled = save_enabled;784777 count = 0;785785- list_for_each_entry(connector, &dev->mode_config.connector_list, head)778778+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {779779+ if (!connector->encoder)780780+ continue;781781+786782 connector->encoder->crtc = save_crtcs[count++];783783+ }787784fail_no_encoder:788785 kfree(save_crtcs);789786 count = 0;
+3
drivers/gpu/drm/drm_fops.c
···457457 if (dev->driver->driver_features & DRIVER_GEM)458458 drm_gem_release(dev, file_priv);459459460460+ if (dev->driver->driver_features & DRIVER_MODESET)461461+ drm_fb_release(file_priv);462462+460463 mutex_lock(&dev->ctxlist_mutex);461464 if (!list_empty(&dev->ctxlist)) {462465 struct drm_ctx_list *pos, *n;
+56-25
drivers/gpu/drm/drm_gem.c
···104104105105 if (drm_mm_init(&mm->offset_manager, DRM_FILE_PAGE_OFFSET_START,106106 DRM_FILE_PAGE_OFFSET_SIZE)) {107107- drm_free(mm, sizeof(struct drm_gem_mm), DRM_MEM_MM);108107 drm_ht_remove(&mm->offset_hash);108108+ drm_free(mm, sizeof(struct drm_gem_mm), DRM_MEM_MM);109109 return -ENOMEM;110110 }111111···295295 return -EBADF;296296297297again:298298- if (idr_pre_get(&dev->object_name_idr, GFP_KERNEL) == 0)299299- return -ENOMEM;298298+ if (idr_pre_get(&dev->object_name_idr, GFP_KERNEL) == 0) {299299+ ret = -ENOMEM;300300+ goto err;301301+ }300302301303 spin_lock(&dev->object_name_lock);302302- if (obj->name) {303303- args->name = obj->name;304304+ if (!obj->name) {305305+ ret = idr_get_new_above(&dev->object_name_idr, obj, 1,306306+ &obj->name);307307+ args->name = (uint64_t) obj->name;304308 spin_unlock(&dev->object_name_lock);305305- return 0;309309+310310+ if (ret == -EAGAIN)311311+ goto again;312312+313313+ if (ret != 0)314314+ goto err;315315+316316+ /* Allocate a reference for the name table. */317317+ drm_gem_object_reference(obj);318318+ } else {319319+ args->name = (uint64_t) obj->name;320320+ spin_unlock(&dev->object_name_lock);321321+ ret = 0;306322 }307307- ret = idr_get_new_above(&dev->object_name_idr, obj, 1,308308- &obj->name);309309- spin_unlock(&dev->object_name_lock);310310- if (ret == -EAGAIN)311311- goto again;312323313313- if (ret != 0) {314314- mutex_lock(&dev->struct_mutex);315315- drm_gem_object_unreference(obj);316316- mutex_unlock(&dev->struct_mutex);317317- return ret;318318- }319319-320320- /*321321- * Leave the reference from the lookup around as the322322- * name table now holds one323323- */324324- args->name = (uint64_t) obj->name;325325-326326- return 0;324324+err:325325+ mutex_lock(&dev->struct_mutex);326326+ drm_gem_object_unreference(obj);327327+ mutex_unlock(&dev->struct_mutex);328328+ return ret;327329}328330329331/**···450448 spin_lock(&dev->object_name_lock);451449 if (obj->name) {452450 idr_remove(&dev->object_name_idr, obj->name);451451+ obj->name = 0;453452 spin_unlock(&dev->object_name_lock);454453 /*455454 * The object name held a reference to this object, drop···462459463460}464461EXPORT_SYMBOL(drm_gem_object_handle_free);462462+463463+void drm_gem_vm_open(struct vm_area_struct *vma)464464+{465465+ struct drm_gem_object *obj = vma->vm_private_data;466466+467467+ drm_gem_object_reference(obj);468468+}469469+EXPORT_SYMBOL(drm_gem_vm_open);470470+471471+void drm_gem_vm_close(struct vm_area_struct *vma)472472+{473473+ struct drm_gem_object *obj = vma->vm_private_data;474474+ struct drm_device *dev = obj->dev;475475+476476+ mutex_lock(&dev->struct_mutex);477477+ drm_gem_object_unreference(obj);478478+ mutex_unlock(&dev->struct_mutex);479479+}480480+EXPORT_SYMBOL(drm_gem_vm_close);481481+465482466483/**467484 * drm_gem_mmap - memory map routine for GEM objects···543520 prot |= _PAGE_CACHE_WC;544521#endif545522 vma->vm_page_prot = __pgprot(prot);523523+524524+ /* Take a ref for this mapping of the object, so that the fault525525+ * handler can dereference the mmap offset's pointer to the object.526526+ * This reference is cleaned up by the corresponding vm_close527527+ * (which should happen whether the vma was created by this call, or528528+ * by a vm_open due to mremap or partial unmap or whatever).529529+ */530530+ drm_gem_object_reference(obj);546531547532 vma->vm_file = filp; /* Needed for drm_vm_open() */548533 drm_vm_open_locked(vma);
···184184 unsigned int lvds_dither:1;185185 unsigned int lvds_vbt:1;186186 unsigned int int_crt_support:1;187187+ unsigned int lvds_use_ssc:1;188188+ int lvds_ssc_freq;187189188190 struct drm_i915_fence_reg fence_regs[16]; /* assume 965 */189191 int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */
+75-44
drivers/gpu/drm/i915/i915_gem.c
···607607 case -EAGAIN:608608 return VM_FAULT_OOM;609609 case -EFAULT:610610- case -EBUSY:611611- DRM_ERROR("can't insert pfn?? fault or busy...\n");612610 return VM_FAULT_SIGBUS;613611 default:614612 return VM_FAULT_NOPAGE;···680682 drm_free(list->map, sizeof(struct drm_map_list), DRM_MEM_DRIVER);681683682684 return ret;685685+}686686+687687+static void688688+i915_gem_free_mmap_offset(struct drm_gem_object *obj)689689+{690690+ struct drm_device *dev = obj->dev;691691+ struct drm_i915_gem_object *obj_priv = obj->driver_private;692692+ struct drm_gem_mm *mm = dev->mm_private;693693+ struct drm_map_list *list;694694+695695+ list = &obj->map_list;696696+ drm_ht_remove_item(&mm->offset_hash, &list->hash);697697+698698+ if (list->file_offset_node) {699699+ drm_mm_put_block(list->file_offset_node);700700+ list->file_offset_node = NULL;701701+ }702702+703703+ if (list->map) {704704+ drm_free(list->map, sizeof(struct drm_map), DRM_MEM_DRIVER);705705+ list->map = NULL;706706+ }707707+708708+ obj_priv->mmap_offset = 0;683709}684710685711/**···780758781759 if (!obj_priv->mmap_offset) {782760 ret = i915_gem_create_mmap_offset(obj);783783- if (ret)761761+ if (ret) {762762+ drm_gem_object_unreference(obj);763763+ mutex_unlock(&dev->struct_mutex);784764 return ret;765765+ }785766 }786767787768 args->offset = obj_priv->mmap_offset;···22762251 (int) reloc.offset,22772252 reloc.read_domains,22782253 reloc.write_domain);22542254+ drm_gem_object_unreference(target_obj);22552255+ i915_gem_object_unpin(obj);22792256 return -EINVAL;22802257 }22812258···25072480 if (dev_priv->mm.wedged) {25082481 DRM_ERROR("Execbuf while wedged\n");25092482 mutex_unlock(&dev->struct_mutex);25102510- return -EIO;24832483+ ret = -EIO;24842484+ goto pre_mutex_err;25112485 }2512248625132487 if (dev_priv->mm.suspended) {25142488 DRM_ERROR("Execbuf while VT-switched.\n");25152489 mutex_unlock(&dev->struct_mutex);25162516- return -EBUSY;24902490+ ret = -EBUSY;24912491+ goto pre_mutex_err;25172492 }2518249325192494 /* Look up object handles */···2661263226622633 i915_verify_inactive(dev, __FILE__, __LINE__);2663263426642664- /* Copy the new buffer offsets back to the user's exec list. */26652665- ret = copy_to_user((struct drm_i915_relocation_entry __user *)26662666- (uintptr_t) args->buffers_ptr,26672667- exec_list,26682668- sizeof(*exec_list) * args->buffer_count);26692669- if (ret)26702670- DRM_ERROR("failed to copy %d exec entries "26712671- "back to user (%d)\n",26722672- args->buffer_count, ret);26732635err:26742636 for (i = 0; i < pinned; i++)26752637 i915_gem_object_unpin(object_list[i]);···26692649 drm_gem_object_unreference(object_list[i]);2670265026712651 mutex_unlock(&dev->struct_mutex);26522652+26532653+ if (!ret) {26542654+ /* Copy the new buffer offsets back to the user's exec list. */26552655+ ret = copy_to_user((struct drm_i915_relocation_entry __user *)26562656+ (uintptr_t) args->buffers_ptr,26572657+ exec_list,26582658+ sizeof(*exec_list) * args->buffer_count);26592659+ if (ret)26602660+ DRM_ERROR("failed to copy %d exec entries "26612661+ "back to user (%d)\n",26622662+ args->buffer_count, ret);26632663+ }2672266426732665pre_mutex_err:26742666 drm_free(object_list, sizeof(*object_list) * args->buffer_count,···27852753 if (obj_priv->pin_filp != NULL && obj_priv->pin_filp != file_priv) {27862754 DRM_ERROR("Already pinned in i915_gem_pin_ioctl(): %d\n",27872755 args->handle);27562756+ drm_gem_object_unreference(obj);27882757 mutex_unlock(&dev->struct_mutex);27892758 return -EINVAL;27902759 }···29182885void i915_gem_free_object(struct drm_gem_object *obj)29192886{29202887 struct drm_device *dev = obj->dev;29212921- struct drm_gem_mm *mm = dev->mm_private;29222922- struct drm_map_list *list;29232923- struct drm_map *map;29242888 struct drm_i915_gem_object *obj_priv = obj->driver_private;2925288929262890 while (obj_priv->pin_count > 0)···2928289829292899 i915_gem_object_unbind(obj);2930290029312931- list = &obj->map_list;29322932- drm_ht_remove_item(&mm->offset_hash, &list->hash);29332933-29342934- if (list->file_offset_node) {29352935- drm_mm_put_block(list->file_offset_node);29362936- list->file_offset_node = NULL;29372937- }29382938-29392939- map = list->map;29402940- if (map) {29412941- drm_free(map, sizeof(*map), DRM_MEM_DRIVER);29422942- list->map = NULL;29432943- }29012901+ i915_gem_free_mmap_offset(obj);2944290229452903 drm_free(obj_priv->page_cpu_valid, 1, DRM_MEM_DRIVER);29462904 drm_free(obj->driver_private, 1, DRM_MEM_DRIVER);···31133095 if (dev_priv->hw_status_page == NULL) {31143096 DRM_ERROR("Failed to map status page.\n");31153097 memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map));30983098+ i915_gem_object_unpin(obj);31163099 drm_gem_object_unreference(obj);31173100 return -EINVAL;31183101 }···31243105 DRM_DEBUG("hws offset: 0x%08x\n", dev_priv->status_gfx_addr);3125310631263107 return 0;31083108+}31093109+31103110+static void31113111+i915_gem_cleanup_hws(struct drm_device *dev)31123112+{31133113+ drm_i915_private_t *dev_priv = dev->dev_private;31143114+ struct drm_gem_object *obj = dev_priv->hws_obj;31153115+ struct drm_i915_gem_object *obj_priv = obj->driver_private;31163116+31173117+ if (dev_priv->hws_obj == NULL)31183118+ return;31193119+31203120+ kunmap(obj_priv->page_list[0]);31213121+ i915_gem_object_unpin(obj);31223122+ drm_gem_object_unreference(obj);31233123+ dev_priv->hws_obj = NULL;31243124+ memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map));31253125+ dev_priv->hw_status_page = NULL;31263126+31273127+ /* Write high address into HWS_PGA when disabling. */31283128+ I915_WRITE(HWS_PGA, 0x1ffff000);31273129}3128313031293131int···31643124 obj = drm_gem_object_alloc(dev, 128 * 1024);31653125 if (obj == NULL) {31663126 DRM_ERROR("Failed to allocate ringbuffer\n");31273127+ i915_gem_cleanup_hws(dev);31673128 return -ENOMEM;31683129 }31693130 obj_priv = obj->driver_private;···31723131 ret = i915_gem_object_pin(obj, 4096);31733132 if (ret != 0) {31743133 drm_gem_object_unreference(obj);31343134+ i915_gem_cleanup_hws(dev);31753135 return ret;31763136 }31773137···31903148 if (ring->map.handle == NULL) {31913149 DRM_ERROR("Failed to map ringbuffer.\n");31923150 memset(&dev_priv->ring, 0, sizeof(dev_priv->ring));31513151+ i915_gem_object_unpin(obj);31933152 drm_gem_object_unreference(obj);31533153+ i915_gem_cleanup_hws(dev);31943154 return -EINVAL;31953155 }31963156 ring->ring_obj = obj;···32723228 dev_priv->ring.ring_obj = NULL;32733229 memset(&dev_priv->ring, 0, sizeof(dev_priv->ring));3274323032753275- if (dev_priv->hws_obj != NULL) {32763276- struct drm_gem_object *obj = dev_priv->hws_obj;32773277- struct drm_i915_gem_object *obj_priv = obj->driver_private;32783278-32793279- kunmap(obj_priv->page_list[0]);32803280- i915_gem_object_unpin(obj);32813281- drm_gem_object_unreference(obj);32823282- dev_priv->hws_obj = NULL;32833283- memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map));32843284- dev_priv->hw_status_page = NULL;32853285-32863286- /* Write high address into HWS_PGA when disabling. */32873287- I915_WRITE(HWS_PGA, 0x1ffff000);32883288- }32313231+ i915_gem_cleanup_hws(dev);32893232}3290323332913234int
···267267 default:268268 {269269 struct hid_device *hid = dev->hid;270270- if (_IOC_TYPE(cmd) != 'H' || _IOC_DIR(cmd) != _IOC_READ)271271- return -EINVAL;270270+ if (_IOC_TYPE(cmd) != 'H' || _IOC_DIR(cmd) != _IOC_READ) {271271+ ret = -EINVAL;272272+ break;273273+ }272274273275 if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWNAME(0))) {274276 int len;···279277 len = strlen(hid->name) + 1;280278 if (len > _IOC_SIZE(cmd))281279 len = _IOC_SIZE(cmd);282282- return copy_to_user(user_arg, hid->name, len) ?280280+ ret = copy_to_user(user_arg, hid->name, len) ?283281 -EFAULT : len;282282+ break;284283 }285284286285 if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWPHYS(0))) {···291288 len = strlen(hid->phys) + 1;292289 if (len > _IOC_SIZE(cmd))293290 len = _IOC_SIZE(cmd);294294- return copy_to_user(user_arg, hid->phys, len) ?291291+ ret = copy_to_user(user_arg, hid->phys, len) ?295292 -EFAULT : len;293293+ break;296294 }297295 }298296299299- ret = -ENOTTY;297297+ ret = -ENOTTY;300298 }301299 unlock_kernel();302300 return ret;
+2-2
drivers/hwmon/f71882fg.c
···1872187218731873 devid = superio_inw(sioaddr, SIO_REG_MANID);18741874 if (devid != SIO_FINTEK_ID) {18751875- printk(KERN_INFO DRVNAME ": Not a Fintek device\n");18751875+ pr_debug(DRVNAME ": Not a Fintek device\n");18761876 goto exit;18771877 }18781878···19321932 res.name = f71882fg_pdev->name;19331933 err = acpi_check_resource_conflict(&res);19341934 if (err)19351935- return err;19351935+ goto exit_device_put;1936193619371937 err = platform_device_add_resources(f71882fg_pdev, &res, 1);19381938 if (err) {
+81-4
drivers/hwmon/hp_accel.c
···166166 }, \167167 .driver_data = &lis3lv02d_axis_##_axis \168168}169169+170170+#define AXIS_DMI_MATCH2(_ident, _class1, _name1, \171171+ _class2, _name2, \172172+ _axis) { \173173+ .ident = _ident, \174174+ .callback = lis3lv02d_dmi_matched, \175175+ .matches = { \176176+ DMI_MATCH(DMI_##_class1, _name1), \177177+ DMI_MATCH(DMI_##_class2, _name2), \178178+ }, \179179+ .driver_data = &lis3lv02d_axis_##_axis \180180+}169181static struct dmi_system_id lis3lv02d_dmi_ids[] = {170182 /* product names are truncated to match all kinds of a same model */171183 AXIS_DMI_MATCH("NC64x0", "HP Compaq nc64", x_inverted),···191179 AXIS_DMI_MATCH("NC673x", "HP Compaq 673", xy_rotated_left_usd),192180 AXIS_DMI_MATCH("NC651xx", "HP Compaq 651", xy_rotated_right),193181 AXIS_DMI_MATCH("NC671xx", "HP Compaq 671", xy_swap_yz_inverted),182182+ /* Intel-based HP Pavilion dv5 */183183+ AXIS_DMI_MATCH2("HPDV5_I",184184+ PRODUCT_NAME, "HP Pavilion dv5",185185+ BOARD_NAME, "3603",186186+ x_inverted),187187+ /* AMD-based HP Pavilion dv5 */188188+ AXIS_DMI_MATCH2("HPDV5_A",189189+ PRODUCT_NAME, "HP Pavilion dv5",190190+ BOARD_NAME, "3600",191191+ y_inverted),194192 { NULL, }195193/* Laptop models without axis info (yet):196194 * "NC6910" "HP Compaq 6910"···235213 .set_brightness = hpled_set,236214};237215216216+static acpi_status217217+lis3lv02d_get_resource(struct acpi_resource *resource, void *context)218218+{219219+ if (resource->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) {220220+ struct acpi_resource_extended_irq *irq;221221+ u32 *device_irq = context;222222+223223+ irq = &resource->data.extended_irq;224224+ *device_irq = irq->interrupts[0];225225+ }226226+227227+ return AE_OK;228228+}229229+230230+static void lis3lv02d_enum_resources(struct acpi_device *device)231231+{232232+ acpi_status status;233233+234234+ status = acpi_walk_resources(device->handle, METHOD_NAME__CRS,235235+ lis3lv02d_get_resource, &adev.irq);236236+ if (ACPI_FAILURE(status))237237+ printk(KERN_DEBUG DRIVER_NAME ": Error getting resources\n");238238+}239239+240240+static s16 lis3lv02d_read_16(acpi_handle handle, int reg)241241+{242242+ u8 lo, hi;243243+244244+ adev.read(handle, reg - 1, &lo);245245+ adev.read(handle, reg, &hi);246246+ /* In "12 bit right justified" mode, bit 6, bit 7, bit 8 = bit 5 */247247+ return (s16)((hi << 8) | lo);248248+}249249+250250+static s16 lis3lv02d_read_8(acpi_handle handle, int reg)251251+{252252+ s8 lo;253253+ adev.read(handle, reg, &lo);254254+ return lo;255255+}256256+238257static int lis3lv02d_add(struct acpi_device *device)239258{240240- u8 val;241259 int ret;242260243261 if (!device)···291229 strcpy(acpi_device_class(device), ACPI_MDPS_CLASS);292230 device->driver_data = &adev;293231294294- lis3lv02d_acpi_read(device->handle, WHO_AM_I, &val);295295- if ((val != LIS3LV02DL_ID) && (val != LIS302DL_ID)) {232232+ lis3lv02d_acpi_read(device->handle, WHO_AM_I, &adev.whoami);233233+ switch (adev.whoami) {234234+ case LIS_DOUBLE_ID:235235+ printk(KERN_INFO DRIVER_NAME ": 2-byte sensor found\n");236236+ adev.read_data = lis3lv02d_read_16;237237+ adev.mdps_max_val = 2048;238238+ break;239239+ case LIS_SINGLE_ID:240240+ printk(KERN_INFO DRIVER_NAME ": 1-byte sensor found\n");241241+ adev.read_data = lis3lv02d_read_8;242242+ adev.mdps_max_val = 128;243243+ break;244244+ default:296245 printk(KERN_ERR DRIVER_NAME297297- ": Accelerometer chip not LIS3LV02D{L,Q}\n");246246+ ": unknown sensor type 0x%X\n", adev.whoami);247247+ return -EINVAL;298248 }299249300250 /* If possible use a "standard" axes order */···320246 ret = led_classdev_register(NULL, &hpled_led.led_classdev);321247 if (ret)322248 return ret;249249+250250+ /* obtain IRQ number of our device from ACPI */251251+ lis3lv02d_enum_resources(adev.device);323252324253 ret = lis3lv02d_init_device(&adev);325254 if (ret) {
+160-35
drivers/hwmon/lis3lv02d.c
···33 *44 * Copyright (C) 2007-2008 Yan Burman55 * Copyright (C) 2008 Eric Piel66- * Copyright (C) 2008 Pavel Machek66+ * Copyright (C) 2008-2009 Pavel Machek77 *88 * This program is free software; you can redistribute it and/or modify99 * it under the terms of the GNU General Public License as published by···3535#include <linux/poll.h>3636#include <linux/freezer.h>3737#include <linux/uaccess.h>3838+#include <linux/miscdevice.h>3839#include <acpi/acpi_drivers.h>3940#include <asm/atomic.h>4041#include "lis3lv02d.h"···5352 * joystick.5453 */55545656-/* Maximum value our axis may get for the input device (signed 12 bits) */5757-#define MDPS_MAX_VAL 20485555+struct acpi_lis3lv02d adev = {5656+ .misc_wait = __WAIT_QUEUE_HEAD_INITIALIZER(adev.misc_wait),5757+};58585959-struct acpi_lis3lv02d adev;6059EXPORT_SYMBOL_GPL(adev);61606261static int lis3lv02d_add_fs(struct acpi_device *device);6363-6464-static s16 lis3lv02d_read_16(acpi_handle handle, int reg)6565-{6666- u8 lo, hi;6767-6868- adev.read(handle, reg, &lo);6969- adev.read(handle, reg + 1, &hi);7070- /* In "12 bit right justified" mode, bit 6, bit 7, bit 8 = bit 5 */7171- return (s16)((hi << 8) | lo);7272-}73627463/**7564 * lis3lv02d_get_axis - For the given axis, give the value converted···8998{9099 int position[3];911009292- position[0] = lis3lv02d_read_16(handle, OUTX_L);9393- position[1] = lis3lv02d_read_16(handle, OUTY_L);9494- position[2] = lis3lv02d_read_16(handle, OUTZ_L);101101+ position[0] = adev.read_data(handle, OUTX);102102+ position[1] = adev.read_data(handle, OUTY);103103+ position[2] = adev.read_data(handle, OUTZ);9510496105 *x = lis3lv02d_get_axis(adev.ac.x, position);97106 *y = lis3lv02d_get_axis(adev.ac.y, position);···101110void lis3lv02d_poweroff(acpi_handle handle)102111{103112 adev.is_on = 0;104104- /* disable X,Y,Z axis and power down */105105- adev.write(handle, CTRL_REG1, 0x00);106113}107114EXPORT_SYMBOL_GPL(lis3lv02d_poweroff);108115109116void lis3lv02d_poweron(acpi_handle handle)110117{111111- u8 val;112112-113118 adev.is_on = 1;114119 adev.init(handle);115115- adev.write(handle, FF_WU_CFG, 0);116116- /*117117- * BDU: LSB and MSB values are not updated until both have been read.118118- * So the value read will always be correct.119119- * IEN: Interrupt for free-fall and DD, not for data-ready.120120- */121121- adev.read(handle, CTRL_REG2, &val);122122- val |= CTRL2_BDU | CTRL2_IEN;123123- adev.write(handle, CTRL_REG2, val);124120}125121EXPORT_SYMBOL_GPL(lis3lv02d_poweron);126122···139161 lis3lv02d_poweroff(dev->device->handle);140162 mutex_unlock(&dev->lock);141163}164164+165165+static irqreturn_t lis302dl_interrupt(int irq, void *dummy)166166+{167167+ /*168168+ * Be careful: on some HP laptops the bios force DD when on battery and169169+ * the lid is closed. This leads to interrupts as soon as a little move170170+ * is done.171171+ */172172+ atomic_inc(&adev.count);173173+174174+ wake_up_interruptible(&adev.misc_wait);175175+ kill_fasync(&adev.async_queue, SIGIO, POLL_IN);176176+ return IRQ_HANDLED;177177+}178178+179179+static int lis3lv02d_misc_open(struct inode *inode, struct file *file)180180+{181181+ int ret;182182+183183+ if (test_and_set_bit(0, &adev.misc_opened))184184+ return -EBUSY; /* already open */185185+186186+ atomic_set(&adev.count, 0);187187+188188+ /*189189+ * The sensor can generate interrupts for free-fall and direction190190+ * detection (distinguishable with FF_WU_SRC and DD_SRC) but to keep191191+ * the things simple and _fast_ we activate it only for free-fall, so192192+ * no need to read register (very slow with ACPI). For the same reason,193193+ * we forbid shared interrupts.194194+ *195195+ * IRQF_TRIGGER_RISING seems pointless on HP laptops because the196196+ * io-apic is not configurable (and generates a warning) but I keep it197197+ * in case of support for other hardware.198198+ */199199+ ret = request_irq(adev.irq, lis302dl_interrupt, IRQF_TRIGGER_RISING,200200+ DRIVER_NAME, &adev);201201+202202+ if (ret) {203203+ clear_bit(0, &adev.misc_opened);204204+ printk(KERN_ERR DRIVER_NAME ": IRQ%d allocation failed\n", adev.irq);205205+ return -EBUSY;206206+ }207207+ lis3lv02d_increase_use(&adev);208208+ printk("lis3: registered interrupt %d\n", adev.irq);209209+ return 0;210210+}211211+212212+static int lis3lv02d_misc_release(struct inode *inode, struct file *file)213213+{214214+ fasync_helper(-1, file, 0, &adev.async_queue);215215+ lis3lv02d_decrease_use(&adev);216216+ free_irq(adev.irq, &adev);217217+ clear_bit(0, &adev.misc_opened); /* release the device */218218+ return 0;219219+}220220+221221+static ssize_t lis3lv02d_misc_read(struct file *file, char __user *buf,222222+ size_t count, loff_t *pos)223223+{224224+ DECLARE_WAITQUEUE(wait, current);225225+ u32 data;226226+ unsigned char byte_data;227227+ ssize_t retval = 1;228228+229229+ if (count < 1)230230+ return -EINVAL;231231+232232+ add_wait_queue(&adev.misc_wait, &wait);233233+ while (true) {234234+ set_current_state(TASK_INTERRUPTIBLE);235235+ data = atomic_xchg(&adev.count, 0);236236+ if (data)237237+ break;238238+239239+ if (file->f_flags & O_NONBLOCK) {240240+ retval = -EAGAIN;241241+ goto out;242242+ }243243+244244+ if (signal_pending(current)) {245245+ retval = -ERESTARTSYS;246246+ goto out;247247+ }248248+249249+ schedule();250250+ }251251+252252+ if (data < 255)253253+ byte_data = data;254254+ else255255+ byte_data = 255;256256+257257+ /* make sure we are not going into copy_to_user() with258258+ * TASK_INTERRUPTIBLE state */259259+ set_current_state(TASK_RUNNING);260260+ if (copy_to_user(buf, &byte_data, sizeof(byte_data)))261261+ retval = -EFAULT;262262+263263+out:264264+ __set_current_state(TASK_RUNNING);265265+ remove_wait_queue(&adev.misc_wait, &wait);266266+267267+ return retval;268268+}269269+270270+static unsigned int lis3lv02d_misc_poll(struct file *file, poll_table *wait)271271+{272272+ poll_wait(file, &adev.misc_wait, wait);273273+ if (atomic_read(&adev.count))274274+ return POLLIN | POLLRDNORM;275275+ return 0;276276+}277277+278278+static int lis3lv02d_misc_fasync(int fd, struct file *file, int on)279279+{280280+ return fasync_helper(fd, file, on, &adev.async_queue);281281+}282282+283283+static const struct file_operations lis3lv02d_misc_fops = {284284+ .owner = THIS_MODULE,285285+ .llseek = no_llseek,286286+ .read = lis3lv02d_misc_read,287287+ .open = lis3lv02d_misc_open,288288+ .release = lis3lv02d_misc_release,289289+ .poll = lis3lv02d_misc_poll,290290+ .fasync = lis3lv02d_misc_fasync,291291+};292292+293293+static struct miscdevice lis3lv02d_misc_device = {294294+ .minor = MISC_DYNAMIC_MINOR,295295+ .name = "freefall",296296+ .fops = &lis3lv02d_misc_fops,297297+};142298143299/**144300 * lis3lv02d_joystick_kthread - Kthread polling function···315203 lis3lv02d_decrease_use(&adev);316204}317205318318-319206static inline void lis3lv02d_calibrate_joystick(void)320207{321208 lis3lv02d_get_xyz(adev.device->handle, &adev.xcalib, &adev.ycalib, &adev.zcalib);···342231 adev.idev->close = lis3lv02d_joystick_close;343232344233 set_bit(EV_ABS, adev.idev->evbit);345345- input_set_abs_params(adev.idev, ABS_X, -MDPS_MAX_VAL, MDPS_MAX_VAL, 3, 3);346346- input_set_abs_params(adev.idev, ABS_Y, -MDPS_MAX_VAL, MDPS_MAX_VAL, 3, 3);347347- input_set_abs_params(adev.idev, ABS_Z, -MDPS_MAX_VAL, MDPS_MAX_VAL, 3, 3);234234+ input_set_abs_params(adev.idev, ABS_X, -adev.mdps_max_val, adev.mdps_max_val, 3, 3);235235+ input_set_abs_params(adev.idev, ABS_Y, -adev.mdps_max_val, adev.mdps_max_val, 3, 3);236236+ input_set_abs_params(adev.idev, ABS_Z, -adev.mdps_max_val, adev.mdps_max_val, 3, 3);348237349238 err = input_register_device(adev.idev);350239 if (err) {···361250 if (!adev.idev)362251 return;363252253253+ misc_deregister(&lis3lv02d_misc_device);364254 input_unregister_device(adev.idev);365255 adev.idev = NULL;366256}···380268 if (lis3lv02d_joystick_enable())381269 printk(KERN_ERR DRIVER_NAME ": joystick initialization failed\n");382270271271+ printk("lis3_init_device: irq %d\n", dev->irq);272272+273273+ /* if we did not get an IRQ from ACPI - we have nothing more to do */274274+ if (!dev->irq) {275275+ printk(KERN_ERR DRIVER_NAME276276+ ": No IRQ in ACPI. Disabling /dev/freefall\n");277277+ goto out;278278+ }279279+280280+ printk("lis3: registering device\n");281281+ if (misc_register(&lis3lv02d_misc_device))282282+ printk(KERN_ERR DRIVER_NAME ": misc_register failed\n");283283+out:383284 lis3lv02d_decrease_use(dev);384285 return 0;385286}···476351EXPORT_SYMBOL_GPL(lis3lv02d_remove_fs);477352478353MODULE_DESCRIPTION("ST LIS3LV02Dx three-axis digital accelerometer driver");479479-MODULE_AUTHOR("Yan Burman and Eric Piel");354354+MODULE_AUTHOR("Yan Burman, Eric Piel, Pavel Machek");480355MODULE_LICENSE("GPL");481356
+18-3
drivers/hwmon/lis3lv02d.h
···2222/*2323 * The actual chip is STMicroelectronics LIS3LV02DL or LIS3LV02DQ that seems to2424 * be connected via SPI. There exists also several similar chips (such as LIS302DL or2525- * LIS3L02DQ) but not in the HP laptops and they have slightly different registers.2525+ * LIS3L02DQ) and they have slightly different registers, but we can provide a2626+ * common interface for all of them.2627 * They can also be connected via I²C.2728 */28292929-#define LIS3LV02DL_ID 0x3A /* Also the LIS3LV02DQ */3030-#define LIS302DL_ID 0x3B /* Also the LIS202DL! */3030+/* 2-byte registers */3131+#define LIS_DOUBLE_ID 0x3A /* LIS3LV02D[LQ] */3232+/* 1-byte registers */3333+#define LIS_SINGLE_ID 0x3B /* LIS[32]02DL and others */31343235enum lis3lv02d_reg {3336 WHO_AM_I = 0x0F,···4744 STATUS_REG = 0x27,4845 OUTX_L = 0x28,4946 OUTX_H = 0x29,4747+ OUTX = 0x29,5048 OUTY_L = 0x2A,5149 OUTY_H = 0x2B,5050+ OUTY = 0x2B,5251 OUTZ_L = 0x2C,5352 OUTZ_H = 0x2D,5353+ OUTZ = 0x2D,5454 FF_WU_CFG = 0x30,5555 FF_WU_SRC = 0x31,5656 FF_WU_ACK = 0x32,···165159 acpi_status (*write) (acpi_handle handle, int reg, u8 val);166160 acpi_status (*read) (acpi_handle handle, int reg, u8 *ret);167161162162+ u8 whoami; /* 3Ah: 2-byte registries, 3Bh: 1-byte registries */163163+ s16 (*read_data) (acpi_handle handle, int reg);164164+ int mdps_max_val;165165+168166 struct input_dev *idev; /* input device */169167 struct task_struct *kthread; /* kthread for input */170168 struct mutex lock;···180170 unsigned char is_on; /* whether the device is on or off */181171 unsigned char usage; /* usage counter */182172 struct axis_conversion ac; /* hw -> logical axis */173173+174174+ u32 irq; /* IRQ number */175175+ struct fasync_struct *async_queue; /* queue for the misc device */176176+ wait_queue_head_t misc_wait; /* Wait queue for the misc device */177177+ unsigned long misc_opened; /* bit0: whether the device is open */183178};184179185180int lis3lv02d_init_device(struct acpi_lis3lv02d *dev);
···328328 struct dpages old_pages = *dp;329329330330 if (sync)331331- rw |= (1 << BIO_RW_SYNC);331331+ rw |= (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG);332332333333 /*334334 * For multiple regions we need to be careful to rewind
···393393 return 0;394394 }395395396396- v4l2_subdev_call(itv->sd_video, video, s_fmt, fmt);396396+ v4l2_subdev_call(itv->sd_video, video, g_fmt, fmt);397397 vbifmt->service_set = ivtv_get_service_set(vbifmt);398398 return 0;399399}···17481748 break;17491749 }1750175017511751+ case IVTV_IOC_DMA_FRAME:17521752+ case VIDEO_GET_PTS:17531753+ case VIDEO_GET_FRAME_COUNT:17541754+ case VIDEO_GET_EVENT:17551755+ case VIDEO_PLAY:17561756+ case VIDEO_STOP:17571757+ case VIDEO_FREEZE:17581758+ case VIDEO_CONTINUE:17591759+ case VIDEO_COMMAND:17601760+ case VIDEO_TRY_COMMAND:17611761+ return ivtv_decoder_ioctls(file, cmd, (void *)arg);17621762+17511763 default:17521764 return -EINVAL;17531765 }···18011789 itv->audio_bilingual_mode = arg;18021790 ivtv_vapi(itv, CX2341X_DEC_SET_AUDIO_MODE, 2, itv->audio_bilingual_mode, itv->audio_stereo_mode);18031791 return 0;18041804-18051805- case IVTV_IOC_DMA_FRAME:18061806- case VIDEO_GET_PTS:18071807- case VIDEO_GET_FRAME_COUNT:18081808- case VIDEO_GET_EVENT:18091809- case VIDEO_PLAY:18101810- case VIDEO_STOP:18111811- case VIDEO_FREEZE:18121812- case VIDEO_CONTINUE:18131813- case VIDEO_COMMAND:18141814- case VIDEO_TRY_COMMAND:18151815- return ivtv_decoder_ioctls(filp, cmd, (void *)arg);1816179218171793 default:18181794 break;
+2-2
drivers/mfd/htc-egpio.c
···286286 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);287287 if (!res)288288 goto fail;289289- ei->base_addr = ioremap_nocache(res->start, res->end - res->start);289289+ ei->base_addr = ioremap_nocache(res->start, resource_size(res));290290 if (!ei->base_addr)291291 goto fail;292292 pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);···307307308308 ei->nchips = pdata->num_chips;309309 ei->chip = kzalloc(sizeof(struct egpio_chip) * ei->nchips, GFP_KERNEL);310310- if (!ei) {310310+ if (!ei->chip) {311311 ret = -ENOMEM;312312 goto fail;313313 }
+1
drivers/mfd/pcf50633-core.c
···678678679679static struct i2c_device_id pcf50633_id_table[] = {680680 {"pcf50633", 0x73},681681+ {/* end of list */}681682};682683683684static struct i2c_driver pcf50633_driver = {
···5555#define VS30 (1 << 25)5656#define SDVS18 (0x5 << 9)5757#define SDVS30 (0x6 << 9)5858+#define SDVS33 (0x7 << 9)5859#define SDVSCLR 0xFFFFF1FF5960#define SDVSDET 0x000004006061#define AUTOIDLE 0x1···376375}377376#endif /* CONFIG_MMC_DEBUG */378377378378+/*379379+ * MMC controller internal state machines reset380380+ *381381+ * Used to reset command or data internal state machines, using respectively382382+ * SRC or SRD bit of SYSCTL register383383+ * Can be called from interrupt context384384+ */385385+static inline void mmc_omap_reset_controller_fsm(struct mmc_omap_host *host,386386+ unsigned long bit)387387+{388388+ unsigned long i = 0;389389+ unsigned long limit = (loops_per_jiffy *390390+ msecs_to_jiffies(MMC_TIMEOUT_MS));391391+392392+ OMAP_HSMMC_WRITE(host->base, SYSCTL,393393+ OMAP_HSMMC_READ(host->base, SYSCTL) | bit);394394+395395+ while ((OMAP_HSMMC_READ(host->base, SYSCTL) & bit) &&396396+ (i++ < limit))397397+ cpu_relax();398398+399399+ if (OMAP_HSMMC_READ(host->base, SYSCTL) & bit)400400+ dev_err(mmc_dev(host->mmc),401401+ "Timeout waiting on controller reset in %s\n",402402+ __func__);403403+}379404380405/*381406 * MMC controller IRQ handler···430403 (status & CMD_CRC)) {431404 if (host->cmd) {432405 if (status & CMD_TIMEOUT) {433433- OMAP_HSMMC_WRITE(host->base, SYSCTL,434434- OMAP_HSMMC_READ(host->base,435435- SYSCTL) | SRC);436436- while (OMAP_HSMMC_READ(host->base,437437- SYSCTL) & SRC)438438- ;439439-406406+ mmc_omap_reset_controller_fsm(host, SRC);440407 host->cmd->error = -ETIMEDOUT;441408 } else {442409 host->cmd->error = -EILSEQ;443410 }444411 end_cmd = 1;445412 }446446- if (host->data)413413+ if (host->data) {447414 mmc_dma_cleanup(host);415415+ mmc_omap_reset_controller_fsm(host, SRD);416416+ }448417 }449418 if ((status & DATA_TIMEOUT) ||450419 (status & DATA_CRC)) {···449426 mmc_dma_cleanup(host);450427 else451428 host->data->error = -EILSEQ;452452- OMAP_HSMMC_WRITE(host->base, SYSCTL,453453- OMAP_HSMMC_READ(host->base,454454- SYSCTL) | SRD);455455- while (OMAP_HSMMC_READ(host->base,456456- SYSCTL) & SRD)457457- ;429429+ mmc_omap_reset_controller_fsm(host, SRD);458430 end_trans = 1;459431 }460432 }···474456}475457476458/*477477- * Switch MMC operating voltage459459+ * Switch MMC interface voltage ... only relevant for MMC1.460460+ *461461+ * MMC2 and MMC3 use fixed 1.8V levels, and maybe a transceiver.462462+ * The MMC2 transceiver controls are used instead of DAT4..DAT7.463463+ * Some chips, like eMMC ones, use internal transceivers.478464 */479465static int omap_mmc_switch_opcond(struct mmc_omap_host *host, int vdd)480466{481467 u32 reg_val = 0;482468 int ret;469469+470470+ if (host->id != OMAP_MMC1_DEVID)471471+ return 0;483472484473 /* Disable the clocks */485474 clk_disable(host->fclk);···510485 OMAP_HSMMC_WRITE(host->base, HCTL,511486 OMAP_HSMMC_READ(host->base, HCTL) & SDVSCLR);512487 reg_val = OMAP_HSMMC_READ(host->base, HCTL);488488+513489 /*514490 * If a MMC dual voltage card is detected, the set_ios fn calls515491 * this fn with VDD bit set for 1.8V. Upon card removal from the516492 * slot, omap_mmc_set_ios sets the VDD back to 3V on MMC_POWER_OFF.517493 *518518- * Only MMC1 supports 3.0V. MMC2 will not function if SDVS30 is519519- * set in HCTL.494494+ * Cope with a bit of slop in the range ... per data sheets:495495+ * - "1.8V" for vdds_mmc1/vdds_mmc1a can be up to 2.45V max,496496+ * but recommended values are 1.71V to 1.89V497497+ * - "3.0V" for vdds_mmc1/vdds_mmc1a can be up to 3.5V max,498498+ * but recommended values are 2.7V to 3.3V499499+ *500500+ * Board setup code shouldn't permit anything very out-of-range.501501+ * TWL4030-family VMMC1 and VSIM regulators are fine (avoiding the502502+ * middle range) but VSIM can't power DAT4..DAT7 at more than 3V.520503 */521521- if (host->id == OMAP_MMC1_DEVID && (((1 << vdd) == MMC_VDD_32_33) ||522522- ((1 << vdd) == MMC_VDD_33_34)))523523- reg_val |= SDVS30;524524- if ((1 << vdd) == MMC_VDD_165_195)504504+ if ((1 << vdd) <= MMC_VDD_23_24)525505 reg_val |= SDVS18;506506+ else507507+ reg_val |= SDVS30;526508527509 OMAP_HSMMC_WRITE(host->base, HCTL, reg_val);528510···549517{550518 struct mmc_omap_host *host = container_of(work, struct mmc_omap_host,551519 mmc_carddetect_work);520520+ struct omap_mmc_slot_data *slot = &mmc_slot(host);521521+522522+ host->carddetect = slot->card_detect(slot->card_detect_irq);552523553524 sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch");554525 if (host->carddetect) {555526 mmc_detect_change(host->mmc, (HZ * 200) / 1000);556527 } else {557557- OMAP_HSMMC_WRITE(host->base, SYSCTL,558558- OMAP_HSMMC_READ(host->base, SYSCTL) | SRD);559559- while (OMAP_HSMMC_READ(host->base, SYSCTL) & SRD)560560- ;561561-528528+ mmc_omap_reset_controller_fsm(host, SRD);562529 mmc_detect_change(host->mmc, (HZ * 50) / 1000);563530 }564531}···569538{570539 struct mmc_omap_host *host = (struct mmc_omap_host *)dev_id;571540572572- host->carddetect = mmc_slot(host).card_detect(irq);573541 schedule_work(&host->mmc_carddetect_work);574542575543 return IRQ_HANDLED;···787757 case MMC_POWER_OFF:788758 mmc_slot(host).set_power(host->dev, host->slot_id, 0, 0);789759 /*790790- * Reset bus voltage to 3V if it got set to 1.8V earlier.760760+ * Reset interface voltage to 3V if it's 1.8V now;761761+ * only relevant on MMC-1, the others always use 1.8V.762762+ *791763 * REVISIT: If we are able to detect cards after unplugging792764 * a 1.8V card, this code should not be needed.793765 */766766+ if (host->id != OMAP_MMC1_DEVID)767767+ break;794768 if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) {795769 int vdd = fls(host->mmc->ocr_avail) - 1;796770 if (omap_mmc_switch_opcond(host, vdd) != 0)···818784 }819785820786 if (host->id == OMAP_MMC1_DEVID) {821821- /* Only MMC1 can operate at 3V/1.8V */787787+ /* Only MMC1 can interface at 3V without some flavor788788+ * of external transceiver; but they all handle 1.8V.789789+ */822790 if ((OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET) &&823791 (ios->vdd == DUAL_VOLT_OCR_BIT)) {824792 /*···11731137 " level suspend\n");11741138 }1175113911761176- if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) {11401140+ if (host->id == OMAP_MMC1_DEVID11411141+ && !(OMAP_HSMMC_READ(host->base, HCTL)11421142+ & SDVSDET)) {11771143 OMAP_HSMMC_WRITE(host->base, HCTL,11781144 OMAP_HSMMC_READ(host->base, HCTL)11791145 & SDVSCLR);
+1-1
drivers/mmc/host/s3cmci.c
···329329330330 to_ptr = host->base + host->sdidata;331331332332- while ((fifo = fifo_free(host))) {332332+ while ((fifo = fifo_free(host)) > 3) {333333 if (!host->pio_bytes) {334334 res = get_data_buffer(host, &host->pio_bytes,335335 &host->pio_ptr);
···208208#define SDHCI_QUIRK_BROKEN_TIMEOUT_VAL (1<<12)209209/* Controller has an issue with buffer bits for small transfers */210210#define SDHCI_QUIRK_BROKEN_SMALL_PIO (1<<13)211211-/* Controller supports high speed but doesn't have the caps bit set */212212-#define SDHCI_QUIRK_FORCE_HIGHSPEED (1<<14)213211214212 int irq; /* Device IRQ */215213 void __iomem * ioaddr; /* Mapped address */···220222221223#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)222224 struct led_classdev led; /* LED control */225225+ char led_name[32];223226#endif224227225228 spinlock_t lock; /* Mutex */
···6161/* global iommu list, set NULL for ignored DMAR units */6262static struct intel_iommu **g_iommus;63636464+static int rwbf_quirk;6565+6466/*6567 * 0: Present6668 * 1-11: Reserved···787785 u32 val;788786 unsigned long flag;789787790790- if (!cap_rwbf(iommu->cap))788788+ if (!rwbf_quirk && !cap_rwbf(iommu->cap))791789 return;792790 val = iommu->gcmd | DMA_GCMD_WBF;793791···31393137 .unmap = intel_iommu_unmap_range,31403138 .iova_to_phys = intel_iommu_iova_to_phys,31413139};31403140+31413141+static void __devinit quirk_iommu_rwbf(struct pci_dev *dev)31423142+{31433143+ /*31443144+ * Mobile 4 Series Chipset neglects to set RWBF capability,31453145+ * but needs it:31463146+ */31473147+ printk(KERN_INFO "DMAR: Forcing write-buffer flush capability\n");31483148+ rwbf_quirk = 1;31493149+}31503150+31513151+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf);
+4-6
drivers/pci/msi.c
···103103 }104104}105105106106-/*107107- * Essentially, this is ((1 << (1 << x)) - 1), but without the108108- * undefinedness of a << 32.109109- */110106static inline __attribute_const__ u32 msi_mask(unsigned x)111107{112112- static const u32 mask[] = { 1, 2, 4, 0xf, 0xff, 0xffff, 0xffffffff };113113- return mask[x];108108+ /* Don't shift by >= width of type */109109+ if (x >= 5)110110+ return 0xffffffff;111111+ return (1 << (1 << x)) - 1;114112}115113116114static void msix_flush_writes(struct irq_desc *desc)
+9-4
drivers/pci/pci.c
···15401540}1541154115421542/**15431543- * pci_request_region - Reserved PCI I/O and memory resource15431543+ * __pci_request_region - Reserved PCI I/O and memory resource15441544 * @pdev: PCI device whose resources are to be reserved15451545 * @bar: BAR to be reserved15461546 * @res_name: Name to be associated with resource.15471547+ * @exclusive: whether the region access is exclusive or not15471548 *15481549 * Mark the PCI region associated with PCI device @pdev BR @bar as15491550 * being reserved by owner @res_name. Do not access any15501551 * address inside the PCI regions unless this call returns15511552 * successfully.15531553+ *15541554+ * If @exclusive is set, then the region is marked so that userspace15551555+ * is explicitly not allowed to map the resource via /dev/mem or15561556+ * sysfs MMIO access.15521557 *15531558 * Returns 0 on success, or %EBUSY on error. A warning15541559 * message is also printed on failure.···15931588}1594158915951590/**15961596- * pci_request_region - Reserved PCI I/O and memory resource15911591+ * pci_request_region - Reserve PCI I/O and memory resource15971592 * @pdev: PCI device whose resources are to be reserved15981593 * @bar: BAR to be reserved15991599- * @res_name: Name to be associated with resource.15941594+ * @res_name: Name to be associated with resource16001595 *16011601- * Mark the PCI region associated with PCI device @pdev BR @bar as15961596+ * Mark the PCI region associated with PCI device @pdev BAR @bar as16021597 * being reserved by owner @res_name. Do not access any16031598 * address inside the PCI regions unless this call returns16041599 * successfully.
+10-10
drivers/pci/pci.h
···1616#endif17171818/**1919- * Firmware PM callbacks1919+ * struct pci_platform_pm_ops - Firmware PM callbacks2020 *2121- * @is_manageable - returns 'true' if given device is power manageable by the2222- * platform firmware2121+ * @is_manageable: returns 'true' if given device is power manageable by the2222+ * platform firmware2323 *2424- * @set_state - invokes the platform firmware to set the device's power state2424+ * @set_state: invokes the platform firmware to set the device's power state2525 *2626- * @choose_state - returns PCI power state of given device preferred by the2727- * platform; to be used during system-wide transitions from a2828- * sleeping state to the working state and vice versa2626+ * @choose_state: returns PCI power state of given device preferred by the2727+ * platform; to be used during system-wide transitions from a2828+ * sleeping state to the working state and vice versa2929 *3030- * @can_wakeup - returns 'true' if given device is capable of waking up the3131- * system from a sleeping state3030+ * @can_wakeup: returns 'true' if given device is capable of waking up the3131+ * system from a sleeping state3232 *3333- * @sleep_wake - enables/disables the system wake up capability of given device3333+ * @sleep_wake: enables/disables the system wake up capability of given device3434 *3535 * If given platform is generally capable of power managing PCI devices, all of3636 * these callbacks are mandatory.
+1
drivers/pci/rom.c
···55555656/**5757 * pci_get_rom_size - obtain the actual size of the ROM image5858+ * @pdev: target PCI device5859 * @rom: kernel virtual pointer to image of ROM5960 * @size: size of PCI window6061 * return: size of actual ROM image
+2
drivers/platform/x86/Kconfig
···6262 depends on EXPERIMENTAL6363 depends on BACKLIGHT_CLASS_DEVICE6464 depends on RFKILL6565+ depends on POWER_SUPPLY6566 default n6667 ---help---6768 This driver adds support for rfkill and backlight control to Dell···302301config EEEPC_LAPTOP303302 tristate "Eee PC Hotkey Driver (EXPERIMENTAL)"304303 depends on ACPI304304+ depends on INPUT305305 depends on EXPERIMENTAL306306 select BACKLIGHT_CLASS_DEVICE307307 select HWMON
+18-7
drivers/platform/x86/fujitsu-laptop.c
···166166 struct platform_device *pf_device;167167 struct kfifo *fifo;168168 spinlock_t fifo_lock;169169+ int rfkill_supported;169170 int rfkill_state;170171 int logolamp_registered;171172 int kblamps_registered;···527526show_lid_state(struct device *dev,528527 struct device_attribute *attr, char *buf)529528{530530- if (fujitsu_hotkey->rfkill_state == UNSUPPORTED_CMD)529529+ if (!(fujitsu_hotkey->rfkill_supported & 0x100))531530 return sprintf(buf, "unknown\n");532531 if (fujitsu_hotkey->rfkill_state & 0x100)533532 return sprintf(buf, "open\n");···539538show_dock_state(struct device *dev,540539 struct device_attribute *attr, char *buf)541540{542542- if (fujitsu_hotkey->rfkill_state == UNSUPPORTED_CMD)541541+ if (!(fujitsu_hotkey->rfkill_supported & 0x200))543542 return sprintf(buf, "unknown\n");544543 if (fujitsu_hotkey->rfkill_state & 0x200)545544 return sprintf(buf, "docked\n");···551550show_radios_state(struct device *dev,552551 struct device_attribute *attr, char *buf)553552{554554- if (fujitsu_hotkey->rfkill_state == UNSUPPORTED_CMD)553553+ if (!(fujitsu_hotkey->rfkill_supported & 0x20))555554 return sprintf(buf, "unknown\n");556555 if (fujitsu_hotkey->rfkill_state & 0x20)557556 return sprintf(buf, "on\n");···929928 ; /* No action, result is discarded */930929 vdbg_printk(FUJLAPTOP_DBG_INFO, "Discarded %i ringbuffer entries\n", i);931930932932- fujitsu_hotkey->rfkill_state =933933- call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0);931931+ fujitsu_hotkey->rfkill_supported =932932+ call_fext_func(FUNC_RFKILL, 0x0, 0x0, 0x0);933933+934934+ /* Make sure our bitmask of supported functions is cleared if the935935+ RFKILL function block is not implemented, like on the S7020. */936936+ if (fujitsu_hotkey->rfkill_supported == UNSUPPORTED_CMD)937937+ fujitsu_hotkey->rfkill_supported = 0;938938+939939+ if (fujitsu_hotkey->rfkill_supported)940940+ fujitsu_hotkey->rfkill_state =941941+ call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0);934942935943 /* Suspect this is a keymap of the application panel, print it */936944 printk(KERN_INFO "fujitsu-laptop: BTNI: [0x%x]\n",···1015100510161006 input = fujitsu_hotkey->input;1017100710181018- fujitsu_hotkey->rfkill_state =10191019- call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0);10081008+ if (fujitsu_hotkey->rfkill_supported)10091009+ fujitsu_hotkey->rfkill_state =10101010+ call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0);1020101110211012 switch (event) {10221013 case ACPI_FUJITSU_NOTIFY_CODE1:
···10781078 case BLKTRACESETUP:10791079 return blk_trace_setup(sdp->device->request_queue,10801080 sdp->disk->disk_name,10811081- sdp->device->sdev_gendev.devt,10811081+ MKDEV(SCSI_GENERIC_MAJOR, sdp->index),10821082 (char *)arg);10831083 case BLKTRACESTART:10841084 return blk_trace_startstop(sdp->device->request_queue, 1);
+15
drivers/serial/8250.c
···2083208320842084 serial8250_set_mctrl(&up->port, up->port.mctrl);2085208520862086+ /* Serial over Lan (SoL) hack:20872087+ Intel 8257x Gigabit ethernet chips have a20882088+ 16550 emulation, to be used for Serial Over Lan.20892089+ Those chips take a longer time than a normal20902090+ serial device to signalize that a transmission20912091+ data was queued. Due to that, the above test generally20922092+ fails. One solution would be to delay the reading of20932093+ iir. However, this is not reliable, since the timeout20942094+ is variable. So, let's just don't test if we receive20952095+ TX irq. This way, we'll never enable UART_BUG_TXEN.20962096+ */20972097+ if (up->port.flags & UPF_NO_TXEN_TEST)20982098+ goto dont_test_tx_en;20992099+20862100 /*20872101 * Do a quick test to see if we receive an20882102 * interrupt when we enable the TX irq.···21162102 up->bugs &= ~UART_BUG_TXEN;21172103 }2118210421052105+dont_test_tx_en:21192106 spin_unlock_irqrestore(&up->port.lock, flags);2120210721212108 /*
···877877 }878878 }879879880880+ /* Save current CSR for comparison in atmel_tasklet_func() */881881+ atmel_port->irq_status_prev = UART_GET_CSR(port);882882+ atmel_port->irq_status = atmel_port->irq_status_prev;883883+880884 /*881885 * Finally, enable the serial port882886 */
···298298EXPORT_SYMBOL_GPL(usb_hcd_pci_suspend);299299300300/**301301- * usb_hcd_pci_resume_early - resume a PCI-based HCD before IRQs are enabled302302- * @dev: USB Host Controller being resumed303303- *304304- * Store this function in the HCD's struct pci_driver as .resume_early.305305- */306306-int usb_hcd_pci_resume_early(struct pci_dev *dev)307307-{308308- pci_restore_state(dev);309309- return 0;310310-}311311-EXPORT_SYMBOL_GPL(usb_hcd_pci_resume_early);312312-313313-/**314301 * usb_hcd_pci_resume - power management resume of a PCI-based HCD315302 * @dev: USB Host Controller being resumed316303 *···319332 of_node, 0, 1);320333 }321334#endif335335+336336+ pci_restore_state(dev);322337323338 hcd = pci_get_drvdata(dev);324339 if (hcd->state != HC_STATE_SUSPENDED) {
-1
drivers/usb/core/hcd.h
···257257258258#ifdef CONFIG_PM259259extern int usb_hcd_pci_suspend(struct pci_dev *dev, pm_message_t msg);260260-extern int usb_hcd_pci_resume_early(struct pci_dev *dev);261260extern int usb_hcd_pci_resume(struct pci_dev *dev);262261#endif /* CONFIG_PM */263262
+2-2
drivers/usb/gadget/pxa25x_udc.c
···904904905905 /* most IN status is the same, but ISO can't stall */906906 *ep->reg_udccs = UDCCS_BI_TPC|UDCCS_BI_FTF|UDCCS_BI_TUR907907- | (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC)908908- ? 0 : UDCCS_BI_SST;907907+ | (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC908908+ ? 0 : UDCCS_BI_SST);909909}910910911911
···227227 * Now that the ASL is updated, complete the removal of any228228 * removed qsets.229229 */230230- spin_lock(&whc->lock);230230+ spin_lock_irq(&whc->lock);231231232232 list_for_each_entry_safe(qset, t, &whc->async_removed_list, list_node) {233233 qset_remove_complete(whc, qset);234234 }235235236236- spin_unlock(&whc->lock);236236+ spin_unlock_irq(&whc->lock);237237}238238239239/**
+2-2
drivers/usb/host/whci/pzl.c
···255255 * Now that the PZL is updated, complete the removal of any256256 * removed qsets.257257 */258258- spin_lock(&whc->lock);258258+ spin_lock_irq(&whc->lock);259259260260 list_for_each_entry_safe(qset, t, &whc->periodic_removed_list, list_node) {261261 qset_remove_complete(whc, qset);262262 }263263264264- spin_unlock(&whc->lock);264264+ spin_unlock_irq(&whc->lock);265265}266266267267/**
···23652365static void aty128_set_suspend(struct aty128fb_par *par, int suspend)23662366{23672367 u32 pmgt;23682368- u16 pwr_command;23692368 struct pci_dev *pdev = par->pdev;2370236923712370 if (!par->pm_reg)
+1-1
drivers/watchdog/Kconfig
···406406 ---help---407407 Hardware driver for the intel TCO timer based watchdog devices.408408 These drivers are included in the Intel 82801 I/O Controller409409- Hub family (from ICH0 up to ICH8) and in the Intel 6300ESB409409+ Hub family (from ICH0 up to ICH10) and in the Intel 63xxESB410410 controller hub.411411412412 The TCO (Total Cost of Ownership) timer is a watchdog timer
+2-2
drivers/watchdog/at91rm9200_wdt.c
···107107static int at91_wdt_settimeout(int new_time)108108{109109 /*110110- * All counting occurs at SLOW_CLOCK / 128 = 0.256 Hz110110+ * All counting occurs at SLOW_CLOCK / 128 = 256 Hz111111 *112112 * Since WDV is a 16-bit counter, the maximum period is113113- * 65536 / 0.256 = 256 seconds.113113+ * 65536 / 256 = 256 seconds.114114 */115115 if ((new_time <= 0) || (new_time > WDT_MAX_TIME))116116 return -EINVAL;
···11/*22 * intel TCO vendor specific watchdog driver support33 *44- * (c) Copyright 2006-2008 Wim Van Sebroeck <wim@iguana.be>.44+ * (c) Copyright 2006-2009 Wim Van Sebroeck <wim@iguana.be>.55 *66 * This program is free software; you can redistribute it and/or77 * modify it under the terms of the GNU General Public License···19192020/* Module and version information */2121#define DRV_NAME "iTCO_vendor_support"2222-#define DRV_VERSION "1.02"2222+#define DRV_VERSION "1.03"2323#define PFX DRV_NAME ": "24242525/* Includes */···7676 * time is about 40 seconds, and the minimum hang time is about7777 * 20.6 seconds.7878 */7979+8080+static void supermicro_old_pre_start(unsigned long acpibase)8181+{8282+ unsigned long val32;8383+8484+ /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */8585+ val32 = inl(SMI_EN);8686+ val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */8787+ outl(val32, SMI_EN); /* Needed to activate watchdog */8888+}8989+9090+static void supermicro_old_pre_stop(unsigned long acpibase)9191+{9292+ unsigned long val32;9393+9494+ /* Bit 13: TCO_EN -> 1 = Enables the TCO logic to generate SMI# */9595+ val32 = inl(SMI_EN);9696+ val32 |= 0x00002000; /* Turn on SMI clearing watchdog */9797+ outl(val32, SMI_EN); /* Needed to deactivate watchdog */9898+}799980100static void supermicro_old_pre_keepalive(unsigned long acpibase)81101{···248228void iTCO_vendor_pre_start(unsigned long acpibase,249229 unsigned int heartbeat)250230{251251- if (vendorsupport == SUPERMICRO_NEW_BOARD)231231+ if (vendorsupport == SUPERMICRO_OLD_BOARD)232232+ supermicro_old_pre_start(acpibase);233233+ else if (vendorsupport == SUPERMICRO_NEW_BOARD)252234 supermicro_new_pre_start(heartbeat);253235}254236EXPORT_SYMBOL(iTCO_vendor_pre_start);255237256238void iTCO_vendor_pre_stop(unsigned long acpibase)257239{258258- if (vendorsupport == SUPERMICRO_NEW_BOARD)240240+ if (vendorsupport == SUPERMICRO_OLD_BOARD)241241+ supermicro_old_pre_stop(acpibase);242242+ else if (vendorsupport == SUPERMICRO_NEW_BOARD)259243 supermicro_new_pre_stop();260244}261245EXPORT_SYMBOL(iTCO_vendor_pre_stop);
+14-21
drivers/watchdog/iTCO_wdt.c
···11/*22- * intel TCO Watchdog Driver (Used in i82801 and i6300ESB chipsets)22+ * intel TCO Watchdog Driver (Used in i82801 and i63xxESB chipsets)33 *44- * (c) Copyright 2006-2008 Wim Van Sebroeck <wim@iguana.be>.44+ * (c) Copyright 2006-2009 Wim Van Sebroeck <wim@iguana.be>.55 *66 * This program is free software; you can redistribute it and/or77 * modify it under the terms of the GNU General Public License···63636464/* Module and version information */6565#define DRV_NAME "iTCO_wdt"6666-#define DRV_VERSION "1.04"6666+#define DRV_VERSION "1.05"6767#define PFX DRV_NAME ": "68686969/* Includes */···236236237237/* Address definitions for the TCO */238238/* TCO base address */239239-#define TCOBASE iTCO_wdt_private.ACPIBASE + 0x60239239+#define TCOBASE iTCO_wdt_private.ACPIBASE + 0x60240240/* SMI Control and Enable Register */241241-#define SMI_EN iTCO_wdt_private.ACPIBASE + 0x30241241+#define SMI_EN iTCO_wdt_private.ACPIBASE + 0x30242242243243#define TCO_RLD TCOBASE + 0x00 /* TCO Timer Reload and Curr. Value */244244#define TCOv1_TMR TCOBASE + 0x01 /* TCOv1 Timer Initial Value */245245-#define TCO_DAT_IN TCOBASE + 0x02 /* TCO Data In Register */246246-#define TCO_DAT_OUT TCOBASE + 0x03 /* TCO Data Out Register */247247-#define TCO1_STS TCOBASE + 0x04 /* TCO1 Status Register */248248-#define TCO2_STS TCOBASE + 0x06 /* TCO2 Status Register */245245+#define TCO_DAT_IN TCOBASE + 0x02 /* TCO Data In Register */246246+#define TCO_DAT_OUT TCOBASE + 0x03 /* TCO Data Out Register */247247+#define TCO1_STS TCOBASE + 0x04 /* TCO1 Status Register */248248+#define TCO2_STS TCOBASE + 0x06 /* TCO2 Status Register */249249#define TCO1_CNT TCOBASE + 0x08 /* TCO1 Control Register */250250#define TCO2_CNT TCOBASE + 0x0a /* TCO2 Control Register */251251#define TCOv2_TMR TCOBASE + 0x12 /* TCOv2 Timer Initial Value */···338338static int iTCO_wdt_start(void)339339{340340 unsigned int val;341341- unsigned long val32;342341343342 spin_lock(&iTCO_wdt_private.io_lock);344343···349350 printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n");350351 return -EIO;351352 }352352-353353- /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */354354- val32 = inl(SMI_EN);355355- val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */356356- outl(val32, SMI_EN);357353358354 /* Force the timer to its reload value by writing to the TCO_RLD359355 register */···372378static int iTCO_wdt_stop(void)373379{374380 unsigned int val;375375- unsigned long val32;376381377382 spin_lock(&iTCO_wdt_private.io_lock);378383···382389 val |= 0x0800;383390 outw(val, TCO1_CNT);384391 val = inw(TCO1_CNT);385385-386386- /* Bit 13: TCO_EN -> 1 = Enables the TCO logic to generate SMI# */387387- val32 = inl(SMI_EN);388388- val32 |= 0x00002000;389389- outl(val32, SMI_EN);390392391393 /* Set the NO_REBOOT bit to prevent later reboots, just for sure */392394 iTCO_wdt_set_NO_REBOOT_bit();···637649 int ret;638650 u32 base_address;639651 unsigned long RCBA;652652+ unsigned long val32;640653641654 /*642655 * Find the ACPI/PM base I/O address which is the base···684695 ret = -EIO;685696 goto out;686697 }698698+ /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */699699+ val32 = inl(SMI_EN);700700+ val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */701701+ outl(val32, SMI_EN);687702688703 /* The TCO I/O registers reside in a 32-byte range pointed to689704 by the TCOBASE value */
+3-2
fs/bio.c
···302302struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)303303{304304 struct bio *bio = NULL;305305+ void *p;305306306307 if (bs) {307307- void *p = mempool_alloc(bs->bio_pool, gfp_mask);308308+ p = mempool_alloc(bs->bio_pool, gfp_mask);308309309310 if (p)310311 bio = p + bs->front_pad;···330329 }331330 if (unlikely(!bvl)) {332331 if (bs)333333- mempool_free(bio, bs->bio_pool);332332+ mempool_free(p, bs->bio_pool);334333 else335334 kfree(bio);336335 bio = NULL;
+37-21
fs/btrfs/ctree.c
···3838static int del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root,3939 struct btrfs_path *path, int level, int slot);40404141-inline void btrfs_init_path(struct btrfs_path *p)4242-{4343- memset(p, 0, sizeof(*p));4444-}4545-4641struct btrfs_path *btrfs_alloc_path(void)4742{4843 struct btrfs_path *path;4949- path = kmem_cache_alloc(btrfs_path_cachep, GFP_NOFS);5050- if (path) {5151- btrfs_init_path(path);4444+ path = kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS);4545+ if (path)5246 path->reada = 1;5353- }5447 return path;5548}5649···62696370/*6471 * reset all the locked nodes in the patch to spinning locks.7272+ *7373+ * held is used to keep lockdep happy, when lockdep is enabled7474+ * we set held to a blocking lock before we go around and7575+ * retake all the spinlocks in the path. You can safely use NULL7676+ * for held6577 */6666-noinline void btrfs_clear_path_blocking(struct btrfs_path *p)7878+noinline void btrfs_clear_path_blocking(struct btrfs_path *p,7979+ struct extent_buffer *held)6780{6881 int i;6969- for (i = 0; i < BTRFS_MAX_LEVEL; i++) {8282+8383+#ifdef CONFIG_DEBUG_LOCK_ALLOC8484+ /* lockdep really cares that we take all of these spinlocks8585+ * in the right order. If any of the locks in the path are not8686+ * currently blocking, it is going to complain. So, make really8787+ * really sure by forcing the path to blocking before we clear8888+ * the path blocking.8989+ */9090+ if (held)9191+ btrfs_set_lock_blocking(held);9292+ btrfs_set_path_blocking(p);9393+#endif9494+9595+ for (i = BTRFS_MAX_LEVEL - 1; i >= 0; i--) {7096 if (p->nodes[i] && p->locks[i])7197 btrfs_clear_lock_blocking(p->nodes[i]);7298 }9999+100100+#ifdef CONFIG_DEBUG_LOCK_ALLOC101101+ if (held)102102+ btrfs_clear_lock_blocking(held);103103+#endif73104}7410575106/* this also releases the path */···303286 trans->transid, level, &ins);304287 BUG_ON(ret);305288 cow = btrfs_init_new_buffer(trans, root, prealloc_dest,306306- buf->len);289289+ buf->len, level);307290 } else {308291 cow = btrfs_alloc_free_block(trans, root, buf->len,309292 parent_start,···934917935918 /* promote the child to a root */936919 child = read_node_slot(root, mid, 0);920920+ BUG_ON(!child);937921 btrfs_tree_lock(child);938922 btrfs_set_lock_blocking(child);939939- BUG_ON(!child);940923 ret = btrfs_cow_block(trans, root, child, mid, 0, &child, 0);941924 BUG_ON(ret);942925···15831566 if (!p->skip_locking)15841567 p->locks[level] = 1;1585156815861586- btrfs_clear_path_blocking(p);15691569+ btrfs_clear_path_blocking(p, NULL);1587157015881571 /*15891572 * we have a lock on b and as long as we aren't changing···1622160516231606 btrfs_set_path_blocking(p);16241607 sret = split_node(trans, root, p, level);16251625- btrfs_clear_path_blocking(p);16081608+ btrfs_clear_path_blocking(p, NULL);1626160916271610 BUG_ON(sret > 0);16281611 if (sret) {···1642162516431626 btrfs_set_path_blocking(p);16441627 sret = balance_level(trans, root, p, level);16451645- btrfs_clear_path_blocking(p);16281628+ btrfs_clear_path_blocking(p, NULL);1646162916471630 if (sret) {16481631 ret = sret;···17051688 if (!p->skip_locking) {17061689 int lret;1707169017081708- btrfs_clear_path_blocking(p);16911691+ btrfs_clear_path_blocking(p, NULL);17091692 lret = btrfs_try_spin_lock(b);1710169317111694 if (!lret) {17121695 btrfs_set_path_blocking(p);17131696 btrfs_tree_lock(b);17141714- btrfs_clear_path_blocking(p);16971697+ btrfs_clear_path_blocking(p, b);17151698 }17161699 }17171700 } else {···17231706 btrfs_set_path_blocking(p);17241707 sret = split_leaf(trans, root, key,17251708 p, ins_len, ret == 0);17261726- btrfs_clear_path_blocking(p);17091709+ btrfs_clear_path_blocking(p, NULL);1727171017281711 BUG_ON(sret > 0);17291712 if (sret) {···39433926 btrfs_release_path(root, path);39443927 goto again;39453928 } else {39463946- btrfs_clear_path_blocking(path);39473929 goto out;39483930 }39493931 }···39623946 path->locks[level - 1] = 1;39633947 path->nodes[level - 1] = cur;39643948 unlock_up(path, level, 1);39653965- btrfs_clear_path_blocking(path);39493949+ btrfs_clear_path_blocking(path, NULL);39663950 }39673951out:39683952 if (ret == 0)
···7575 struct btrfs_work work;7676};77777878+/* These are used to set the lockdep class on the extent buffer locks.7979+ * The class is set by the readpage_end_io_hook after the buffer has8080+ * passed csum validation but before the pages are unlocked.8181+ *8282+ * The lockdep class is also set by btrfs_init_new_buffer on freshly8383+ * allocated blocks.8484+ *8585+ * The class is based on the level in the tree block, which allows lockdep8686+ * to know that lower nodes nest inside the locks of higher nodes.8787+ *8888+ * We also add a check to make sure the highest level of the tree is8989+ * the same as our lockdep setup here. If BTRFS_MAX_LEVEL changes, this9090+ * code needs update as well.9191+ */9292+#ifdef CONFIG_DEBUG_LOCK_ALLOC9393+# if BTRFS_MAX_LEVEL != 89494+# error9595+# endif9696+static struct lock_class_key btrfs_eb_class[BTRFS_MAX_LEVEL + 1];9797+static const char *btrfs_eb_name[BTRFS_MAX_LEVEL + 1] = {9898+ /* leaf */9999+ "btrfs-extent-00",100100+ "btrfs-extent-01",101101+ "btrfs-extent-02",102102+ "btrfs-extent-03",103103+ "btrfs-extent-04",104104+ "btrfs-extent-05",105105+ "btrfs-extent-06",106106+ "btrfs-extent-07",107107+ /* highest possible level */108108+ "btrfs-extent-08",109109+};110110+#endif111111+78112/*79113 * extents on the btree inode are pretty simple, there's one extent80114 * that covers the entire device···381347 return ret;382348}383349350350+#ifdef CONFIG_DEBUG_LOCK_ALLOC351351+void btrfs_set_buffer_lockdep_class(struct extent_buffer *eb, int level)352352+{353353+ lockdep_set_class_and_name(&eb->lock,354354+ &btrfs_eb_class[level],355355+ btrfs_eb_name[level]);356356+}357357+#endif358358+384359static int btree_readpage_end_io_hook(struct page *page, u64 start, u64 end,385360 struct extent_state *state)386361{···434391 goto err;435392 }436393 found_level = btrfs_header_level(eb);394394+395395+ btrfs_set_buffer_lockdep_class(eb, found_level);437396438397 ret = csum_tree_block(root, eb, 1);439398 if (ret)···18221777 ret = find_and_setup_root(tree_root, fs_info,18231778 BTRFS_DEV_TREE_OBJECTID, dev_root);18241779 dev_root->track_dirty = 1;18251825-18261780 if (ret)18271781 goto fail_extent_root;18281782
···13231323int btrfs_extent_post_op(struct btrfs_trans_handle *trans,13241324 struct btrfs_root *root)13251325{13261326- finish_current_insert(trans, root->fs_info->extent_root, 1);13271327- del_pending_extents(trans, root->fs_info->extent_root, 1);13261326+ u64 start;13271327+ u64 end;13281328+ int ret;13291329+13301330+ while(1) {13311331+ finish_current_insert(trans, root->fs_info->extent_root, 1);13321332+ del_pending_extents(trans, root->fs_info->extent_root, 1);13331333+13341334+ /* is there more work to do? */13351335+ ret = find_first_extent_bit(&root->fs_info->pending_del,13361336+ 0, &start, &end, EXTENT_WRITEBACK);13371337+ if (!ret)13381338+ continue;13391339+ ret = find_first_extent_bit(&root->fs_info->extent_ins,13401340+ 0, &start, &end, EXTENT_WRITEBACK);13411341+ if (!ret)13421342+ continue;13431343+ break;13441344+ }13281345 return 0;13291346}13301347···22282211 u64 end;22292212 u64 priv;22302213 u64 search = 0;22312231- u64 skipped = 0;22322214 struct btrfs_fs_info *info = extent_root->fs_info;22332215 struct btrfs_path *path;22342216 struct pending_extent_op *extent_op, *tmp;22352217 struct list_head insert_list, update_list;22362218 int ret;22372237- int num_inserts = 0, max_inserts;22192219+ int num_inserts = 0, max_inserts, restart = 0;2238222022392221 path = btrfs_alloc_path();22402222 INIT_LIST_HEAD(&insert_list);···22492233 ret = find_first_extent_bit(&info->extent_ins, search, &start,22502234 &end, EXTENT_WRITEBACK);22512235 if (ret) {22522252- if (skipped && all && !num_inserts &&22362236+ if (restart && !num_inserts &&22532237 list_empty(&update_list)) {22542254- skipped = 0;22382238+ restart = 0;22552239 search = 0;22562240 continue;22572241 }22582258- mutex_unlock(&info->extent_ins_mutex);22592242 break;22602243 }2261224422622245 ret = try_lock_extent(&info->extent_ins, start, end, GFP_NOFS);22632246 if (!ret) {22642264- skipped = 1;22472247+ if (all)22482248+ restart = 1;22652249 search = end + 1;22662250 if (need_resched()) {22672251 mutex_unlock(&info->extent_ins_mutex);···22802264 list_add_tail(&extent_op->list, &insert_list);22812265 search = end + 1;22822266 if (num_inserts == max_inserts) {22832283- mutex_unlock(&info->extent_ins_mutex);22672267+ restart = 1;22842268 break;22852269 }22862270 } else if (extent_op->type == PENDING_BACKREF_UPDATE) {···22962280 * somebody marked this thing for deletion then just unlock it and be22972281 * done, the free_extents will handle it22982282 */22992299- mutex_lock(&info->extent_ins_mutex);23002283 list_for_each_entry_safe(extent_op, tmp, &update_list, list) {23012284 clear_extent_bits(&info->extent_ins, extent_op->bytenr,23022285 extent_op->bytenr + extent_op->num_bytes - 1,···23172302 if (!list_empty(&update_list)) {23182303 ret = update_backrefs(trans, extent_root, path, &update_list);23192304 BUG_ON(ret);23052305+23062306+ /* we may have COW'ed new blocks, so lets start over */23072307+ if (all)23082308+ restart = 1;23202309 }2321231023222311 /*···23282309 * need to make sure everything is cleaned then reset everything and23292310 * go back to the beginning23302311 */23312331- if (!num_inserts && all && skipped) {23122312+ if (!num_inserts && restart) {23322313 search = 0;23332333- skipped = 0;23142314+ restart = 0;23342315 INIT_LIST_HEAD(&update_list);23352316 INIT_LIST_HEAD(&insert_list);23362317 goto again;···23872368 BUG_ON(ret);2388236923892370 /*23902390- * if we broke out of the loop in order to insert stuff because we hit23912391- * the maximum number of inserts at a time we can handle, then loop23922392- * back and pick up where we left off23712371+ * if restart is set for whatever reason we need to go back and start23722372+ * searching through the pending list again.23732373+ *23742374+ * We just inserted some extents, which could have resulted in new23752375+ * blocks being allocated, which would result in new blocks needing23762376+ * updates, so if all is set we _must_ restart to get the updated23772377+ * blocks.23932378 */23942394- if (num_inserts == max_inserts) {23952395- INIT_LIST_HEAD(&insert_list);23962396- INIT_LIST_HEAD(&update_list);23972397- num_inserts = 0;23982398- goto again;23992399- }24002400-24012401- /*24022402- * again, if we need to make absolutely sure there are no more pending24032403- * extent operations left and we know that we skipped some, go back to24042404- * the beginning and do it all again24052405- */24062406- if (all && skipped) {23792379+ if (restart || all) {24072380 INIT_LIST_HEAD(&insert_list);24082381 INIT_LIST_HEAD(&update_list);24092382 search = 0;24102410- skipped = 0;23832383+ restart = 0;24112384 num_inserts = 0;24122385 goto again;24132386 }···27202709 goto again;27212710 }2722271127122712+ if (!err)27132713+ finish_current_insert(trans, extent_root, 0);27232714 return err;27242715}27252716···2872285928732860 if (data & BTRFS_BLOCK_GROUP_METADATA) {28742861 last_ptr = &root->fs_info->last_alloc;28752875- empty_cluster = 64 * 1024;28622862+ if (!btrfs_test_opt(root, SSD))28632863+ empty_cluster = 64 * 1024;28762864 }2877286528782866 if ((data & BTRFS_BLOCK_GROUP_DATA) && btrfs_test_opt(root, SSD))···3416340234173403struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans,34183404 struct btrfs_root *root,34193419- u64 bytenr, u32 blocksize)34053405+ u64 bytenr, u32 blocksize,34063406+ int level)34203407{34213408 struct extent_buffer *buf;34223409···34253410 if (!buf)34263411 return ERR_PTR(-ENOMEM);34273412 btrfs_set_header_generation(buf, trans->transid);34133413+ btrfs_set_buffer_lockdep_class(buf, level);34283414 btrfs_tree_lock(buf);34293415 clean_tree_block(trans, root, buf);34303416···34693453 return ERR_PTR(ret);34703454 }3471345534723472- buf = btrfs_init_new_buffer(trans, root, ins.objectid, blocksize);34563456+ buf = btrfs_init_new_buffer(trans, root, ins.objectid,34573457+ blocksize, level);34733458 return buf;34743459}34753460···56585641 prev_block = block_start;56595642 }5660564356445644+ mutex_lock(&extent_root->fs_info->trans_mutex);56615645 btrfs_record_root_in_trans(found_root);56465646+ mutex_unlock(&extent_root->fs_info->trans_mutex);56625647 if (ref_path->owner_objectid >= BTRFS_FIRST_FREE_OBJECTID) {56635648 /*56645649 * try to update data extent references while
···12221222 /*12231223 * ok we haven't committed the transaction yet, lets do a commit12241224 */12251225- if (file->private_data)12251225+ if (file && file->private_data)12261226 btrfs_ioctl_trans_end(file);1227122712281228 trans = btrfs_start_transaction(root, 1);···12311231 goto out;12321232 }1233123312341234- ret = btrfs_log_dentry_safe(trans, root, file->f_dentry);12341234+ ret = btrfs_log_dentry_safe(trans, root, dentry);12351235 if (ret < 0)12361236 goto out;12371237···12451245 * file again, but that will end up using the synchronization12461246 * inside btrfs_sync_log to keep things safe.12471247 */12481248- mutex_unlock(&file->f_dentry->d_inode->i_mutex);12481248+ mutex_unlock(&dentry->d_inode->i_mutex);1249124912501250 if (ret > 0) {12511251 ret = btrfs_commit_transaction(trans, root);···12531253 btrfs_sync_log(trans, root);12541254 ret = btrfs_end_transaction(trans, root);12551255 }12561256- mutex_lock(&file->f_dentry->d_inode->i_mutex);12561256+ mutex_lock(&dentry->d_inode->i_mutex);12571257out:12581258 return ret > 0 ? EIO : ret;12591259}
···2525#include "extent_io.h"2626#include "locking.h"27272828-/*2929- * btrfs_header_level() isn't free, so don't call it when lockdep isn't3030- * on3131- */3232-#ifdef CONFIG_DEBUG_LOCK_ALLOC3333-static inline void spin_nested(struct extent_buffer *eb)3434-{3535- spin_lock_nested(&eb->lock, BTRFS_MAX_LEVEL - btrfs_header_level(eb));3636-}3737-#else3828static inline void spin_nested(struct extent_buffer *eb)3929{4030 spin_lock(&eb->lock);4131}4242-#endif43324433/*4534 * Setting a lock to blocking will drop the spinlock and set the
+4-1
fs/btrfs/super.c
···379379 btrfs_start_delalloc_inodes(root);380380 btrfs_wait_ordered_extents(root, 0);381381382382- btrfs_clean_old_snapshots(root);383382 trans = btrfs_start_transaction(root, 1);384383 ret = btrfs_commit_transaction(trans, root);385384 sb->s_dirt = 0;···509510{510511 struct btrfs_root *root = btrfs_sb(sb);511512 int ret;513513+514514+ ret = btrfs_parse_options(root, data);515515+ if (ret)516516+ return -EINVAL;512517513518 if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))514519 return 0;
···28942894 free_extent_map(em);28952895 }2896289628972897- map = kzalloc(sizeof(*map), GFP_NOFS);28982898- if (!map)28992899- return -ENOMEM;29002900-29012897 em = alloc_extent_map(GFP_NOFS);29022898 if (!em)29032899 return -ENOMEM;···31023106 if (!sb)31033107 return -ENOMEM;31043108 btrfs_set_buffer_uptodate(sb);31093109+ btrfs_set_buffer_lockdep_class(sb, 0);31103110+31053111 write_extent_buffer(sb, super_copy, 0, BTRFS_SUPER_INFO_SIZE);31063112 array_size = btrfs_super_sys_array_size(super_copy);31073113
+2-1
fs/buffer.c
···777777 __inc_zone_page_state(page, NR_FILE_DIRTY);778778 __inc_bdi_stat(mapping->backing_dev_info,779779 BDI_RECLAIMABLE);780780+ task_dirty_inc(current);780781 task_io_account_write(PAGE_CACHE_SIZE);781782 }782783 radix_tree_tag_set(&mapping->page_tree,···31093108 if (test_clear_buffer_dirty(bh)) {31103109 get_bh(bh);31113110 bh->b_end_io = end_buffer_write_sync;31123112- ret = submit_bh(WRITE_SYNC, bh);31113111+ ret = submit_bh(WRITE, bh);31133112 wait_on_buffer(bh);31143113 if (buffer_eopnotsupp(bh)) {31153114 clear_buffer_eopnotsupp(bh);
+14-1
fs/cifs/CHANGES
···11+Version 1.5722+------------33+Improve support for multiple security contexts to the same server. We44+used to use the same "vcnumber" for all connections which could cause55+the server to treat subsequent connections, especially those that66+are authenticated as guest, as reconnections, invalidating the earlier77+user's smb session. This fix allows cifs to mount multiple times to the88+same server with different userids without risking invalidating earlier99+established security contexts.1010+111Version 1.56212------------313Add "forcemandatorylock" mount option to allow user to use mandatory···177top of the share. Fix problem in 2.6.28 resolving DFS paths to188Samba servers (worked to Windows). Fix rmdir so that pending search199(readdir) requests do not get invalid results which include the now2020-removed directory.1010+removed directory. Fix oops in cifs_dfs_ref.c when prefixpath is not reachable1111+when using DFS. Add better file create support to servers which support1212+the CIFS POSIX protocol extensions (this adds support for new flags1313+on create, and improves semantics for write of locked ranges).21142215Version 1.552316------------
···164164 /* multiplexed reads or writes */165165 unsigned int maxBuf; /* maxBuf specifies the maximum */166166 /* message size the server can send or receive for non-raw SMBs */167167- unsigned int maxRw; /* maxRw specifies the maximum */167167+ unsigned int max_rw; /* maxRw specifies the maximum */168168 /* message size the server can send or receive for */169169 /* SMB_COM_WRITE_RAW or SMB_COM_READ_RAW. */170170+ unsigned int max_vcs; /* maximum number of smb sessions, at least171171+ those that can be specified uniquely with172172+ vcnumbers */170173 char sessid[4]; /* unique token id for this session */171174 /* (returned on Negotiate */172175 int capabilities; /* allow selective disabling of caps by smb sess */···213210 unsigned overrideSecFlg; /* if non-zero override global sec flags */214211 __u16 ipc_tid; /* special tid for connection to IPC share */215212 __u16 flags;213213+ __u16 vcnum;216214 char *serverOS; /* name of operating system underlying server */217215 char *serverNOS; /* name of network operating system of server */218216 char *serverDomain; /* security realm of server */
···528528 server->maxReq = le16_to_cpu(rsp->MaxMpxCount);529529 server->maxBuf = min((__u32)le16_to_cpu(rsp->MaxBufSize),530530 (__u32)CIFSMaxBufSize + MAX_CIFS_HDR_SIZE);531531+ server->max_vcs = le16_to_cpu(rsp->MaxNumberVcs);531532 GETU32(server->sessid) = le32_to_cpu(rsp->SessionKey);532533 /* even though we do not use raw we might as well set this533534 accurately, in case we ever find a need for it */534535 if ((le16_to_cpu(rsp->RawMode) & RAW_ENABLE) == RAW_ENABLE) {535535- server->maxRw = 0xFF00;536536+ server->max_rw = 0xFF00;536537 server->capabilities = CAP_MPX_MODE | CAP_RAW_MODE;537538 } else {538538- server->maxRw = 0;/* we do not need to use raw anyway */539539+ server->max_rw = 0;/* do not need to use raw anyway */539540 server->capabilities = CAP_MPX_MODE;540541 }541542 tmp = (__s16)le16_to_cpu(rsp->ServerTimeZone);···639638 /* probably no need to store and check maxvcs */640639 server->maxBuf = min(le32_to_cpu(pSMBr->MaxBufferSize),641640 (__u32) CIFSMaxBufSize + MAX_CIFS_HDR_SIZE);642642- server->maxRw = le32_to_cpu(pSMBr->MaxRawSize);641641+ server->max_rw = le32_to_cpu(pSMBr->MaxRawSize);643642 cFYI(DBG2, ("Max buf = %d", ses->server->maxBuf));644643 GETU32(ses->server->sessid) = le32_to_cpu(pSMBr->SessionKey);645644 server->capabilities = le32_to_cpu(pSMBr->Capabilities);
+48-3
fs/cifs/connect.c
···2323#include <linux/string.h>2424#include <linux/list.h>2525#include <linux/wait.h>2626-#include <linux/ipv6.h>2726#include <linux/pagemap.h>2827#include <linux/ctype.h>2928#include <linux/utsname.h>···3435#include <linux/freezer.h>3536#include <asm/uaccess.h>3637#include <asm/processor.h>3838+#include <net/ipv6.h>3739#include "cifspdu.h"3840#include "cifsglob.h"3941#include "cifsproto.h"···13791379 server->addr.sockAddr.sin_addr.s_addr))13801380 continue;13811381 else if (addr->ss_family == AF_INET6 &&13821382- memcmp(&server->addr.sockAddr6.sin6_addr,13831383- &addr6->sin6_addr, sizeof(addr6->sin6_addr)))13821382+ !ipv6_addr_equal(&server->addr.sockAddr6.sin6_addr,13831383+ &addr6->sin6_addr))13841384 continue;1385138513861386 ++server->srv_count;···21802180 "mount option supported"));21812181}2182218221832183+static int21842184+is_path_accessible(int xid, struct cifsTconInfo *tcon,21852185+ struct cifs_sb_info *cifs_sb, const char *full_path)21862186+{21872187+ int rc;21882188+ __u64 inode_num;21892189+ FILE_ALL_INFO *pfile_info;21902190+21912191+ rc = CIFSGetSrvInodeNumber(xid, tcon, full_path, &inode_num,21922192+ cifs_sb->local_nls,21932193+ cifs_sb->mnt_cifs_flags &21942194+ CIFS_MOUNT_MAP_SPECIAL_CHR);21952195+ if (rc != -EOPNOTSUPP)21962196+ return rc;21972197+21982198+ pfile_info = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL);21992199+ if (pfile_info == NULL)22002200+ return -ENOMEM;22012201+22022202+ rc = CIFSSMBQPathInfo(xid, tcon, full_path, pfile_info,22032203+ 0 /* not legacy */, cifs_sb->local_nls,22042204+ cifs_sb->mnt_cifs_flags &22052205+ CIFS_MOUNT_MAP_SPECIAL_CHR);22062206+ kfree(pfile_info);22072207+ return rc;22082208+}22092209+21832210int21842211cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,21852212 char *mount_data, const char *devname)···22172190 struct cifsSesInfo *pSesInfo = NULL;22182191 struct cifsTconInfo *tcon = NULL;22192192 struct TCP_Server_Info *srvTcp = NULL;21932193+ char *full_path;2220219422212195 xid = GetXid();22222196···24532425 if (!(tcon->ses->capabilities & CAP_LARGE_READ_X))24542426 cifs_sb->rsize = min(cifs_sb->rsize,24552427 (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE));24282428+24292429+ if (!rc && cifs_sb->prepathlen) {24302430+ /* build_path_to_root works only when we have a valid tcon */24312431+ full_path = cifs_build_path_to_root(cifs_sb);24322432+ if (full_path == NULL) {24332433+ rc = -ENOMEM;24342434+ goto mount_fail_check;24352435+ }24362436+ rc = is_path_accessible(xid, tcon, cifs_sb, full_path);24372437+ if (rc) {24382438+ cERROR(1, ("Path %s in not accessible: %d",24392439+ full_path, rc));24402440+ kfree(full_path);24412441+ goto mount_fail_check;24422442+ }24432443+ kfree(full_path);24442444+ }2456244524572446 /* volume_info->password is freed above when existing session found24582447 (in which case it is not needed anymore) but when new sesion is created
+202-99
fs/cifs/dir.c
···33 *44 * vfs operations that deal with dentries55 *66- * Copyright (C) International Business Machines Corp., 2002,200866+ * Copyright (C) International Business Machines Corp., 2002,200977 * Author(s): Steve French (sfrench@us.ibm.com)88 *99 * This library is free software; you can redistribute it and/or modify···129129 return full_path;130130}131131132132+static int cifs_posix_open(char *full_path, struct inode **pinode,133133+ struct super_block *sb, int mode, int oflags,134134+ int *poplock, __u16 *pnetfid, int xid)135135+{136136+ int rc;137137+ __u32 oplock;138138+ FILE_UNIX_BASIC_INFO *presp_data;139139+ __u32 posix_flags = 0;140140+ struct cifs_sb_info *cifs_sb = CIFS_SB(sb);141141+142142+ cFYI(1, ("posix open %s", full_path));143143+144144+ presp_data = kzalloc(sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL);145145+ if (presp_data == NULL)146146+ return -ENOMEM;147147+148148+/* So far cifs posix extensions can only map the following flags.149149+ There are other valid fmode oflags such as FMODE_LSEEK, FMODE_PREAD, but150150+ so far we do not seem to need them, and we can treat them as local only */151151+ if ((oflags & (FMODE_READ | FMODE_WRITE)) ==152152+ (FMODE_READ | FMODE_WRITE))153153+ posix_flags = SMB_O_RDWR;154154+ else if (oflags & FMODE_READ)155155+ posix_flags = SMB_O_RDONLY;156156+ else if (oflags & FMODE_WRITE)157157+ posix_flags = SMB_O_WRONLY;158158+ if (oflags & O_CREAT)159159+ posix_flags |= SMB_O_CREAT;160160+ if (oflags & O_EXCL)161161+ posix_flags |= SMB_O_EXCL;162162+ if (oflags & O_TRUNC)163163+ posix_flags |= SMB_O_TRUNC;164164+ if (oflags & O_APPEND)165165+ posix_flags |= SMB_O_APPEND;166166+ if (oflags & O_SYNC)167167+ posix_flags |= SMB_O_SYNC;168168+ if (oflags & O_DIRECTORY)169169+ posix_flags |= SMB_O_DIRECTORY;170170+ if (oflags & O_NOFOLLOW)171171+ posix_flags |= SMB_O_NOFOLLOW;172172+ if (oflags & O_DIRECT)173173+ posix_flags |= SMB_O_DIRECT;174174+175175+176176+ rc = CIFSPOSIXCreate(xid, cifs_sb->tcon, posix_flags, mode,177177+ pnetfid, presp_data, &oplock, full_path,178178+ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &179179+ CIFS_MOUNT_MAP_SPECIAL_CHR);180180+ if (rc)181181+ goto posix_open_ret;182182+183183+ if (presp_data->Type == cpu_to_le32(-1))184184+ goto posix_open_ret; /* open ok, caller does qpathinfo */185185+186186+ /* get new inode and set it up */187187+ if (!pinode)188188+ goto posix_open_ret; /* caller does not need info */189189+190190+ *pinode = cifs_new_inode(sb, &presp_data->UniqueId);191191+192192+ /* We do not need to close the file if new_inode fails since193193+ the caller will retry qpathinfo as long as inode is null */194194+ if (*pinode == NULL)195195+ goto posix_open_ret;196196+197197+ posix_fill_in_inode(*pinode, presp_data, 1);198198+199199+posix_open_ret:200200+ kfree(presp_data);201201+ return rc;202202+}203203+132204static void setup_cifs_dentry(struct cifsTconInfo *tcon,133205 struct dentry *direntry,134206 struct inode *newinode)···222150 int xid;223151 int create_options = CREATE_NOT_DIR;224152 int oplock = 0;225225- /* BB below access is too much for the mknod to request */153153+ int oflags;154154+ /*155155+ * BB below access is probably too much for mknod to request156156+ * but we have to do query and setpathinfo so requesting157157+ * less could fail (unless we want to request getatr and setatr158158+ * permissions (only). At least for POSIX we do not have to159159+ * request so much.160160+ */226161 int desiredAccess = GENERIC_READ | GENERIC_WRITE;227162 __u16 fileHandle;228163 struct cifs_sb_info *cifs_sb;···253174 }254175255176 mode &= ~current->fs->umask;177177+ if (oplockEnabled)178178+ oplock = REQ_OPLOCK;179179+180180+ if (nd && (nd->flags & LOOKUP_OPEN))181181+ oflags = nd->intent.open.flags;182182+ else183183+ oflags = FMODE_READ;184184+185185+ if (tcon->unix_ext && (tcon->ses->capabilities & CAP_UNIX) &&186186+ (CIFS_UNIX_POSIX_PATH_OPS_CAP &187187+ le64_to_cpu(tcon->fsUnixInfo.Capability))) {188188+ rc = cifs_posix_open(full_path, &newinode, inode->i_sb,189189+ mode, oflags, &oplock, &fileHandle, xid);190190+ /* EIO could indicate that (posix open) operation is not191191+ supported, despite what server claimed in capability192192+ negotation. EREMOTE indicates DFS junction, which is not193193+ handled in posix open */194194+195195+ if ((rc == 0) && (newinode == NULL))196196+ goto cifs_create_get_file_info; /* query inode info */197197+ else if (rc == 0) /* success, no need to query */198198+ goto cifs_create_set_dentry;199199+ else if ((rc != -EIO) && (rc != -EREMOTE) &&200200+ (rc != -EOPNOTSUPP)) /* path not found or net err */201201+ goto cifs_create_out;202202+ /* else fallthrough to retry, using older open call, this is203203+ case where server does not support this SMB level, and204204+ falsely claims capability (also get here for DFS case205205+ which should be rare for path not covered on files) */206206+ }256207257208 if (nd && (nd->flags & LOOKUP_OPEN)) {258258- int oflags = nd->intent.open.flags;259259-209209+ /* if the file is going to stay open, then we210210+ need to set the desired access properly */260211 desiredAccess = 0;261212 if (oflags & FMODE_READ)262262- desiredAccess |= GENERIC_READ;213213+ desiredAccess |= GENERIC_READ; /* is this too little? */263214 if (oflags & FMODE_WRITE) {264215 desiredAccess |= GENERIC_WRITE;265216 if (!(oflags & FMODE_READ))···308199309200 /* BB add processing to set equivalent of mode - e.g. via CreateX with310201 ACLs */311311- if (oplockEnabled)312312- oplock = REQ_OPLOCK;313202314203 buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL);315204 if (buf == NULL) {···340233 }341234 if (rc) {342235 cFYI(1, ("cifs_create returned 0x%x", rc));343343- } else {344344- /* If Open reported that we actually created a file345345- then we now have to set the mode if possible */346346- if ((tcon->unix_ext) && (oplock & CIFS_CREATE_ACTION)) {347347- struct cifs_unix_set_info_args args = {236236+ goto cifs_create_out;237237+ }238238+239239+ /* If Open reported that we actually created a file240240+ then we now have to set the mode if possible */241241+ if ((tcon->unix_ext) && (oplock & CIFS_CREATE_ACTION)) {242242+ struct cifs_unix_set_info_args args = {348243 .mode = mode,349244 .ctime = NO_CHANGE_64,350245 .atime = NO_CHANGE_64,351246 .mtime = NO_CHANGE_64,352247 .device = 0,353353- };248248+ };354249355355- if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {356356- args.uid = (__u64) current_fsuid();357357- if (inode->i_mode & S_ISGID)358358- args.gid = (__u64) inode->i_gid;359359- else360360- args.gid = (__u64) current_fsgid();361361- } else {362362- args.uid = NO_CHANGE_64;363363- args.gid = NO_CHANGE_64;364364- }365365- CIFSSMBUnixSetInfo(xid, tcon, full_path, &args,366366- cifs_sb->local_nls,367367- cifs_sb->mnt_cifs_flags &368368- CIFS_MOUNT_MAP_SPECIAL_CHR);250250+ if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {251251+ args.uid = (__u64) current_fsuid();252252+ if (inode->i_mode & S_ISGID)253253+ args.gid = (__u64) inode->i_gid;254254+ else255255+ args.gid = (__u64) current_fsgid();369256 } else {370370- /* BB implement mode setting via Windows security371371- descriptors e.g. */372372- /* CIFSSMBWinSetPerms(xid,tcon,path,mode,-1,-1,nls);*/373373-374374- /* Could set r/o dos attribute if mode & 0222 == 0 */257257+ args.uid = NO_CHANGE_64;258258+ args.gid = NO_CHANGE_64;375259 }260260+ CIFSSMBUnixSetInfo(xid, tcon, full_path, &args,261261+ cifs_sb->local_nls,262262+ cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);263263+ } else {264264+ /* BB implement mode setting via Windows security265265+ descriptors e.g. */266266+ /* CIFSSMBWinSetPerms(xid,tcon,path,mode,-1,-1,nls);*/376267377377- /* server might mask mode so we have to query for it */378378- if (tcon->unix_ext)379379- rc = cifs_get_inode_info_unix(&newinode, full_path,380380- inode->i_sb, xid);381381- else {382382- rc = cifs_get_inode_info(&newinode, full_path,383383- buf, inode->i_sb, xid,384384- &fileHandle);385385- if (newinode) {386386- if (cifs_sb->mnt_cifs_flags &387387- CIFS_MOUNT_DYNPERM)388388- newinode->i_mode = mode;389389- if ((oplock & CIFS_CREATE_ACTION) &&390390- (cifs_sb->mnt_cifs_flags &391391- CIFS_MOUNT_SET_UID)) {392392- newinode->i_uid = current_fsuid();393393- if (inode->i_mode & S_ISGID)394394- newinode->i_gid =395395- inode->i_gid;396396- else397397- newinode->i_gid =398398- current_fsgid();399399- }268268+ /* Could set r/o dos attribute if mode & 0222 == 0 */269269+ }270270+271271+cifs_create_get_file_info:272272+ /* server might mask mode so we have to query for it */273273+ if (tcon->unix_ext)274274+ rc = cifs_get_inode_info_unix(&newinode, full_path,275275+ inode->i_sb, xid);276276+ else {277277+ rc = cifs_get_inode_info(&newinode, full_path, buf,278278+ inode->i_sb, xid, &fileHandle);279279+ if (newinode) {280280+ if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM)281281+ newinode->i_mode = mode;282282+ if ((oplock & CIFS_CREATE_ACTION) &&283283+ (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID)) {284284+ newinode->i_uid = current_fsuid();285285+ if (inode->i_mode & S_ISGID)286286+ newinode->i_gid = inode->i_gid;287287+ else288288+ newinode->i_gid = current_fsgid();400289 }401290 }291291+ }402292403403- if (rc != 0) {404404- cFYI(1, ("Create worked, get_inode_info failed rc = %d",405405- rc));406406- } else407407- setup_cifs_dentry(tcon, direntry, newinode);293293+cifs_create_set_dentry:294294+ if (rc == 0)295295+ setup_cifs_dentry(tcon, direntry, newinode);296296+ else297297+ cFYI(1, ("Create worked, get_inode_info failed rc = %d", rc));408298409409- if ((nd == NULL /* nfsd case - nfs srv does not set nd */) ||410410- (!(nd->flags & LOOKUP_OPEN))) {411411- /* mknod case - do not leave file open */412412- CIFSSMBClose(xid, tcon, fileHandle);413413- } else if (newinode) {414414- struct cifsFileInfo *pCifsFile =415415- kzalloc(sizeof(struct cifsFileInfo), GFP_KERNEL);299299+ /* nfsd case - nfs srv does not set nd */300300+ if ((nd == NULL) || (!(nd->flags & LOOKUP_OPEN))) {301301+ /* mknod case - do not leave file open */302302+ CIFSSMBClose(xid, tcon, fileHandle);303303+ } else if (newinode) {304304+ struct cifsFileInfo *pCifsFile =305305+ kzalloc(sizeof(struct cifsFileInfo), GFP_KERNEL);416306417417- if (pCifsFile == NULL)418418- goto cifs_create_out;419419- pCifsFile->netfid = fileHandle;420420- pCifsFile->pid = current->tgid;421421- pCifsFile->pInode = newinode;422422- pCifsFile->invalidHandle = false;423423- pCifsFile->closePend = false;424424- init_MUTEX(&pCifsFile->fh_sem);425425- mutex_init(&pCifsFile->lock_mutex);426426- INIT_LIST_HEAD(&pCifsFile->llist);427427- atomic_set(&pCifsFile->wrtPending, 0);307307+ if (pCifsFile == NULL)308308+ goto cifs_create_out;309309+ pCifsFile->netfid = fileHandle;310310+ pCifsFile->pid = current->tgid;311311+ pCifsFile->pInode = newinode;312312+ pCifsFile->invalidHandle = false;313313+ pCifsFile->closePend = false;314314+ init_MUTEX(&pCifsFile->fh_sem);315315+ mutex_init(&pCifsFile->lock_mutex);316316+ INIT_LIST_HEAD(&pCifsFile->llist);317317+ atomic_set(&pCifsFile->wrtPending, 0);428318429429- /* set the following in open now319319+ /* set the following in open now430320 pCifsFile->pfile = file; */431431- write_lock(&GlobalSMBSeslock);432432- list_add(&pCifsFile->tlist, &tcon->openFileList);433433- pCifsInode = CIFS_I(newinode);434434- if (pCifsInode) {435435- /* if readable file instance put first in list*/436436- if (write_only) {437437- list_add_tail(&pCifsFile->flist,438438- &pCifsInode->openFileList);439439- } else {440440- list_add(&pCifsFile->flist,441441- &pCifsInode->openFileList);442442- }443443- if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) {444444- pCifsInode->clientCanCacheAll = true;445445- pCifsInode->clientCanCacheRead = true;446446- cFYI(1, ("Exclusive Oplock inode %p",447447- newinode));448448- } else if ((oplock & 0xF) == OPLOCK_READ)449449- pCifsInode->clientCanCacheRead = true;321321+ write_lock(&GlobalSMBSeslock);322322+ list_add(&pCifsFile->tlist, &tcon->openFileList);323323+ pCifsInode = CIFS_I(newinode);324324+ if (pCifsInode) {325325+ /* if readable file instance put first in list*/326326+ if (write_only) {327327+ list_add_tail(&pCifsFile->flist,328328+ &pCifsInode->openFileList);329329+ } else {330330+ list_add(&pCifsFile->flist,331331+ &pCifsInode->openFileList);450332 }451451- write_unlock(&GlobalSMBSeslock);333333+ if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) {334334+ pCifsInode->clientCanCacheAll = true;335335+ pCifsInode->clientCanCacheRead = true;336336+ cFYI(1, ("Exclusive Oplock inode %p",337337+ newinode));338338+ } else if ((oplock & 0xF) == OPLOCK_READ)339339+ pCifsInode->clientCanCacheRead = true;452340 }341341+ write_unlock(&GlobalSMBSeslock);453342 }454343cifs_create_out:455344 kfree(buf);
+64-40
fs/cifs/inode.c
···199199 pfnd_dat->Gid = cpu_to_le64(pinode->i_gid);200200}201201202202+/**203203+ * cifs_new inode - create new inode, initialize, and hash it204204+ * @sb - pointer to superblock205205+ * @inum - if valid pointer and serverino is enabled, replace i_ino with val206206+ *207207+ * Create a new inode, initialize it for CIFS and hash it. Returns the new208208+ * inode or NULL if one couldn't be allocated.209209+ *210210+ * If the share isn't mounted with "serverino" or inum is a NULL pointer then211211+ * we'll just use the inode number assigned by new_inode(). Note that this can212212+ * mean i_ino collisions since the i_ino assigned by new_inode is not213213+ * guaranteed to be unique.214214+ */215215+struct inode *216216+cifs_new_inode(struct super_block *sb, __u64 *inum)217217+{218218+ struct inode *inode;219219+220220+ inode = new_inode(sb);221221+ if (inode == NULL)222222+ return NULL;223223+224224+ /*225225+ * BB: Is i_ino == 0 legal? Here, we assume that it is. If it isn't we226226+ * stop passing inum as ptr. Are there sanity checks we can use to227227+ * ensure that the server is really filling in that field? Also,228228+ * if serverino is disabled, perhaps we should be using iunique()?229229+ */230230+ if (inum && (CIFS_SB(sb)->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM))231231+ inode->i_ino = (unsigned long) *inum;232232+233233+ /*234234+ * must set this here instead of cifs_alloc_inode since VFS will235235+ * clobber i_flags236236+ */237237+ if (sb->s_flags & MS_NOATIME)238238+ inode->i_flags |= S_NOATIME | S_NOCMTIME;239239+240240+ insert_inode_hash(inode);241241+242242+ return inode;243243+}244244+202245int cifs_get_inode_info_unix(struct inode **pinode,203246 const unsigned char *full_path, struct super_block *sb, int xid)204247{···276233277234 /* get new inode */278235 if (*pinode == NULL) {279279- *pinode = new_inode(sb);236236+ *pinode = cifs_new_inode(sb, &find_data.UniqueId);280237 if (*pinode == NULL) {281238 rc = -ENOMEM;282239 goto cgiiu_exit;283240 }284284- /* Is an i_ino of zero legal? */285285- /* note ino incremented to unique num in new_inode */286286- /* Are there sanity checks we can use to ensure that287287- the server is really filling in that field? */288288- if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)289289- (*pinode)->i_ino = (unsigned long)find_data.UniqueId;290290-291291- if (sb->s_flags & MS_NOATIME)292292- (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME;293293-294294- insert_inode_hash(*pinode);295241 }296242297243 inode = *pinode;···497465498466 /* get new inode */499467 if (*pinode == NULL) {500500- *pinode = new_inode(sb);501501- if (*pinode == NULL) {502502- rc = -ENOMEM;503503- goto cgii_exit;504504- }468468+ __u64 inode_num;469469+ __u64 *pinum = &inode_num;470470+505471 /* Is an i_ino of zero legal? Can we use that to check506472 if the server supports returning inode numbers? Are507473 there other sanity checks we can use to ensure that···516486517487 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {518488 int rc1 = 0;519519- __u64 inode_num;520489521490 rc1 = CIFSGetSrvInodeNumber(xid, pTcon,522522- full_path, &inode_num,491491+ full_path, pinum,523492 cifs_sb->local_nls,524493 cifs_sb->mnt_cifs_flags &525494 CIFS_MOUNT_MAP_SPECIAL_CHR);526495 if (rc1) {527496 cFYI(1, ("GetSrvInodeNum rc %d", rc1));497497+ pinum = NULL;528498 /* BB EOPNOSUPP disable SERVER_INUM? */529529- } else /* do we need cast or hash to ino? */530530- (*pinode)->i_ino = inode_num;531531- } /* else ino incremented to unique num in new_inode*/532532- if (sb->s_flags & MS_NOATIME)533533- (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME;534534- insert_inode_hash(*pinode);499499+ }500500+ } else {501501+ pinum = NULL;502502+ }503503+504504+ *pinode = cifs_new_inode(sb, pinum);505505+ if (*pinode == NULL) {506506+ rc = -ENOMEM;507507+ goto cgii_exit;508508+ }535509 }536510 inode = *pinode;537511 cifsInfo = CIFS_I(inode);···655621 .lookup = cifs_lookup,656622};657623658658-static char *build_path_to_root(struct cifs_sb_info *cifs_sb)624624+char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb)659625{660626 int pplen = cifs_sb->prepathlen;661627 int dfsplen;···712678 return inode;713679714680 cifs_sb = CIFS_SB(inode->i_sb);715715- full_path = build_path_to_root(cifs_sb);681681+ full_path = cifs_build_path_to_root(cifs_sb);716682 if (full_path == NULL)717683 return ERR_PTR(-ENOMEM);718684···10511017 return rc;10521018}1053101910541054-static void posix_fill_in_inode(struct inode *tmp_inode,10201020+void posix_fill_in_inode(struct inode *tmp_inode,10551021 FILE_UNIX_BASIC_INFO *pData, int isNewInode)10561022{10571023 struct cifsInodeInfo *cifsInfo = CIFS_I(tmp_inode);···11481114 else11491115 direntry->d_op = &cifs_dentry_ops;1150111611511151- newinode = new_inode(inode->i_sb);11171117+ newinode = cifs_new_inode(inode->i_sb,11181118+ &pInfo->UniqueId);11521119 if (newinode == NULL) {11531120 kfree(pInfo);11541121 goto mkdir_get_info;11551122 }1156112311571157- /* Is an i_ino of zero legal? */11581158- /* Are there sanity checks we can use to ensure that11591159- the server is really filling in that field? */11601160- if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {11611161- newinode->i_ino =11621162- (unsigned long)pInfo->UniqueId;11631163- } /* note ino incremented to unique num in new_inode */11641164- if (inode->i_sb->s_flags & MS_NOATIME)11651165- newinode->i_flags |= S_NOATIME | S_NOCMTIME;11661124 newinode->i_nlink = 2;11671167-11681168- insert_inode_hash(newinode);11691125 d_instantiate(direntry, newinode);1170112611711127 /* we already checked in POSIXCreate whether
+26-32
fs/cifs/readdir.c
···5656}5757#endif /* DEBUG2 */58585959-/* Returns one if new inode created (which therefore needs to be hashed) */5959+/* Returns 1 if new inode created, 2 if both dentry and inode were */6060/* Might check in the future if inode number changed so we can rehash inode */6161-static int construct_dentry(struct qstr *qstring, struct file *file,6262- struct inode **ptmp_inode, struct dentry **pnew_dentry)6161+static int6262+construct_dentry(struct qstr *qstring, struct file *file,6363+ struct inode **ptmp_inode, struct dentry **pnew_dentry,6464+ __u64 *inum)6365{6464- struct dentry *tmp_dentry;6565- struct cifs_sb_info *cifs_sb;6666- struct cifsTconInfo *pTcon;6666+ struct dentry *tmp_dentry = NULL;6767+ struct super_block *sb = file->f_path.dentry->d_sb;6768 int rc = 0;68696970 cFYI(1, ("For %s", qstring->name));7070- cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);7171- pTcon = cifs_sb->tcon;72717372 qstring->hash = full_name_hash(qstring->name, qstring->len);7473 tmp_dentry = d_lookup(file->f_path.dentry, qstring);7574 if (tmp_dentry) {7575+ /* BB: overwrite old name? i.e. tmp_dentry->d_name and7676+ * tmp_dentry->d_name.len??7777+ */7678 cFYI(0, ("existing dentry with inode 0x%p",7779 tmp_dentry->d_inode));7880 *ptmp_inode = tmp_dentry->d_inode;7979-/* BB overwrite old name? i.e. tmp_dentry->d_name and tmp_dentry->d_name.len??*/8081 if (*ptmp_inode == NULL) {8181- *ptmp_inode = new_inode(file->f_path.dentry->d_sb);8282+ *ptmp_inode = cifs_new_inode(sb, inum);8283 if (*ptmp_inode == NULL)8384 return rc;8485 rc = 1;8586 }8686- if (file->f_path.dentry->d_sb->s_flags & MS_NOATIME)8787- (*ptmp_inode)->i_flags |= S_NOATIME | S_NOCMTIME;8887 } else {8988 tmp_dentry = d_alloc(file->f_path.dentry, qstring);9089 if (tmp_dentry == NULL) {···9293 return rc;9394 }94959595- *ptmp_inode = new_inode(file->f_path.dentry->d_sb);9696- if (pTcon->nocase)9696+ if (CIFS_SB(sb)->tcon->nocase)9797 tmp_dentry->d_op = &cifs_ci_dentry_ops;9898 else9999 tmp_dentry->d_op = &cifs_dentry_ops;100100+101101+ *ptmp_inode = cifs_new_inode(sb, inum);100102 if (*ptmp_inode == NULL)101103 return rc;102102- if (file->f_path.dentry->d_sb->s_flags & MS_NOATIME)103103- (*ptmp_inode)->i_flags |= S_NOATIME | S_NOCMTIME;104104 rc = 2;105105 }106106···820822/* inode num, inode type and filename returned */821823static int cifs_get_name_from_search_buf(struct qstr *pqst,822824 char *current_entry, __u16 level, unsigned int unicode,823823- struct cifs_sb_info *cifs_sb, int max_len, ino_t *pinum)825825+ struct cifs_sb_info *cifs_sb, int max_len, __u64 *pinum)824826{825827 int rc = 0;826828 unsigned int len = 0;···840842 len = strnlen(filename, PATH_MAX);841843 }842844843843- /* BB fixme - hash low and high 32 bits if not 64 bit arch BB */844844- if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)845845- *pinum = pFindData->UniqueId;845845+ *pinum = pFindData->UniqueId;846846 } else if (level == SMB_FIND_FILE_DIRECTORY_INFO) {847847 FILE_DIRECTORY_INFO *pFindData =848848 (FILE_DIRECTORY_INFO *)current_entry;···903907 struct qstr qstring;904908 struct cifsFileInfo *pCifsF;905909 unsigned int obj_type;906906- ino_t inum;910910+ __u64 inum;907911 struct cifs_sb_info *cifs_sb;908912 struct inode *tmp_inode;909913 struct dentry *tmp_dentry;···936940 if (rc)937941 return rc;938942939939- rc = construct_dentry(&qstring, file, &tmp_inode, &tmp_dentry);943943+ /* only these two infolevels return valid inode numbers */944944+ if (pCifsF->srch_inf.info_level == SMB_FIND_FILE_UNIX ||945945+ pCifsF->srch_inf.info_level == SMB_FIND_FILE_ID_FULL_DIR_INFO)946946+ rc = construct_dentry(&qstring, file, &tmp_inode, &tmp_dentry,947947+ &inum);948948+ else949949+ rc = construct_dentry(&qstring, file, &tmp_inode, &tmp_dentry,950950+ NULL);951951+940952 if ((tmp_inode == NULL) || (tmp_dentry == NULL))941953 return -ENOMEM;942942-943943- if (rc) {944944- /* inode created, we need to hash it with right inode number */945945- if (inum != 0) {946946- /* BB fixme - hash the 2 32 quantities bits together if947947- * necessary BB */948948- tmp_inode->i_ino = inum;949949- }950950- insert_inode_hash(tmp_inode);951951- }952954953955 /* we pass in rc below, indicating whether it is a new inode,954956 so we can figure out whether to invalidate the inode cached
+87-4
fs/cifs/sess.c
···3434extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8,3535 unsigned char *p24);36363737+/* Checks if this is the first smb session to be reconnected after3838+ the socket has been reestablished (so we know whether to use vc 0).3939+ Called while holding the cifs_tcp_ses_lock, so do not block */4040+static bool is_first_ses_reconnect(struct cifsSesInfo *ses)4141+{4242+ struct list_head *tmp;4343+ struct cifsSesInfo *tmp_ses;4444+4545+ list_for_each(tmp, &ses->server->smb_ses_list) {4646+ tmp_ses = list_entry(tmp, struct cifsSesInfo,4747+ smb_ses_list);4848+ if (tmp_ses->need_reconnect == false)4949+ return false;5050+ }5151+ /* could not find a session that was already connected,5252+ this must be the first one we are reconnecting */5353+ return true;5454+}5555+5656+/*5757+ * vc number 0 is treated specially by some servers, and should be the5858+ * first one we request. After that we can use vcnumbers up to maxvcs,5959+ * one for each smb session (some Windows versions set maxvcs incorrectly6060+ * so maxvc=1 can be ignored). If we have too many vcs, we can reuse6161+ * any vc but zero (some servers reset the connection on vcnum zero)6262+ *6363+ */6464+static __le16 get_next_vcnum(struct cifsSesInfo *ses)6565+{6666+ __u16 vcnum = 0;6767+ struct list_head *tmp;6868+ struct cifsSesInfo *tmp_ses;6969+ __u16 max_vcs = ses->server->max_vcs;7070+ __u16 i;7171+ int free_vc_found = 0;7272+7373+ /* Quoting the MS-SMB specification: "Windows-based SMB servers set this7474+ field to one but do not enforce this limit, which allows an SMB client7575+ to establish more virtual circuits than allowed by this value ... but7676+ other server implementations can enforce this limit." */7777+ if (max_vcs < 2)7878+ max_vcs = 0xFFFF;7979+8080+ write_lock(&cifs_tcp_ses_lock);8181+ if ((ses->need_reconnect) && is_first_ses_reconnect(ses))8282+ goto get_vc_num_exit; /* vcnum will be zero */8383+ for (i = ses->server->srv_count - 1; i < max_vcs; i++) {8484+ if (i == 0) /* this is the only connection, use vc 0 */8585+ break;8686+8787+ free_vc_found = 1;8888+8989+ list_for_each(tmp, &ses->server->smb_ses_list) {9090+ tmp_ses = list_entry(tmp, struct cifsSesInfo,9191+ smb_ses_list);9292+ if (tmp_ses->vcnum == i) {9393+ free_vc_found = 0;9494+ break; /* found duplicate, try next vcnum */9595+ }9696+ }9797+ if (free_vc_found)9898+ break; /* we found a vcnumber that will work - use it */9999+ }100100+101101+ if (i == 0)102102+ vcnum = 0; /* for most common case, ie if one smb session, use103103+ vc zero. Also for case when no free vcnum, zero104104+ is safest to send (some clients only send zero) */105105+ else if (free_vc_found == 0)106106+ vcnum = 1; /* we can not reuse vc=0 safely, since some servers107107+ reset all uids on that, but 1 is ok. */108108+ else109109+ vcnum = i;110110+ ses->vcnum = vcnum;111111+get_vc_num_exit:112112+ write_unlock(&cifs_tcp_ses_lock);113113+114114+ return le16_to_cpu(vcnum);115115+}116116+37117static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB)38118{39119 __u32 capabilities = 0;4012041121 /* init fields common to all four types of SessSetup */4242- /* note that header is initialized to zero in header_assemble */122122+ /* Note that offsets for first seven fields in req struct are same */123123+ /* in CIFS Specs so does not matter which of 3 forms of struct */124124+ /* that we use in next few lines */125125+ /* Note that header is initialized to zero in header_assemble */43126 pSMB->req.AndXCommand = 0xFF;44127 pSMB->req.MaxBufferSize = cpu_to_le16(ses->server->maxBuf);45128 pSMB->req.MaxMpxCount = cpu_to_le16(ses->server->maxReq);129129+ pSMB->req.VcNumber = get_next_vcnum(ses);4613047131 /* Now no need to set SMBFLG_CASELESS or obsolete CANONICAL PATH */48132···15571 if (ses->capabilities & CAP_UNIX)15672 capabilities |= CAP_UNIX;15773158158- /* BB check whether to init vcnum BB */15974 return capabilities;16075}16176···311228312229 kfree(ses->serverOS);313230 /* UTF-8 string will not grow more than four times as big as UCS-16 */314314- ses->serverOS = kzalloc(4 * len, GFP_KERNEL);231231+ ses->serverOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL);315232 if (ses->serverOS != NULL)316233 cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp);317234 data += 2 * (len + 1);···324241 return rc;325242326243 kfree(ses->serverNOS);327327- ses->serverNOS = kzalloc(4 * len, GFP_KERNEL); /* BB this is wrong length FIXME BB */244244+ ses->serverNOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL);328245 if (ses->serverNOS != NULL) {329246 cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len,330247 nls_cp);
+2
fs/compat_ioctl.c
···19381938/* Big K */19391939COMPATIBLE_IOCTL(PIO_FONT)19401940COMPATIBLE_IOCTL(GIO_FONT)19411941+COMPATIBLE_IOCTL(PIO_CMAP)19421942+COMPATIBLE_IOCTL(GIO_CMAP)19411943ULONG_IOCTL(KDSIGACCEPT)19421944COMPATIBLE_IOCTL(KDGETKEYCODE)19431945COMPATIBLE_IOCTL(KDSETKEYCODE)
+1-1
fs/ext4/ext4.h
···868868{869869 unsigned len = le16_to_cpu(dlen);870870871871- if (len == EXT4_MAX_REC_LEN)871871+ if (len == EXT4_MAX_REC_LEN || len == 0)872872 return 1 << 16;873873 return len;874874}
+23-4
fs/ext4/inode.c
···4747static inline int ext4_begin_ordered_truncate(struct inode *inode,4848 loff_t new_size)4949{5050- return jbd2_journal_begin_ordered_truncate(&EXT4_I(inode)->jinode,5151- new_size);5050+ return jbd2_journal_begin_ordered_truncate(5151+ EXT4_SB(inode->i_sb)->s_journal,5252+ &EXT4_I(inode)->jinode,5353+ new_size);5254}53555456static void ext4_invalidatepage(struct page *page, unsigned long offset);···24392437 int no_nrwrite_index_update;24402438 int pages_written = 0;24412439 long pages_skipped;24402440+ int range_cyclic, cycled = 1, io_done = 0;24422441 int needed_blocks, ret = 0, nr_to_writebump = 0;24432442 struct ext4_sb_info *sbi = EXT4_SB(mapping->host->i_sb);24442443···24912488 if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)24922489 range_whole = 1;2493249024942494- if (wbc->range_cyclic)24912491+ range_cyclic = wbc->range_cyclic;24922492+ if (wbc->range_cyclic) {24952493 index = mapping->writeback_index;24962496- else24942494+ if (index)24952495+ cycled = 0;24962496+ wbc->range_start = index << PAGE_CACHE_SHIFT;24972497+ wbc->range_end = LLONG_MAX;24982498+ wbc->range_cyclic = 0;24992499+ } else24972500 index = wbc->range_start >> PAGE_CACHE_SHIFT;2498250124992502 mpd.wbc = wbc;···25132504 wbc->no_nrwrite_index_update = 1;25142505 pages_skipped = wbc->pages_skipped;2515250625072507+retry:25162508 while (!ret && wbc->nr_to_write > 0) {2517250925182510 /*···25562546 pages_written += mpd.pages_written;25572547 wbc->pages_skipped = pages_skipped;25582548 ret = 0;25492549+ io_done = 1;25592550 } else if (wbc->nr_to_write)25602551 /*25612552 * There is no more writeout needed···25652554 */25662555 break;25672556 }25572557+ if (!io_done && !cycled) {25582558+ cycled = 1;25592559+ index = 0;25602560+ wbc->range_start = index << PAGE_CACHE_SHIFT;25612561+ wbc->range_end = mapping->writeback_index - 1;25622562+ goto retry;25632563+ }25682564 if (pages_skipped != wbc->pages_skipped)25692565 printk(KERN_EMERG "This should not happen leaving %s "25702566 "with nr_to_write = %ld ret = %d\n",···2579256125802562 /* Update index */25812563 index += pages_written;25642564+ wbc->range_cyclic = range_cyclic;25822565 if (wbc->range_cyclic || (range_whole && wbc->nr_to_write > 0))25832566 /*25842567 * set the writeback_index so that range_cyclic
+19-13
fs/ext4/mballoc.c
···36933693 pa->pa_free = pa->pa_len;36943694 atomic_set(&pa->pa_count, 1);36953695 spin_lock_init(&pa->pa_lock);36963696+ INIT_LIST_HEAD(&pa->pa_inode_list);36973697+ INIT_LIST_HEAD(&pa->pa_group_list);36963698 pa->pa_deleted = 0;36973699 pa->pa_linear = 0;36983700···37573755 atomic_set(&pa->pa_count, 1);37583756 spin_lock_init(&pa->pa_lock);37593757 INIT_LIST_HEAD(&pa->pa_inode_list);37583758+ INIT_LIST_HEAD(&pa->pa_group_list);37603759 pa->pa_deleted = 0;37613760 pa->pa_linear = 1;37623761···44794476 pa->pa_free -= ac->ac_b_ex.fe_len;44804477 pa->pa_len -= ac->ac_b_ex.fe_len;44814478 spin_unlock(&pa->pa_lock);44824482- /*44834483- * We want to add the pa to the right bucket.44844484- * Remove it from the list and while adding44854485- * make sure the list to which we are adding44864486- * doesn't grow big.44874487- */44884488- if (likely(pa->pa_free)) {44894489- spin_lock(pa->pa_obj_lock);44904490- list_del_rcu(&pa->pa_inode_list);44914491- spin_unlock(pa->pa_obj_lock);44924492- ext4_mb_add_n_trim(ac);44934493- }44944479 }44954495- ext4_mb_put_pa(ac, ac->ac_sb, pa);44964480 }44974481 if (ac->alloc_semp)44984482 up_read(ac->alloc_semp);44834483+ if (pa) {44844484+ /*44854485+ * We want to add the pa to the right bucket.44864486+ * Remove it from the list and while adding44874487+ * make sure the list to which we are adding44884488+ * doesn't grow big. We need to release44894489+ * alloc_semp before calling ext4_mb_add_n_trim()44904490+ */44914491+ if (pa->pa_linear && likely(pa->pa_free)) {44924492+ spin_lock(pa->pa_obj_lock);44934493+ list_del_rcu(&pa->pa_inode_list);44944494+ spin_unlock(pa->pa_obj_lock);44954495+ ext4_mb_add_n_trim(ac);44964496+ }44974497+ ext4_mb_put_pa(ac, ac->ac_sb, pa);44984498+ }44994499 if (ac->ac_bitmap_page)45004500 page_cache_release(ac->ac_bitmap_page);45014501 if (ac->ac_buddy_page)
···30463046static int ext4_sync_fs(struct super_block *sb, int wait)30473047{30483048 int ret = 0;30493049+ tid_t target;3049305030503051 trace_mark(ext4_sync_fs, "dev %s wait %d", sb->s_id, wait);30513052 sb->s_dirt = 0;30523053 if (EXT4_SB(sb)->s_journal) {30533053- if (wait)30543054- ret = ext4_force_commit(sb);30553055- else30563056- jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, NULL);30543054+ if (jbd2_journal_start_commit(EXT4_SB(sb)->s_journal,30553055+ &target)) {30563056+ if (wait)30573057+ jbd2_log_wait_commit(EXT4_SB(sb)->s_journal,30583058+ target);30593059+ }30573060 } else {30583061 ext4_commit_super(sb, EXT4_SB(sb)->s_es, wait);30593062 }
+11-6
fs/jbd2/journal.c
···450450}451451452452/*453453- * Called under j_state_lock. Returns true if a transaction was started.453453+ * Called under j_state_lock. Returns true if a transaction commit was started.454454 */455455int __jbd2_log_start_commit(journal_t *journal, tid_t target)456456{···518518519519/*520520 * Start a commit of the current running transaction (if any). Returns true521521- * if a transaction was started, and fills its tid in at *ptid521521+ * if a transaction is going to be committed (or is currently already522522+ * committing), and fills its tid in at *ptid522523 */523524int jbd2_journal_start_commit(journal_t *journal, tid_t *ptid)524525{···529528 if (journal->j_running_transaction) {530529 tid_t tid = journal->j_running_transaction->t_tid;531530532532- ret = __jbd2_log_start_commit(journal, tid);533533- if (ret && ptid)531531+ __jbd2_log_start_commit(journal, tid);532532+ /* There's a running transaction and we've just made sure533533+ * it's commit has been scheduled. */534534+ if (ptid)534535 *ptid = tid;535535- } else if (journal->j_committing_transaction && ptid) {536536+ ret = 1;537537+ } else if (journal->j_committing_transaction) {536538 /*537539 * If ext3_write_super() recently started a commit, then we538540 * have to wait for completion of that transaction539541 */540540- *ptid = journal->j_committing_transaction->t_tid;542542+ if (ptid)543543+ *ptid = journal->j_committing_transaction->t_tid;541544 ret = 1;542545 }543546 spin_unlock(&journal->j_state_lock);
+31-11
fs/jbd2/transaction.c
···21292129}2130213021312131/*21322132- * This function must be called when inode is journaled in ordered mode21332133- * before truncation happens. It starts writeout of truncated part in21342134- * case it is in the committing transaction so that we stand to ordered21352135- * mode consistency guarantees.21322132+ * File truncate and transaction commit interact with each other in a21332133+ * non-trivial way. If a transaction writing data block A is21342134+ * committing, we cannot discard the data by truncate until we have21352135+ * written them. Otherwise if we crashed after the transaction with21362136+ * write has committed but before the transaction with truncate has21372137+ * committed, we could see stale data in block A. This function is a21382138+ * helper to solve this problem. It starts writeout of the truncated21392139+ * part in case it is in the committing transaction.21402140+ *21412141+ * Filesystem code must call this function when inode is journaled in21422142+ * ordered mode before truncation happens and after the inode has been21432143+ * placed on orphan list with the new inode size. The second condition21442144+ * avoids the race that someone writes new data and we start21452145+ * committing the transaction after this function has been called but21462146+ * before a transaction for truncate is started (and furthermore it21472147+ * allows us to optimize the case where the addition to orphan list21482148+ * happens in the same transaction as write --- we don't have to write21492149+ * any data in such case).21362150 */21372137-int jbd2_journal_begin_ordered_truncate(struct jbd2_inode *inode,21512151+int jbd2_journal_begin_ordered_truncate(journal_t *journal,21522152+ struct jbd2_inode *jinode,21382153 loff_t new_size)21392154{21402140- journal_t *journal;21412141- transaction_t *commit_trans;21552155+ transaction_t *inode_trans, *commit_trans;21422156 int ret = 0;2143215721442144- if (!inode->i_transaction && !inode->i_next_transaction)21582158+ /* This is a quick check to avoid locking if not necessary */21592159+ if (!jinode->i_transaction)21452160 goto out;21462146- journal = inode->i_transaction->t_journal;21612161+ /* Locks are here just to force reading of recent values, it is21622162+ * enough that the transaction was not committing before we started21632163+ * a transaction adding the inode to orphan list */21472164 spin_lock(&journal->j_state_lock);21482165 commit_trans = journal->j_committing_transaction;21492166 spin_unlock(&journal->j_state_lock);21502150- if (inode->i_transaction == commit_trans) {21512151- ret = filemap_fdatawrite_range(inode->i_vfs_inode->i_mapping,21672167+ spin_lock(&journal->j_list_lock);21682168+ inode_trans = jinode->i_transaction;21692169+ spin_unlock(&journal->j_list_lock);21702170+ if (inode_trans == commit_trans) {21712171+ ret = filemap_fdatawrite_range(jinode->i_vfs_inode->i_mapping,21522172 new_size, LLONG_MAX);21532173 if (ret)21542174 jbd2_journal_abort(journal, ret);
···156156 int ret;157157158158 do {159159- if (unlikely(!idr_pre_get(&ih->idr, GFP_KERNEL)))159159+ if (unlikely(!idr_pre_get(&ih->idr, GFP_NOFS)))160160 return -ENOSPC;161161 ret = idr_get_new_above(&ih->idr, watch, ih->last_wd+1, &watch->wd);162162 } while (ret == -EAGAIN);
···4848 */4949 file->f_version = 0;50505151- /* SEQ files support lseek, but not pread/pwrite */5252- file->f_mode &= ~(FMODE_PREAD | FMODE_PWRITE);5151+ /*5252+ * seq_files support lseek() and pread(). They do not implement5353+ * write() at all, but we clear FMODE_PWRITE here for historical5454+ * reasons.5555+ *5656+ * If a client of seq_files a) implements file.write() and b) wishes to5757+ * support pwrite() then that client will need to implement its own5858+ * file.open() which calls seq_open() and then sets FMODE_PWRITE.5959+ */6060+ file->f_mode &= ~FMODE_PWRITE;5361 return 0;5462}5563EXPORT_SYMBOL(seq_open);···139131 int err = 0;140132141133 mutex_lock(&m->lock);134134+135135+ /* Don't assume *ppos is where we left it */136136+ if (unlikely(*ppos != m->read_pos)) {137137+ m->read_pos = *ppos;138138+ while ((err = traverse(m, *ppos)) == -EAGAIN)139139+ ;140140+ if (err) {141141+ /* With prejudice... */142142+ m->read_pos = 0;143143+ m->version = 0;144144+ m->index = 0;145145+ m->count = 0;146146+ goto Done;147147+ }148148+ }149149+142150 /*143151 * seq_file->op->..m_start/m_stop/m_next may do special actions144152 * or optimisations based on the file->f_version, so we want to···254230Done:255231 if (!copied)256232 copied = err;257257- else233233+ else {258234 *ppos += copied;235235+ m->read_pos += copied;236236+ }259237 file->f_version = m->version;260238 mutex_unlock(&m->lock);261239 return copied;···292266 if (offset < 0)293267 break;294268 retval = offset;295295- if (offset != file->f_pos) {269269+ if (offset != m->read_pos) {296270 while ((retval=traverse(m, offset)) == -EAGAIN)297271 ;298272 if (retval) {299273 /* with extreme prejudice... */300274 file->f_pos = 0;275275+ m->read_pos = 0;301276 m->version = 0;302277 m->index = 0;303278 m->count = 0;304279 } else {280280+ m->read_pos = offset;305281 retval = file->f_pos = offset;306282 }307283 }
+16-1
fs/super.c
···8282 * lock ordering than usbfs:8383 */8484 lockdep_set_class(&s->s_lock, &type->s_lock_key);8585- down_write(&s->s_umount);8585+ /*8686+ * sget() can have s_umount recursion.8787+ *8888+ * When it cannot find a suitable sb, it allocates a new8989+ * one (this one), and tries again to find a suitable old9090+ * one.9191+ *9292+ * In case that succeeds, it will acquire the s_umount9393+ * lock of the old one. Since these are clearly distrinct9494+ * locks, and this object isn't exposed yet, there's no9595+ * risk of deadlocks.9696+ *9797+ * Annotate this by putting this lock in a different9898+ * subclass.9999+ */100100+ down_write_nested(&s->s_umount, SINGLE_DEPTH_NESTING);86101 s->s_count = S_BIAS;87102 atomic_set(&s->s_active, 1);88103 mutex_init(&s->s_vfs_rename_mutex);
···5454 struct drm_display_mode *mode,5555 struct drm_display_mode *adjusted_mode);5656 /* Actually set the mode */5757- void (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode,5858- struct drm_display_mode *adjusted_mode, int x, int y,5959- struct drm_framebuffer *old_fb);5757+ int (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode,5858+ struct drm_display_mode *adjusted_mode, int x, int y,5959+ struct drm_framebuffer *old_fb);60606161 /* Move the crtc on the current fb to the given position *optional* */6262- void (*mode_set_base)(struct drm_crtc *crtc, int x, int y,6363- struct drm_framebuffer *old_fb);6262+ int (*mode_set_base)(struct drm_crtc *crtc, int x, int y,6363+ struct drm_framebuffer *old_fb);6464};65656666struct drm_encoder_helper_funcs {
···147147extern struct device_driver *driver_find(const char *name,148148 struct bus_type *bus);149149extern int driver_probe_done(void);150150+extern int wait_for_device_probe(void);151151+150152151153/* sysfs interface for exporting driver attributes */152154
+2
include/linux/dmaengine.h
···121121 * @local: per-cpu pointer to a struct dma_chan_percpu122122 * @client-count: how many clients are using this channel123123 * @table_count: number of appearances in the mem-to-mem allocation table124124+ * @private: private data for certain client-channel associations124125 */125126struct dma_chan {126127 struct dma_device *device;···135134 struct dma_chan_percpu *local;136135 int client_count;137136 int table_count;137137+ void *private;138138};139139140140/**
+1-1
include/linux/firmware-map.h
···11/*22 * include/linux/firmware-map.h:33 * Copyright (C) 2008 SUSE LINUX Products GmbH44- * by Bernhard Walle <bwalle@suse.de>44+ * by Bernhard Walle <bernhard.walle@gmx.de>55 *66 * This program is free software; you can redistribute it and/or modify77 * it under the terms of the GNU General Public License v2.0 as published by
+15-9
include/linux/fs.h
···5454#define MAY_ACCESS 165555#define MAY_OPEN 3256565757+/*5858+ * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond5959+ * to O_WRONLY and O_RDWR via the strange trick in __dentry_open()6060+ */6161+5762/* file is open for reading */5863#define FMODE_READ ((__force fmode_t)1)5964/* file is open for writing */6065#define FMODE_WRITE ((__force fmode_t)2)6166/* file is seekable */6267#define FMODE_LSEEK ((__force fmode_t)4)6363-/* file can be accessed using pread/pwrite */6868+/* file can be accessed using pread */6469#define FMODE_PREAD ((__force fmode_t)8)6565-#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */7070+/* file can be accessed using pwrite */7171+#define FMODE_PWRITE ((__force fmode_t)16)6672/* File is opened for execution with sys_execve / sys_uselib */6767-#define FMODE_EXEC ((__force fmode_t)16)7373+#define FMODE_EXEC ((__force fmode_t)32)6874/* File is opened with O_NDELAY (only set for block devices) */6969-#define FMODE_NDELAY ((__force fmode_t)32)7575+#define FMODE_NDELAY ((__force fmode_t)64)7076/* File is opened with O_EXCL (only set for block devices) */7171-#define FMODE_EXCL ((__force fmode_t)64)7777+#define FMODE_EXCL ((__force fmode_t)128)7278/* File is opened using open(.., 3, ..) and is writeable only for ioctls7379 (specialy hack for floppy.c) */7474-#define FMODE_WRITE_IOCTL ((__force fmode_t)128)8080+#define FMODE_WRITE_IOCTL ((__force fmode_t)256)75817682/*7783 * Don't update ctime and mtime.···9387#define WRITE 19488#define READA 2 /* read-ahead - don't block if no resources */9589#define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */9696-#define READ_SYNC (READ | (1 << BIO_RW_SYNC))9090+#define READ_SYNC (READ | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG))9791#define READ_META (READ | (1 << BIO_RW_META))9898-#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC))9999-#define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNC))9292+#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG))9393+#define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG))10094#define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER))10195#define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD)10296#define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER))
+2-1
include/linux/jbd2.h
···11501150extern int jbd2_journal_bmap(journal_t *, unsigned long, unsigned long long *);11511151extern int jbd2_journal_force_commit(journal_t *);11521152extern int jbd2_journal_file_inode(handle_t *handle, struct jbd2_inode *inode);11531153-extern int jbd2_journal_begin_ordered_truncate(struct jbd2_inode *inode, loff_t new_size);11531153+extern int jbd2_journal_begin_ordered_truncate(journal_t *journal,11541154+ struct jbd2_inode *inode, loff_t new_size);11541155extern void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode, struct inode *inode);11551156extern void jbd2_journal_release_jbd_inode(journal_t *journal, struct jbd2_inode *jinode);11561157
···8383 * int getmiso(struct spi_device *);8484 * void spidelay(unsigned);8585 *8686+ * setsck()'s is_on parameter is a zero/nonzero boolean.8787+ *8888+ * setmosi()'s is_on parameter is a zero/nonzero boolean.8989+ *9090+ * getmiso() is required to return 0 or 1 only. Any other value is invalid9191+ * and will result in improper operation.9292+ *8693 * A non-inlined routine would call bitbang_txrx_*() routines. The8794 * main loop could easily compile down to a handful of instructions,8895 * especially if the delay is a NOP (to run at peak speed).
+12-4
include/linux/timerfd.h
···1111/* For O_CLOEXEC and O_NONBLOCK */1212#include <linux/fcntl.h>13131414-/* Flags for timerfd_settime. */1414+/*1515+ * CAREFUL: Check include/asm-generic/fcntl.h when defining1616+ * new flags, since they might collide with O_* ones. We want1717+ * to re-use O_* flags that couldn't possibly have a meaning1818+ * from eventfd, in order to leave a free define-space for1919+ * shared O_* flags.2020+ */1521#define TFD_TIMER_ABSTIME (1 << 0)1616-1717-/* Flags for timerfd_create. */1822#define TFD_CLOEXEC O_CLOEXEC1923#define TFD_NONBLOCK O_NONBLOCK20242525+#define TFD_SHARED_FCNTL_FLAGS (TFD_CLOEXEC | TFD_NONBLOCK)2626+/* Flags for timerfd_create. */2727+#define TFD_CREATE_FLAGS TFD_SHARED_FCNTL_FLAGS2828+/* Flags for timerfd_settime. */2929+#define TFD_SETTIME_FLAGS TFD_TIMER_ABSTIME21302231#endif /* _LINUX_TIMERFD_H */2323-
+4
include/linux/vmalloc.h
···8484 unsigned long flags, void *caller);8585extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,8686 unsigned long start, unsigned long end);8787+extern struct vm_struct *__get_vm_area_caller(unsigned long size,8888+ unsigned long flags,8989+ unsigned long start, unsigned long end,9090+ void *caller);8791extern struct vm_struct *get_vm_area_node(unsigned long size,8892 unsigned long flags, int node,8993 gfp_t gfp_mask);
+9-4
init/do_mounts.c
···370370 ssleep(root_delay);371371 }372372373373- /* wait for the known devices to complete their probing */374374- while (driver_probe_done() != 0)375375- msleep(100);376376- async_synchronize_full();373373+ /*374374+ * wait for the known devices to complete their probing375375+ *376376+ * Note: this is a potential source of long boot delays.377377+ * For example, it is not atypical to wait 5 seconds here378378+ * for the touchpad of a laptop to initialize.379379+ */380380+ wait_for_device_probe();377381378382 md_run_setup();379383···403399 while (driver_probe_done() != 0 ||404400 (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)405401 msleep(100);402402+ async_synchronize_full();406403 }407404408405 is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
+3-2
init/do_mounts_md.c
···281281 */282282 printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n");283283 printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n");284284- while (driver_probe_done() < 0)285285- msleep(100);284284+285285+ wait_for_device_probe();286286+286287 fd = sys_open("/dev/md0", 0, 0);287288 if (fd >= 0) {288289 sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
···11651165 u32 val, ktime_t *abs_time, u32 bitset, int clockrt)11661166{11671167 struct task_struct *curr = current;11681168+ struct restart_block *restart;11681169 DECLARE_WAITQUEUE(wait, curr);11691170 struct futex_hash_bucket *hb;11701171 struct futex_q q;···1217121612181217 if (!ret)12191218 goto retry;12201220- return ret;12191219+ goto out;12211220 }12221221 ret = -EWOULDBLOCK;12231223- if (uval != val)12241224- goto out_unlock_put_key;12221222+ if (unlikely(uval != val)) {12231223+ queue_unlock(&q, hb);12241224+ goto out_put_key;12251225+ }1225122612261227 /* Only actually queue if *uaddr contained val. */12271228 queue_me(&q, hb);···12871284 */1288128512891286 /* If we were woken (and unqueued), we succeeded, whatever. */12871287+ ret = 0;12901288 if (!unqueue_me(&q))12911291- return 0;12891289+ goto out_put_key;12901290+ ret = -ETIMEDOUT;12921291 if (rem)12931293- return -ETIMEDOUT;12921292+ goto out_put_key;1294129312951294 /*12961295 * We expect signal_pending(current), but another thread may12971296 * have handled it for us already.12981297 */12981298+ ret = -ERESTARTSYS;12991299 if (!abs_time)13001300- return -ERESTARTSYS;13011301- else {13021302- struct restart_block *restart;13031303- restart = ¤t_thread_info()->restart_block;13041304- restart->fn = futex_wait_restart;13051305- restart->futex.uaddr = (u32 *)uaddr;13061306- restart->futex.val = val;13071307- restart->futex.time = abs_time->tv64;13081308- restart->futex.bitset = bitset;13091309- restart->futex.flags = 0;13001300+ goto out_put_key;1310130113111311- if (fshared)13121312- restart->futex.flags |= FLAGS_SHARED;13131313- if (clockrt)13141314- restart->futex.flags |= FLAGS_CLOCKRT;13151315- return -ERESTART_RESTARTBLOCK;13161316- }13021302+ restart = ¤t_thread_info()->restart_block;13031303+ restart->fn = futex_wait_restart;13041304+ restart->futex.uaddr = (u32 *)uaddr;13051305+ restart->futex.val = val;13061306+ restart->futex.time = abs_time->tv64;13071307+ restart->futex.bitset = bitset;13081308+ restart->futex.flags = 0;1317130913181318-out_unlock_put_key:13191319- queue_unlock(&q, hb);13101310+ if (fshared)13111311+ restart->futex.flags |= FLAGS_SHARED;13121312+ if (clockrt)13131313+ restart->futex.flags |= FLAGS_CLOCKRT;13141314+13151315+ ret = -ERESTART_RESTARTBLOCK;13161316+13171317+out_put_key:13201318 put_futex_key(fshared, &q.key);13211321-13221319out:13231320 return ret;13241321}
+30-30
kernel/posix-cpu-timers.c
···681681}682682683683/*684684+ * Sample a process (thread group) timer for the given group_leader task.685685+ * Must be called with tasklist_lock held for reading.686686+ */687687+static int cpu_timer_sample_group(const clockid_t which_clock,688688+ struct task_struct *p,689689+ union cpu_time_count *cpu)690690+{691691+ struct task_cputime cputime;692692+693693+ thread_group_cputimer(p, &cputime);694694+ switch (CPUCLOCK_WHICH(which_clock)) {695695+ default:696696+ return -EINVAL;697697+ case CPUCLOCK_PROF:698698+ cpu->cpu = cputime_add(cputime.utime, cputime.stime);699699+ break;700700+ case CPUCLOCK_VIRT:701701+ cpu->cpu = cputime.utime;702702+ break;703703+ case CPUCLOCK_SCHED:704704+ cpu->sched = cputime.sum_exec_runtime + task_delta_exec(p);705705+ break;706706+ }707707+ return 0;708708+}709709+710710+/*684711 * Guts of sys_timer_settime for CPU timers.685712 * This is called with the timer locked and interrupts disabled.686713 * If we return TIMER_RETRY, it's necessary to release the timer's lock···768741 if (CPUCLOCK_PERTHREAD(timer->it_clock)) {769742 cpu_clock_sample(timer->it_clock, p, &val);770743 } else {771771- cpu_clock_sample_group(timer->it_clock, p, &val);744744+ cpu_timer_sample_group(timer->it_clock, p, &val);772745 }773746774747 if (old) {···916889 read_unlock(&tasklist_lock);917890 goto dead;918891 } else {919919- cpu_clock_sample_group(timer->it_clock, p, &now);892892+ cpu_timer_sample_group(timer->it_clock, p, &now);920893 clear_dead = (unlikely(p->exit_state) &&921894 thread_group_empty(p));922895 }···12711244 clear_dead_task(timer, now);12721245 goto out_unlock;12731246 }12741274- cpu_clock_sample_group(timer->it_clock, p, &now);12471247+ cpu_timer_sample_group(timer->it_clock, p, &now);12751248 bump_cpu_timer(timer, now);12761249 /* Leave the tasklist_lock locked for the call below. */12771250 }···14331406 }14341407 spin_unlock(&timer->it_lock);14351408 }14361436-}14371437-14381438-/*14391439- * Sample a process (thread group) timer for the given group_leader task.14401440- * Must be called with tasklist_lock held for reading.14411441- */14421442-static int cpu_timer_sample_group(const clockid_t which_clock,14431443- struct task_struct *p,14441444- union cpu_time_count *cpu)14451445-{14461446- struct task_cputime cputime;14471447-14481448- thread_group_cputimer(p, &cputime);14491449- switch (CPUCLOCK_WHICH(which_clock)) {14501450- default:14511451- return -EINVAL;14521452- case CPUCLOCK_PROF:14531453- cpu->cpu = cputime_add(cputime.utime, cputime.stime);14541454- break;14551455- case CPUCLOCK_VIRT:14561456- cpu->cpu = cputime.utime;14571457- break;14581458- case CPUCLOCK_SCHED:14591459- cpu->sched = cputime.sum_exec_runtime + task_delta_exec(p);14601460- break;14611461- }14621462- return 0;14631409}1464141014651411/*
···595595 unsigned int flags;596596597597 /*598598+ * If the user said "noresume".. bail out early.599599+ */600600+ if (noresume)601601+ return 0;602602+603603+ /*598604 * name_to_dev_t() below takes a sysfs buffer mutex when sysfs599605 * is configured into the kernel. Since the regular hibernate600606 * trigger path is via sysfs which takes a buffer mutex before···616610 mutex_unlock(&pm_mutex);617611 return -ENOENT;618612 }613613+ /*614614+ * Some device discovery might still be in progress; we need615615+ * to wait for this to finish.616616+ */617617+ wait_for_device_probe();619618 swsusp_resume_device = name_to_dev_t(resume_file);620619 pr_debug("PM: Resume from partition %s\n", resume_file);621620 } else {
+3-2
kernel/power/swap.c
···6060static int submit(int rw, pgoff_t page_off, struct page *page,6161 struct bio **bio_chain)6262{6363+ const int bio_rw = rw | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG);6364 struct bio *bio;64656566 bio = bio_alloc(__GFP_WAIT | __GFP_HIGH, 1);···8180 bio_get(bio);82818382 if (bio_chain == NULL) {8484- submit_bio(rw | (1 << BIO_RW_SYNC), bio);8383+ submit_bio(bio_rw, bio);8584 wait_on_page_locked(page);8685 if (rw == READ)8786 bio_set_pages_dirty(bio);···9190 get_page(page); /* These pages are freed later */9291 bio->bi_private = *bio_chain;9392 *bio_chain = bio;9494- submit_bio(rw | (1 << BIO_RW_SYNC), bio);9393+ submit_bio(bio_rw, bio);9594 }9695 return 0;9796}
···6944694469456945static void rq_attach_root(struct rq *rq, struct root_domain *rd)69466946{69476947+ struct root_domain *old_rd = NULL;69476948 unsigned long flags;6948694969496950 spin_lock_irqsave(&rq->lock, flags);6950695169516952 if (rq->rd) {69526952- struct root_domain *old_rd = rq->rd;69536953+ old_rd = rq->rd;6953695469546955 if (cpumask_test_cpu(rq->cpu, old_rd->online))69556956 set_rq_offline(rq);6956695769576958 cpumask_clear_cpu(rq->cpu, old_rd->span);6958695969596959- if (atomic_dec_and_test(&old_rd->refcount))69606960- free_rootdomain(old_rd);69606960+ /*69616961+ * If we dont want to free the old_rt yet then69626962+ * set old_rd to NULL to skip the freeing later69636963+ * in this function:69646964+ */69656965+ if (!atomic_dec_and_test(&old_rd->refcount))69666966+ old_rd = NULL;69616967 }6962696869636969 atomic_inc(&rd->refcount);···69746968 set_rq_online(rq);6975696969766970 spin_unlock_irqrestore(&rq->lock, flags);69716971+69726972+ if (old_rd)69736973+ free_rootdomain(old_rd);69776974}6978697569796976static int __init_refok init_rootdomain(struct root_domain *rd, bool bootmem)
+25
kernel/trace/Kconfig
···5252 depends on HAVE_FUNCTION_TRACER5353 depends on DEBUG_KERNEL5454 select FRAME_POINTER5555+ select KALLSYMS5556 select TRACING5657 select CONTEXT_SWITCH_TRACER5758 help···239238 depends on DEBUG_KERNEL240239 select FUNCTION_TRACER241240 select STACKTRACE241241+ select KALLSYMS242242 help243243 This special tracer records the maximum stack footprint of the244244 kernel and displays it in debugfs/tracing/stack_trace.···303301 a series of tests are made to verify that the tracer is304302 functioning properly. It will do tests on all the configured305303 tracers of ftrace.304304+305305+config MMIOTRACE306306+ bool "Memory mapped IO tracing"307307+ depends on HAVE_MMIOTRACE_SUPPORT && DEBUG_KERNEL && PCI308308+ select TRACING309309+ help310310+ Mmiotrace traces Memory Mapped I/O access and is meant for311311+ debugging and reverse engineering. It is called from the ioremap312312+ implementation and works via page faults. Tracing is disabled by313313+ default and can be enabled at run-time.314314+315315+ See Documentation/tracers/mmiotrace.txt.316316+ If you are not helping to develop drivers, say N.317317+318318+config MMIOTRACE_TEST319319+ tristate "Test module for mmiotrace"320320+ depends on MMIOTRACE && m321321+ help322322+ This is a dumb module for testing mmiotrace. It is very dangerous323323+ as it will write garbage to IO memory starting at a given address.324324+ However, it should be safe to use on e.g. unused portion of VRAM.325325+326326+ Say N, unless you absolutely know what you are doing.306327307328endmenu
+5-1
kernel/trace/ftrace.c
···20332033static int start_graph_tracing(void)20342034{20352035 struct ftrace_ret_stack **ret_stack_list;20362036- int ret;20362036+ int ret, cpu;2037203720382038 ret_stack_list = kmalloc(FTRACE_RETSTACK_ALLOC_SIZE *20392039 sizeof(struct ftrace_ret_stack *),···2041204120422042 if (!ret_stack_list)20432043 return -ENOMEM;20442044+20452045+ /* The cpu_boot init_task->ret_stack will never be freed */20462046+ for_each_online_cpu(cpu)20472047+ ftrace_graph_init_task(idle_task(cpu));2044204820452049 do {20462050 ret = alloc_retstack_tasklist(ret_stack_list);
+10-4
kernel/trace/trace_mmiotrace.c
···99#include <linux/kernel.h>1010#include <linux/mmiotrace.h>1111#include <linux/pci.h>1212+#include <asm/atomic.h>12131314#include "trace.h"1415···2019static struct trace_array *mmio_trace_array;2120static bool overrun_detected;2221static unsigned long prev_overruns;2222+static atomic_t dropped_count;23232424static void mmio_reset_data(struct trace_array *tr)2525{···123121124122static unsigned long count_overruns(struct trace_iterator *iter)125123{126126- unsigned long cnt = 0;124124+ unsigned long cnt = atomic_xchg(&dropped_count, 0);127125 unsigned long over = ring_buffer_overruns(iter->tr->buffer);128126129127 if (over > prev_overruns)130130- cnt = over - prev_overruns;128128+ cnt += over - prev_overruns;131129 prev_overruns = over;132130 return cnt;133131}···312310313311 event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry),314312 &irq_flags);315315- if (!event)313313+ if (!event) {314314+ atomic_inc(&dropped_count);316315 return;316316+ }317317 entry = ring_buffer_event_data(event);318318 tracing_generic_entry_update(&entry->ent, 0, preempt_count());319319 entry->ent.type = TRACE_MMIO_RW;···342338343339 event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry),344340 &irq_flags);345345- if (!event)341341+ if (!event) {342342+ atomic_inc(&dropped_count);346343 return;344344+ }347345 entry = ring_buffer_event_data(event);348346 tracing_generic_entry_update(&entry->ent, 0, preempt_count());349347 entry->ent.type = TRACE_MMIO_MAP;
+19
kernel/trace/trace_selftest.c
···2323{2424 struct ring_buffer_event *event;2525 struct trace_entry *entry;2626+ unsigned int loops = 0;26272728 while ((event = ring_buffer_consume(tr->buffer, cpu, NULL))) {2829 entry = ring_buffer_event_data(event);29303131+ /*3232+ * The ring buffer is a size of trace_buf_size, if3333+ * we loop more than the size, there's something wrong3434+ * with the ring buffer.3535+ */3636+ if (loops++ > trace_buf_size) {3737+ printk(KERN_CONT ".. bad ring buffer ");3838+ goto failed;3939+ }3040 if (!trace_valid_entry(entry)) {3141 printk(KERN_CONT ".. invalid entry %d ",3242 entry->type);···67576858 cnt = ring_buffer_entries(tr->buffer);69596060+ /*6161+ * The trace_test_buffer_cpu runs a while loop to consume all data.6262+ * If the calling tracer is broken, and is constantly filling6363+ * the buffer, this will run forever, and hard lock the box.6464+ * We disable the ring buffer while we do this test to prevent6565+ * a hard lock up.6666+ */6767+ tracing_off();7068 for_each_possible_cpu(cpu) {7169 ret = trace_test_buffer_cpu(tr, cpu);7270 if (ret)7371 break;7472 }7373+ tracing_on();7574 __raw_spin_unlock(&ftrace_max_lock);7675 local_irq_restore(flags);7776
+1-1
lib/Kconfig.debug
···838838839839 If unsure, say N.840840841841-menuconfig BUILD_DOCSRC841841+config BUILD_DOCSRC842842 bool "Build targets in Documentation/ tree"843843 depends on HEADERS_CHECK844844 help
···240240}241241EXPORT_SYMBOL_GPL(bdi_writeout_inc);242242243243-static inline void task_dirty_inc(struct task_struct *tsk)243243+void task_dirty_inc(struct task_struct *tsk)244244{245245 prop_inc_single(&vm_dirties, &tsk->dirties);246246}···12301230 __inc_zone_page_state(page, NR_FILE_DIRTY);12311231 __inc_bdi_stat(mapping->backing_dev_info,12321232 BDI_RECLAIMABLE);12331233+ task_dirty_inc(current);12331234 task_io_account_write(PAGE_CACHE_SIZE);12341235 }12351236 radix_tree_tag_set(&mapping->page_tree,···12631262 * If the mapping doesn't provide a set_page_dirty a_op, then12641263 * just fall through and assume that it wants buffer_heads.12651264 */12661266-static int __set_page_dirty(struct page *page)12651265+int set_page_dirty(struct page *page)12671266{12681267 struct address_space *mapping = page_mapping(page);12691268···12801279 return 1;12811280 }12821281 return 0;12831283-}12841284-12851285-int set_page_dirty(struct page *page)12861286-{12871287- int ret = __set_page_dirty(page);12881288- if (ret)12891289- task_dirty_inc(current);12901290- return ret;12911282}12921283EXPORT_SYMBOL(set_page_dirty);12931284
+26-3
mm/page_alloc.c
···29892989 * was used and there are no special requirements, this is a convenient29902990 * alternative29912991 */29922992-int __meminit early_pfn_to_nid(unsigned long pfn)29922992+int __meminit __early_pfn_to_nid(unsigned long pfn)29932993{29942994 int i;29952995···30003000 if (start_pfn <= pfn && pfn < end_pfn)30013001 return early_node_map[i].nid;30023002 }30033003-30043004- return 0;30033003+ /* This is a memory hole */30043004+ return -1;30053005}30063006#endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */30073007+30083008+int __meminit early_pfn_to_nid(unsigned long pfn)30093009+{30103010+ int nid;30113011+30123012+ nid = __early_pfn_to_nid(pfn);30133013+ if (nid >= 0)30143014+ return nid;30153015+ /* just returns 0 */30163016+ return 0;30173017+}30183018+30193019+#ifdef CONFIG_NODES_SPAN_OTHER_NODES30203020+bool __meminit early_pfn_in_nid(unsigned long pfn, int node)30213021+{30223022+ int nid;30233023+30243024+ nid = __early_pfn_to_nid(pfn);30253025+ if (nid >= 0 && nid != node)30263026+ return false;30273027+ return true;30283028+}30293029+#endif3007303030083031/* Basic iterator support to walk early_node_map[] */30093032#define for_each_active_range_index_in_nid(i, nid) \
···635635636636 if (!bdev) {637637 if (bdev_p)638638- *bdev_p = sis->bdev;638638+ *bdev_p = bdget(sis->bdev->bd_dev);639639640640 spin_unlock(&swap_lock);641641 return i;···647647 struct swap_extent, list);648648 if (se->start_block == offset) {649649 if (bdev_p)650650- *bdev_p = sis->bdev;650650+ *bdev_p = bdget(sis->bdev->bd_dev);651651652652 spin_unlock(&swap_lock);653653 bdput(bdev);
+20
mm/util.c
···129129}130130EXPORT_SYMBOL(krealloc);131131132132+/**133133+ * kzfree - like kfree but zero memory134134+ * @p: object to free memory of135135+ *136136+ * The memory of the object @p points to is zeroed before freed.137137+ * If @p is %NULL, kzfree() does nothing.138138+ */139139+void kzfree(const void *p)140140+{141141+ size_t ks;142142+ void *mem = (void *)p;143143+144144+ if (unlikely(ZERO_OR_NULL_PTR(mem)))145145+ return;146146+ ks = ksize(mem);147147+ memset(mem, 0, ks);148148+ kfree(mem);149149+}150150+EXPORT_SYMBOL(kzfree);151151+132152/*133153 * strndup_user - duplicate an existing string from user space134154 * @s: The string to duplicate
+10
mm/vmalloc.c
···10121012void unmap_kernel_range(unsigned long addr, unsigned long size)10131013{10141014 unsigned long end = addr + size;10151015+10161016+ flush_cache_vunmap(addr, end);10151017 vunmap_page_range(addr, end);10161018 flush_tlb_kernel_range(addr, end);10171019}···11071105 __builtin_return_address(0));11081106}11091107EXPORT_SYMBOL_GPL(__get_vm_area);11081108+11091109+struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags,11101110+ unsigned long start, unsigned long end,11111111+ void *caller)11121112+{11131113+ return __get_vm_area_node(size, flags, start, end, -1, GFP_KERNEL,11141114+ caller);11151115+}1110111611111117/**11121118 * get_vm_area - reserve a contiguous kernel virtual area
+12-16
mm/vmscan.c
···20572057 int pass, struct scan_control *sc)20582058{20592059 struct zone *zone;20602060- unsigned long nr_to_scan, ret = 0;20612061- enum lru_list l;20602060+ unsigned long ret = 0;2062206120632062 for_each_zone(zone) {20632063+ enum lru_list l;2064206420652065 if (!populated_zone(zone))20662066 continue;20672067-20682067 if (zone_is_all_unreclaimable(zone) && prio != DEF_PRIORITY)20692068 continue;2070206920712070 for_each_evictable_lru(l) {20712071+ enum zone_stat_item ls = NR_LRU_BASE + l;20722072+ unsigned long lru_pages = zone_page_state(zone, ls);20732073+20722074 /* For pass = 0, we don't shrink the active list */20732073- if (pass == 0 &&20742074- (l == LRU_ACTIVE || l == LRU_ACTIVE_FILE))20752075+ if (pass == 0 && (l == LRU_ACTIVE_ANON ||20762076+ l == LRU_ACTIVE_FILE))20752077 continue;2076207820772077- zone->lru[l].nr_scan +=20782078- (zone_page_state(zone, NR_LRU_BASE + l)20792079- >> prio) + 1;20792079+ zone->lru[l].nr_scan += (lru_pages >> prio) + 1;20802080 if (zone->lru[l].nr_scan >= nr_pages || pass > 3) {20812081+ unsigned long nr_to_scan;20822082+20812083 zone->lru[l].nr_scan = 0;20822082- nr_to_scan = min(nr_pages,20832083- zone_page_state(zone,20842084- NR_LRU_BASE + l));20842084+ nr_to_scan = min(nr_pages, lru_pages);20852085 ret += shrink_list(l, nr_to_scan, zone,20862086 sc, prio);20872087 if (ret >= nr_pages)···20892089 }20902090 }20912091 }20922092-20932092 return ret;20942093}20952094···21112112 .may_swap = 0,21122113 .swap_cluster_max = nr_pages,21132114 .may_writepage = 1,21142114- .swappiness = vm_swappiness,21152115 .isolate_pages = isolate_pages_global,21162116 };21172117···21442146 int prio;2145214721462148 /* Force reclaiming mapped pages in the passes #3 and #4 */21472147- if (pass > 2) {21492149+ if (pass > 2)21482150 sc.may_swap = 1;21492149- sc.swappiness = 100;21502150- }2151215121522152 for (prio = DEF_PRIORITY; prio >= 0; prio--) {21532153 unsigned long nr_to_scan = nr_pages - ret;
+2-2
scripts/bootgraph.pl
···51515252while (<>) {5353 my $line = $_;5454- if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z0-9\_]+)\+/) {5454+ if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z0-9\_\.]+)\+/) {5555 my $func = $2;5656 if ($done == 0) {5757 $start{$func} = $1;···8787 $count = $count + 1;8888 }89899090- if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z0-9\_]+)\+.*returned/) {9090+ if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z0-9\_\.]+)\+.*returned/) {9191 if ($done == 0) {9292 $end{$2} = $1;9393 $maxtime = $1;
+158-13
scripts/markup_oops.pl
···11-#!/usr/bin/perl -w11+#!/usr/bin/perl2233use File::Basename;44···2929my $target = "0";3030my $function;3131my $module = "";3232-my $func_offset;3232+my $func_offset = 0;3333my $vmaoffset = 0;34343535+my %regs;3636+3737+3838+sub parse_x86_regs3939+{4040+ my ($line) = @_;4141+ if ($line =~ /EAX: ([0-9a-f]+) EBX: ([0-9a-f]+) ECX: ([0-9a-f]+) EDX: ([0-9a-f]+)/) {4242+ $regs{"%eax"} = $1;4343+ $regs{"%ebx"} = $2;4444+ $regs{"%ecx"} = $3;4545+ $regs{"%edx"} = $4;4646+ }4747+ if ($line =~ /ESI: ([0-9a-f]+) EDI: ([0-9a-f]+) EBP: ([0-9a-f]+) ESP: ([0-9a-f]+)/) {4848+ $regs{"%esi"} = $1;4949+ $regs{"%edi"} = $2;5050+ $regs{"%esp"} = $4;5151+ }5252+ if ($line =~ /RAX: ([0-9a-f]+) RBX: ([0-9a-f]+) RCX: ([0-9a-f]+)/) {5353+ $regs{"%eax"} = $1;5454+ $regs{"%ebx"} = $2;5555+ $regs{"%ecx"} = $3;5656+ }5757+ if ($line =~ /RDX: ([0-9a-f]+) RSI: ([0-9a-f]+) RDI: ([0-9a-f]+)/) {5858+ $regs{"%edx"} = $1;5959+ $regs{"%esi"} = $2;6060+ $regs{"%edi"} = $3;6161+ }6262+ if ($line =~ /RBP: ([0-9a-f]+) R08: ([0-9a-f]+) R09: ([0-9a-f]+)/) {6363+ $regs{"%r08"} = $2;6464+ $regs{"%r09"} = $3;6565+ }6666+ if ($line =~ /R10: ([0-9a-f]+) R11: ([0-9a-f]+) R12: ([0-9a-f]+)/) {6767+ $regs{"%r10"} = $1;6868+ $regs{"%r11"} = $2;6969+ $regs{"%r12"} = $3;7070+ }7171+ if ($line =~ /R13: ([0-9a-f]+) R14: ([0-9a-f]+) R15: ([0-9a-f]+)/) {7272+ $regs{"%r13"} = $1;7373+ $regs{"%r14"} = $2;7474+ $regs{"%r15"} = $3;7575+ }7676+}7777+7878+sub reg_name7979+{8080+ my ($reg) = @_;8181+ $reg =~ s/r(.)x/e\1x/;8282+ $reg =~ s/r(.)i/e\1i/;8383+ $reg =~ s/r(.)p/e\1p/;8484+ return $reg;8585+}8686+8787+sub process_x86_regs8888+{8989+ my ($line, $cntr) = @_;9090+ my $str = "";9191+ if (length($line) < 40) {9292+ return ""; # not an asm istruction9393+ }9494+9595+ # find the arguments to the instruction9696+ if ($line =~ /([0-9a-zA-Z\,\%\(\)\-\+]+)$/) {9797+ $lastword = $1;9898+ } else {9999+ return "";100100+ }101101+102102+ # we need to find the registers that get clobbered,103103+ # since their value is no longer relevant for previous104104+ # instructions in the stream.105105+106106+ $clobber = $lastword;107107+ # first, remove all memory operands, they're read only108108+ $clobber =~ s/\([a-z0-9\%\,]+\)//g;109109+ # then, remove everything before the comma, thats the read part110110+ $clobber =~ s/.*\,//g;111111+112112+ # if this is the instruction that faulted, we haven't actually done113113+ # the write yet... nothing is clobbered.114114+ if ($cntr == 0) {115115+ $clobber = "";116116+ }117117+118118+ foreach $reg (keys(%regs)) {119119+ my $clobberprime = reg_name($clobber);120120+ my $lastwordprime = reg_name($lastword);121121+ my $val = $regs{$reg};122122+ if ($val =~ /^[0]+$/) {123123+ $val = "0";124124+ } else {125125+ $val =~ s/^0*//;126126+ }127127+128128+ # first check if we're clobbering this register; if we do129129+ # we print it with a =>, and then delete its value130130+ if ($clobber =~ /$reg/ || $clobberprime =~ /$reg/) {131131+ if (length($val) > 0) {132132+ $str = $str . " $reg => $val ";133133+ }134134+ $regs{$reg} = "";135135+ $val = "";136136+ }137137+ # now check if we're reading this register138138+ if ($lastword =~ /$reg/ || $lastwordprime =~ /$reg/) {139139+ if (length($val) > 0) {140140+ $str = $str . " $reg = $val ";141141+ }142142+ }143143+ }144144+ return $str;145145+}146146+147147+# parse the oops35148while (<STDIN>) {36149 my $line = $_;37150 if ($line =~ /EIP: 0060:\[\<([a-z0-9]+)\>\]/) {38151 $target = $1;39152 }153153+ if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) {154154+ $target = $1;155155+ }40156 if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {157157+ $function = $1;158158+ $func_offset = $2;159159+ }160160+ if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {41161 $function = $1;42162 $func_offset = $2;43163 }···16646 if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]+\W\[([a-zA-Z0-9\_\-]+)\]/) {16747 $module = $3;16848 }4949+ if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]+\W\[([a-zA-Z0-9\_\-]+)\]/) {5050+ $module = $3;5151+ }5252+ parse_x86_regs($line);16953}1705417155my $decodestart = hex($target) - hex($func_offset);172172-my $decodestop = $decodestart + 8192;5656+my $decodestop = hex($target) + 8192;17357if ($target eq "0") {17458 print "No oops found!\n";17559 print "Usage: \n";···20884my $state = 0;20985my $center = 0;21086my @lines;8787+my @reglines;2118821289sub InRange {21390 my ($address, $target) = @_;···313188314189my $i;315190316316-my $fulltext = "";317317-$i = $start;318318-while ($i < $finish) {319319- if ($i == $center) {320320- $fulltext = $fulltext . "*$lines[$i] <----- faulting instruction\n";321321- } else {322322- $fulltext = $fulltext . " $lines[$i]\n";323323- }324324- $i = $i +1;191191+192192+# start annotating the registers in the asm.193193+# this goes from the oopsing point back, so that the annotator194194+# can track (opportunistically) which registers got written and195195+# whos value no longer is relevant.196196+197197+$i = $center;198198+while ($i >= $start) {199199+ $reglines[$i] = process_x86_regs($lines[$i], $center - $i);200200+ $i = $i - 1;325201}326202327327-print $fulltext;203203+$i = $start;204204+while ($i < $finish) {205205+ my $line;206206+ if ($i == $center) {207207+ $line = "*$lines[$i] ";208208+ } else {209209+ $line = " $lines[$i] ";210210+ }211211+ print $line;212212+ if (defined($reglines[$i]) && length($reglines[$i]) > 0) {213213+ my $c = 60 - length($line);214214+ while ($c > 0) { print " "; $c = $c - 1; };215215+ print "| $reglines[$i]";216216+ }217217+ if ($i == $center) {218218+ print "<--- faulting instruction";219219+ }220220+ print "\n";221221+ $i = $i +1;222222+}328223
···7373{7474 int i, r = 0;75757676- down_read(&kvm->slots_lock);7776 for (i = 0; i < kvm->nmemslots; i++) {7877 r = kvm_iommu_map_pages(kvm, kvm->memslots[i].base_gfn,7978 kvm->memslots[i].npages);8079 if (r)8180 break;8281 }8383- up_read(&kvm->slots_lock);8282+8483 return r;8584}8685···189190static int kvm_iommu_unmap_memslots(struct kvm *kvm)190191{191192 int i;192192- down_read(&kvm->slots_lock);193193+193194 for (i = 0; i < kvm->nmemslots; i++) {194195 kvm_iommu_put_pages(kvm, kvm->memslots[i].base_gfn,195196 kvm->memslots[i].npages);196197 }197197- up_read(&kvm->slots_lock);198198199199 return 0;200200}
+33-10
virt/kvm/kvm_main.c
···173173 assigned_dev->host_irq_disabled = false;174174 }175175 mutex_unlock(&assigned_dev->kvm->lock);176176- kvm_put_kvm(assigned_dev->kvm);177176}178177179178static irqreturn_t kvm_assigned_dev_intr(int irq, void *dev_id)180179{181180 struct kvm_assigned_dev_kernel *assigned_dev =182181 (struct kvm_assigned_dev_kernel *) dev_id;183183-184184- kvm_get_kvm(assigned_dev->kvm);185182186183 schedule_work(&assigned_dev->interrupt_work);187184···210213 }211214}212215216216+/* The function implicit hold kvm->lock mutex due to cancel_work_sync() */213217static void kvm_free_assigned_irq(struct kvm *kvm,214218 struct kvm_assigned_dev_kernel *assigned_dev)215219{···226228 if (!assigned_dev->irq_requested_type)227229 return;228230229229- if (cancel_work_sync(&assigned_dev->interrupt_work))230230- /* We had pending work. That means we will have to take231231- * care of kvm_put_kvm.232232- */233233- kvm_put_kvm(kvm);231231+ /*232232+ * In kvm_free_device_irq, cancel_work_sync return true if:233233+ * 1. work is scheduled, and then cancelled.234234+ * 2. work callback is executed.235235+ *236236+ * The first one ensured that the irq is disabled and no more events237237+ * would happen. But for the second one, the irq may be enabled (e.g.238238+ * for MSI). So we disable irq here to prevent further events.239239+ *240240+ * Notice this maybe result in nested disable if the interrupt type is241241+ * INTx, but it's OK for we are going to free it.242242+ *243243+ * If this function is a part of VM destroy, please ensure that till244244+ * now, the kvm state is still legal for probably we also have to wait245245+ * interrupt_work done.246246+ */247247+ disable_irq_nosync(assigned_dev->host_irq);248248+ cancel_work_sync(&assigned_dev->interrupt_work);234249235250 free_irq(assigned_dev->host_irq, (void *)assigned_dev);236251···296285297286 if (irqchip_in_kernel(kvm)) {298287 if (!msi2intx &&299299- adev->irq_requested_type & KVM_ASSIGNED_DEV_HOST_MSI) {300300- free_irq(adev->host_irq, (void *)kvm);288288+ (adev->irq_requested_type & KVM_ASSIGNED_DEV_HOST_MSI)) {289289+ free_irq(adev->host_irq, (void *)adev);301290 pci_disable_msi(adev->dev);302291 }303292···466455 struct kvm_assigned_dev_kernel *match;467456 struct pci_dev *dev;468457458458+ down_read(&kvm->slots_lock);469459 mutex_lock(&kvm->lock);470460471461 match = kvm_find_assigned_dev(&kvm->arch.assigned_dev_head,···528516529517out:530518 mutex_unlock(&kvm->lock);519519+ up_read(&kvm->slots_lock);531520 return r;532521out_list_del:533522 list_del(&match->list);···540527out_free:541528 kfree(match);542529 mutex_unlock(&kvm->lock);530530+ up_read(&kvm->slots_lock);543531 return r;544532}545533#endif···803789 return young;804790}805791792792+static void kvm_mmu_notifier_release(struct mmu_notifier *mn,793793+ struct mm_struct *mm)794794+{795795+ struct kvm *kvm = mmu_notifier_to_kvm(mn);796796+ kvm_arch_flush_shadow(kvm);797797+}798798+806799static const struct mmu_notifier_ops kvm_mmu_notifier_ops = {807800 .invalidate_page = kvm_mmu_notifier_invalidate_page,808801 .invalidate_range_start = kvm_mmu_notifier_invalidate_range_start,809802 .invalidate_range_end = kvm_mmu_notifier_invalidate_range_end,810803 .clear_flush_young = kvm_mmu_notifier_clear_flush_young,804804+ .release = kvm_mmu_notifier_release,811805};812806#endif /* CONFIG_MMU_NOTIFIER && KVM_ARCH_WANT_MMU_NOTIFIER */813807···905883{906884 struct mm_struct *mm = kvm->mm;907885886886+ kvm_arch_sync_events(kvm);908887 spin_lock(&kvm_lock);909888 list_del(&kvm->vm_list);910889 spin_unlock(&kvm_lock);