You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'upstream-fixes'
This commit is contained in:
+14
-27
@@ -4,8 +4,9 @@
|
||||
Copyright (C) 2004 BULL SA.
|
||||
Written by Simon.Derr@bull.net
|
||||
|
||||
Portions Copyright (c) 2004 Silicon Graphics, Inc.
|
||||
Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
|
||||
Modified by Paul Jackson <pj@sgi.com>
|
||||
Modified by Christoph Lameter <clameter@sgi.com>
|
||||
|
||||
CONTENTS:
|
||||
=========
|
||||
@@ -90,7 +91,8 @@ This can be especially valuable on:
|
||||
|
||||
These subsets, or "soft partitions" must be able to be dynamically
|
||||
adjusted, as the job mix changes, without impacting other concurrently
|
||||
executing jobs.
|
||||
executing jobs. The location of the running jobs pages may also be moved
|
||||
when the memory locations are changed.
|
||||
|
||||
The kernel cpuset patch provides the minimum essential kernel
|
||||
mechanisms required to efficiently implement such subsets. It
|
||||
@@ -102,8 +104,8 @@ memory allocator code.
|
||||
1.3 How are cpusets implemented ?
|
||||
---------------------------------
|
||||
|
||||
Cpusets provide a Linux kernel (2.6.7 and above) mechanism to constrain
|
||||
which CPUs and Memory Nodes are used by a process or set of processes.
|
||||
Cpusets provide a Linux kernel mechanism to constrain which CPUs and
|
||||
Memory Nodes are used by a process or set of processes.
|
||||
|
||||
The Linux kernel already has a pair of mechanisms to specify on which
|
||||
CPUs a task may be scheduled (sched_setaffinity) and on which Memory
|
||||
@@ -371,22 +373,17 @@ cpusets memory placement policy 'mems' subsequently changes.
|
||||
If the cpuset flag file 'memory_migrate' is set true, then when
|
||||
tasks are attached to that cpuset, any pages that task had
|
||||
allocated to it on nodes in its previous cpuset are migrated
|
||||
to the tasks new cpuset. Depending on the implementation,
|
||||
this migration may either be done by swapping the page out,
|
||||
so that the next time the page is referenced, it will be paged
|
||||
into the tasks new cpuset, usually on the node where it was
|
||||
referenced, or this migration may be done by directly copying
|
||||
the pages from the tasks previous cpuset to the new cpuset,
|
||||
where possible to the same node, relative to the new cpuset,
|
||||
as the node that held the page, relative to the old cpuset.
|
||||
to the tasks new cpuset. The relative placement of the page within
|
||||
the cpuset is preserved during these migration operations if possible.
|
||||
For example if the page was on the second valid node of the prior cpuset
|
||||
then the page will be placed on the second valid node of the new cpuset.
|
||||
|
||||
Also if 'memory_migrate' is set true, then if that cpusets
|
||||
'mems' file is modified, pages allocated to tasks in that
|
||||
cpuset, that were on nodes in the previous setting of 'mems',
|
||||
will be moved to nodes in the new setting of 'mems.' Again,
|
||||
depending on the implementation, this might be done by swapping,
|
||||
or by direct copying. In either case, pages that were not in
|
||||
the tasks prior cpuset, or in the cpusets prior 'mems' setting,
|
||||
will not be moved.
|
||||
will be moved to nodes in the new setting of 'mems.'
|
||||
Pages that were not in the tasks prior cpuset, or in the cpusets
|
||||
prior 'mems' setting, will not be moved.
|
||||
|
||||
There is an exception to the above. If hotplug functionality is used
|
||||
to remove all the CPUs that are currently assigned to a cpuset,
|
||||
@@ -434,16 +431,6 @@ and then start a subshell 'sh' in that cpuset:
|
||||
# The next line should display '/Charlie'
|
||||
cat /proc/self/cpuset
|
||||
|
||||
In the case that a change of cpuset includes wanting to move already
|
||||
allocated memory pages, consider further the work of IWAMOTO
|
||||
Toshihiro <iwamoto@valinux.co.jp> for page remapping and memory
|
||||
hotremoval, which can be found at:
|
||||
|
||||
http://people.valinux.co.jp/~iwamoto/mh.html
|
||||
|
||||
The integration of cpusets with such memory migration is not yet
|
||||
available.
|
||||
|
||||
In the future, a C library interface to cpusets will likely be
|
||||
available. For now, the only way to query or modify cpusets is
|
||||
via the cpuset file system, using the various cd, mkdir, echo, cat,
|
||||
|
||||
@@ -12,12 +12,18 @@ is running.
|
||||
|
||||
Page migration allows a process to manually relocate the node on which its
|
||||
pages are located through the MF_MOVE and MF_MOVE_ALL options while setting
|
||||
a new memory policy. The pages of process can also be relocated
|
||||
a new memory policy via mbind(). The pages of process can also be relocated
|
||||
from another process using the sys_migrate_pages() function call. The
|
||||
migrate_pages function call takes two sets of nodes and moves pages of a
|
||||
process that are located on the from nodes to the destination nodes.
|
||||
Page migration functions are provided by the numactl package by Andi Kleen
|
||||
(a version later than 0.9.3 is required. Get it from
|
||||
ftp://ftp.suse.com/pub/people/ak). numactl provided libnuma which
|
||||
provides an interface similar to other numa functionality for page migration.
|
||||
cat /proc/<pid>/numa_maps allows an easy review of where the pages of
|
||||
a process are located. See also the numa_maps manpage in the numactl package.
|
||||
|
||||
Manual migration is very useful if for example the scheduler has relocated
|
||||
Manual migration is useful if for example the scheduler has relocated
|
||||
a process to a processor on a distant node. A batch scheduler or an
|
||||
administrator may detect the situation and move the pages of the process
|
||||
nearer to the new processor. At some point in the future we may have
|
||||
@@ -25,10 +31,12 @@ some mechanism in the scheduler that will automatically move the pages.
|
||||
|
||||
Larger installations usually partition the system using cpusets into
|
||||
sections of nodes. Paul Jackson has equipped cpusets with the ability to
|
||||
move pages when a task is moved to another cpuset. This allows automatic
|
||||
control over locality of a process. If a task is moved to a new cpuset
|
||||
then also all its pages are moved with it so that the performance of the
|
||||
process does not sink dramatically (as is the case today).
|
||||
move pages when a task is moved to another cpuset (See ../cpusets.txt).
|
||||
Cpusets allows the automation of process locality. If a task is moved to
|
||||
a new cpuset then also all its pages are moved with it so that the
|
||||
performance of the process does not sink dramatically. Also the pages
|
||||
of processes in a cpuset are moved if the allowed memory nodes of a
|
||||
cpuset are changed.
|
||||
|
||||
Page migration allows the preservation of the relative location of pages
|
||||
within a group of nodes for all migration techniques which will preserve a
|
||||
@@ -37,22 +45,26 @@ process. This is necessary in order to preserve the memory latencies.
|
||||
Processes will run with similar performance after migration.
|
||||
|
||||
Page migration occurs in several steps. First a high level
|
||||
description for those trying to use migrate_pages() and then
|
||||
a low level description of how the low level details work.
|
||||
description for those trying to use migrate_pages() from the kernel
|
||||
(for userspace usage see the Andi Kleen's numactl package mentioned above)
|
||||
and then a low level description of how the low level details work.
|
||||
|
||||
A. Use of migrate_pages()
|
||||
-------------------------
|
||||
A. In kernel use of migrate_pages()
|
||||
-----------------------------------
|
||||
|
||||
1. Remove pages from the LRU.
|
||||
|
||||
Lists of pages to be migrated are generated by scanning over
|
||||
pages and moving them into lists. This is done by
|
||||
calling isolate_lru_page() or __isolate_lru_page().
|
||||
calling isolate_lru_page().
|
||||
Calling isolate_lru_page increases the references to the page
|
||||
so that it cannot vanish under us.
|
||||
so that it cannot vanish while the page migration occurs.
|
||||
It also prevents the swapper or other scans to encounter
|
||||
the page.
|
||||
|
||||
2. Generate a list of newly allocates page to move the contents
|
||||
of the first list to.
|
||||
2. Generate a list of newly allocates page. These pages will contain the
|
||||
contents of the pages from the first list after page migration is
|
||||
complete.
|
||||
|
||||
3. The migrate_pages() function is called which attempts
|
||||
to do the migration. It returns the moved pages in the
|
||||
@@ -63,13 +75,17 @@ A. Use of migrate_pages()
|
||||
4. The leftover pages of various types are returned
|
||||
to the LRU using putback_to_lru_pages() or otherwise
|
||||
disposed of. The pages will still have the refcount as
|
||||
increased by isolate_lru_pages()!
|
||||
increased by isolate_lru_pages() if putback_to_lru_pages() is not
|
||||
used! The kernel may want to handle the various cases of failures in
|
||||
different ways.
|
||||
|
||||
B. Operation of migrate_pages()
|
||||
--------------------------------
|
||||
B. How migrate_pages() works
|
||||
----------------------------
|
||||
|
||||
migrate_pages does several passes over its list of pages. A page is moved
|
||||
if all references to a page are removable at the time.
|
||||
migrate_pages() does several passes over its list of pages. A page is moved
|
||||
if all references to a page are removable at the time. The page has
|
||||
already been removed from the LRU via isolate_lru_page() and the refcount
|
||||
is increased so that the page cannot be freed while page migration occurs.
|
||||
|
||||
Steps:
|
||||
|
||||
@@ -79,36 +95,40 @@ Steps:
|
||||
|
||||
3. Make sure that the page has assigned swap cache entry if
|
||||
it is an anonyous page. The swap cache reference is necessary
|
||||
to preserve the information contain in the page table maps.
|
||||
to preserve the information contain in the page table maps while
|
||||
page migration occurs.
|
||||
|
||||
4. Prep the new page that we want to move to. It is locked
|
||||
and set to not being uptodate so that all accesses to the new
|
||||
page immediately lock while we are moving references.
|
||||
page immediately lock while the move is in progress.
|
||||
|
||||
5. All the page table references to the page are either dropped (file backed)
|
||||
or converted to swap references (anonymous pages). This should decrease the
|
||||
reference count.
|
||||
5. All the page table references to the page are either dropped (file
|
||||
backed pages) or converted to swap references (anonymous pages).
|
||||
This should decrease the reference count.
|
||||
|
||||
6. The radix tree lock is taken
|
||||
6. The radix tree lock is taken. This will cause all processes trying
|
||||
to reestablish a pte to block on the radix tree spinlock.
|
||||
|
||||
7. The refcount of the page is examined and we back out if references remain
|
||||
otherwise we know that we are the only one referencing this page.
|
||||
|
||||
8. The radix tree is checked and if it does not contain the pointer to this
|
||||
page then we back out.
|
||||
page then we back out because someone else modified the mapping first.
|
||||
|
||||
9. The mapping is checked. If the mapping is gone then a truncate action may
|
||||
be in progress and we back out.
|
||||
|
||||
10. The new page is prepped with some settings from the old page so that accesses
|
||||
to the new page will be discovered to have the correct settings.
|
||||
10. The new page is prepped with some settings from the old page so that
|
||||
accesses to the new page will be discovered to have the correct settings.
|
||||
|
||||
11. The radix tree is changed to point to the new page.
|
||||
|
||||
12. The reference count of the old page is dropped because the reference has now
|
||||
been removed.
|
||||
12. The reference count of the old page is dropped because the radix tree
|
||||
reference is gone.
|
||||
|
||||
13. The radix tree lock is dropped.
|
||||
13. The radix tree lock is dropped. With that lookups become possible again
|
||||
and other processes will move from spinning on the tree lock to sleeping on
|
||||
the locked new page.
|
||||
|
||||
14. The page contents are copied to the new page.
|
||||
|
||||
@@ -119,11 +139,37 @@ Steps:
|
||||
|
||||
17. Queued up writeback on the new page is triggered.
|
||||
|
||||
18. If swap pte's were generated for the page then remove them again.
|
||||
18. If swap pte's were generated for the page then replace them with real
|
||||
ptes. This will reenable access for processes not blocked by the page lock.
|
||||
|
||||
19. The locks are dropped from the old and new page.
|
||||
19. The page locks are dropped from the old and new page.
|
||||
Processes waiting on the page lock can continue.
|
||||
|
||||
20. The new page is moved to the LRU.
|
||||
20. The new page is moved to the LRU and can be scanned by the swapper
|
||||
etc again.
|
||||
|
||||
Christoph Lameter, December 19, 2005.
|
||||
TODO list
|
||||
---------
|
||||
|
||||
- Page migration requires the use of swap handles to preserve the
|
||||
information of the anonymous page table entries. This means that swap
|
||||
space is reserved but never used. The maximum number of swap handles used
|
||||
is determined by CHUNK_SIZE (see mm/mempolicy.c) per ongoing migration.
|
||||
Reservation of pages could be avoided by having a special type of swap
|
||||
handle that does not require swap space and that would only track the page
|
||||
references. Something like that was proposed by Marcelo Tosatti in the
|
||||
past (search for migration cache on lkml or linux-mm@kvack.org).
|
||||
|
||||
- Page migration unmaps ptes for file backed pages and requires page
|
||||
faults to reestablish these ptes. This could be optimized by somehow
|
||||
recording the references before migration and then reestablish them later.
|
||||
However, there are several locking challenges that have to be overcome
|
||||
before this is possible.
|
||||
|
||||
- Page migration generates read ptes for anonymous pages. Dirty page
|
||||
faults are required to make the pages writable again. It may be possible
|
||||
to generate a pte marked dirty if it is known that the page is dirty and
|
||||
that this process has the only reference to that page.
|
||||
|
||||
Christoph Lameter, March 8, 2006.
|
||||
|
||||
|
||||
@@ -799,6 +799,8 @@ source "drivers/i2c/Kconfig"
|
||||
|
||||
source "drivers/spi/Kconfig"
|
||||
|
||||
source "drivers/w1/Kconfig"
|
||||
|
||||
source "drivers/hwmon/Kconfig"
|
||||
|
||||
#source "drivers/l3/Kconfig"
|
||||
|
||||
@@ -57,7 +57,9 @@ int main(void)
|
||||
DEFINE(TI_TP_VALUE, offsetof(struct thread_info, tp_value));
|
||||
DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate));
|
||||
DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate));
|
||||
DEFINE(TI_IWMMXT_STATE, (offsetof(struct thread_info, fpstate)+4)&~7);
|
||||
#ifdef CONFIG_IWMMXT
|
||||
DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt));
|
||||
#endif
|
||||
BLANK();
|
||||
DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0));
|
||||
DEFINE(S_R1, offsetof(struct pt_regs, ARM_r1));
|
||||
|
||||
@@ -610,15 +610,12 @@ static int ptrace_setfpregs(struct task_struct *tsk, void __user *ufp)
|
||||
static int ptrace_getwmmxregs(struct task_struct *tsk, void __user *ufp)
|
||||
{
|
||||
struct thread_info *thread = task_thread_info(tsk);
|
||||
void *ptr = &thread->fpstate;
|
||||
|
||||
if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT))
|
||||
return -ENODATA;
|
||||
iwmmxt_task_disable(thread); /* force it to ram */
|
||||
/* The iWMMXt state is stored doubleword-aligned. */
|
||||
if (((long) ptr) & 4)
|
||||
ptr += 4;
|
||||
return copy_to_user(ufp, ptr, 0x98) ? -EFAULT : 0;
|
||||
return copy_to_user(ufp, &thread->fpstate.iwmmxt, IWMMXT_SIZE)
|
||||
? -EFAULT : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -627,15 +624,12 @@ static int ptrace_getwmmxregs(struct task_struct *tsk, void __user *ufp)
|
||||
static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp)
|
||||
{
|
||||
struct thread_info *thread = task_thread_info(tsk);
|
||||
void *ptr = &thread->fpstate;
|
||||
|
||||
if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT))
|
||||
return -EACCES;
|
||||
iwmmxt_task_release(thread); /* force a reload */
|
||||
/* The iWMMXt state is stored doubleword-aligned. */
|
||||
if (((long) ptr) & 4)
|
||||
ptr += 4;
|
||||
return copy_from_user(ptr, ufp, 0x98) ? -EFAULT : 0;
|
||||
return copy_from_user(&thead->fpstate.iwmmxt, ufp, IWMMXT_SIZE)
|
||||
? -EFAULT : 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,8 +29,8 @@ ENTRY(__aeabi_lmul)
|
||||
|
||||
mul xh, yl, xh
|
||||
mla xh, xl, yh, xh
|
||||
mov ip, xl, asr #16
|
||||
mov yh, yl, asr #16
|
||||
mov ip, xl, lsr #16
|
||||
mov yh, yl, lsr #16
|
||||
bic xl, xl, ip, lsl #16
|
||||
bic yl, yl, yh, lsl #16
|
||||
mla xh, yh, ip, xh
|
||||
|
||||
@@ -8,11 +8,9 @@ menu "Intel IXP4xx Implementation Options"
|
||||
|
||||
comment "IXP4xx Platforms"
|
||||
|
||||
# This entry is placed on top because otherwise it would have
|
||||
# been shown as a submenu.
|
||||
config MACH_NSLU2
|
||||
bool
|
||||
prompt "NSLU2" if !(MACH_IXDP465 || MACH_IXDPG425 || ARCH_IXDP425 || ARCH_ADI_COYOTE || ARCH_AVILA || ARCH_IXCDP1100 || ARCH_PRPMC1100 || MACH_GTWX5715)
|
||||
prompt "Linksys NSLU2"
|
||||
help
|
||||
Say 'Y' here if you want your kernel to support Linksys's
|
||||
NSLU2 NAS device. For more information on this platform,
|
||||
|
||||
@@ -113,6 +113,9 @@ static void __init nas100d_init(void)
|
||||
{
|
||||
ixp4xx_sys_init();
|
||||
|
||||
/* gpio 14 and 15 are _not_ clocks */
|
||||
*IXP4XX_GPIO_GPCLKR = 0;
|
||||
|
||||
nas100d_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
|
||||
nas100d_flash_resource.end =
|
||||
IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
|
||||
|
||||
@@ -96,15 +96,16 @@ ENTRY(v6_coherent_user_range)
|
||||
#ifdef HARVARD_CACHE
|
||||
bic r0, r0, #CACHE_LINE_SIZE - 1
|
||||
1: mcr p15, 0, r0, c7, c10, 1 @ clean D line
|
||||
mcr p15, 0, r0, c7, c5, 1 @ invalidate I line
|
||||
add r0, r0, #CACHE_LINE_SIZE
|
||||
cmp r0, r1
|
||||
blo 1b
|
||||
#endif
|
||||
mcr p15, 0, r0, c7, c5, 6 @ invalidate BTB
|
||||
#ifdef HARVARD_CACHE
|
||||
mov r0, #0
|
||||
#ifdef HARVARD_CACHE
|
||||
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
|
||||
mcr p15, 0, r0, c7, c5, 0 @ I+BTB cache invalidate
|
||||
#else
|
||||
mcr p15, 0, r0, c7, c5, 6 @ invalidate BTB
|
||||
#endif
|
||||
mov pc, lr
|
||||
|
||||
|
||||
+4
-2
@@ -24,14 +24,16 @@
|
||||
static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr)
|
||||
{
|
||||
unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT);
|
||||
const int zero = 0;
|
||||
|
||||
set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL));
|
||||
flush_tlb_kernel_page(to);
|
||||
|
||||
asm( "mcrr p15, 0, %1, %0, c14\n"
|
||||
" mcrr p15, 0, %1, %0, c5\n"
|
||||
" mcr p15, 0, %2, c7, c10, 4\n"
|
||||
" mcr p15, 0, %2, c7, c5, 0\n"
|
||||
:
|
||||
: "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES)
|
||||
: "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES), "r" (zero)
|
||||
: "cc");
|
||||
}
|
||||
|
||||
|
||||
@@ -570,16 +570,18 @@ void __devinit setup_local_APIC(void)
|
||||
*/
|
||||
void lapic_shutdown(void)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (!cpu_has_apic)
|
||||
return;
|
||||
|
||||
local_irq_disable();
|
||||
local_irq_save(flags);
|
||||
clear_local_APIC();
|
||||
|
||||
if (enabled_via_apicbase)
|
||||
disable_local_APIC();
|
||||
|
||||
local_irq_enable();
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
+42
-2
@@ -38,6 +38,12 @@
|
||||
|
||||
#define EDAC_MC_VERSION "edac_mc Ver: 2.0.0 " __DATE__
|
||||
|
||||
/* For now, disable the EDAC sysfs code. The sysfs interface that EDAC
|
||||
* presents to user space needs more thought, and is likely to change
|
||||
* substantially.
|
||||
*/
|
||||
#define DISABLE_EDAC_SYSFS
|
||||
|
||||
#ifdef CONFIG_EDAC_DEBUG
|
||||
/* Values of 0 to 4 will generate output */
|
||||
int edac_debug_level = 1;
|
||||
@@ -47,7 +53,7 @@ EXPORT_SYMBOL(edac_debug_level);
|
||||
/* EDAC Controls, setable by module parameter, and sysfs */
|
||||
static int log_ue = 1;
|
||||
static int log_ce = 1;
|
||||
static int panic_on_ue = 1;
|
||||
static int panic_on_ue;
|
||||
static int poll_msec = 1000;
|
||||
|
||||
static int check_pci_parity = 0; /* default YES check PCI parity */
|
||||
@@ -77,6 +83,8 @@ static int pci_whitelist_count ;
|
||||
|
||||
/* START sysfs data and methods */
|
||||
|
||||
#ifndef DISABLE_EDAC_SYSFS
|
||||
|
||||
static const char *mem_types[] = {
|
||||
[MEM_EMPTY] = "Empty",
|
||||
[MEM_RESERVED] = "Reserved",
|
||||
@@ -241,6 +249,7 @@ static struct kobj_type ktype_memctrl = {
|
||||
.default_attrs = (struct attribute **) memctrl_attr,
|
||||
};
|
||||
|
||||
#endif /* DISABLE_EDAC_SYSFS */
|
||||
|
||||
/* Initialize the main sysfs entries for edac:
|
||||
* /sys/devices/system/edac
|
||||
@@ -251,6 +260,11 @@ static struct kobj_type ktype_memctrl = {
|
||||
* !0 FAILURE
|
||||
*/
|
||||
static int edac_sysfs_memctrl_setup(void)
|
||||
#ifdef DISABLE_EDAC_SYSFS
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
{
|
||||
int err=0;
|
||||
|
||||
@@ -283,6 +297,7 @@ static int edac_sysfs_memctrl_setup(void)
|
||||
|
||||
return err;
|
||||
}
|
||||
#endif /* DISABLE_EDAC_SYSFS */
|
||||
|
||||
/*
|
||||
* MC teardown:
|
||||
@@ -290,6 +305,7 @@ static int edac_sysfs_memctrl_setup(void)
|
||||
*/
|
||||
static void edac_sysfs_memctrl_teardown(void)
|
||||
{
|
||||
#ifndef DISABLE_EDAC_SYSFS
|
||||
debugf0("MC: " __FILE__ ": %s()\n", __func__);
|
||||
|
||||
/* Unregister the MC's kobject */
|
||||
@@ -300,8 +316,11 @@ static void edac_sysfs_memctrl_teardown(void)
|
||||
|
||||
/* Unregister the 'edac' object */
|
||||
sysdev_class_unregister(&edac_class);
|
||||
#endif /* DISABLE_EDAC_SYSFS */
|
||||
}
|
||||
|
||||
#ifndef DISABLE_EDAC_SYSFS
|
||||
|
||||
/*
|
||||
* /sys/devices/system/edac/pci;
|
||||
* data structures and methods
|
||||
@@ -554,11 +573,18 @@ static struct kobj_type ktype_edac_pci = {
|
||||
.default_attrs = (struct attribute **) edac_pci_attr,
|
||||
};
|
||||
|
||||
#endif /* DISABLE_EDAC_SYSFS */
|
||||
|
||||
/**
|
||||
* edac_sysfs_pci_setup()
|
||||
*
|
||||
*/
|
||||
static int edac_sysfs_pci_setup(void)
|
||||
#ifdef DISABLE_EDAC_SYSFS
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
{
|
||||
int err;
|
||||
|
||||
@@ -582,16 +608,20 @@ static int edac_sysfs_pci_setup(void)
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
#endif /* DISABLE_EDAC_SYSFS */
|
||||
|
||||
static void edac_sysfs_pci_teardown(void)
|
||||
{
|
||||
#ifndef DISABLE_EDAC_SYSFS
|
||||
debugf0("MC: " __FILE__ ": %s()\n", __func__);
|
||||
|
||||
kobject_unregister(&edac_pci_kobj);
|
||||
kobject_put(&edac_pci_kobj);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef DISABLE_EDAC_SYSFS
|
||||
|
||||
/* EDAC sysfs CSROW data structures and methods */
|
||||
|
||||
/* Set of more detailed csrow<id> attribute show/store functions */
|
||||
@@ -1045,6 +1075,8 @@ static struct kobj_type ktype_mci = {
|
||||
.default_attrs = (struct attribute **) mci_attr,
|
||||
};
|
||||
|
||||
#endif /* DISABLE_EDAC_SYSFS */
|
||||
|
||||
#define EDAC_DEVICE_SYMLINK "device"
|
||||
|
||||
/*
|
||||
@@ -1056,6 +1088,11 @@ static struct kobj_type ktype_mci = {
|
||||
* !0 Failure
|
||||
*/
|
||||
static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
|
||||
#ifdef DISABLE_EDAC_SYSFS
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
{
|
||||
int i;
|
||||
int err;
|
||||
@@ -1124,12 +1161,14 @@ fail:
|
||||
|
||||
return err;
|
||||
}
|
||||
#endif /* DISABLE_EDAC_SYSFS */
|
||||
|
||||
/*
|
||||
* remove a Memory Controller instance
|
||||
*/
|
||||
static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
|
||||
{
|
||||
#ifndef DISABLE_EDAC_SYSFS
|
||||
int i;
|
||||
|
||||
debugf0("MC: " __FILE__ ": %s()\n", __func__);
|
||||
@@ -1146,6 +1185,7 @@ static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
|
||||
|
||||
kobject_unregister(&mci->edac_mci_kobj);
|
||||
kobject_put(&mci->edac_mci_kobj);
|
||||
#endif /* DISABLE_EDAC_SYSFS */
|
||||
}
|
||||
|
||||
/* END OF sysfs data and methods */
|
||||
|
||||
@@ -825,7 +825,7 @@ proc_get_info(char *page, char **start, off_t off,
|
||||
p += sprintf(p, "PMU driver version : %d\n", PMU_DRIVER_VERSION);
|
||||
p += sprintf(p, "PMU firmware version : %02x\n", pmu_version);
|
||||
p += sprintf(p, "AC Power : %d\n",
|
||||
((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0));
|
||||
((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0) || pmu_battery_count == 0);
|
||||
p += sprintf(p, "Battery count : %d\n", pmu_battery_count);
|
||||
|
||||
return p - page;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
mxb - v4l2 driver for the Multimedia eXtension Board
|
||||
|
||||
Copyright (C) 1998-2003 Michael Hunold <michael@mihu.de>
|
||||
Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de>
|
||||
|
||||
Visit http://www.mihu.de/linux/saa7146/mxb/
|
||||
for further details about this card.
|
||||
@@ -327,6 +327,7 @@ static int mxb_init_done(struct saa7146_dev* dev)
|
||||
struct video_decoder_init init;
|
||||
struct i2c_msg msg;
|
||||
struct tuner_setup tun_setup;
|
||||
v4l2_std_id std = V4L2_STD_PAL_BG;
|
||||
|
||||
int i = 0, err = 0;
|
||||
struct tea6415c_multiplex vm;
|
||||
@@ -361,6 +362,9 @@ static int mxb_init_done(struct saa7146_dev* dev)
|
||||
mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY,
|
||||
&mxb->cur_freq);
|
||||
|
||||
/* set a default video standard */
|
||||
mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
|
||||
|
||||
/* mute audio on tea6420s */
|
||||
mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[6][0]);
|
||||
mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[6][1]);
|
||||
@@ -921,17 +925,21 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std)
|
||||
int one = 1;
|
||||
|
||||
if(V4L2_STD_PAL_I == std->id ) {
|
||||
v4l2_std_id std = V4L2_STD_PAL_I;
|
||||
DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n"));
|
||||
/* set the 7146 gpio register -- I don't know what this does exactly */
|
||||
saa7146_write(dev, GPIO_CTRL, 0x00404050);
|
||||
/* unset the 7111 gpio register -- I don't know what this does exactly */
|
||||
mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero);
|
||||
mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
|
||||
} else {
|
||||
v4l2_std_id std = V4L2_STD_PAL_BG;
|
||||
DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n"));
|
||||
/* set the 7146 gpio register -- I don't know what this does exactly */
|
||||
saa7146_write(dev, GPIO_CTRL, 0x00404050);
|
||||
/* set the 7111 gpio register -- I don't know what this does exactly */
|
||||
mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one);
|
||||
mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
|
||||
* we're at a block boundary and need to erase the whole block.
|
||||
*/
|
||||
pageaddr = instr->addr / priv->page_size;
|
||||
do_block = (pageaddr & 0x7) == 0 && instr->len <= blocksize;
|
||||
do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize;
|
||||
pageaddr = pageaddr << priv->page_offset;
|
||||
|
||||
command[0] = do_block ? OP_ERASE_BLOCK : OP_ERASE_PAGE;
|
||||
|
||||
@@ -10543,8 +10543,6 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str)
|
||||
strcat(str, "66MHz");
|
||||
else if (clock_ctrl == 6)
|
||||
strcat(str, "100MHz");
|
||||
else if (clock_ctrl == 7)
|
||||
strcat(str, "133MHz");
|
||||
} else {
|
||||
strcpy(str, "PCI:");
|
||||
if (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED)
|
||||
|
||||
+4
-1
@@ -249,8 +249,11 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv,
|
||||
|
||||
if (align)
|
||||
skb_reserve(skb, align);
|
||||
if (memcpy_fromiovec(skb_put(skb, len), iv, len))
|
||||
if (memcpy_fromiovec(skb_put(skb, len), iv, len)) {
|
||||
tun->stats.rx_dropped++;
|
||||
kfree_skb(skb);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
skb->dev = tun->dev;
|
||||
switch (tun->flags & TUN_TYPE_MASK) {
|
||||
|
||||
@@ -409,6 +409,9 @@ __init_channel_subsystem(struct subchannel_id schid, void *data)
|
||||
/* -ENXIO: no more subchannels. */
|
||||
case -ENXIO:
|
||||
return ret;
|
||||
/* -EIO: this subchannel set not supported. */
|
||||
case -EIO:
|
||||
return ret;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -664,6 +664,7 @@ do { \
|
||||
#define ZFCP_STATUS_UNIT_TEMPORARY 0x00000002
|
||||
#define ZFCP_STATUS_UNIT_SHARED 0x00000004
|
||||
#define ZFCP_STATUS_UNIT_READONLY 0x00000008
|
||||
#define ZFCP_STATUS_UNIT_REGISTERED 0x00000010
|
||||
|
||||
/* FSF request status (this does not have a common part) */
|
||||
#define ZFCP_STATUS_FSFREQ_NOT_INIT 0x00000000
|
||||
|
||||
@@ -3391,10 +3391,13 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter,
|
||||
&& (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY,
|
||||
&unit->status))
|
||||
&& !unit->device
|
||||
&& port->rport)
|
||||
scsi_add_device(port->adapter->scsi_host, 0,
|
||||
port->rport->scsi_target_id,
|
||||
unit->scsi_lun);
|
||||
&& port->rport) {
|
||||
atomic_set_mask(ZFCP_STATUS_UNIT_REGISTERED,
|
||||
&unit->status);
|
||||
scsi_scan_target(&port->rport->dev, 0,
|
||||
port->rport->scsi_target_id,
|
||||
unit->scsi_lun, 0);
|
||||
}
|
||||
zfcp_unit_put(unit);
|
||||
break;
|
||||
case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user