17 Oct, 2007
8 commits
-
Introduce architecture dependent kretprobe blacklists to prohibit users
from inserting return probes on the function in which kprobes can be
inserted but kretprobes can not.This patch also removes "__kprobes" mark from "__switch_to" on x86_64 and
registers "__switch_to" to the blacklist on x86-64, because that mark is to
prohibit user from inserting only kretprobe.Signed-off-by: Masami Hiramatsu
Cc: Prasanna S Panchamukhi
Acked-by: Ananth N Mavinakayanahalli
Cc: Anil S Keshavamurthy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Now, arch dependent code around CONFIG_MEMORY_HOTREMOVE is a mess.
This patch cleans up them. This is against 2.6.23-rc6-mm1.- fix compile failure on ia64/ CONFIG_MEMORY_HOTPLUG && !CONFIG_MEMORY_HOTREMOVE case.
- For !CONFIG_MEMORY_HOTREMOVE, add generic no-op remove_memory(),
which returns -EINVAL.
- removed remove_pages() only used in powerpc.
- removed no-op remove_memory() in i386, sh, sparc64, x86_64.- only powerpc returns -ENOSYS at memory hot remove(no-op). changes it
to return -EINVAL.Note:
Currently, only ia64 supports CONFIG_MEMORY_HOTREMOVE. I welcome other
archs if there are requirements and testers.Signed-off-by: KAMEZAWA Hiroyuki
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We have had complaints where a threaded application is left in a bad state
after one of it's threads is killed when we hit a VM: out_of_memory
condition.Killing just one of the process threads can leave the application in a bad
state, whereas killing the entire process group would allow for the
application to restart, or be otherwise handled, and makes it very obvious
that something has gone wrong.This change allows the entire process group to be taken down, rather
than just the one thread.Signed-off-by: Will Schmidt
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Russell King
Cc: Ian Molton
Cc: Haavard Skinnemoen
Cc: Mikael Starvik
Cc: David Howells
Cc: Andi Kleen
Cc: "Luck, Tony"
Cc: Hirokazu Takata
Cc: Geert Uytterhoeven
Cc: Roman Zippel
Cc: Ralf Baechle
Cc: Kyle McMartin
Cc: Matthew Wilcox
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: Heiko Carstens
Cc: Martin Schwidefsky
Cc: Paul Mundt
Cc: Kazumoto Kojima
Cc: Richard Curnow
Cc: William Lee Irwin III
Cc: "David S. Miller"
Cc: Chris Zankel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
x86_64 uses 2M page table entries to map its 1-1 kernel space. We also
implement the virtual memmap using 2M page table entries. So there is no
additional runtime overhead over FLATMEM, initialisation is slightly more
complex. As FLATMEM still references memory to obtain the mem_map pointer and
SPARSEMEM_VMEMMAP uses a compile time constant, SPARSEMEM_VMEMMAP should be
superior.With this SPARSEMEM becomes the most efficient way of handling virt_to_page,
pfn_to_page and friends for UP, SMP and NUMA on x86_64.[apw@shadowen.org: code resplit, style fixups]
[apw@shadowen.org: vmemmap x86_64: ensure end of section memmap is initialised]
Signed-off-by: Christoph Lameter
Signed-off-by: Andy Whitcroft
Acked-by: Mel Gorman
Cc: Andi Kleen
Cc: KAMEZAWA Hiroyuki
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
x86(-64) are the last architectures still using the page fault notifier
cruft for the kprobes page fault hook. This patch converts them to the
proper direct calls, and removes the now unused pagefault notifier bits
aswell as the cruft in kprobes.c that was related to this mess.I know Andi didn't really like this, but all other architecture maintainers
agreed the direct calls are much better and besides the obvious cruft
removal a common way of dealing with kprobes across architectures is
important aswell.[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix sparc64]
Signed-off-by: Christoph Hellwig
Cc: Andi Kleen
Cc:
Cc: Prasanna S Panchamukhi
Cc: Ananth N Mavinakayanahalli
Cc: Anil S Keshavamurthy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Convert cpu_sibling_map from a static array sized by NR_CPUS to a per_cpu
variable. This saves sizeof(cpumask_t) * NR unused cpus. Access is mostly
from startup and CPU HOTPLUG functions.Signed-off-by: Mike Travis
Cc: Andi Kleen
Cc: Christoph Lameter
Cc: "Siddha, Suresh B"
Cc: "David S. Miller"
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: "Luck, Tony"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This is from an earlier message from 'Christoph Lameter':
cpu_core_map is currently an array defined using NR_CPUS. This means that
we overallocate since we will rarely really use maximum configured cpu.If we put the cpu_core_map into the per cpu area then it will be allocated
for each processor as it comes online.This means that the core map cannot be accessed until the per cpu area
has been allocated. Xen does a weird thing here looping over all processors
and zeroing the masks that are not yet allocated and that will be zeroed
when they are allocated. I commented the code out.Signed-off-by: Christoph Lameter
Signed-off-by: Mike Travis
Cc: Andi Kleen
Cc: Christoph Lameter
Cc: "Siddha, Suresh B"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Identical handlers of PTRACE_DETACH go into ptrace_request().
Not touching compat code.
Not touching archs that don't call ptrace_request.Signed-off-by: Alexey Dobriyan
Acked-by: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Oct, 2007
4 commits
-
The 64bit SMP bootup is slightly different to the 32bit one. It enables
the boot CPU local APIC timer before all CPUs are brought up. Some AMD C1E
systems have the C1E feature flag only set in the secondary CPU. Due to
the early enable of the boot CPU local APIC timer the APIC timer is
registered as a fully functional device. When we detect the wreckage during
the bringup of the secondary CPU, we need to force the boot CPU into
broadcast mode.Check the C1E caused APIC timer disable, when the secondary APIC timer is
initialized. If the boot CPU APIC timer was registered as a functional
clock event device, then fix this up and utilize the
CLOCK_EVT_NOTIFY_BROADCAST_FORCE mechanism to force the already
registered boot CPU APIC timer into broadcast mode.Tested by force injecting the failure mode.
Signed-off-by: Thomas Gleixner
-
Preparatory patch for the AMD C1E wreckage fixup.
Signed-off-by: Thomas Gleixner
-
> Maybe I just picked a bad time to try, but...
>
> arch/x86/kernel/alternative.c: In function 'apply_alternatives':
> arch/x86/kernel/alternative.c:191: error: 'VSYSCALL_START' undeclared (first use in this function)
> arch/x86/kernel/alternative.c:191: error: (Each undeclared identifier is reported only once
> arch/x86/kernel/alternative.c:191: error: for each function it appears in.)
> arch/x86/kernel/alternative.c:191: error: 'VSYSCALL_END' undeclared (first use in this function)
> make[1]: *** [arch/x86/kernel/alternative.o] Error 1
> make: *** [arch/x86/kernel] Error 2Try this.
Include missing header for vsyscall.
Signed-off-by: Dave Jones
Signed-off-by: Thomas Gleixner -
deal with signedness of the stuff passed to set_bit() et.al.
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
14 Oct, 2007
1 commit
-
Since the x86 merge, lots of files that referenced their own filenames
are no longer correct. Rather than keep them up to date, just delete
them, as they add no real value.Additionally:
- fix up comment formatting in scx200_32.c
- Remove a credit from myself in setup_64.c from a time when we had no SCM
- remove longwinded history from tsc_32.c which can be figured out from
git.Signed-off-by: Dave Jones
Signed-off-by: Linus Torvalds
13 Oct, 2007
24 commits
-
Fix DMI const-ification fallout that appeared when merging subsystem
trees.Signed-off-by: Jeff Garzik
Signed-off-by: Linus Torvalds -
movnt* instructions are not strongly ordered with respect to other stores,
so if we are to assume stores are strongly ordered in the rest of the 64
bit code, we must fence these off (see similar examples in 32 bit code).[ The AMD memory ordering document seems to say that nontemporal stores can
also pass earlier regular stores, so maybe we need sfences _before_
movnt* everywhere too? ]Signed-off-by: Nick Piggin
Signed-off-by: Linus Torvalds -
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (37 commits)
PCI: merge almost all of pci_32.h and pci_64.h together
PCI: X86: Introduce and enable PCI domain support
PCI: Add 'nodomains' boot option, and pci_domains_supported global
PCI: modify PCI bridge control ISA flag for clarity
PCI: use _CRS for PCI resource allocation
PCI: avoid P2P prefetch window for expansion ROMs
PCI: skip ISA ioresource alignment on some systems
PCI: remove transparent bridge sizing
pci: write file size to inode on proc bus file write
pci: use size stored in proc_dir_entry for proc bus files
pci: implement "pci=noaer"
PCI: fix IDE legacy mode resources
MSI: Use correct data offset for 32-bit MSI in read_msi_msg()
PCI: Fix incorrect argument order to list_add_tail() in PCI dynamic ID code
PCI: i386: Compaq EVO N800c needs PCI bus renumbering
PCI: Remove no longer correct documentation regarding MSI vector assignment
PCI: re-enable onboard sound on "MSI K8T Neo2-FIR"
PCI: quirk_vt82c586_acpi: Omit reading PCI revision ID
PCI: quirk amd_8131_mmrbc: Omit reading pci revision ID
cpqphp: Use PCI_CLASS_REVISION instead of PCI_REVISION_ID for read
... -
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] Don't take semaphore in cpufreq_quick_get()
[CPUFREQ] Support different families in fid/did to frequency conversion
[CPUFREQ] cpufreq_stats: misc cpuinit section annotations
[CPUFREQ] implement !CONFIG_CPU_FREQ stub for cpufreq_unregister_notifier()
[CPUFREQ] mark hotplug notifier callback as __cpuinit
[CPUFREQ] Only check for transition latency on problematic governors (kconfig fix)
[CPUFREQ] allow ondemand and conservative cpufreq governors to be used as default
[CPUFREQ] move policy's governor initialisation out of low-level drivers into cpufreq core
[CPUFREQ] Longhaul - Add support for PM133 northbridge
[CPUFREQ] x86: use num_online_nodes to get physical cpus numbers for -
* fix bug in pci_read() and pci_write() which prevented PCI domain
support from working (hardcoded domain 0).* unconditionally enable CONFIG_PCI_DOMAINS
* implement pci_domain_nr() and pci_proc_domain(), as required of
all arches when CONFIG_PCI_DOMAINS is enabled.* store domain in struct pci_sysdata, as assigned by ACPI
* support "pci=nodomains"
Signed-off-by: Jeff Garzik
Cc: Andi Kleen
Signed-off-by: Greg Kroah-Hartman -
Modify PCI Bridge Control ISA flag for clarity
This patch changes PCI_BRIDGE_CTL_NO_ISA to PCI_BRIDGE_CTL_ISA
and modifies it's clarifying comment and locations where used.
The change reduces the chance of future confusion since it makes
the set/unset meaning of the bit the same in both the bridge
control register and bridge_ctl field of the pci_bus struct.Signed-off-by: Gary Hade
Acked-by: Linas Vepstas
Cc: Ivan Kokshaysky
Signed-off-by: Greg Kroah-Hartman -
Use _CRS for PCI resource allocation
This patch resolves an issue where incorrect PCI memory and i/o ranges
are being assigned to hotplugged PCI devices on some IBM systems. The
resource mis-allocation not only makes the PCI device unuseable but
often makes the entire system unuseable due to resulting machine checks.The hotplug capable PCI slots on the affected systems are not located
under a standard P2P bridge but are instead located under PCI root
bridges or subtractive decode P2P bridges. For example, the IBM x3850
contains 2 hotplug capable PCI-X slots and 4 hotplug capable PCIe slots
with the PCI-X slots each located under a PCI root bridge and the PCIe
slots each located under a subtractive decode P2P bridge.The current i386/x86_64 PCI resource allocation code does not use _CRS
returned resource information. No other resource information source is
available for slots that are not below a standard P2P bridge so
incorrect ranges are being allocated from e820 hole causing the bad
result.This patch causes the kernel to use _CRS returned resource info. It is
roughly based on a change provided by Matthew Wilcox for the ia64 kernel
in 2005. Due to possible buggy BIOS factor and possible yet to be
discovered kernel issues the function is disabled by default and can be
enabled with pci=use_crs.Signed-off-by: Gary Hade
Signed-off-by: Greg Kroah-Hartman -
Skip ISA ioresource alignment on some systems
To conserve limited PCI i/o resource on some IBM multi-node systems, the
BIOS allocates (via _CRS) and expects the kernel to use addresses in
ranges currently excluded by pcibios_align_resource() [i386/pci/i386.c].
This change allows the kernel to use the currently excluded address
ranges on the IBM x3800, x3850, and x3950.Signed-off-by: Gary Hade
Signed-off-by: Greg Kroah-Hartman -
Force PCI bus renumbering for Compaq EVO N800c laptop, in order to get
the cardbus slot recognised.Signed-off-by: Juha Laiho
Signed-off-by: Greg Kroah-Hartman -
On the "MSI K8T Neo2-FIR" board the BIOS disables the onboard
soundcard, if a second PCI soundcard is present.This patch sets the korrect register bit to enable the onboard sound.
Removed old code in /drivers/pci/quirks.c that only checks for the
PCI-ID and fires on any Board with VIA 8237.New code in /arch/i386/pci/fixup.c checks the DMI-tables and only runs
on the specific board.Signed-off-by: Johannes Goecke
Acked-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
Add support for PicoPower PT86C523 IRQ router to be used with the in-kernel
yenta driver for CardBus. With this patch cardbus works on e.g. Dell
Latitude XPi P150CD.Initial patch for kernel 2.4 series by Sune Mølgaard
http://molgaard.org/code/linux-2.4.31-picopower.patchPorted to 2.6.20 by Chmouel Boudjnah (http://www.chmouel.com)
Testing and confirmation that it works by Austin Acton
Cleaned up a little for inclusion in a 2.6.21-rc7 based kernel.
Added some more cleanups according to CodingStyle, as noted by
Randy Dunlap on LKML.[akpm@linux-foundation.org: build fixes]
Signed-off-by: Thomas Backlund
Cc: Andi Kleen
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman -
The following calltrace is possible now:
handle_sysrq
machine_emergency_restart
mach_reboot_fixups
pci_get_device
pci_get_subsys
down_read
The patch skips reboot fixup if called from sysrq-B code.Signed-off-by: Denis V. Lunev
Signed-off-by: Greg Kroah-Hartman -
On at least ARM (and I'm told MIPS too) dma_free_coherent() has a newish
call context requirement: unlike its dma_alloc_coherent() sibling, it may
not be called with IRQs disabled. (This was new behavior on ARM as of late
2005, caused by ARM SMP updates.) This little surprise can be annoyingly
driver-visible.Since it looks like that restriction won't be removed, this patch changes
the definition of the API to include that requirement. Also, to help catch
nonportable drivers, it updates the x86 and swiotlb versions to include the
relevant warnings. (I already observed that it trips on the
bus_reset_tasklet of the new firewire_ohci driver.)Signed-off-by: David Brownell
Cc: David Miller
Acked-by: Russell King
Cc: Andi Kleen
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman -
Add another PCI ID for ICH7 force hpet.
Signed-off-by: Venkatesh Pallipadi
Cc: Andi Kleen
Cc: john stultz
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Ingo Molnar
Signed-off-by: Thomas Gleixner
Signed-off-by: Arjan van de Ven -
A bugfix in ich5 hpet force detect which caused resumes to fail. Thanks to
Udo A Steinberg for reporting the problem.Signed-off-by: Venkatesh Pallipadi
Cc: Andi Kleen
Cc: john stultz
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Ingo Molnar
Signed-off-by: Arjan van de Ven
Signed-off-by: Thomas Gleixner -
force_enable hpet for ICH5.
[ Build fixes from Andrew Morton ]
Signed-off-by: Venkatesh Pallipadi
Cc: Andi Kleen
Cc: john stultz
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Ingo Molnar
Signed-off-by: Arjan van de Ven
Signed-off-by: Thomas Gleixner -
Enable HPET later during boot, after the force detect in PCI quirks. Also add
a call to repeat the force enabling at resume time.Signed-off-by: Venkatesh Pallipadi
Cc: Andi Kleen
Cc: john stultz
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Ingo Molnar
Signed-off-by: Arjan van de Ven
Signed-off-by: Thomas Gleixner -
Force detect and/or enable HPET on ICH chipsets. This patch just handles the
detection part and following patches use this information. Adds a function to
repeat the force enabling during resume time.Using HPET this way, instead of PIT increases the time CPUs can reside in
C-state when system is totally idle. On my test system with Core 2 Duo,
average C-state residency goes up from ~20mS to ~80mS.[ Build fixed from Andrew Morton ]
Signed-off-by: Venkatesh Pallipadi
Cc: Andi Kleen
Cc: john stultz
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Ingo Molnar
Signed-off-by: Arjan van de Ven
Signed-off-by: Thomas Gleixner -
Restructure and rename legacy replacement mode HPET timer support. Just the
code structural changes and should be zero functionality change.Signed-off-by: Venkatesh Pallipadi
Cc: Andi Kleen
Cc: john stultz
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Ingo Molnar
Signed-off-by: Arjan van de Ven
Signed-off-by: Thomas Gleixner -
Remove hpet_readl/writel from vsyscall.h, where it does not belong
anyway. Use the hpet code itself.Signed-off-by: Chris Wright
Signed-off-by: Ingo Molnar
Signed-off-by: Thomas Gleixner
Signed-off-by: Arjan van de Ven -
Make variables static.
Signed-off-by: Chris Wright
Signed-off-by: Ingo Molnar
Signed-off-by: Arjan van de Ven
Signed-off-by: Thomas Gleixner -
Remove the unused code after the switch to clock events.
Signed-off-by: Thomas Gleixner
Signed-off-by: Chris Wright
Signed-off-by: Ingo Molnar
Signed-off-by: Arjan van de Ven -
Combine the timex.h variants and move the TSC related code into tsc.h.
Move the set_cyc2ns_scale() call into the tsc calibraction code, where
it belongs.Signed-off-by: Thomas Gleixner
Signed-off-by: Arjan van de Ven -
Useless header file with 32 bit and 64 bit variants. Move the
single useful line to the place where it is used.Signed-off-by: Thomas Gleixner
Signed-off-by: Ingo Molnar
Signed-off-by: Arjan van de Ven
12 Oct, 2007
3 commits
-
kprobes disables irqs for jprobes, but does not tell lockdep about it.
This resolves this warning during an allyesconfig bzImage bootup test:
[ 423.670337] WARNING: at kernel/lockdep.c:2658 check_flags()
[ 423.670341] [] show_trace_log_lvl+0x19/0x2e
[ 423.670348] [] show_trace+0x12/0x14
[ 423.670350] [] dump_stack+0x14/0x16
[ 423.670353] [] check_flags+0x95/0x142
[ 423.670357] [] lock_acquire+0x52/0xb8
[ 423.670360] [] _spin_lock+0x2e/0x58
[ 423.670365] [] jtcp_rcv_established+0x6e/0x189
[ 423.670369] [] tcp_v4_do_rcv+0x30b/0x620
[ 423.670373] [] tcp_v4_rcv+0x89d/0x8fa
[ 423.670376] [] ip_local_deliver+0x17d/0x225
[ 423.670380] [] ip_rcv+0x493/0x4ce
[ 423.670383] [] netif_receive_skb+0x347/0x365
[ 423.670388] [] nv_napi_poll+0x501/0x6c3
[ 423.670393] [] net_rx_action+0xa3/0x1b6
[ 423.670396] [] __do_softirq+0x76/0xfb
[ 423.670400] [] do_softirq+0x75/0xf3[ akpm: checkpatch.pl cleanups ]
Cc: Prasanna S Panchamukhi
Cc: Ananth N Mavinakayanahalli
Cc: Anil S Keshavamurthy
Cc: David S. Miller
Signed-off-by: Peter Zijlstra
Signed-off-by: Ingo Molnar
Signed-off-by: Andrew Morton -
Run the lockdep_sys_exit hook after all other C code on the syscall
return path.Signed-off-by: Peter Zijlstra
Signed-off-by: Ingo Molnar -
Run the lockdep_sys_exit hook after all other C code on the syscall
return path.Signed-off-by: Peter Zijlstra
Signed-off-by: Ingo Molnar