Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178914
b: refs/heads/master
c: 6144a85
h: refs/heads/master
v: v3
  • Loading branch information
Jason Wessel committed Jan 7, 2010
1 parent df88a72 commit c753427
Show file tree
Hide file tree
Showing 35 changed files with 98 additions and 176 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 82062e7b50280bcf0feca70ac35a44f375602976
refs/heads/master: 6144a85a0e018c19bc4b24f7eb6c1f3f7431813d
10 changes: 9 additions & 1 deletion trunk/arch/arm/plat-s3c64xx/s3c6400-clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ static struct clk clk_ext_xtal_mux = {
#define clk_fin_epll clk_ext_xtal_mux

#define clk_fout_mpll clk_mpll
#define clk_fout_epll clk_epll

struct clk_sources {
unsigned int nr_sources;
Expand Down Expand Up @@ -89,6 +88,11 @@ static struct clksrc_clk clk_mout_apll = {
.sources = &clk_src_apll,
};

static struct clk clk_fout_epll = {
.name = "fout_epll",
.id = -1,
};

static struct clk *clk_src_epll_list[] = {
[0] = &clk_fin_epll,
[1] = &clk_fout_epll,
Expand Down Expand Up @@ -711,6 +715,7 @@ static struct clk *clks[] __initdata = {
&clk_iis_cd1,
&clk_pcm_cd,
&clk_mout_epll.clk,
&clk_fout_epll,
&clk_mout_mpll.clk,
&clk_dout_mpll,
&clk_mmc0.clk,
Expand Down Expand Up @@ -755,4 +760,7 @@ void __init s3c6400_register_clocks(unsigned armclk_divlimit)
clkp->name, ret);
}
}

clk_mpll.parent = &clk_mout_mpll.clk;
clk_epll.parent = &clk_mout_epll.clk;
}
1 change: 1 addition & 0 deletions trunk/arch/ia64/include/asm/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
extern void _mcount(unsigned long pfs, unsigned long r1, unsigned long b0, unsigned long r0);
#define mcount _mcount

#include <asm/kprobes.h>
/* In IA64, MCOUNT_ADDR is set in link time, so it's not a constant at compile time */
#define MCOUNT_ADDR (((struct fnptr *)mcount)->ip)
#define FTRACE_ADDR (((struct fnptr *)ftrace_caller)->ip)
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/ia64/include/asm/kprobes.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ typedef struct kprobe_opcode {
bundle_t bundle;
} kprobe_opcode_t;

struct fnptr {
unsigned long ip;
unsigned long gp;
};

/* Architecture specific copy of original instruction*/
struct arch_specific_insn {
/* copy of the instruction to be emulated */
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/include/asm/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct ia64_tr_entry {
extern int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size);
extern void ia64_ptr_entry(u64 target_mask, int slot);

extern struct ia64_tr_entry *ia64_idtrs[NR_CPUS];
extern struct ia64_tr_entry __per_cpu_idtrs[NR_CPUS][2][IA64_TR_ALLOC_MAX];

/*
region register macros
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/ia64/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
/*
* Returns a bitmask of CPUs on Node 'node'.
*/
#define cpumask_of_node(node) ((node) == -1 ? \
cpu_all_mask : \
&node_to_cpu_mask[node])
#define cpumask_of_node(node) (&node_to_cpu_mask[node])

/*
* Returns the number of the node containing Node 'nid'.
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/ia64/include/asm/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ typedef unsigned int umode_t;
*/
# ifdef __KERNEL__

struct fnptr {
unsigned long ip;
unsigned long gp;
};

/* DMA addresses are 64-bits wide, in general. */
typedef u64 dma_addr_t;

Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/ia64/kernel/mca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1225,12 +1225,9 @@ static void mca_insert_tr(u64 iord)
unsigned long psr;
int cpu = smp_processor_id();

if (!ia64_idtrs[cpu])
return;

psr = ia64_clear_ic();
for (i = IA64_TR_ALLOC_BASE; i < IA64_TR_ALLOC_MAX; i++) {
p = ia64_idtrs[cpu] + (iord - 1) * IA64_TR_ALLOC_MAX;
p = &__per_cpu_idtrs[cpu][iord-1][i];
if (p->pte & 0x1) {
old_rr = ia64_get_rr(p->ifa);
if (old_rr != p->rr) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/kernel/perfmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2293,7 +2293,7 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t
* if ((mm->total_vm << PAGE_SHIFT) + len> task->rlim[RLIMIT_AS].rlim_cur)
* return -ENOMEM;
*/
if (size > task_rlimit(task, RLIMIT_MEMLOCK))
if (size > task->signal->rlim[RLIMIT_MEMLOCK].rlim_cur)
return -ENOMEM;

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ dma_mark_clean(void *addr, size_t size)
inline void
ia64_set_rbs_bot (void)
{
unsigned long stack_size = rlimit_max(RLIMIT_STACK) & -16;
unsigned long stack_size = current->signal->rlim[RLIMIT_STACK].rlim_max & -16;

if (stack_size > MAX_USER_STACK_SIZE)
stack_size = MAX_USER_STACK_SIZE;
Expand Down
32 changes: 13 additions & 19 deletions trunk/arch/ia64/mm/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ DEFINE_PER_CPU(u8, ia64_need_tlb_flush);
DEFINE_PER_CPU(u8, ia64_tr_num); /*Number of TR slots in current processor*/
DEFINE_PER_CPU(u8, ia64_tr_used); /*Max Slot number used by kernel*/

struct ia64_tr_entry *ia64_idtrs[NR_CPUS];
struct ia64_tr_entry __per_cpu_idtrs[NR_CPUS][2][IA64_TR_ALLOC_MAX];

/*
* Initializes the ia64_ctx.bitmap array based on max_ctx+1.
Expand Down Expand Up @@ -429,16 +429,10 @@ int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size)
struct ia64_tr_entry *p;
int cpu = smp_processor_id();

if (!ia64_idtrs[cpu]) {
ia64_idtrs[cpu] = kmalloc(2 * IA64_TR_ALLOC_MAX *
sizeof (struct ia64_tr_entry), GFP_KERNEL);
if (!ia64_idtrs[cpu])
return -ENOMEM;
}
r = -EINVAL;
/*Check overlap with existing TR entries*/
if (target_mask & 0x1) {
p = ia64_idtrs[cpu];
p = &__per_cpu_idtrs[cpu][0][0];
for (i = IA64_TR_ALLOC_BASE; i <= per_cpu(ia64_tr_used, cpu);
i++, p++) {
if (p->pte & 0x1)
Expand All @@ -450,7 +444,7 @@ int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size)
}
}
if (target_mask & 0x2) {
p = ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX;
p = &__per_cpu_idtrs[cpu][1][0];
for (i = IA64_TR_ALLOC_BASE; i <= per_cpu(ia64_tr_used, cpu);
i++, p++) {
if (p->pte & 0x1)
Expand All @@ -465,16 +459,16 @@ int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size)
for (i = IA64_TR_ALLOC_BASE; i < per_cpu(ia64_tr_num, cpu); i++) {
switch (target_mask & 0x3) {
case 1:
if (!((ia64_idtrs[cpu] + i)->pte & 0x1))
if (!(__per_cpu_idtrs[cpu][0][i].pte & 0x1))
goto found;
continue;
case 2:
if (!((ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX + i)->pte & 0x1))
if (!(__per_cpu_idtrs[cpu][1][i].pte & 0x1))
goto found;
continue;
case 3:
if (!((ia64_idtrs[cpu] + i)->pte & 0x1) &&
!((ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX + i)->pte & 0x1))
if (!(__per_cpu_idtrs[cpu][0][i].pte & 0x1) &&
!(__per_cpu_idtrs[cpu][1][i].pte & 0x1))
goto found;
continue;
default:
Expand All @@ -494,7 +488,7 @@ int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size)
if (target_mask & 0x1) {
ia64_itr(0x1, i, va, pte, log_size);
ia64_srlz_i();
p = ia64_idtrs[cpu] + i;
p = &__per_cpu_idtrs[cpu][0][i];
p->ifa = va;
p->pte = pte;
p->itir = log_size << 2;
Expand All @@ -503,7 +497,7 @@ int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size)
if (target_mask & 0x2) {
ia64_itr(0x2, i, va, pte, log_size);
ia64_srlz_i();
p = ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX + i;
p = &__per_cpu_idtrs[cpu][1][i];
p->ifa = va;
p->pte = pte;
p->itir = log_size << 2;
Expand Down Expand Up @@ -534,7 +528,7 @@ void ia64_ptr_entry(u64 target_mask, int slot)
return;

if (target_mask & 0x1) {
p = ia64_idtrs[cpu] + slot;
p = &__per_cpu_idtrs[cpu][0][slot];
if ((p->pte&0x1) && is_tr_overlap(p, p->ifa, p->itir>>2)) {
p->pte = 0;
ia64_ptr(0x1, p->ifa, p->itir>>2);
Expand All @@ -543,7 +537,7 @@ void ia64_ptr_entry(u64 target_mask, int slot)
}

if (target_mask & 0x2) {
p = ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX + slot;
p = &__per_cpu_idtrs[cpu][1][slot];
if ((p->pte & 0x1) && is_tr_overlap(p, p->ifa, p->itir>>2)) {
p->pte = 0;
ia64_ptr(0x2, p->ifa, p->itir>>2);
Expand All @@ -552,8 +546,8 @@ void ia64_ptr_entry(u64 target_mask, int slot)
}

for (i = per_cpu(ia64_tr_used, cpu); i >= IA64_TR_ALLOC_BASE; i--) {
if (((ia64_idtrs[cpu] + i)->pte & 0x1) ||
((ia64_idtrs[cpu] + IA64_TR_ALLOC_MAX + i)->pte & 0x1))
if ((__per_cpu_idtrs[cpu][0][i].pte & 0x1) ||
(__per_cpu_idtrs[cpu][1][i].pte & 0x1))
break;
}
per_cpu(ia64_tr_used, cpu) = i;
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/x86/include/asm/uaccess_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,14 @@ static inline unsigned long __must_check copy_from_user(void *to,
unsigned long n)
{
int sz = __compiletime_object_size(to);
int ret = -EFAULT;

if (likely(sz == -1 || sz >= n))
n = _copy_from_user(to, from, n);
ret = _copy_from_user(to, from, n);
else
copy_from_user_overflow();

return n;
return ret;
}

long __must_check strncpy_from_user(char *dst, const char __user *src,
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/x86/include/asm/uaccess_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ static inline unsigned long __must_check copy_from_user(void *to,
unsigned long n)
{
int sz = __compiletime_object_size(to);
int ret = -EFAULT;

might_fault();
if (likely(sz == -1 || sz >= n))
n = _copy_from_user(to, from, n);
ret = _copy_from_user(to, from, n);
#ifdef CONFIG_DEBUG_VM
else
WARN(1, "Buffer overflow detected!\n");
#endif
return n;
return ret;
}

static __always_inline __must_check
Expand Down
7 changes: 0 additions & 7 deletions trunk/arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2434,13 +2434,6 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
cfg = irq_cfg(irq);
raw_spin_lock(&desc->lock);

/*
* Check if the irq migration is in progress. If so, we
* haven't received the cleanup request yet for this irq.
*/
if (cfg->move_in_progress)
goto unlock;

if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain))
goto unlock;

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,13 +733,13 @@ struct early_res {
};
static struct early_res early_res[MAX_EARLY_RES] __initdata = {
{ 0, PAGE_SIZE, "BIOS data page", 1 }, /* BIOS data page */
#if defined(CONFIG_X86_32) && defined(CONFIG_X86_TRAMPOLINE)
#ifdef CONFIG_X86_32
/*
* But first pinch a few for the stack/trampoline stuff
* FIXME: Don't need the extra page at 4K, but need to fix
* trampoline before removing it. (see the GDT stuff)
*/
{ PAGE_SIZE, PAGE_SIZE + PAGE_SIZE, "EX TRAMPOLINE", 1 },
{ PAGE_SIZE, PAGE_SIZE, "EX TRAMPOLINE", 1 },
#endif

{}
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/x86/pci/intel_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ static void __devinit pci_root_bus_res(struct pci_dev *dev)
u64 mmioh_base, mmioh_end;
int bus_base, bus_end;

/* some sys doesn't get mmconf enabled */
if (dev->cfg_size < 0x120)
return;

if (pci_root_num >= PCI_ROOT_NR) {
printk(KERN_DEBUG "intel_bus.c: PCI_ROOT_NR is too small\n");
return;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -4684,7 +4684,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
INIT_WORK(&hw->restart_work, sky2_restart);

pci_set_drvdata(pdev, hw);
pdev->d3_delay = 150;

return 0;

Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/pci/pci-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ static ssize_t local_cpus_show(struct device *dev,
int len;

#ifdef CONFIG_NUMA
mask = (dev_to_node(dev) == -1) ? cpu_online_mask :
cpumask_of_node(dev_to_node(dev));
mask = cpumask_of_node(dev_to_node(dev));
#else
mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
#endif
Expand All @@ -94,8 +93,7 @@ static ssize_t local_cpulist_show(struct device *dev,
int len;

#ifdef CONFIG_NUMA
mask = (dev_to_node(dev) == -1) ? cpu_online_mask :
cpumask_of_node(dev_to_node(dev));
mask = cpumask_of_node(dev_to_node(dev));
#else
mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
#endif
Expand Down
19 changes: 4 additions & 15 deletions trunk/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,7 @@ const char *pci_power_names[] = {
};
EXPORT_SYMBOL_GPL(pci_power_names);

unsigned int pci_pm_d3_delay;

static void pci_dev_d3_sleep(struct pci_dev *dev)
{
unsigned int delay = dev->d3_delay;

if (delay < pci_pm_d3_delay)
delay = pci_pm_d3_delay;

msleep(delay);
}
unsigned int pci_pm_d3_delay = PCI_PM_D3_WAIT;

#ifdef CONFIG_PCI_DOMAINS
int pci_domains_supported = 1;
Expand Down Expand Up @@ -532,7 +522,7 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
/* Mandatory power management transition delays */
/* see PCI PM 1.1 5.6.1 table 18 */
if (state == PCI_D3hot || dev->current_state == PCI_D3hot)
pci_dev_d3_sleep(dev);
msleep(pci_pm_d3_delay);
else if (state == PCI_D2 || dev->current_state == PCI_D2)
udelay(PCI_PM_D2_DELAY);

Expand Down Expand Up @@ -1419,7 +1409,6 @@ void pci_pm_init(struct pci_dev *dev)
}

dev->pm_cap = pm;
dev->d3_delay = PCI_PM_D3_WAIT;

dev->d1_support = false;
dev->d2_support = false;
Expand Down Expand Up @@ -2258,12 +2247,12 @@ static int pci_pm_reset(struct pci_dev *dev, int probe)
csr &= ~PCI_PM_CTRL_STATE_MASK;
csr |= PCI_D3hot;
pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, csr);
pci_dev_d3_sleep(dev);
msleep(pci_pm_d3_delay);

csr &= ~PCI_PM_CTRL_STATE_MASK;
csr |= PCI_D0;
pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, csr);
pci_dev_d3_sleep(dev);
msleep(pci_pm_d3_delay);

return 0;
}
Expand Down
Loading

0 comments on commit c753427

Please sign in to comment.