1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Merge ^/head r292936 through r292950.

This commit is contained in:
Dimitry Andric 2015-12-30 16:20:24 +00:00
commit 6a0fcfa92a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/clang380-import/; revision=292951
14 changed files with 201 additions and 172 deletions

View File

@ -1,23 +0,0 @@
This patch adds "CC" and "clang-CC" to the list of program name aliases which
invoke the C++ compiler.
Introduced here: http://svnweb.freebsd.org/changeset/base/257109
Index: tools/clang/tools/driver/driver.cpp
===================================================================
--- tools/clang/tools/driver/driver.cpp
+++ tools/clang/tools/driver/driver.cpp
@@ -213,11 +213,13 @@ static const DriverSuffix *FindDriverSuffix(String
{"clang", nullptr},
{"clang++", "--driver-mode=g++"},
{"clang-c++", "--driver-mode=g++"},
+ {"clang-CC", "--driver-mode=g++"},
{"clang-cc", nullptr},
{"clang-cpp", "--driver-mode=cpp"},
{"clang-g++", "--driver-mode=g++"},
{"clang-gcc", nullptr},
{"clang-cl", "--driver-mode=cl"},
+ {"CC", "--driver-mode=g++"},
{"cc", nullptr},
{"cpp", "--driver-mode=cpp"},
{"cl", "--driver-mode=cl"},

View File

@ -105,17 +105,11 @@ const DriverSuffix *FindDriverSuffix(StringRef ProgName) {
{"clang", nullptr},
{"clang++", "--driver-mode=g++"},
{"clang-c++", "--driver-mode=g++"},
#ifdef __FreeBSD__
{"clang-CC", "--driver-mode=g++"},
#endif
{"clang-cc", nullptr},
{"clang-cpp", "--driver-mode=cpp"},
{"clang-g++", "--driver-mode=g++"},
{"clang-gcc", nullptr},
{"clang-cl", "--driver-mode=cl"},
#ifdef __FreeBSD__
{"CC", "--driver-mode=g++"},
#endif
{"cc", nullptr},
{"cpp", "--driver-mode=cpp"},
{"cl", "--driver-mode=cl"},

View File

@ -76,7 +76,7 @@ main(int argc, char *argv[])
howto = RB_HALT;
} else
howto = 0;
lflag = nflag = qflag = 0;
lflag = nflag = qflag = Nflag = 0;
while ((ch = getopt(argc, argv, "dk:lNnpqr")) != -1)
switch(ch) {
case 'd':

View File

@ -698,7 +698,7 @@ enum mlx5e_link_mode {
MLX5E_56GBASE_R4 = 8,
MLX5E_10GBASE_CR = 12,
MLX5E_10GBASE_SR = 13,
MLX5E_10GBASE_ER = 14,
MLX5E_10GBASE_LR = 14,
MLX5E_40GBASE_SR4 = 15,
MLX5E_40GBASE_LR4 = 16,
MLX5E_100GBASE_CR4 = 20,
@ -787,5 +787,6 @@ void mlx5e_create_stats(struct sysctl_ctx_list *,
struct sysctl_oid_list *, const char *,
const char **, unsigned, u64 *);
void mlx5e_send_nop(struct mlx5e_sq *, u32, bool);
int mlx5e_refresh_channel_params(struct mlx5e_priv *);
#endif /* _MLX5_EN_H_ */

View File

@ -69,12 +69,49 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS)
} else {
error = 0;
}
/* check if device is gone */
if (priv->gone) {
error = ENXIO;
goto done;
}
/* import RX coal time */
if (priv->params_ethtool.rx_coalesce_usecs < 1)
priv->params_ethtool.rx_coalesce_usecs = 0;
else if (priv->params_ethtool.rx_coalesce_usecs >
MLX5E_FLD_MAX(cqc, cq_period)) {
priv->params_ethtool.rx_coalesce_usecs =
MLX5E_FLD_MAX(cqc, cq_period);
}
priv->params.rx_cq_moderation_usec = priv->params_ethtool.rx_coalesce_usecs;
/* import RX coal pkts */
if (priv->params_ethtool.rx_coalesce_pkts < 1)
priv->params_ethtool.rx_coalesce_pkts = 0;
else if (priv->params_ethtool.rx_coalesce_pkts >
MLX5E_FLD_MAX(cqc, cq_max_count)) {
priv->params_ethtool.rx_coalesce_pkts =
MLX5E_FLD_MAX(cqc, cq_max_count);
}
priv->params.rx_cq_moderation_pkts = priv->params_ethtool.rx_coalesce_pkts;
/* import TX coal time */
if (priv->params_ethtool.tx_coalesce_usecs < 1)
priv->params_ethtool.tx_coalesce_usecs = 0;
else if (priv->params_ethtool.tx_coalesce_usecs >
MLX5E_FLD_MAX(cqc, cq_period)) {
priv->params_ethtool.tx_coalesce_usecs =
MLX5E_FLD_MAX(cqc, cq_period);
}
priv->params.tx_cq_moderation_usec = priv->params_ethtool.tx_coalesce_usecs;
/* import TX coal pkts */
if (priv->params_ethtool.tx_coalesce_pkts < 1)
priv->params_ethtool.tx_coalesce_pkts = 0;
else if (priv->params_ethtool.tx_coalesce_pkts >
MLX5E_FLD_MAX(cqc, cq_max_count)) {
priv->params_ethtool.tx_coalesce_pkts = MLX5E_FLD_MAX(cqc, cq_max_count);
}
priv->params.tx_cq_moderation_pkts = priv->params_ethtool.tx_coalesce_pkts;
if (&priv->params_ethtool.arg[arg2] == &priv->params_ethtool.rx_pauseframe_control ||
&priv->params_ethtool.arg[arg2] == &priv->params_ethtool.tx_pauseframe_control) {
@ -92,9 +129,19 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS)
}
was_opened = test_bit(MLX5E_STATE_OPENED, &priv->state);
if (was_opened)
mlx5e_close_locked(priv->ifp);
if (was_opened) {
u64 *xarg = priv->params_ethtool.arg + arg2;
if (xarg == &priv->params_ethtool.tx_coalesce_pkts ||
xarg == &priv->params_ethtool.rx_coalesce_pkts ||
xarg == &priv->params_ethtool.tx_coalesce_usecs ||
xarg == &priv->params_ethtool.rx_coalesce_usecs) {
/* avoid downing and upping the network interface */
error = mlx5e_refresh_channel_params(priv);
goto done;
}
mlx5e_close_locked(priv->ifp);
}
/* import TX queue size */
if (priv->params_ethtool.tx_queue_size <
(1 << MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE)) {
@ -145,45 +192,6 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS)
priv->params_ethtool.tx_coalesce_mode = 1;
priv->params.tx_cq_moderation_mode = priv->params_ethtool.tx_coalesce_mode;
/* import RX coal time */
if (priv->params_ethtool.rx_coalesce_usecs < 1)
priv->params_ethtool.rx_coalesce_usecs = 0;
else if (priv->params_ethtool.rx_coalesce_usecs >
MLX5E_FLD_MAX(cqc, cq_period)) {
priv->params_ethtool.rx_coalesce_usecs =
MLX5E_FLD_MAX(cqc, cq_period);
}
priv->params.rx_cq_moderation_usec = priv->params_ethtool.rx_coalesce_usecs;
/* import RX coal pkts */
if (priv->params_ethtool.rx_coalesce_pkts < 1)
priv->params_ethtool.rx_coalesce_pkts = 0;
else if (priv->params_ethtool.rx_coalesce_pkts >
MLX5E_FLD_MAX(cqc, cq_max_count)) {
priv->params_ethtool.rx_coalesce_pkts =
MLX5E_FLD_MAX(cqc, cq_max_count);
}
priv->params.rx_cq_moderation_pkts = priv->params_ethtool.rx_coalesce_pkts;
/* import TX coal time */
if (priv->params_ethtool.tx_coalesce_usecs < 1)
priv->params_ethtool.tx_coalesce_usecs = 0;
else if (priv->params_ethtool.tx_coalesce_usecs >
MLX5E_FLD_MAX(cqc, cq_period)) {
priv->params_ethtool.tx_coalesce_usecs =
MLX5E_FLD_MAX(cqc, cq_period);
}
priv->params.tx_cq_moderation_usec = priv->params_ethtool.tx_coalesce_usecs;
/* import TX coal pkts */
if (priv->params_ethtool.tx_coalesce_pkts < 1)
priv->params_ethtool.tx_coalesce_pkts = 0;
else if (priv->params_ethtool.tx_coalesce_pkts >
MLX5E_FLD_MAX(cqc, cq_max_count)) {
priv->params_ethtool.tx_coalesce_pkts = MLX5E_FLD_MAX(cqc, cq_max_count);
}
priv->params.tx_cq_moderation_pkts = priv->params_ethtool.tx_coalesce_pkts;
/* we always agree to turn off HW LRO - but not always to turn on */
if (priv->params_ethtool.hw_lro) {
if (priv->params_ethtool.hw_lro != 1) {

View File

@ -106,8 +106,8 @@ static const struct {
.subtype = IFM_10G_SR,
.baudrate = IF_Gbps(10ULL),
},
[MLX5E_10GBASE_ER] = {
.subtype = IFM_10G_ER,
[MLX5E_10GBASE_LR] = {
.subtype = IFM_10G_LR,
.baudrate = IF_Gbps(10ULL),
},
[MLX5E_40GBASE_SR4] = {
@ -1711,6 +1711,62 @@ mlx5e_close_channels(struct mlx5e_priv *priv)
free(ptr, M_MLX5EN);
}
static int
mlx5e_refresh_sq_params(struct mlx5e_priv *priv, struct mlx5e_sq *sq)
{
return (mlx5_core_modify_cq_moderation(priv->mdev, &sq->cq.mcq,
priv->params.tx_cq_moderation_usec,
priv->params.tx_cq_moderation_pkts));
}
static int
mlx5e_refresh_rq_params(struct mlx5e_priv *priv, struct mlx5e_rq *rq)
{
return (mlx5_core_modify_cq_moderation(priv->mdev, &rq->cq.mcq,
priv->params.rx_cq_moderation_usec,
priv->params.rx_cq_moderation_pkts));
}
static int
mlx5e_refresh_channel_params_sub(struct mlx5e_priv *priv, struct mlx5e_channel *c)
{
int err;
int i;
if (c == NULL)
return (EINVAL);
err = mlx5e_refresh_rq_params(priv, &c->rq);
if (err)
goto done;
for (i = 0; i != c->num_tc; i++) {
err = mlx5e_refresh_sq_params(priv, &c->sq[i]);
if (err)
goto done;
}
done:
return (err);
}
int
mlx5e_refresh_channel_params(struct mlx5e_priv *priv)
{
int i;
if (priv->channel == NULL)
return (EINVAL);
for (i = 0; i < priv->params.num_channels; i++) {
int err;
err = mlx5e_refresh_channel_params_sub(priv, priv->channel[i]);
if (err)
return (err);
}
return (0);
}
static int
mlx5e_open_tis(struct mlx5e_priv *priv, int tc)
{
@ -2298,6 +2354,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
int size_read = 0;
int module_num;
int max_mtu;
uint8_t read_addr;
priv = ifp->if_softc;
@ -2484,11 +2541,21 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
/*
* Note that we ignore i2c.addr here. The driver hardcodes
* the address to 0x50, while standard expects it to be 0xA0.
* Currently 0XA0 and 0xA2 are the only addresses permitted.
* The internal conversion is as follows:
*/
if (i2c.dev_addr == 0xA0)
read_addr = MLX5E_I2C_ADDR_LOW;
else if (i2c.dev_addr == 0xA2)
read_addr = MLX5E_I2C_ADDR_HIGH;
else {
if_printf(ifp, "Query eeprom failed, "
"Invalid Address: %X\n", i2c.dev_addr);
error = EINVAL;
goto err_i2c;
}
error = mlx5_query_eeprom(priv->mdev,
MLX5E_I2C_ADDR_LOW, MLX5E_EEPROM_LOW_PAGE,
read_addr, MLX5E_EEPROM_LOW_PAGE,
(uint32_t)i2c.offset, (uint32_t)i2c.len, module_num,
(uint32_t *)i2c.data, &size_read);
if (error) {
@ -2499,7 +2566,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
if (i2c.len > MLX5_EEPROM_MAX_BYTES) {
error = mlx5_query_eeprom(priv->mdev,
MLX5E_I2C_ADDR_LOW, MLX5E_EEPROM_LOW_PAGE,
read_addr, MLX5E_EEPROM_LOW_PAGE,
(uint32_t)(i2c.offset + size_read),
(uint32_t)(i2c.len - size_read), module_num,
(uint32_t *)(i2c.data + size_read), &size_read);

View File

@ -55,9 +55,6 @@ __FBSDID("$FreeBSD$");
#include <sys/time.h>
#include <machine/cpu.h>
#ifdef __sparc64__
#include <machine/ktr.h>
#endif
#ifdef DDB
#include <ddb/ddb.h>

View File

@ -34,14 +34,10 @@
#include <sys/ktr.h>
#ifndef LOCORE
#define KTR_CPU PCPU_GET(mid)
#else
#ifdef LOCORE
/*
* XXX could really use another register...
* XXX could really use another register ...
*/
#define ATR(desc, r1, r2, r3, l1, l2) \
.sect .rodata ; \
@ -70,9 +66,6 @@ l2: add r2, 1, r3 ; \
SET(l1 ## b, r3, r2) ; \
stx r2, [r1 + KTR_DESC]
/*
* NB: this clobbers %y.
*/
#define CATR(mask, desc, r1, r2, r3, l1, l2, l3) \
setx mask, r3, r1 ; \
setx ktr_mask, r3, r2 ; \
@ -82,16 +75,14 @@ l2: add r2, 1, r3 ; \
nop ; \
lduw [PCPU(CPUID)], r2 ; \
mov _NCPUBITS, r3 ; \
mov %g0, %y ; \
udiv r2, r3, r2 ; \
udivx r2, r3, r2 ; \
srl r2, 0, r2 ; \
sllx r2, PTR_SHIFT, r2 ; \
SET(ktr_cpumask, r3, r1) ; \
ldx [r1 + r2], r1 ; \
lduw [PCPU(CPUID)], r2 ; \
mov _NCPUBITS, r3 ; \
mov %g0, %y ; \
udiv r2, r3, r2 ; \
udivx r2, r3, r2 ; \
srl r2, 0, r2 ; \
smul r2, r3, r3 ; \
lduw [PCPU(CPUID)], r2 ; \

View File

@ -2628,9 +2628,9 @@ ENTRY(tl0_ret)
andn %l4, TSTATE_CWP_MASK, %g2
/*
* Save %y in an alternate global.
* Restore %y. Could also be below if we had more alternate globals.
*/
mov %l5, %g4
wr %l5, 0, %y
/*
* Setup %wstate for return. We need to restore the user window state
@ -2675,8 +2675,8 @@ tl0_ret_fill:
* Fixup %tstate so the saved %cwp points to the current window and
* restore it.
*/
rdpr %cwp, %g1
wrpr %g2, %g1, %tstate
rdpr %cwp, %g4
wrpr %g2, %g4, %tstate
/*
* Restore the user window state. The transition bit was set above
@ -2686,24 +2686,19 @@ tl0_ret_fill:
#if KTR_COMPILE & KTR_TRAP
CATR(KTR_TRAP, "tl0_ret: td=%#lx pil=%#lx pc=%#lx npc=%#lx sp=%#lx"
, %g1, %g2, %g3, 7, 8, 9)
ldx [PCPU(CURTHREAD)], %g2
stx %g2, [%g1 + KTR_PARM1]
rdpr %pil, %g2
stx %g2, [%g1 + KTR_PARM2]
rdpr %tpc, %g2
stx %g2, [%g1 + KTR_PARM3]
rdpr %tnpc, %g2
stx %g2, [%g1 + KTR_PARM4]
stx %sp, [%g1 + KTR_PARM5]
, %g2, %g3, %g4, 7, 8, 9)
ldx [PCPU(CURTHREAD)], %g3
stx %g3, [%g2 + KTR_PARM1]
rdpr %pil, %g3
stx %g3, [%g2 + KTR_PARM2]
rdpr %tpc, %g3
stx %g3, [%g2 + KTR_PARM3]
rdpr %tnpc, %g3
stx %g3, [%g2 + KTR_PARM4]
stx %sp, [%g2 + KTR_PARM5]
9:
#endif
/*
* Restore %y. Note that the CATR above clobbered it.
*/
wr %g4, 0, %y
/*
* Return to usermode.
*/
@ -2718,11 +2713,6 @@ tl0_ret_fill_end:
stx %l6, [%l0 + KTR_PARM2]
stx %sp, [%l0 + KTR_PARM3]
9:
/*
* Restore %y clobbered by the CATR. This was saved in %l5 above.
*/
wr %l5, 0, %y
#endif
/*
@ -2890,36 +2880,34 @@ ENTRY(tl1_ret)
andn %l0, TSTATE_CWP_MASK, %g1
mov %l1, %g2
mov %l2, %g3
mov %l4, %g4
wrpr %l3, 0, %pil
wr %l4, 0, %y
restore
wrpr %g0, 2, %tl
rdpr %cwp, %g4
wrpr %g1, %g4, %tstate
wrpr %g2, 0, %tpc
wrpr %g3, 0, %tnpc
rdpr %cwp, %g2
wrpr %g1, %g2, %tstate
#if KTR_COMPILE & KTR_TRAP
CATR(KTR_TRAP, "tl1_ret: td=%#lx pil=%#lx ts=%#lx pc=%#lx sp=%#lx"
, %g1, %g2, %g3, 7, 8, 9)
ldx [PCPU(CURTHREAD)], %g2
stx %g2, [%g1 + KTR_PARM1]
rdpr %pil, %g2
stx %g2, [%g1 + KTR_PARM2]
rdpr %tstate, %g2
stx %g2, [%g1 + KTR_PARM3]
rdpr %tpc, %g2
stx %g2, [%g1 + KTR_PARM4]
stx %sp, [%g1 + KTR_PARM5]
, %g2, %g3, %g4, 7, 8, 9)
ldx [PCPU(CURTHREAD)], %g3
stx %g3, [%g2 + KTR_PARM1]
rdpr %pil, %g3
stx %g3, [%g2 + KTR_PARM2]
rdpr %tstate, %g3
stx %g3, [%g2 + KTR_PARM3]
rdpr %tpc, %g3
stx %g3, [%g2 + KTR_PARM4]
stx %sp, [%g2 + KTR_PARM5]
9:
#endif
wr %g4, 0, %y
retry
END(tl1_ret)
@ -3020,35 +3008,33 @@ ENTRY(tl1_intr)
andn %l0, TSTATE_CWP_MASK, %g1
mov %l1, %g2
mov %l2, %g3
mov %l4, %g4
wrpr %l3, 0, %pil
wr %l4, 0, %y
restore
wrpr %g0, 2, %tl
rdpr %cwp, %g4
wrpr %g1, %g4, %tstate
wrpr %g2, 0, %tpc
wrpr %g3, 0, %tnpc
rdpr %cwp, %g2
wrpr %g1, %g2, %tstate
#if KTR_COMPILE & KTR_INTR
CATR(KTR_INTR, "tl1_intr: td=%#x pil=%#lx ts=%#lx pc=%#lx sp=%#lx"
, %g1, %g2, %g3, 7, 8, 9)
ldx [PCPU(CURTHREAD)], %g2
stx %g2, [%g1 + KTR_PARM1]
rdpr %pil, %g2
stx %g2, [%g1 + KTR_PARM2]
rdpr %tstate, %g2
stx %g2, [%g1 + KTR_PARM3]
rdpr %tpc, %g2
stx %g2, [%g1 + KTR_PARM4]
stx %sp, [%g1 + KTR_PARM5]
, %g2, %g3, %g4, 7, 8, 9)
ldx [PCPU(CURTHREAD)], %g3
stx %g3, [%g2 + KTR_PARM1]
rdpr %pil, %g3
stx %g3, [%g2 + KTR_PARM2]
rdpr %tstate, %g3
stx %g3, [%g2 + KTR_PARM3]
rdpr %tpc, %g3
stx %g3, [%g2 + KTR_PARM4]
stx %sp, [%g2 + KTR_PARM5]
9:
#endif
wr %g4, 0, %y
retry
END(tl1_intr)

View File

@ -38,12 +38,10 @@ __FBSDID("$FreeBSD$");
.register %g2, #ignore
.register %g3, #ignore
#define IPI_DONE(r1, r2, r3, r4, r5, r6) \
rd %y, r6 ; \
#define IPI_DONE(r1, r2, r3, r4, r5) \
lduw [PCPU(CPUID)], r2 ; \
mov _NCPUBITS, r3 ; \
mov %g0, %y ; \
udiv r2, r3, r4 ; \
udivx r2, r3, r4 ; \
srl r4, 0, r5 ; \
sllx r5, PTR_SHIFT, r5 ; \
add r1, r5, r1 ; \
@ -51,7 +49,6 @@ __FBSDID("$FreeBSD$");
sub r2, r3, r3 ; \
mov 1, r4 ; \
sllx r4, r3, r4 ; \
wr r6, %y ; \
ATOMIC_CLEAR_LONG(r1, r2, r3, r4)
/*
@ -89,7 +86,7 @@ ENTRY(tl_ipi_spitfire_dcache_page_inval)
2: brgz,pt %g2, 1b
sub %g2, %g4, %g2
IPI_DONE(%g5, %g1, %g2, %g3, %g4, %g6)
IPI_DONE(%g5, %g1, %g2, %g3, %g4)
retry
END(tl_ipi_spitfire_dcache_page_inval)
@ -129,7 +126,7 @@ ENTRY(tl_ipi_spitfire_icache_page_inval)
2: brgz,pt %g2, 1b
sub %g2, %g4, %g2
IPI_DONE(%g5, %g1, %g2, %g3, %g4, %g6)
IPI_DONE(%g5, %g1, %g2, %g3, %g4)
retry
END(tl_ipi_spitfire_icache_page_inval)
@ -160,7 +157,7 @@ ENTRY(tl_ipi_cheetah_dcache_page_inval)
blt,a,pt %xcc, 1b
nop
IPI_DONE(%g5, %g1, %g2, %g3, %g4, %g6)
IPI_DONE(%g5, %g1, %g2, %g3, %g4)
retry
END(tl_ipi_cheetah_dcache_page_inval)
@ -216,7 +213,7 @@ ENTRY(tl_ipi_tlb_page_demap)
stxa %g0, [%g2] ASI_IMMU_DEMAP
flush %g3
IPI_DONE(%g5, %g1, %g2, %g3, %g4, %g6)
IPI_DONE(%g5, %g1, %g2, %g3, %g4)
retry
END(tl_ipi_tlb_page_demap)
@ -259,7 +256,7 @@ ENTRY(tl_ipi_tlb_range_demap)
blt,a,pt %xcc, 1b
sethi %hi(KERNBASE), %g6
IPI_DONE(%g5, %g1, %g2, %g3, %g4, %g6)
IPI_DONE(%g5, %g1, %g2, %g3, %g4)
retry
END(tl_ipi_tlb_range_demap)
@ -283,7 +280,7 @@ ENTRY(tl_ipi_tlb_context_demap)
stxa %g0, [%g1] ASI_IMMU_DEMAP
flush %g3
IPI_DONE(%g5, %g1, %g2, %g3, %g4, %g6)
IPI_DONE(%g5, %g1, %g2, %g3, %g4)
retry
END(tl_ipi_tlb_context_demap)
@ -295,7 +292,7 @@ ENTRY(tl_ipi_stick_rd)
rd %asr24, %g2
stx %g2, [%g1]
IPI_DONE(%g5, %g1, %g2, %g3, %g4, %g6)
IPI_DONE(%g5, %g1, %g2, %g3, %g4)
retry
END(tl_ipi_stick_rd)
@ -307,6 +304,6 @@ ENTRY(tl_ipi_tick_rd)
rd %tick, %g2
stx %g2, [%g1]
IPI_DONE(%g5, %g1, %g2, %g3, %g4, %g6)
IPI_DONE(%g5, %g1, %g2, %g3, %g4)
retry
END(tl_ipi_tick_rd)

View File

@ -346,14 +346,18 @@ pmap_bootstrap(u_int cpu_impl)
if (OF_getprop(pmem, "available", mra, sz) == -1)
OF_panic("%s: getprop /memory/available", __func__);
sz /= sizeof(*mra);
CTR0(KTR_PMAP, "pmap_bootstrap: physical memory");
#ifdef DIAGNOSTIC
OF_printf("pmap_bootstrap: physical memory\n");
#endif
qsort(mra, sz, sizeof (*mra), mr_cmp);
physsz = 0;
getenv_quad("hw.physmem", &physmem);
physmem = btoc(physmem);
for (i = 0, j = 0; i < sz; i++, j += 2) {
CTR2(KTR_PMAP, "start=%#lx size=%#lx", mra[i].mr_start,
#ifdef DIAGNOSTIC
OF_printf("start=%#lx size=%#lx\n", mra[i].mr_start,
mra[i].mr_size);
#endif
if (physmem != 0 && btoc(physsz + mra[i].mr_size) >= physmem) {
if (btoc(physsz) < physmem) {
phys_avail[j] = mra[i].mr_start;
@ -617,13 +621,16 @@ pmap_bootstrap(u_int cpu_impl)
__func__);
sz /= sizeof(*translations);
translations_size = sz;
CTR0(KTR_PMAP, "pmap_bootstrap: translations");
#ifdef DIAGNOSTIC
OF_printf("pmap_bootstrap: translations\n");
#endif
qsort(translations, sz, sizeof (*translations), om_cmp);
for (i = 0; i < sz; i++) {
CTR3(KTR_PMAP,
"translation: start=%#lx size=%#lx tte=%#lx",
#ifdef DIAGNOSTIC
OF_printf("translation: start=%#lx size=%#lx tte=%#lx\n",
translations[i].om_start, translations[i].om_size,
translations[i].om_tte);
#endif
if ((translations[i].om_tte & TD_V) == 0)
continue;
if (translations[i].om_start < VM_MIN_PROM_ADDRESS ||

View File

@ -173,8 +173,7 @@ ENTRY(cpu_switch)
* active on this CPU.
*/
mov _NCPUBITS, %l5
mov %g0, %y
udiv %l3, %l5, %l6
udivx %l3, %l5, %l6
srl %l6, 0, %l4
sllx %l4, PTR_SHIFT, %l4
add %l4, PM_ACTIVE, %l4
@ -242,8 +241,7 @@ ENTRY(cpu_switch)
* Mark the pmap as active on this CPU.
*/
mov _NCPUBITS, %l5
mov %g0, %y
udiv %l3, %l5, %l6
udivx %l3, %l5, %l6
srl %l6, 0, %l4
sllx %l4, PTR_SHIFT, %l4
add %l4, PM_ACTIVE, %l4

4
usr.bin/clang/clang/CC.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
# $FreeBSD$
# This file is in the public domain.
exec /usr/bin/c++ "$@"

View File

@ -18,9 +18,11 @@ LINKS= ${BINDIR}/clang ${BINDIR}/clang++ \
MLINKS= clang.1 clang++.1 \
clang.1 clang-cpp.1
.if ${MK_CLANG_IS_CC} != "no"
SCRIPTS=CC.sh
SCRIPTSNAME=CC
LINKS+= ${BINDIR}/clang ${BINDIR}/cc \
${BINDIR}/clang ${BINDIR}/c++ \
${BINDIR}/clang ${BINDIR}/CC \
${BINDIR}/clang ${BINDIR}/cpp
MLINKS+= clang.1 cc.1 \
clang.1 c++.1 \