Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234042
b: refs/heads/master
c: 4afcc10
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Mar 10, 2011
1 parent 694a619 commit 7a97d96
Show file tree
Hide file tree
Showing 20 changed files with 113 additions and 42 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: d891eedbc3b1b0fade8a9ce60cc0eba1cccb59e5
refs/heads/master: 4afcc10a65bb1f30c4fa1dec2634df74160a8054
16 changes: 16 additions & 0 deletions trunk/arch/powerpc/include/asm/lppaca.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,25 @@
//
//----------------------------------------------------------------------------
#include <linux/cache.h>
#include <linux/threads.h>
#include <asm/types.h>
#include <asm/mmu.h>

/*
* We only have to have statically allocated lppaca structs on
* legacy iSeries, which supports at most 64 cpus.
*/
#ifdef CONFIG_PPC_ISERIES
#if NR_CPUS < 64
#define NR_LPPACAS NR_CPUS
#else
#define NR_LPPACAS 64
#endif
#else /* not iSeries */
#define NR_LPPACAS 1
#endif


/* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k
* alignment is sufficient to prevent this */
struct lppaca {
Expand Down
14 changes: 0 additions & 14 deletions trunk/arch/powerpc/kernel/paca.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@ extern unsigned long __toc_start;

#ifdef CONFIG_PPC_BOOK3S

/*
* We only have to have statically allocated lppaca structs on
* legacy iSeries, which supports at most 64 cpus.
*/
#ifdef CONFIG_PPC_ISERIES
#if NR_CPUS < 64
#define NR_LPPACAS NR_CPUS
#else
#define NR_LPPACAS 64
#endif
#else /* not iSeries */
#define NR_LPPACAS 1
#endif

/*
* The structure which the hypervisor knows about - this structure
* should not cross a page boundary. The vpa_init/register_vpa call
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,8 @@ int start_topology_update(void)
{
int rc = 0;

if (firmware_has_feature(FW_FEATURE_VPHN) &&
/* Disabled until races with load balancing are fixed */
if (0 && firmware_has_feature(FW_FEATURE_VPHN) &&
get_lppaca()->shared_proc) {
vphn_enabled = 1;
setup_cpu_associativity_change_counters();
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/platforms/iseries/dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,16 @@ static void __init dt_cpus(struct iseries_flat_dt *dt)
pft_size[0] = 0; /* NUMA CEC cookie, 0 for non NUMA */
pft_size[1] = __ilog2(HvCallHpt_getHptPages() * HW_PAGE_SIZE);

for (i = 0; i < NR_CPUS; i++) {
if (lppaca_of(i).dyn_proc_status >= 2)
for (i = 0; i < NR_LPPACAS; i++) {
if (lppaca[i].dyn_proc_status >= 2)
continue;

snprintf(p, 32 - (p - buf), "@%d", i);
dt_start_node(dt, buf);

dt_prop_str(dt, "device_type", device_type_cpu);

index = lppaca_of(i).dyn_hv_phys_proc_index;
index = lppaca[i].dyn_hv_phys_proc_index;
d = &xIoHriProcessorVpd[index];

dt_prop_u32(dt, "i-cache-size", d->xInstCacheSize * 1024);
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/iseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ void * __init iSeries_early_setup(void)
* on but calling this function multiple times is fine.
*/
identify_cpu(0, mfspr(SPRN_PVR));
initialise_paca(&boot_paca, 0);

powerpc_firmware_features |= FW_FEATURE_ISERIES;
powerpc_firmware_features |= FW_FEATURE_LPAR;
Expand Down
7 changes: 6 additions & 1 deletion trunk/arch/x86/boot/compressed/mkpiggy.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ int main(int argc, char *argv[])
if (fseek(f, -4L, SEEK_END)) {
perror(argv[1]);
}
fread(&olen, sizeof olen, 1, f);

if (fread(&olen, sizeof(olen), 1, f) != 1) {
perror(argv[1]);
return 1;
}

ilen = ftell(f);
olen = getle32(&olen);
fclose(f);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/include/asm/uv/uv_bau.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ struct bau_msg_payload {
struct bau_msg_header {
unsigned int dest_subnodeid:6; /* must be 0x10, for the LB */
/* bits 5:0 */
unsigned int base_dest_nodeid:15; /* nasid (pnode<<1) of */
unsigned int base_dest_nodeid:15; /* nasid of the */
/* bits 20:6 */ /* first bit in uvhub map */
unsigned int command:8; /* message type */
/* bits 28:21 */
Expand Down
6 changes: 1 addition & 5 deletions trunk/arch/x86/mm/numa_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,11 +780,7 @@ void __cpuinit numa_add_cpu(int cpu)
int physnid;
int nid = NUMA_NO_NODE;

apicid = early_per_cpu(x86_cpu_to_apicid, cpu);
if (apicid != BAD_APICID)
nid = apicid_to_node[apicid];
if (nid == NUMA_NO_NODE)
nid = early_cpu_to_node(cpu);
nid = early_cpu_to_node(cpu);
BUG_ON(nid == NUMA_NO_NODE || !node_online(nid));

/*
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/platform/uv/tlb_uv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1364,11 +1364,11 @@ uv_activation_descriptor_init(int node, int pnode)
memset(bd2, 0, sizeof(struct bau_desc));
bd2->header.sw_ack_flag = 1;
/*
* base_dest_nodeid is the nasid (pnode<<1) of the first uvhub
* base_dest_nodeid is the nasid of the first uvhub
* in the partition. The bit map will indicate uvhub numbers,
* which are 0-N in a partition. Pnodes are unique system-wide.
*/
bd2->header.base_dest_nodeid = uv_partition_base_pnode << 1;
bd2->header.base_dest_nodeid = UV_PNODE_TO_NASID(uv_partition_base_pnode);
bd2->header.dest_subnodeid = 0x10; /* the LB */
bd2->header.command = UV_NET_ENDPOINT_INTD;
bd2->header.int_both = 1;
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,17 @@

/* Backlight control */
#define BLC_PWM_CTL 0x61254
#define BACKLIGHT_MODULATION_FREQ_SHIFT (17)
#define BLC_PWM_CTL2 0x61250 /* 965+ only */
#define BLM_COMBINATION_MODE (1 << 30)
/*
* This is the most significant 15 bits of the number of backlight cycles in a
* complete cycle of the modulated backlight control.
*
* The actual value is this field multiplied by two.
*/
#define BACKLIGHT_MODULATION_FREQ_MASK (0x7fff << 17)
#define BLM_LEGACY_MODE (1 << 16)
/*
* This is the number of cycles out of the backlight modulation cycle for which
* the backlight is on.
Expand Down
36 changes: 36 additions & 0 deletions trunk/drivers/gpu/drm/i915/intel_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

#include "intel_drv.h"

#define PCI_LBPC 0xf4 /* legacy/combination backlight modes */

void
intel_fixed_panel_mode(struct drm_display_mode *fixed_mode,
struct drm_display_mode *adjusted_mode)
Expand Down Expand Up @@ -110,6 +112,19 @@ intel_pch_panel_fitting(struct drm_device *dev,
dev_priv->pch_pf_size = (width << 16) | height;
}

static int is_backlight_combination_mode(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;

if (INTEL_INFO(dev)->gen >= 4)
return I915_READ(BLC_PWM_CTL2) & BLM_COMBINATION_MODE;

if (IS_GEN2(dev))
return I915_READ(BLC_PWM_CTL) & BLM_LEGACY_MODE;

return 0;
}

static u32 i915_read_blc_pwm_ctl(struct drm_i915_private *dev_priv)
{
u32 val;
Expand Down Expand Up @@ -166,6 +181,9 @@ u32 intel_panel_get_max_backlight(struct drm_device *dev)
if (INTEL_INFO(dev)->gen < 4)
max &= ~1;
}

if (is_backlight_combination_mode(dev))
max *= 0xff;
}

DRM_DEBUG_DRIVER("max backlight PWM = %d\n", max);
Expand All @@ -183,6 +201,14 @@ u32 intel_panel_get_backlight(struct drm_device *dev)
val = I915_READ(BLC_PWM_CTL) & BACKLIGHT_DUTY_CYCLE_MASK;
if (IS_PINEVIEW(dev))
val >>= 1;

if (is_backlight_combination_mode(dev)){
u8 lbpc;

val &= ~1;
pci_read_config_byte(dev->pdev, PCI_LBPC, &lbpc);
val *= lbpc;
}
}

DRM_DEBUG_DRIVER("get backlight PWM = %d\n", val);
Expand All @@ -205,6 +231,16 @@ void intel_panel_set_backlight(struct drm_device *dev, u32 level)

if (HAS_PCH_SPLIT(dev))
return intel_pch_panel_set_backlight(dev, level);

if (is_backlight_combination_mode(dev)){
u32 max = intel_panel_get_max_backlight(dev);
u8 lbpc;

lbpc = level * 0xfe / max + 1;
level /= lbpc;
pci_write_config_byte(dev->pdev, PCI_LBPC, lbpc);
}

tmp = I915_READ(BLC_PWM_CTL);
if (IS_PINEVIEW(dev)) {
tmp &= ~(BACKLIGHT_DUTY_CYCLE_MASK - 1);
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -2392,6 +2392,9 @@ extern int netdev_notice(const struct net_device *dev, const char *format, ...)
extern int netdev_info(const struct net_device *dev, const char *format, ...)
__attribute__ ((format (printf, 2, 3)));

#define MODULE_ALIAS_NETDEV(device) \
MODULE_ALIAS("netdev-" device)

#if defined(DEBUG)
#define netdev_dbg(__dev, format, args...) \
netdev_printk(KERN_DEBUG, __dev, format, ##args)
Expand Down
14 changes: 9 additions & 5 deletions trunk/kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,12 @@ static void dequeue_rt_entity(struct sched_rt_entity *rt_se);

static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
{
int this_cpu = smp_processor_id();
struct task_struct *curr = rq_of_rt_rq(rt_rq)->curr;
struct sched_rt_entity *rt_se;

rt_se = rt_rq->tg->rt_se[this_cpu];
int cpu = cpu_of(rq_of_rt_rq(rt_rq));

rt_se = rt_rq->tg->rt_se[cpu];

if (rt_rq->rt_nr_running) {
if (rt_se && !on_rt_rq(rt_se))
Expand All @@ -226,10 +227,10 @@ static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)

static void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
{
int this_cpu = smp_processor_id();
struct sched_rt_entity *rt_se;
int cpu = cpu_of(rq_of_rt_rq(rt_rq));

rt_se = rt_rq->tg->rt_se[this_cpu];
rt_se = rt_rq->tg->rt_se[cpu];

if (rt_se && on_rt_rq(rt_se))
dequeue_rt_entity(rt_se);
Expand Down Expand Up @@ -565,8 +566,11 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun)
if (rt_rq->rt_time || rt_rq->rt_nr_running)
idle = 0;
raw_spin_unlock(&rt_rq->rt_runtime_lock);
} else if (rt_rq->rt_nr_running)
} else if (rt_rq->rt_nr_running) {
idle = 0;
if (!rt_rq_throttled(rt_rq))
enqueue = 1;
}

if (enqueue)
sched_rt_rq_enqueue(rt_rq);
Expand Down
12 changes: 10 additions & 2 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,13 +1114,21 @@ EXPORT_SYMBOL(netdev_bonding_change);
void dev_load(struct net *net, const char *name)
{
struct net_device *dev;
int no_module;

rcu_read_lock();
dev = dev_get_by_name_rcu(net, name);
rcu_read_unlock();

if (!dev && capable(CAP_NET_ADMIN))
request_module("%s", name);
no_module = !dev;
if (no_module && capable(CAP_NET_ADMIN))
no_module = request_module("netdev-%s", name);
if (no_module && capable(CAP_SYS_MODULE)) {
if (!request_module("%s", name))
pr_err("Loading kernel module for a network device "
"with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev-%s "
"instead\n", name);
}
}
EXPORT_SYMBOL(dev_load);

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -1765,4 +1765,4 @@ module_exit(ipgre_fini);
MODULE_LICENSE("GPL");
MODULE_ALIAS_RTNL_LINK("gre");
MODULE_ALIAS_RTNL_LINK("gretap");
MODULE_ALIAS("gre0");
MODULE_ALIAS_NETDEV("gre0");
2 changes: 1 addition & 1 deletion trunk/net/ipv4/ipip.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,4 +913,4 @@ static void __exit ipip_fini(void)
module_init(ipip_init);
module_exit(ipip_fini);
MODULE_LICENSE("GPL");
MODULE_ALIAS("tunl0");
MODULE_ALIAS_NETDEV("tunl0");
2 changes: 1 addition & 1 deletion trunk/net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1290,4 +1290,4 @@ static int __init sit_init(void)
module_init(sit_init);
module_exit(sit_cleanup);
MODULE_LICENSE("GPL");
MODULE_ALIAS("sit0");
MODULE_ALIAS_NETDEV("sit0");
11 changes: 8 additions & 3 deletions trunk/tools/perf/util/header.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,15 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir,
const char *name, bool is_kallsyms)
{
const size_t size = PATH_MAX;
char *realname = realpath(name, NULL),
*filename = malloc(size),
char *realname, *filename = malloc(size),
*linkname = malloc(size), *targetname;
int len, err = -1;

if (is_kallsyms)
realname = (char *)name;
else
realname = realpath(name, NULL);

if (realname == NULL || filename == NULL || linkname == NULL)
goto out_free;

Expand Down Expand Up @@ -306,7 +310,8 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir,
if (symlink(targetname, linkname) == 0)
err = 0;
out_free:
free(realname);
if (!is_kallsyms)
free(realname);
free(filename);
free(linkname);
return err;
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@ int dso__load_vmlinux(struct dso *self, struct map *map,
int err = -1, fd;
char symfs_vmlinux[PATH_MAX];

snprintf(symfs_vmlinux, sizeof(symfs_vmlinux), "%s/%s",
snprintf(symfs_vmlinux, sizeof(symfs_vmlinux), "%s%s",
symbol_conf.symfs, vmlinux);
fd = open(symfs_vmlinux, O_RDONLY);
if (fd < 0)
Expand Down

0 comments on commit 7a97d96

Please sign in to comment.