29 Apr, 2008
1 commit
-
psr is not a good name for local variable in macro body when it
has a good chance of being the argument of said macro (actually
is at least in one place)Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
28 Apr, 2008
4 commits
-
Huge ptes have a special type on s390 and cannot be handled with the standard
pte functions in certain cases, e.g. because of a different location of the
invalid bit. This patch adds some new architecture- specific functions to
hugetlb common code, as a prerequisite for the s390 large page support.This won't affect other architectures in functionality, but I need to add some
new dummy inline functions to the headers.Acked-by: Martin Schwidefsky
Signed-off-by: Gerald Schaefer
Cc: Paul Mundt
Cc: "Luck, Tony"
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "David S. Miller"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A cow break on a hugetlbfs page with page_count > 1 will set a new pte with
set_huge_pte_at(), w/o any tlb flush operation. The old pte will remain in
the tlb and subsequent write access to the page will result in a page fault
loop, for as long as it may take until the tlb is flushed from somewhere else.
This patch introduces an architecture-specific huge_ptep_clear_flush()
function, which is called before the the set_huge_pte_at() in hugetlb_cow().ATTENTION: This is just a nop on all architectures for now, the s390
implementation will come with our large page patch later. Other architectures
should define their own huge_ptep_clear_flush() if needed.Acked-by: Martin Schwidefsky
Signed-off-by: Gerald Schaefer
Cc: Paul Mundt
Cc: "Luck, Tony"
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "David S. Miller"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch moves all architecture functions for hugetlb to architecture header
files (include/asm-foo/hugetlb.h) and converts all macros to inline functions.
It also removes (!) ARCH_HAS_HUGEPAGE_ONLY_RANGE,
ARCH_HAS_HUGETLB_FREE_PGD_RANGE, ARCH_HAS_PREPARE_HUGEPAGE_RANGE,
ARCH_HAS_SETCLEAR_HUGE_PTE and ARCH_HAS_HUGETLB_PREFAULT_HOOK.Getting rid of the ARCH_HAS_xxx #ifdef and macro fugliness should increase
readability and maintainability, at the price of some code duplication. An
asm-generic common part would have reduced the loc, but we would end up with
new ARCH_HAS_xxx defines eventually.Acked-by: Martin Schwidefsky
Signed-off-by: Gerald Schaefer
Cc: Paul Mundt
Cc: "Luck, Tony"
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "David S. Miller"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
s390 for one, cannot implement VM_MIXEDMAP with pfn_valid, due to their memory
model (which is more dynamic than most). Instead, they had proposed to
implement it with an additional path through vm_normal_page(), using a bit in
the pte to determine whether or not the page should be refcounted:vm_normal_page()
{
...
if (unlikely(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))) {
if (vma->vm_flags & VM_MIXEDMAP) {
#ifdef s390
if (!mixedmap_refcount_pte(pte))
return NULL;
#else
if (!pfn_valid(pfn))
return NULL;
#endif
goto out;
}
...
}This is fine, however if we are allowed to use a bit in the pte to determine
refcountedness, we can use that to _completely_ replace all the vma based
schemes. So instead of adding more cases to the already complex vma-based
scheme, we can have a clearly seperate and simple pte-based scheme (and get
slightly better code generation in the process):vm_normal_page()
{
#ifdef s390
if (!mixedmap_refcount_pte(pte))
return NULL;
return pte_page(pte);
#else
...
#endif
}And finally, we may rather make this concept usable by any architecture rather
than making it s390 only, so implement a new type of pte state for this.
Unfortunately the old vma based code must stay, because some architectures may
not be able to spare pte bits. This makes vm_normal_page a little bit more
ugly than we would like, but the 2 cases are clearly seperate.So introduce a pte_special pte state, and use it in mm/memory.c. It is
currently a noop for all architectures, so this doesn't actually result in any
compiled code changes to mm/memory.o.BTW:
I haven't put vm_normal_page() into arch code as-per an earlier suggestion.
The reason is that, regardless of where vm_normal_page is actually
implemented, the *abstraction* is still exactly the same. Also, while it
depends on whether the architecture has pte_special or not, that is the
only two possible cases, and it really isn't an arch specific function --
the role of the arch code should be to provide primitive functions and
accessors with which to build the core code; pte_special does that. We do
not want architectures to know or care about vm_normal_page itself, and
we definitely don't want them being able to invent something new there
out of sight of mm/ code. If we made vm_normal_page an arch function, then
we have to make vm_insert_mixed (next patch) an arch function too. So I
don't think moving it to arch code fundamentally improves any abstractions,
while it does practically make the code more difficult to follow, for both
mm and arch developers, and easier to misuse.[akpm@linux-foundation.org: build fix]
Signed-off-by: Nick Piggin
Acked-by: Carsten Otte
Cc: Jared Hulbert
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Apr, 2008
4 commits
-
We wish to export it to userspace, so move it into the kvm namespace.
Signed-off-by: Avi Kivity
-
Three header files are added:
asm-ia64/kvm.h
asm-ia64/kvm_host.h
asm-ia64/kvm_para.hSigned-off-by: Xiantao Zhang
Signed-off-by: Avi Kivity -
Register structures are defined per SDM.
Add three small routines for kernel:
ia64_ttag, ia64_loadrs, ia64_flushrsSigned-off-by: Xiantao Zhang
Signed-off-by: Avi Kivity -
Implement __fls on all 64-bit archs:
alpha has an implementation of fls64.
Added __fls(x) = fls64(x) - 1.ia64 has fls, but not __fls.
Added __fls based on code of fls.mips and powerpc have __ilog2, which is the same as __fls.
Added __fls = __ilog2.parisc, s390, sh and sparc64:
Include generic __fls.x86_64 already has __fls.
Signed-off-by: Alexander van Heukelum
Signed-off-by: Ingo Molnar
23 Apr, 2008
1 commit
-
Move XPC and XPNET from arch/ia64/sn/kernel to drivers/misc/sgi-xp.
Signed-off-by: Dean Nelson
Signed-off-by: Tony Luck
22 Apr, 2008
2 commits
-
There are many notify_die() and almost all take same style with
ia64_mca_spin(). This patch defines macros and replace them all,
to reduce lines and to improve readability.Signed-off-by: Hidetoshi Seto
Signed-off-by: Tony Luck -
* 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc:
Deprecate the asm/semaphore.h files in feature-removal-schedule.
Convert asm/semaphore.h users to linux/semaphore.h
security: Remove unnecessary inclusions of asm/semaphore.h
lib: Remove unnecessary inclusions of asm/semaphore.h
kernel: Remove unnecessary inclusions of asm/semaphore.h
include: Remove unnecessary inclusions of asm/semaphore.h
fs: Remove unnecessary inclusions of asm/semaphore.h
drivers: Remove unnecessary inclusions of asm/semaphore.h
net: Remove unnecessary inclusions of asm/semaphore.h
arch: Remove unnecessary inclusions of asm/semaphore.h
20 Apr, 2008
2 commits
-
[rebased for sched-devel/latest]
- Add a new cpuset file, having levels:
sched_relax_domain_level- Modify partition_sched_domains() and build_sched_domains()
to take attributes parameter passed from cpuset.- Fill newidle_idx for node domains which currently unused but
might be required if sched_relax_domain_level become higher.- We can change the default level by boot option 'relax_domain_level='.
Signed-off-by: Hidetoshi Seto
Signed-off-by: Ingo Molnar -
Create a simple macro to always return a pointer to the node_to_cpumask(node)
value. This relies on compiler optimization to remove the extra indirection:#define node_to_cpumask_ptr(v, node) \
cpumask_t _##v = node_to_cpumask(node), *v = &_##vFor those systems with a large cpumask size, then a true pointer
to the array element can be used:#define node_to_cpumask_ptr(v, node) \
cpumask_t *v = &(node_to_cpumask_map[node])A node_to_cpumask_ptr_next() macro is provided to access another
node_to_cpumask value.The other change is to always include asm-generic/topology.h moving the
ifdef CONFIG_NUMA to this same file.Note: there are no references to either of these new macros in this patch,
only the definition.Based on 2.6.25-rc5-mm1
# alpha
Cc: Richard Henderson# fujitsu
Cc: David Howells# ia64
Cc: Tony Luck# powerpc
Cc: Paul Mackerras
Cc: Anton Blanchard# sparc
Cc: David S. Miller
Cc: William L. Irwin# x86
Cc: H. Peter AnvinSigned-off-by: Mike Travis
Signed-off-by: Ingo Molnar
19 Apr, 2008
2 commits
-
None of these files use any of the functionality promised by
asm/semaphore.h. It's possible that they (or some user of them) rely
on it dragging in some unrelated header file, but I can't build all
these files, so we'll have to fix any build failures as they come up.Signed-off-by: Matthew Wilcox
-
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: (27 commits)
[IA64] kdump: Add crash_save_vmcoreinfo for INIT
[IA64] Fix NUMA configuration issue
[IA64] Itanium Spec updates
[IA64] Untangle sync_icache_dcache() page size determination
[IA64] arch/ia64/kernel/: use time_* macros
[IA64] remove redundant display of free swap space in show_mem()
[IA64] make IOMMU respect the segment boundary limits
[IA64] kprobes: kprobe-booster for ia64
[IA64] fix getpid and set_tid_address fast system calls for pid namespaces
[IA64] Replace explicit jiffies tests with time_* macros.
[IA64] use goto to jump out do/while_each_thread
[IA64] Fix unlock ordering in smp_callin
[IA64] pgd_offset() constfication.
[IA64] kdump: crash.c coding style fix
[IA64] kdump: add kdump_on_fatal_mca
[IA64] Minimize per_cpu reservations.
[IA64] Correct pernodesize calculation.
[IA64] Kernel parameter for max number of concurrent global TLB purges
[IA64] Multiple outstanding ptc.g instruction support
[IA64] Implement smp_call_function_mask for ia64
...
18 Apr, 2008
10 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (58 commits)
ide: remove ide_init_default_irq() macro
ide: move default IDE ports setup to ide_generic host driver
ide: remove obsoleted "idex=noprobe" kernel parameter (take 2)
ide: remove needless hwif->irq check from ide_hwif_configure()
ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers
ide: limit legacy VLB host drivers to alpha, x86 and mips
cmd640: init hwif->{io_ports,irq} explicitly
cmd640: cleanup setup_device_ptrs()
ide: add ide-4drives host driver (take 3)
ide: remove ppc ifdef from init_ide_data()
ide: remove ide_default_io_ctl() macro
ide: remove CONFIG_IDE_ARCH_OBSOLETE_INIT
ide: add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS (take 2)
ppc/pmac: remove no longer needed IDE quirk
ppc: don't include
ppc: remove ppc_ide_md
ppc/pplus: remove ppc_ide_md.ide_init_hwif hook
ppc/sandpoint: remove ppc_ide_md hooks
ppc/lopec: remove ppc_ide_md hooks
ppc/mpc8xx: remove ppc_ide_md hooks
... -
* Use ide_default_irq() instead of ide_init_default_irq() in
ide_generic host driver (so the correct IRQ is always set
regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI).* Remove no longer needed ide_init_default_irq() macro.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
It is always == '((base) + 0x206)' if CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y
and it is not needed otherwise (arm, blackfin, parisc, ppc64, sh, sparc[64]).Signed-off-by: Bartlomiej Zolnierkiewicz
-
* Add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS to drivers/ide/Kconfig and use
it instead of defining IDE_ARCH_OBSOLETE_DEFAULTS in .v2:
* Define ide_default_irq() in ide-probe.c/ns87415.c if not already defined
and drop defining ide_default_irq() for CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=n.[ Thanks to Stephen Rothwell and David Miller for noticing the problem. ]
Cc: Stephen Rothwell
Cc: David Miller
Signed-off-by: Bartlomiej Zolnierkiewicz -
Conflicts:
arch/ia64/kernel/mca.c
-
Conflicts:
arch/ia64/mm/tlb.c
17 Apr, 2008
1 commit
-
Semaphores are no longer performance-critical, so a generic C
implementation is better for maintainability, debuggability and
extensibility. Thanks to Peter Zijlstra for fixing the lockdep
warning. Thanks to Harvey Harrison for pointing out that the
unlikely() was unnecessary.Signed-off-by: Matthew Wilcox
Acked-by: Ingo Molnar
12 Apr, 2008
1 commit
-
There is a NUMA memory configuration issue in 2.6.24:
A 2-node machine of ours has got the following memory layout:
Node 0: 0 - 2 Gbytes
Node 0: 4 - 8 Gbytes
Node 1: 8 - 16 Gbytes
Node 0: 16 - 18 Gbytes"efi_memmap_init()" merges the three last ranges into one.
"register_active_ranges()" is called as follows:
efi_memmap_walk(register_active_ranges, NULL);
i.e. once for the 4 - 18 Gbytes range. It picks up the node
number from the start address, and registers all the memory for
the node #0."register_active_ranges()" should be called as follows to
make sure there is no merged address range at its entry:efi_memmap_walk(filter_memory, register_active_ranges);
"filter_memory()" is similar to "filter_rsvd_memory()",
but the reserved memory ranges are not filtered out.Signed-off-by: Zoltan Menyhart
Signed-off-by: Tony Luck
10 Apr, 2008
3 commits
-
Updates based on the "Intel® Itanium® Architecture Software Developer's Manual
Specification Update October 2007".http://download.intel.com/design/itanium/specupdt/24869911.pdf
Signed-off-by: Russ Anderson
Signed-off-by: Tony Luck -
Add kprobe-booster support on ia64.
Kprobe-booster improves the performance of kprobes by eliminating single-step,
where possible. Currently, kprobe-booster is implemented on x86 and x86-64.
This is an ia64 port.On ia64, kprobe-booster executes a copied bundle directly, instead of single
stepping. Bundles which have B or X unit and which may cause an exception
(including break) are not executed directly. And also, to prevent hitting
break exceptions on the copied bundle, only the hindmost kprobe is executed
directly if several kprobes share a bundle and are placed in different slots.
Note: set_brl_inst() is used for preparing an instruction buffer(it does not
modify any active code), so it does not need any atomic operation.Signed-off-by: Masami Hiramatsu
Cc: Anil S Keshavamurthy
Cc: Ananth N Mavinakayanahalli
Cc: bibo,mao
Cc: Rusty Lynch
Cc: Prasanna S Panchamukhi
Cc: Jim Keniston
Cc: Shaohua Li
Signed-off-by: Andrew Morton
Signed-off-by: Tony Luck -
when compile 2.6.25-rc8-mm1, below warning happend.
because walk_page_range pass argument as "const struct mm*",
but pgd_offset() receive as "struct mm*".CC mm/pagewalk.o
mm/pagewalk.c: In function 'walk_page_range':
mm/pagewalk.c:111: warning: passing argument 1 of 'pgd_offset' discards qualifiers from pointer target typeSigned-off-by: KOSAKI Motohiro
Signed-off-by: Tony Luck
09 Apr, 2008
1 commit
-
This attached patch significantly shrinks boot memory allocation on ia64.
It does this by not allocating per_cpu areas for cpus that can never
exist.In the case where acpi does not have any numa node description of the
cpus, I defaulted to assigning the first 32 round-robin on the known
nodes.. For the !CONFIG_ACPI I used for_each_possible_cpu().Signed-off-by: Robin Holt
Signed-off-by: Tony Luck
05 Apr, 2008
2 commits
-
The patch defines kernel parameter "nptcg=". The parameter overrides max number
of concurrent global TLB purges which is reported from either PAL_VM_SUMMARY or
SAL PALO.Signed-off-by: Fenghua Yu
Signed-off-by: Tony Luck -
According to SDM2.2, Itanium supports multiple outstanding ptc.g instructions.
But current kernel function ia64_global_tlb_purge() uses a spinlock to serialize
ptc.g instructions issued by multiple processors. This serialization might have
scalability issue on a big SMP machine where many processors could purge TLB
in parallel.The patch fixes this problem by issuing multiple ptc.g instructions in
ia64_global_tlb_purge(). It also adds support for the "PALO" table to get
a platform view of the max number of outstanding ptc.g instructions (which
may be different from the processor view found from PAL_VM_SUMMARY).PALO specification can be found at: http://www.dig64.org/home/DIG64_PALO_R1_0.pdf
spinaphore implementation by Matthew Wilcox.
Signed-off-by: Fenghua Yu
Signed-off-by: Tony Luck
04 Apr, 2008
2 commits
-
This interface provides more flexible functionality for smp
infrastructure ... e.g. KVM frequently needs to operate on
a subset of cpus.Signed-off-by: Xiantao Zhang
Signed-off-by: Tony Luck -
Dynamic TR resource should be managed in the uniform way.
Add two interfaces for kernel:
ia64_itr_entry: Allocate a (pair of) TR for caller.
ia64_ptr_entry: Purge a (pair of ) TR by caller.Signed-off-by: Xiantao Zhang
Signed-off-by: Anthony Xu
Signed-off-by: Tony Luck
03 Apr, 2008
1 commit
-
Currently include/linux/kvm.h is not considered by make headers_install,
because Kbuild cannot handle " unifdef-$(CONFIG_FOO) += foo.h. This problem
was introduced bycommit fb56dbb31c4738a3918db81fd24da732ce3b4ae6
Author: Avi Kivity
Date: Sun Dec 2 10:50:06 2007 +0200KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM
Currently, make headers_check barfs due to , which
includes, not existing. Rather than add a zillion s, export kvm.
only if the arch actually supports it.Signed-off-by: Avi Kivity
which makes this an 2.6.25 regression.
One way of solving the issue is to enhance Kbuild, but Avi and David conviced
me, that changing headers_install is not the way to go. This patch changes
the definition for linux/kvm.h to unifdef-y.If unifdef-y is used for linux/kvm.h "make headers_check" will fail on all
architectures without asm/kvm.h. Therefore, this patch also provides
asm/kvm.h on all architectures.Signed-off-by: Christian Borntraeger
Acked-by: Avi Kivity
Cc: Sam Ravnborg
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Mar, 2008
2 commits
-
After we have regset support, we can use CORE_DUMP_USE_REGSET.
Signed-off-by: Shaohua Li
Signed-off-by: Tony Luck -
This is the 64-bit regset implementation under IA64. Basically register
read/write, which is derived from current ptrace register read/write.Signed-off-by: Shaohua Li
Signed-off-by: Tony Luck
07 Mar, 2008
1 commit
-
ia64 named their handler kprobes_fault_handler while all other
arches used kprobe_fault_handler. Change the function definition
and header declaration.Signed-off-by: Harvey Harrison
Signed-off-by: Tony Luck