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 git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (890 commits) x86: fix nodemap_size according to nodeid bits x86: fix overlap between pagetable with bss section x86: add PCI IDs to k8topology_64.c x86: fix early_ioremap pagetable ops x86: use the same pgd_list for PAE and 64-bit x86: defer cr3 reload when doing pud_clear() x86: early boot debugging via FireWire (ohci1394_dma=early) x86: don't special-case pmd allocations as much x86: shrink some ifdefs in fault.c x86: ignore spurious faults x86: remove nx_enabled from fault.c x86: unify fault_32|64.c x86: unify fault_32|64.c with ifdefs x86: unify fault_32|64.c by ifdef'd function bodies x86: arch/x86/mm/init_32.c printk fixes x86: arch/x86/mm/init_32.c cleanup x86: arch/x86/mm/init_64.c printk fixes x86: unify ioremap x86: fixes some bugs about EFI memory map handling x86: use reboot_type on EFI 32 ...
This commit is contained in:
@@ -0,0 +1,179 @@
|
||||
|
||||
Using physical DMA provided by OHCI-1394 FireWire controllers for debugging
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Basically all FireWire controllers which are in use today are compliant
|
||||
to the OHCI-1394 specification which defines the controller to be a PCI
|
||||
bus master which uses DMA to offload data transfers from the CPU and has
|
||||
a "Physical Response Unit" which executes specific requests by employing
|
||||
PCI-Bus master DMA after applying filters defined by the OHCI-1394 driver.
|
||||
|
||||
Once properly configured, remote machines can send these requests to
|
||||
ask the OHCI-1394 controller to perform read and write requests on
|
||||
physical system memory and, for read requests, send the result of
|
||||
the physical memory read back to the requester.
|
||||
|
||||
With that, it is possible to debug issues by reading interesting memory
|
||||
locations such as buffers like the printk buffer or the process table.
|
||||
|
||||
Retrieving a full system memory dump is also possible over the FireWire,
|
||||
using data transfer rates in the order of 10MB/s or more.
|
||||
|
||||
Memory access is currently limited to the low 4G of physical address
|
||||
space which can be a problem on IA64 machines where memory is located
|
||||
mostly above that limit, but it is rarely a problem on more common
|
||||
hardware such as hardware based on x86, x86-64 and PowerPC.
|
||||
|
||||
Together with a early initialization of the OHCI-1394 controller for debugging,
|
||||
this facility proved most useful for examining long debugs logs in the printk
|
||||
buffer on to debug early boot problems in areas like ACPI where the system
|
||||
fails to boot and other means for debugging (serial port) are either not
|
||||
available (notebooks) or too slow for extensive debug information (like ACPI).
|
||||
|
||||
Drivers
|
||||
-------
|
||||
|
||||
The OHCI-1394 drivers in drivers/firewire and drivers/ieee1394 initialize
|
||||
the OHCI-1394 controllers to a working state and can be used to enable
|
||||
physical DMA. By default you only have to load the driver, and physical
|
||||
DMA access will be granted to all remote nodes, but it can be turned off
|
||||
when using the ohci1394 driver.
|
||||
|
||||
Because these drivers depend on the PCI enumeration to be completed, an
|
||||
initialization routine which can runs pretty early (long before console_init(),
|
||||
which makes the printk buffer appear on the console can be called) was written.
|
||||
|
||||
To activate it, enable CONFIG_PROVIDE_OHCI1394_DMA_INIT (Kernel hacking menu:
|
||||
Provide code for enabling DMA over FireWire early on boot) and pass the
|
||||
parameter "ohci1394_dma=early" to the recompiled kernel on boot.
|
||||
|
||||
Tools
|
||||
-----
|
||||
|
||||
firescope - Originally developed by Benjamin Herrenschmidt, Andi Kleen ported
|
||||
it from PowerPC to x86 and x86_64 and added functionality, firescope can now
|
||||
be used to view the printk buffer of a remote machine, even with live update.
|
||||
|
||||
Bernhard Kaindl enhanced firescope to support accessing 64-bit machines
|
||||
from 32-bit firescope and vice versa:
|
||||
- ftp://ftp.suse.de/private/bk/firewire/tools/firescope-0.2.2.tar.bz2
|
||||
|
||||
and he implemented fast system dump (alpha version - read README.txt):
|
||||
- ftp://ftp.suse.de/private/bk/firewire/tools/firedump-0.1.tar.bz2
|
||||
|
||||
There is also a gdb proxy for firewire which allows to use gdb to access
|
||||
data which can be referenced from symbols found by gdb in vmlinux:
|
||||
- ftp://ftp.suse.de/private/bk/firewire/tools/fireproxy-0.33.tar.bz2
|
||||
|
||||
The latest version of this gdb proxy (fireproxy-0.34) can communicate (not
|
||||
yet stable) with kgdb over an memory-based communication module (kgdbom).
|
||||
|
||||
Getting Started
|
||||
---------------
|
||||
|
||||
The OHCI-1394 specification regulates that the OHCI-1394 controller must
|
||||
disable all physical DMA on each bus reset.
|
||||
|
||||
This means that if you want to debug an issue in a system state where
|
||||
interrupts are disabled and where no polling of the OHCI-1394 controller
|
||||
for bus resets takes place, you have to establish any FireWire cable
|
||||
connections and fully initialize all FireWire hardware __before__ the
|
||||
system enters such state.
|
||||
|
||||
Step-by-step instructions for using firescope with early OHCI initialization:
|
||||
|
||||
1) Verify that your hardware is supported:
|
||||
|
||||
Load the ohci1394 or the fw-ohci module and check your kernel logs.
|
||||
You should see a line similar to
|
||||
|
||||
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[18] MMIO=[fe9ff800-fe9fffff]
|
||||
... Max Packet=[2048] IR/IT contexts=[4/8]
|
||||
|
||||
when loading the driver. If you have no supported controller, many PCI,
|
||||
CardBus and even some Express cards which are fully compliant to OHCI-1394
|
||||
specification are available. If it requires no driver for Windows operating
|
||||
systems, it most likely is. Only specialized shops have cards which are not
|
||||
compliant, they are based on TI PCILynx chips and require drivers for Win-
|
||||
dows operating systems.
|
||||
|
||||
2) Establish a working FireWire cable connection:
|
||||
|
||||
Any FireWire cable, as long at it provides electrically and mechanically
|
||||
stable connection and has matching connectors (there are small 4-pin and
|
||||
large 6-pin FireWire ports) will do.
|
||||
|
||||
If an driver is running on both machines you should see a line like
|
||||
|
||||
ieee1394: Node added: ID:BUS[0-01:1023] GUID[0090270001b84bba]
|
||||
|
||||
on both machines in the kernel log when the cable is plugged in
|
||||
and connects the two machines.
|
||||
|
||||
3) Test physical DMA using firescope:
|
||||
|
||||
On the debug host,
|
||||
- load the raw1394 module,
|
||||
- make sure that /dev/raw1394 is accessible,
|
||||
then start firescope:
|
||||
|
||||
$ firescope
|
||||
Port 0 (ohci1394) opened, 2 nodes detected
|
||||
|
||||
FireScope
|
||||
---------
|
||||
Target : <unspecified>
|
||||
Gen : 1
|
||||
[Ctrl-T] choose target
|
||||
[Ctrl-H] this menu
|
||||
[Ctrl-Q] quit
|
||||
|
||||
------> Press Ctrl-T now, the output should be similar to:
|
||||
|
||||
2 nodes available, local node is: 0
|
||||
0: ffc0, uuid: 00000000 00000000 [LOCAL]
|
||||
1: ffc1, uuid: 00279000 ba4bb801
|
||||
|
||||
Besides the [LOCAL] node, it must show another node without error message.
|
||||
|
||||
4) Prepare for debugging with early OHCI-1394 initialization:
|
||||
|
||||
4.1) Kernel compilation and installation on debug target
|
||||
|
||||
Compile the kernel to be debugged with CONFIG_PROVIDE_OHCI1394_DMA_INIT
|
||||
(Kernel hacking: Provide code for enabling DMA over FireWire early on boot)
|
||||
enabled and install it on the machine to be debugged (debug target).
|
||||
|
||||
4.2) Transfer the System.map of the debugged kernel to the debug host
|
||||
|
||||
Copy the System.map of the kernel be debugged to the debug host (the host
|
||||
which is connected to the debugged machine over the FireWire cable).
|
||||
|
||||
5) Retrieving the printk buffer contents:
|
||||
|
||||
With the FireWire cable connected, the OHCI-1394 driver on the debugging
|
||||
host loaded, reboot the debugged machine, booting the kernel which has
|
||||
CONFIG_PROVIDE_OHCI1394_DMA_INIT enabled, with the option ohci1394_dma=early.
|
||||
|
||||
Then, on the debugging host, run firescope, for example by using -A:
|
||||
|
||||
firescope -A System.map-of-debug-target-kernel
|
||||
|
||||
Note: -A automatically attaches to the first non-local node. It only works
|
||||
reliably if only connected two machines are connected using FireWire.
|
||||
|
||||
After having attached to the debug target, press Ctrl-D to view the
|
||||
complete printk buffer or Ctrl-U to enter auto update mode and get an
|
||||
updated live view of recent kernel messages logged on the debug target.
|
||||
|
||||
Call "firescope -h" to get more information on firescope's options.
|
||||
|
||||
Notes
|
||||
-----
|
||||
Documentation and specifications: ftp://ftp.suse.de/private/bk/firewire/docs
|
||||
|
||||
FireWire is a trademark of Apple Inc. - for more information please refer to:
|
||||
http://en.wikipedia.org/wiki/FireWire
|
||||
@@ -416,8 +416,21 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
[SPARC64] tick
|
||||
[X86-64] hpet,tsc
|
||||
|
||||
code_bytes [IA32] How many bytes of object code to print in an
|
||||
oops report.
|
||||
clearcpuid=BITNUM [X86]
|
||||
Disable CPUID feature X for the kernel. See
|
||||
include/asm-x86/cpufeature.h for the valid bit numbers.
|
||||
Note the Linux specific bits are not necessarily
|
||||
stable over kernel options, but the vendor specific
|
||||
ones should be.
|
||||
Also note that user programs calling CPUID directly
|
||||
or using the feature without checking anything
|
||||
will still see it. This just prevents it from
|
||||
being used by the kernel or shown in /proc/cpuinfo.
|
||||
Also note the kernel might malfunction if you disable
|
||||
some critical bits.
|
||||
|
||||
code_bytes [IA32/X86_64] How many bytes of object code to print
|
||||
in an oops report.
|
||||
Range: 0 - 8192
|
||||
Default: 64
|
||||
|
||||
@@ -570,6 +583,12 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
See drivers/char/README.epca and
|
||||
Documentation/digiepca.txt.
|
||||
|
||||
disable_mtrr_trim [X86, Intel and AMD only]
|
||||
By default the kernel will trim any uncacheable
|
||||
memory out of your available memory pool based on
|
||||
MTRR settings. This parameter disables that behavior,
|
||||
possibly causing your machine to run very slowly.
|
||||
|
||||
dmasound= [HW,OSS] Sound subsystem buffers
|
||||
|
||||
dscc4.setup= [NET]
|
||||
@@ -660,6 +679,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
|
||||
gamma= [HW,DRM]
|
||||
|
||||
gart_fix_e820= [X86_64] disable the fix e820 for K8 GART
|
||||
Format: off | on
|
||||
default: on
|
||||
|
||||
gdth= [HW,SCSI]
|
||||
See header of drivers/scsi/gdth.c.
|
||||
|
||||
@@ -794,6 +817,16 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
for translation below 32 bit and if not available
|
||||
then look in the higher range.
|
||||
|
||||
io_delay= [X86-32,X86-64] I/O delay method
|
||||
0x80
|
||||
Standard port 0x80 based delay
|
||||
0xed
|
||||
Alternate port 0xed based delay (needed on some systems)
|
||||
udelay
|
||||
Simple two microseconds delay
|
||||
none
|
||||
No delay
|
||||
|
||||
io7= [HW] IO7 for Marvel based alpha systems
|
||||
See comment before marvel_specify_io7 in
|
||||
arch/alpha/kernel/core_marvel.c.
|
||||
@@ -1059,6 +1092,11 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
Multi-Function General Purpose Timers on AMD Geode
|
||||
platforms.
|
||||
|
||||
mfgptfix [X86-32] Fix MFGPT timers on AMD Geode platforms when
|
||||
the BIOS has incorrectly applied a workaround. TinyBIOS
|
||||
version 0.98 is known to be affected, 0.99 fixes the
|
||||
problem by letting the user disable the workaround.
|
||||
|
||||
mga= [HW,DRM]
|
||||
|
||||
mousedev.tap_time=
|
||||
@@ -1159,6 +1197,8 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
|
||||
nodisconnect [HW,SCSI,M68K] Disables SCSI disconnects.
|
||||
|
||||
noefi [X86-32,X86-64] Disable EFI runtime services support.
|
||||
|
||||
noexec [IA-64]
|
||||
|
||||
noexec [X86-32,X86-64]
|
||||
@@ -1169,6 +1209,8 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
register save and restore. The kernel will only save
|
||||
legacy floating-point registers on task switch.
|
||||
|
||||
noclflush [BUGS=X86] Don't use the CLFLUSH instruction
|
||||
|
||||
nohlt [BUGS=ARM]
|
||||
|
||||
no-hlt [BUGS=X86-32] Tells the kernel that the hlt
|
||||
@@ -1978,6 +2020,11 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
vdso=1: enable VDSO (default)
|
||||
vdso=0: disable VDSO mapping
|
||||
|
||||
vdso32= [X86-32,X86-64]
|
||||
vdso32=2: enable compat VDSO (default with COMPAT_VDSO)
|
||||
vdso32=1: enable 32-bit VDSO (default)
|
||||
vdso32=0: disable 32-bit VDSO mapping
|
||||
|
||||
vector= [IA-64,SMP]
|
||||
vector=percpu: enable percpu vector domain
|
||||
|
||||
|
||||
@@ -110,12 +110,18 @@ Idle loop
|
||||
|
||||
Rebooting
|
||||
|
||||
reboot=b[ios] | t[riple] | k[bd] [, [w]arm | [c]old]
|
||||
reboot=b[ios] | t[riple] | k[bd] | a[cpi] | e[fi] [, [w]arm | [c]old]
|
||||
bios Use the CPU reboot vector for warm reset
|
||||
warm Don't set the cold reboot flag
|
||||
cold Set the cold reboot flag
|
||||
triple Force a triple fault (init)
|
||||
kbd Use the keyboard controller. cold reset (default)
|
||||
acpi Use the ACPI RESET_REG in the FADT. If ACPI is not configured or the
|
||||
ACPI reset does not work, the reboot path attempts the reset using
|
||||
the keyboard controller.
|
||||
efi Use efi reset_system runtime service. If EFI is not configured or the
|
||||
EFI reset does not work, the reboot path attempts the reset using
|
||||
the keyboard controller.
|
||||
|
||||
Using warm reset will be much faster especially on big memory
|
||||
systems because the BIOS will not go through the memory check.
|
||||
|
||||
@@ -19,6 +19,10 @@ Mechanics:
|
||||
- Build the kernel with the following configuration.
|
||||
CONFIG_FB_EFI=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
If EFI runtime services are expected, the following configuration should
|
||||
be selected.
|
||||
CONFIG_EFI=y
|
||||
CONFIG_EFI_VARS=y or m # optional
|
||||
- Create a VFAT partition on the disk
|
||||
- Copy the following to the VFAT partition:
|
||||
elilo bootloader with x86_64 support, elilo configuration file,
|
||||
@@ -27,3 +31,8 @@ Mechanics:
|
||||
can be found in the elilo sourceforge project.
|
||||
- Boot to EFI shell and invoke elilo choosing the kernel image built
|
||||
in first step.
|
||||
- If some or all EFI runtime services don't work, you can try following
|
||||
kernel command line parameters to turn off some or all EFI runtime
|
||||
services.
|
||||
noefi turn off all EFI runtime services
|
||||
reboot_type=k turn off EFI reboot runtime service
|
||||
|
||||
@@ -91,6 +91,11 @@ config GENERIC_IRQ_PROBE
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_LOCKBREAK
|
||||
bool
|
||||
default y
|
||||
depends on SMP && PREEMPT
|
||||
|
||||
config RWSEM_GENERIC_SPINLOCK
|
||||
bool
|
||||
default y
|
||||
|
||||
@@ -42,6 +42,11 @@ config MMU
|
||||
config SWIOTLB
|
||||
bool
|
||||
|
||||
config GENERIC_LOCKBREAK
|
||||
bool
|
||||
default y
|
||||
depends on SMP && PREEMPT
|
||||
|
||||
config RWSEM_XCHGADD_ALGORITHM
|
||||
bool
|
||||
default y
|
||||
@@ -75,6 +80,9 @@ config GENERIC_TIME_VSYSCALL
|
||||
bool
|
||||
default y
|
||||
|
||||
config ARCH_SETS_UP_PER_CPU_AREA
|
||||
def_bool y
|
||||
|
||||
config DMI
|
||||
bool
|
||||
default y
|
||||
|
||||
@@ -222,7 +222,8 @@ elf32_set_personality (void)
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int prot, int type)
|
||||
elf32_map(struct file *filep, unsigned long addr, struct elf_phdr *eppnt,
|
||||
int prot, int type, unsigned long unused)
|
||||
{
|
||||
unsigned long pgoff = (eppnt->p_vaddr) & ~IA32_PAGE_MASK;
|
||||
|
||||
|
||||
@@ -947,7 +947,7 @@ percpu_modcopy (void *pcpudst, const void *src, unsigned long size)
|
||||
{
|
||||
unsigned int i;
|
||||
for_each_possible_cpu(i) {
|
||||
memcpy(pcpudst + __per_cpu_offset[i], src, size);
|
||||
memcpy(pcpudst + per_cpu_offset(i), src, size);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
@@ -235,6 +235,11 @@ config IRAM_SIZE
|
||||
# Define implied options from the CPU selection here
|
||||
#
|
||||
|
||||
config GENERIC_LOCKBREAK
|
||||
bool
|
||||
default y
|
||||
depends on SMP && PREEMPT
|
||||
|
||||
config RWSEM_GENERIC_SPINLOCK
|
||||
bool
|
||||
depends on M32R
|
||||
|
||||
@@ -694,6 +694,11 @@ source "arch/mips/vr41xx/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
||||
config GENERIC_LOCKBREAK
|
||||
bool
|
||||
default y
|
||||
depends on SMP && PREEMPT
|
||||
|
||||
config RWSEM_GENERIC_SPINLOCK
|
||||
bool
|
||||
default y
|
||||
|
||||
@@ -24,9 +24,7 @@ DEFINE_SPINLOCK(i8253_lock);
|
||||
static void init_pit_timer(enum clock_event_mode mode,
|
||||
struct clock_event_device *evt)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&i8253_lock, flags);
|
||||
spin_lock(&i8253_lock);
|
||||
|
||||
switch(mode) {
|
||||
case CLOCK_EVT_MODE_PERIODIC:
|
||||
@@ -55,7 +53,7 @@ static void init_pit_timer(enum clock_event_mode mode,
|
||||
/* Nothing to do here */
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(&i8253_lock, flags);
|
||||
spin_unlock(&i8253_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -65,12 +63,10 @@ static void init_pit_timer(enum clock_event_mode mode,
|
||||
*/
|
||||
static int pit_next_event(unsigned long delta, struct clock_event_device *evt)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&i8253_lock, flags);
|
||||
spin_lock(&i8253_lock);
|
||||
outb_p(delta & 0xff , PIT_CH0); /* LSB */
|
||||
outb(delta >> 8 , PIT_CH0); /* MSB */
|
||||
spin_unlock_irqrestore(&i8253_lock, flags);
|
||||
spin_unlock(&i8253_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,11 @@ config MMU
|
||||
config STACK_GROWSUP
|
||||
def_bool y
|
||||
|
||||
config GENERIC_LOCKBREAK
|
||||
bool
|
||||
default y
|
||||
depends on SMP && PREEMPT
|
||||
|
||||
config RWSEM_GENERIC_SPINLOCK
|
||||
def_bool y
|
||||
|
||||
|
||||
@@ -42,6 +42,9 @@ config GENERIC_HARDIRQS
|
||||
bool
|
||||
default y
|
||||
|
||||
config ARCH_SETS_UP_PER_CPU_AREA
|
||||
def_bool PPC64
|
||||
|
||||
config IRQ_PER_CPU
|
||||
bool
|
||||
default y
|
||||
@@ -53,6 +56,11 @@ config RWSEM_XCHGADD_ALGORITHM
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_LOCKBREAK
|
||||
bool
|
||||
default y
|
||||
depends on SMP && PREEMPT
|
||||
|
||||
config ARCH_HAS_ILOG2_U32
|
||||
bool
|
||||
default y
|
||||
|
||||
@@ -256,7 +256,7 @@ static int set_evrregs(struct task_struct *task, unsigned long *data)
|
||||
#endif /* CONFIG_SPE */
|
||||
|
||||
|
||||
static void set_single_step(struct task_struct *task)
|
||||
void user_enable_single_step(struct task_struct *task)
|
||||
{
|
||||
struct pt_regs *regs = task->thread.regs;
|
||||
|
||||
@@ -271,7 +271,7 @@ static void set_single_step(struct task_struct *task)
|
||||
set_tsk_thread_flag(task, TIF_SINGLESTEP);
|
||||
}
|
||||
|
||||
static void clear_single_step(struct task_struct *task)
|
||||
void user_disable_single_step(struct task_struct *task)
|
||||
{
|
||||
struct pt_regs *regs = task->thread.regs;
|
||||
|
||||
@@ -313,7 +313,7 @@ static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
|
||||
void ptrace_disable(struct task_struct *child)
|
||||
{
|
||||
/* make sure the single step bit is not set. */
|
||||
clear_single_step(child);
|
||||
user_disable_single_step(child);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -445,52 +445,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
||||
break;
|
||||
}
|
||||
|
||||
case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
|
||||
case PTRACE_CONT: { /* restart after signal. */
|
||||
ret = -EIO;
|
||||
if (!valid_signal(data))
|
||||
break;
|
||||
if (request == PTRACE_SYSCALL)
|
||||
set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
|
||||
else
|
||||
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
|
||||
child->exit_code = data;
|
||||
/* make sure the single step bit is not set. */
|
||||
clear_single_step(child);
|
||||
wake_up_process(child);
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* make the child exit. Best I can do is send it a sigkill.
|
||||
* perhaps it should be put in the status that it wants to
|
||||
* exit.
|
||||
*/
|
||||
case PTRACE_KILL: {
|
||||
ret = 0;
|
||||
if (child->exit_state == EXIT_ZOMBIE) /* already dead */
|
||||
break;
|
||||
child->exit_code = SIGKILL;
|
||||
/* make sure the single step bit is not set. */
|
||||
clear_single_step(child);
|
||||
wake_up_process(child);
|
||||
break;
|
||||
}
|
||||
|
||||
case PTRACE_SINGLESTEP: { /* set the trap flag. */
|
||||
ret = -EIO;
|
||||
if (!valid_signal(data))
|
||||
break;
|
||||
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
|
||||
set_single_step(child);
|
||||
child->exit_code = data;
|
||||
/* give it a chance to run. */
|
||||
wake_up_process(child);
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
case PTRACE_GET_DEBUGREG: {
|
||||
ret = -EINVAL;
|
||||
/* We only support one DABR and no IABRS at the moment */
|
||||
|
||||
@@ -66,6 +66,9 @@ config AUDIT_ARCH
|
||||
bool
|
||||
default y
|
||||
|
||||
config ARCH_SETS_UP_PER_CPU_AREA
|
||||
def_bool y
|
||||
|
||||
config ARCH_NO_VIRT_TO_BUS
|
||||
def_bool y
|
||||
|
||||
@@ -200,6 +203,11 @@ config US2E_FREQ
|
||||
If in doubt, say N.
|
||||
|
||||
# Global things across all Sun machines.
|
||||
config GENERIC_LOCKBREAK
|
||||
bool
|
||||
default y
|
||||
depends on SMP && PREEMPT
|
||||
|
||||
config RWSEM_GENERIC_SPINLOCK
|
||||
bool
|
||||
|
||||
|
||||
@@ -71,10 +71,10 @@ EXPORT_SYMBOL(dump_thread);
|
||||
|
||||
/* required for SMP */
|
||||
|
||||
extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
|
||||
extern void __write_lock_failed(rwlock_t *rw);
|
||||
EXPORT_SYMBOL(__write_lock_failed);
|
||||
|
||||
extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
|
||||
extern void __read_lock_failed(rwlock_t *rw);
|
||||
EXPORT_SYMBOL(__read_lock_failed);
|
||||
|
||||
#endif
|
||||
|
||||
+25
-25
@@ -3,10 +3,10 @@
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#include "linux/ptrace.h"
|
||||
#include "asm/unistd.h"
|
||||
#include "asm/uaccess.h"
|
||||
#include "asm/ucontext.h"
|
||||
#include <linux/ptrace.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/ucontext.h>
|
||||
#include "frame_kern.h"
|
||||
#include "skas.h"
|
||||
|
||||
@@ -18,17 +18,17 @@ void copy_sc(struct uml_pt_regs *regs, void *from)
|
||||
REGS_FS(regs->gp) = sc->fs;
|
||||
REGS_ES(regs->gp) = sc->es;
|
||||
REGS_DS(regs->gp) = sc->ds;
|
||||
REGS_EDI(regs->gp) = sc->edi;
|
||||
REGS_ESI(regs->gp) = sc->esi;
|
||||
REGS_EBP(regs->gp) = sc->ebp;
|
||||
REGS_SP(regs->gp) = sc->esp;
|
||||
REGS_EBX(regs->gp) = sc->ebx;
|
||||
REGS_EDX(regs->gp) = sc->edx;
|
||||
REGS_ECX(regs->gp) = sc->ecx;
|
||||
REGS_EAX(regs->gp) = sc->eax;
|
||||
REGS_IP(regs->gp) = sc->eip;
|
||||
REGS_EDI(regs->gp) = sc->di;
|
||||
REGS_ESI(regs->gp) = sc->si;
|
||||
REGS_EBP(regs->gp) = sc->bp;
|
||||
REGS_SP(regs->gp) = sc->sp;
|
||||
REGS_EBX(regs->gp) = sc->bx;
|
||||
REGS_EDX(regs->gp) = sc->dx;
|
||||
REGS_ECX(regs->gp) = sc->cx;
|
||||
REGS_EAX(regs->gp) = sc->ax;
|
||||
REGS_IP(regs->gp) = sc->ip;
|
||||
REGS_CS(regs->gp) = sc->cs;
|
||||
REGS_EFLAGS(regs->gp) = sc->eflags;
|
||||
REGS_EFLAGS(regs->gp) = sc->flags;
|
||||
REGS_SS(regs->gp) = sc->ss;
|
||||
}
|
||||
|
||||
@@ -229,18 +229,18 @@ static int copy_sc_to_user(struct sigcontext __user *to,
|
||||
sc.fs = REGS_FS(regs->regs.gp);
|
||||
sc.es = REGS_ES(regs->regs.gp);
|
||||
sc.ds = REGS_DS(regs->regs.gp);
|
||||
sc.edi = REGS_EDI(regs->regs.gp);
|
||||
sc.esi = REGS_ESI(regs->regs.gp);
|
||||
sc.ebp = REGS_EBP(regs->regs.gp);
|
||||
sc.esp = sp;
|
||||
sc.ebx = REGS_EBX(regs->regs.gp);
|
||||
sc.edx = REGS_EDX(regs->regs.gp);
|
||||
sc.ecx = REGS_ECX(regs->regs.gp);
|
||||
sc.eax = REGS_EAX(regs->regs.gp);
|
||||
sc.eip = REGS_IP(regs->regs.gp);
|
||||
sc.di = REGS_EDI(regs->regs.gp);
|
||||
sc.si = REGS_ESI(regs->regs.gp);
|
||||
sc.bp = REGS_EBP(regs->regs.gp);
|
||||
sc.sp = sp;
|
||||
sc.bx = REGS_EBX(regs->regs.gp);
|
||||
sc.dx = REGS_EDX(regs->regs.gp);
|
||||
sc.cx = REGS_ECX(regs->regs.gp);
|
||||
sc.ax = REGS_EAX(regs->regs.gp);
|
||||
sc.ip = REGS_IP(regs->regs.gp);
|
||||
sc.cs = REGS_CS(regs->regs.gp);
|
||||
sc.eflags = REGS_EFLAGS(regs->regs.gp);
|
||||
sc.esp_at_signal = regs->regs.gp[UESP];
|
||||
sc.flags = REGS_EFLAGS(regs->regs.gp);
|
||||
sc.sp_at_signal = regs->regs.gp[UESP];
|
||||
sc.ss = regs->regs.gp[SS];
|
||||
sc.cr2 = fi->cr2;
|
||||
sc.err = fi->error_code;
|
||||
|
||||
+35
-35
@@ -4,11 +4,11 @@
|
||||
* Licensed under the GPL
|
||||
*/
|
||||
|
||||
#include "linux/personality.h"
|
||||
#include "linux/ptrace.h"
|
||||
#include "asm/unistd.h"
|
||||
#include "asm/uaccess.h"
|
||||
#include "asm/ucontext.h"
|
||||
#include <linux/personality.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/ucontext.h>
|
||||
#include "frame_kern.h"
|
||||
#include "skas.h"
|
||||
|
||||
@@ -27,16 +27,16 @@ void copy_sc(struct uml_pt_regs *regs, void *from)
|
||||
GETREG(regs, R13, sc, r13);
|
||||
GETREG(regs, R14, sc, r14);
|
||||
GETREG(regs, R15, sc, r15);
|
||||
GETREG(regs, RDI, sc, rdi);
|
||||
GETREG(regs, RSI, sc, rsi);
|
||||
GETREG(regs, RBP, sc, rbp);
|
||||
GETREG(regs, RBX, sc, rbx);
|
||||
GETREG(regs, RDX, sc, rdx);
|
||||
GETREG(regs, RAX, sc, rax);
|
||||
GETREG(regs, RCX, sc, rcx);
|
||||
GETREG(regs, RSP, sc, rsp);
|
||||
GETREG(regs, RIP, sc, rip);
|
||||
GETREG(regs, EFLAGS, sc, eflags);
|
||||
GETREG(regs, RDI, sc, di);
|
||||
GETREG(regs, RSI, sc, si);
|
||||
GETREG(regs, RBP, sc, bp);
|
||||
GETREG(regs, RBX, sc, bx);
|
||||
GETREG(regs, RDX, sc, dx);
|
||||
GETREG(regs, RAX, sc, ax);
|
||||
GETREG(regs, RCX, sc, cx);
|
||||
GETREG(regs, RSP, sc, sp);
|
||||
GETREG(regs, RIP, sc, ip);
|
||||
GETREG(regs, EFLAGS, sc, flags);
|
||||
GETREG(regs, CS, sc, cs);
|
||||
|
||||
#undef GETREG
|
||||
@@ -61,16 +61,16 @@ static int copy_sc_from_user(struct pt_regs *regs,
|
||||
err |= GETREG(regs, R13, from, r13);
|
||||
err |= GETREG(regs, R14, from, r14);
|
||||
err |= GETREG(regs, R15, from, r15);
|
||||
err |= GETREG(regs, RDI, from, rdi);
|
||||
err |= GETREG(regs, RSI, from, rsi);
|
||||
err |= GETREG(regs, RBP, from, rbp);
|
||||
err |= GETREG(regs, RBX, from, rbx);
|
||||
err |= GETREG(regs, RDX, from, rdx);
|
||||
err |= GETREG(regs, RAX, from, rax);
|
||||
err |= GETREG(regs, RCX, from, rcx);
|
||||
err |= GETREG(regs, RSP, from, rsp);
|
||||
err |= GETREG(regs, RIP, from, rip);
|
||||
err |= GETREG(regs, EFLAGS, from, eflags);
|
||||
err |= GETREG(regs, RDI, from, di);
|
||||
err |= GETREG(regs, RSI, from, si);
|
||||
err |= GETREG(regs, RBP, from, bp);
|
||||
err |= GETREG(regs, RBX, from, bx);
|
||||
err |= GETREG(regs, RDX, from, dx);
|
||||
err |= GETREG(regs, RAX, from, ax);
|
||||
err |= GETREG(regs, RCX, from, cx);
|
||||
err |= GETREG(regs, RSP, from, sp);
|
||||
err |= GETREG(regs, RIP, from, ip);
|
||||
err |= GETREG(regs, EFLAGS, from, flags);
|
||||
err |= GETREG(regs, CS, from, cs);
|
||||
if (err)
|
||||
return 1;
|
||||
@@ -108,19 +108,19 @@ static int copy_sc_to_user(struct sigcontext __user *to,
|
||||
__put_user((regs)->regs.gp[(regno) / sizeof(unsigned long)], \
|
||||
&(sc)->regname)
|
||||
|
||||
err |= PUTREG(regs, RDI, to, rdi);
|
||||
err |= PUTREG(regs, RSI, to, rsi);
|
||||
err |= PUTREG(regs, RBP, to, rbp);
|
||||
err |= PUTREG(regs, RDI, to, di);
|
||||
err |= PUTREG(regs, RSI, to, si);
|
||||
err |= PUTREG(regs, RBP, to, bp);
|
||||
/*
|
||||
* Must use orignal RSP, which is passed in, rather than what's in
|
||||
* the pt_regs, because that's already been updated to point at the
|
||||
* signal frame.
|
||||
*/
|
||||
err |= __put_user(sp, &to->rsp);
|
||||
err |= PUTREG(regs, RBX, to, rbx);
|
||||
err |= PUTREG(regs, RDX, to, rdx);
|
||||
err |= PUTREG(regs, RCX, to, rcx);
|
||||
err |= PUTREG(regs, RAX, to, rax);
|
||||
err |= __put_user(sp, &to->sp);
|
||||
err |= PUTREG(regs, RBX, to, bx);
|
||||
err |= PUTREG(regs, RDX, to, dx);
|
||||
err |= PUTREG(regs, RCX, to, cx);
|
||||
err |= PUTREG(regs, RAX, to, ax);
|
||||
err |= PUTREG(regs, R8, to, r8);
|
||||
err |= PUTREG(regs, R9, to, r9);
|
||||
err |= PUTREG(regs, R10, to, r10);
|
||||
@@ -135,8 +135,8 @@ static int copy_sc_to_user(struct sigcontext __user *to,
|
||||
err |= __put_user(fi->error_code, &to->err);
|
||||
err |= __put_user(fi->trap_no, &to->trapno);
|
||||
|
||||
err |= PUTREG(regs, RIP, to, rip);
|
||||
err |= PUTREG(regs, EFLAGS, to, eflags);
|
||||
err |= PUTREG(regs, RIP, to, ip);
|
||||
err |= PUTREG(regs, EFLAGS, to, flags);
|
||||
#undef PUTREG
|
||||
|
||||
err |= __put_user(mask, &to->oldmask);
|
||||
|
||||
+145
-166
File diff suppressed because it is too large
Load Diff
+31
-34
@@ -219,10 +219,10 @@ config MGEODEGX1
|
||||
Select this for a Geode GX1 (Cyrix MediaGX) chip.
|
||||
|
||||
config MGEODE_LX
|
||||
bool "Geode GX/LX"
|
||||
bool "Geode GX/LX"
|
||||
depends on X86_32
|
||||
help
|
||||
Select this for AMD Geode GX and LX processors.
|
||||
help
|
||||
Select this for AMD Geode GX and LX processors.
|
||||
|
||||
config MCYRIXIII
|
||||
bool "CyrixIII/VIA-C3"
|
||||
@@ -258,7 +258,7 @@ config MPSC
|
||||
Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey
|
||||
Xeon CPUs with Intel 64bit which is compatible with x86-64.
|
||||
Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the
|
||||
Netburst core and shouldn't use this option. You can distinguish them
|
||||
Netburst core and shouldn't use this option. You can distinguish them
|
||||
using the cpu family field
|
||||
in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one.
|
||||
|
||||
@@ -317,81 +317,75 @@ config X86_L1_CACHE_SHIFT
|
||||
default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MVIAC7
|
||||
|
||||
config X86_XADD
|
||||
bool
|
||||
def_bool y
|
||||
depends on X86_32 && !M386
|
||||
default y
|
||||
|
||||
config X86_PPRO_FENCE
|
||||
bool
|
||||
bool "PentiumPro memory ordering errata workaround"
|
||||
depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1
|
||||
default y
|
||||
help
|
||||
Old PentiumPro multiprocessor systems had errata that could cause memory
|
||||
operations to violate the x86 ordering standard in rare cases. Enabling this
|
||||
option will attempt to work around some (but not all) occurances of
|
||||
this problem, at the cost of much heavier spinlock and memory barrier
|
||||
operations.
|
||||
|
||||
If unsure, say n here. Even distro kernels should think twice before enabling
|
||||
this: there are few systems, and an unlikely bug.
|
||||
|
||||
config X86_F00F_BUG
|
||||
bool
|
||||
def_bool y
|
||||
depends on M586MMX || M586TSC || M586 || M486 || M386
|
||||
default y
|
||||
|
||||
config X86_WP_WORKS_OK
|
||||
bool
|
||||
def_bool y
|
||||
depends on X86_32 && !M386
|
||||
default y
|
||||
|
||||
config X86_INVLPG
|
||||
bool
|
||||
def_bool y
|
||||
depends on X86_32 && !M386
|
||||
default y
|
||||
|
||||
config X86_BSWAP
|
||||
bool
|
||||
def_bool y
|
||||
depends on X86_32 && !M386
|
||||
default y
|
||||
|
||||
config X86_POPAD_OK
|
||||
bool
|
||||
def_bool y
|
||||
depends on X86_32 && !M386
|
||||
default y
|
||||
|
||||
config X86_ALIGNMENT_16
|
||||
bool
|
||||
def_bool y
|
||||
depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1
|
||||
default y
|
||||
|
||||
config X86_GOOD_APIC
|
||||
bool
|
||||
def_bool y
|
||||
depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON || MCORE2 || MVIAC7 || X86_64
|
||||
default y
|
||||
|
||||
config X86_INTEL_USERCOPY
|
||||
bool
|
||||
def_bool y
|
||||
depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2
|
||||
default y
|
||||
|
||||
config X86_USE_PPRO_CHECKSUM
|
||||
bool
|
||||
def_bool y
|
||||
depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MEFFICEON || MGEODE_LX || MCORE2
|
||||
default y
|
||||
|
||||
config X86_USE_3DNOW
|
||||
bool
|
||||
def_bool y
|
||||
depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML
|
||||
default y
|
||||
|
||||
config X86_OOSTORE
|
||||
bool
|
||||
def_bool y
|
||||
depends on (MWINCHIP3D || MWINCHIP2 || MWINCHIPC6) && MTRR
|
||||
default y
|
||||
|
||||
config X86_TSC
|
||||
bool
|
||||
def_bool y
|
||||
depends on ((MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2) && !X86_NUMAQ) || X86_64
|
||||
default y
|
||||
|
||||
# this should be set for all -march=.. options where the compiler
|
||||
# generates cmov.
|
||||
config X86_CMOV
|
||||
bool
|
||||
def_bool y
|
||||
depends on (MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7)
|
||||
default y
|
||||
|
||||
config X86_MINIMUM_CPU_FAMILY
|
||||
int
|
||||
@@ -399,3 +393,6 @@ config X86_MINIMUM_CPU_FAMILY
|
||||
default "4" if X86_32 && (X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK)
|
||||
default "3"
|
||||
|
||||
config X86_DEBUGCTLMSR
|
||||
def_bool y
|
||||
depends on !(M586MMX || M586TSC || M586 || M486 || M386)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user